skip to main content
research-article

Building embedded systems with embedded DSLs

Published:19 August 2014Publication History
Skip Abstract Section

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.

References

  1. APM Project. APM multiplatform autopilot suite. Website http://ardupilot.com/. Retrieved Feb. 2014.Google ScholarGoogle Scholar
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle Scholar
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. eChronos. eChronos. Website http://ssrg.nicta.com.au/projects/TS/echronos. Retrieved Feb. 2014.Google ScholarGoogle Scholar
  7. FreeRTOS. FreeRTOS.Website http://freertos.org/. Retrieved Feb. 2014.Google ScholarGoogle Scholar
  8. 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 ScholarGoogle Scholar
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. J. Launchbury and S. L. Peyton Jones. Lazy functional state threads. pages 24--35, June 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. X. Leroy. Formal verification of a realistic compiler. Communications of the ACM, 52(7):107--115, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. Pixhawk. PX4 autopilot project. Website http://pixhawk.org/. Retrieved Feb. 2014.Google ScholarGoogle Scholar
  16. Rust. Rust. Website http://www.rust-lang.org/. Retrieved Feb. 2014.Google ScholarGoogle Scholar
  17. SAE-AS5506. Architecture Analysis and Design Language. SAE, Nov 2004.Google ScholarGoogle Scholar
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. T. Sheard and S. P. Jones. Template meta-programming for haskell. SIGPLAN Notices, 37(12):60--75, Dec. 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Building embedded systems with embedded DSLs

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 49, Issue 9
      ICFP '14
      September 2014
      361 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2692915
      Issue’s Table of Contents
      • cover image ACM Conferences
        ICFP '14: Proceedings of the 19th ACM SIGPLAN international conference on Functional programming
        August 2014
        390 pages
        ISBN:9781450328739
        DOI:10.1145/2628136

      Copyright © 2014 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 19 August 2014

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader