Abstract
We report on our experiences in synthesizing a fully-featured autopilot from embedded domain-specific languages (EDSLs) hosted in Haskell. The autopilot is approximately 50k lines of C code generated from 10k lines of EDSL code and includes control laws, mode logic, encrypted communications system, and device drivers. The autopilot was built in less than two engineer years. This is the story of how EDSLs provided the productivity and safety gains to do large-scale low-level embedded programming and lessons we learned in doing so.
- APM Project. APM multiplatform autopilot suite. Website http://ardupilot.com/. Retrieved Feb. 2014.Google Scholar
- E. Axelsson, K. Claessen, M. Sheeran, J. Svenningsson, D. Engdal, and A. Persson. The design and implementation of Feldspar - an embedded language for digital signal processing. In Implementation and Application of Functional Languages, volume 6647 of LNCS, pages 121--136. Springer, 2011. Google ScholarDigital Library
- E. Clarke, D. Kroening, and F. Lerda. A tool for checking ANSI-C programs. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), LNCS, pages 168--176. Springer, 2004.Google Scholar
- I. S. Diatchki and M. P. Jones. Strongly typed memory areas programming systems-level data structures in a functional language. In Proceedings of the ACM SIGPLAN Workshop on Haskell, pages 72--83. ACM, 2006. Google ScholarDigital Library
- I. S. Diatchki, M. P. Jones, and R. Leslie. High-level views on low-level representations. In Intl. Conference on Functional Programming, pages 168--179. ACM, 2005. Google ScholarDigital Library
- eChronos. eChronos. Website http://ssrg.nicta.com.au/projects/TS/echronos. Retrieved Feb. 2014.Google Scholar
- FreeRTOS. FreeRTOS.Website http://freertos.org/. Retrieved Feb. 2014.Google Scholar
- T. Hawkins. Controlling hybrid vehicles with Haskell. Presentation. Commercial Users of Functional Programming (CUFP), 2008. Available at http://cufp.galois.com/2008/schedule.html.Google Scholar
- T. Jim, J. G. Morrisett, D. Grossman, M. W. Hicks, J. Cheney, and Y. Wang. Cyclone: A safe dialect of C. In USENIX Conference, Berkeley, CA, USA, 2002. USENIX. Google ScholarDigital Library
- J. Launchbury and S. L. Peyton Jones. Lazy functional state threads. pages 24--35, June 1994. Google ScholarDigital Library
- X. Leroy. Formal verification of a realistic compiler. Communications of the ACM, 52(7):107--115, 2009. Google ScholarDigital Library
- S. Lindley and C. McBride. Hasochism: The pleasure and pain of dependently typed haskell programming. In Symposium on Haskell, pages 81--92. ACM, 2013. Google ScholarDigital Library
- L. Pike, A. Goodloe, R. Morisset, and S. Niller. Copilot: A hard realtime runtime monitor. In Runtime Verification (RV), volume 6418, pages 345--359. Springer, 2010. Google ScholarDigital Library
- L. Pike, N. Wegmann, S. Niller, and A. Goodloe. Experience report: a do-it-yourself high-assurance compiler. In Proceedings of the Intl. Conference on Functional Programming (ICFP). ACM, September 2012. Google ScholarDigital Library
- Pixhawk. PX4 autopilot project. Website http://pixhawk.org/. Retrieved Feb. 2014.Google Scholar
- Rust. Rust. Website http://www.rust-lang.org/. Retrieved Feb. 2014.Google Scholar
- SAE-AS5506. Architecture Analysis and Design Language. SAE, Nov 2004.Google Scholar
- T. Schrijvers, S. Peyton Jones, M. Chakravarty, and M. Sulzmann. Type checking with open type functions. Intl. Conference on Functional Programming, pages 51--62, Sept. 2008. ISSN 0362-1340. Google ScholarDigital Library
- T. Sheard and S. P. Jones. Template meta-programming for haskell. SIGPLAN Notices, 37(12):60--75, Dec. 2002. Google ScholarDigital Library
- B. A. Yorgey, S.Weirich, J. Cretin, S. Peyton Jones, D. Vytiniotis, and J. P. Magalhães. Giving haskell a promotion. In Workshop on Types in Language Design and Implementation, pages 53--66. ACM, 2012. Google ScholarDigital Library
Index Terms
- Building embedded systems with embedded DSLs
Recommendations
Building embedded systems with embedded DSLs
ICFP '14: Proceedings of the 19th ACM SIGPLAN international conference on Functional programmingWe report on our experiences in synthesizing a fully-featured autopilot from embedded domain-specific languages (EDSLs) hosted in Haskell. The autopilot is approximately 50k lines of C code generated from 10k lines of EDSL code and includes control laws,...
LibDSL: a library for developing embedded domain specific languages in d via template metaprogramming
GPCE '14This paper presents a library called LibDSL that helps the implementer of an embedded domain specific language (EDSL) effectively develop it in D language. The LibDSL library accepts as input some kinds of ``specifications'' of the EDSL that the ...
LibDSL: a library for developing embedded domain specific languages in d via template metaprogramming
GPCE 2014: Proceedings of the 2014 International Conference on Generative Programming: Concepts and ExperiencesThis paper presents a library called LibDSL that helps the implementer of an embedded domain specific language (EDSL) effectively develop it in D language. The LibDSL library accepts as input some kinds of ``specifications'' of the EDSL that the ...
Comments