Abstract
Embedded domain-specific languages (EDSLs) are an approach for quickly building new languages while maintaining the advantages of a rich metalanguage. We argue in this experience report that the "EDSL approach" can surprisingly ease the task of building a high-assurance compiler. We do not strive to build a fully formally-verified tool-chain, but take a "do-it-yourself" approach to increase our confidence in compiler-correctness without too much effort. Copilot is an EDSL developed by Galois, Inc. and the National Institute of Aerospace under contract to NASA for the purpose of runtime monitoring of flight-critical avionics. We report our experience in using type-checking, QuickCheck, and model-checking "off-the-shelf" to quickly increase confidence in our EDSL tool-chain.
- 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 Scholar
Digital Library
- A. I. Baars and S. D. Swierstra. Typing dynamic typing. In Intl. Conference on Functional Programming (ICFP), pages 157--166. ACM, September 2002. Google Scholar
Digital Library
- R. S. Boyer and J. S. Moore. MJRTY: A fast majority vote algorithm. In Automated Reasoning: Essays in Honor of Woody Bledsoe, pages 105--118, 1991.Google Scholar
Cross Ref
- P. Caspi, D. Pialiud, N. Halbwachs, and J. Plaice. LUSTRE: a declarative language for programming synchronous systems. In 14th Symposium on Principles of Programming Languages, pages 178--188, 1987. Google Scholar
Digital Library
- K. Claessen and J. Hughes. QuickCheck: A lightweight tool for random testing of Haskell programs. In ACM SIGPLAN Notices, pages 268--279. ACM, 2000. Google Scholar
Digital 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
- P. E. Dagand, A. Baumann, and T. Roscoe. Filet-o-Fish: practical and dependable domain-specific languages for OS development. In Proceedings of the Fifth Workshop on Programming Languages and Operating Systems (PLOS '09), pages 1--5. ACM, 2009. Google Scholar
Digital Library
- B. Dutertre and L. D. Moura. The Yices SMT solver. Technical report, SRI, 2006.Google Scholar
- J. Gao, M. Heimdahl, and E. Van Wyk. Flexible and extensible notations for modeling languages. In Fundamental Approaches to Software Engineering (FASE), volume 4422 of LNCS, pages 102--116. Springer Verlag, March 2007. Google Scholar
Digital Library
- A. Gill. Type-safe observable sharing in Haskell. In Proceedings of the 2009 ACM SIGPLAN Haskell Symposium, September 2009. Google Scholar
Digital Library
- A. Goodloe and L. Pike. Monitoring distributed real-time systems: A survey and future directions. Technical Report NASA/CR-2010-216724, NASA Langley Research Center, July 2010.Google Scholar
- N. Halbwachs and P. Raymond. Validation of synchronous reactive systems: from formal verification to automatic testing. In ASIAN'99, Asian Computing Science Conference. LNCS 1742, Springer, December 1999. Google Scholar
Digital Library
- 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. Kahsai, Y. Ge, and C. Tinelli. Instantiation-based invariant discovery. In 3rd NASA Formal Methods Symposium, volume 6617 of LNCS, pages 192--207. Springer, 2011. Google Scholar
Digital Library
- D. Leijen and E. Meijer. Domain specific embedded compilers. In Domain-Specific Languages Conference. USENIX, 1999. Google Scholar
Digital Library
- X. Leroy. Formal verification of a realistic compiler. Communications of the ACM, 52: 107--115, July 2009. Google Scholar
Digital Library
- J. S. Moore, editor. Special Issue on System Verification: Journal of Automated Reasoning, volume 5, 1989. Google Scholar
Digital Library
- B. Pagano, O. Andrieu, T. Moniot, B. Canou, E. Chailloux, P. Wang, P. Manoury, and J.-L. Colao. Experience report: using Objective Caml to develop safety-critical embedded tools in a certification framework. In G. Hutton and A. P. Tolmach, editors, International Conference on Functional Programming (ICFP), pages 215--220. ACM, 2009. Google Scholar
Digital Library
- L. Pike, M. Shields, and J. Matthews. A verifying core for a cryptographic language compiler. In Proceedings of the 6th Intl. Workshop on the ACL2 Theorem Prover and its Applications, pages 1--10. ACM, 2006. Google Scholar
Digital Library
- L. Pike, S. Niller, and N. Wegmann. Runtime verification for ultra-critical systems. In Proceedings of the 2nd Intl. Conference on Runtime Verification, LNCS. Springer, September 2011. Google Scholar
Digital Library
- L. Sassaman, M. L. Patterson, S. Bratus, and A. Shubina. The Halting problems of network stack insecurity. ;login: The USENIX Magazine, 36 (6), December 2011.Google Scholar
- T. Schrijvers, S. Peyton Jones, M. Sulzmann, and D. Vytiniotis. Complete and decidable type inference for GADTs. In International Conference on Functional Programming (ICFP), ICFP '09, pages 341--352. ACM, 2009. Google Scholar
Digital Library
- D. Terei, S. Marlow, S. P. Jones, and D. Mazières. Safe haskell. In Proceedings of the Haskell Symposium, 2012. Google Scholar
Digital Library
- X. Yang, Y. Chen, E. Eide, and J. Regehr. Finding and understanding bugs in C compilers. In Programming Language Design and Implementation (PLDI), pages 283--294. ACM, 2011. Google Scholar
Digital Library
Index Terms
Experience report: a do-it-yourself high-assurance compiler
Recommendations
Experience report: a do-it-yourself high-assurance compiler
ICFP '12: Proceedings of the 17th ACM SIGPLAN international conference on Functional programmingEmbedded domain-specific languages (EDSLs) are an approach for quickly building new languages while maintaining the advantages of a rich metalanguage. We argue in this experience report that the "EDSL approach" can surprisingly ease the task of building ...
Modular language implementation in Rascal - experience report
All software evolves, and programming languages and programming language tools are no exception. And just like in ordinary software construction, modular implementations can help ease the process of changing a language implementation and its dependent ...
Experience report: using hackage to inform language design
HASKELL '10Hackage, an online repository of Haskell applications and libraries, provides a hub for programmers to both release code to and use code from the larger Haskell community. We suggest that Hackage can also serve as a valuable resource for language ...







Comments