ABSTRACT
The compilation of synchronous block diagrams into sequential imperative code has been addressed in the early eighties and can now be considered as folklore. However, separate, or modular, code generation, though largely used in existing compilers and particularly in industrial ones, has never been precisely described or entirely formalized. Such a formalization is now fundamental in the long-term goal to develop a mathematically certified compiler for a synchronous language as well as in simplifying existing implementations.
This article presents in full detail the modular compilation of synchronous block diagrams into sequential code. We consider a first-order functional language reminiscent of LUSTRE, which it extends with a general n-ary merge operator, a reset construct, and a richer notion of clocks. The clocks are used to express activation of computations in the program and are specifically taken into account during the compilation process to produce efficient imperative code. We introduce a generic machine-based intermediate language to represent transition functions, and we present a concise clock-directed translation from the source to this intermediate language. We address the target code generation phase by describing a translation from the intermediate language to JAVA and C.
- T. Amagbegnon, L. Besnard, and P. Le Guernic. Implementation of the data-flow synchronous language signal. In Programming Languages Design and Implementation (PLDI), pages 163--173. ACM, 1995. Google ScholarDigital Library
- A. Benveniste, P. Caspi, S.A. Edwards, N. Halbwachs, P. Le Guernic, and R. de Simone. The synchronous languages 12 years later. Proceedings of the IEEE, 91(1), January 2003.Google ScholarCross Ref
- Sandrine Blazy, Zaynah Dargaye, and Xavier Leroy. Formal verification of a C compiler front-end. In FM 2006: Int. Symp. on Formal Methods, volume 4085 of Lecture Notes in Computer Science, pages 460--475. Springer-Verlag, 2006. Google ScholarDigital Library
- P. Caspi, N. Halbwachs, D. Pilaud, and J. Plaice. Lustre: a declarative language for programming synchronous systems. In 14th ACM Symposium on Principles of Programming Languages. ACM, 1987. Google ScholarDigital Library
- Paul Caspi and Marc Pouzet. A Co-iterative Characterization of Synchronous Stream Functions. In Coalgebraic Methods in Computer Science (CMCS'98), Electronic Notes in Theoretical Computer Science, March 1998. Extended version available as a VERIMAG tech. report no. 97--07 at www.lri.fr/~pouzet.Google Scholar
- Jean-Louis Colaço, Bruno Pagano, and Marc Pouzet. A Conservative Extension of Synchronous Data-flow with State Machines. In ACM International Conference on Embedded Software (EMSOFT'05), Jersey city, New Jersey, USA, September 2005. Google ScholarDigital Library
- Jean-Louis Colaço and Marc Pouzet. Clocks as First Class Abstract Types. In Third International Conference on Embedded Software (EMSOFT'03), Philadelphia, Pennsylvania, USA, october 2003.Google ScholarCross Ref
- Jean-Louis Colaço and Marc Pouzet. Type-based Initialization Analysis of a Synchronous Data-flow Language. International Journal on Software Tools for Technology Transfer (STTT), 6(3):245--255, August 2004. Google ScholarDigital Library
- Sacres consortium. The declarative code dc+ , version 1.4. Technical report, Esprit project EP 20897 : Sacres, 1997.Google Scholar
- The coq proof assistant, 2007. http://coq.inria.fr.Google Scholar
- Thierry Gautier and Paul Le Guernic. Code generation in the sacres project. In Towards System Safety, Proceedings of the Safety-critical Systems Symposium, SSS'99, pages 127--149, Huntingdon, UK, Feb 1999. Springer.Google Scholar
- Alain Girault. A survey of automatic distribution method for synchronous programs. In International Workshop on Synchronous Languages, Applications and Programs (SLAP), Edinburg, UK, April 2005. ENTCS.Google Scholar
- Georges Gonthier. Sémantiques et modèles d'exécution des langages réactifs synchrones. PhD thesis, Université Paris VI, Paris, 1988.Google Scholar
- N. Halbwachs. The declarative code DC, version 1.2a. Vérimag, Grenoble, France, October 1995. unpublished report.Google Scholar
- N. Halbwachs, P. Raymond, and C. Ratel. Generating efficient code from data-flow programs. In Third International Symposium on Programming Language Implementation and Logic Programming, Passau (Germany), August 1991.Google ScholarCross Ref
- N. Halbwachs and Pascal Raymond. A tutorial of lustre. http://www-verimag.imag.fr/SYNCHRONE/, 2002.Google Scholar
- F. Maraninchi and Y. Rémond. Mode-automata: a new domainspecific construct for the development of safe critical systems. Science of Computer Programming, (46):219--254, 2003. Google ScholarDigital Library
- The MathWorks. http://www.mathworks.com/products/simulink.Google Scholar
- Steven S Muchnick. Advanced Compiler Design and Implementation. Morgan Kaufmann, 1997. Google ScholarDigital Library
- B. C. Pierce. Types and Programming Languages. MIT Press, 2002. Google ScholarDigital Library
- Pascal Raymond. Compilation séparée de programmes lustre. Technical report, Projet SPECTRE, IMAG, juillet 1988.Google Scholar
- SCADE. http://www.esterel-technologies.com/scade/, 2007.Google Scholar
Index Terms
- Clock-directed modular code generation for synchronous data-flow languages
Recommendations
Clock-directed modular code generation for synchronous data-flow languages
LCTES '08The compilation of synchronous block diagrams into sequential imperative code has been addressed in the early eighties and can now be considered as folklore. However, separate, or modular, code generation, though largely used in existing compilers and ...
A modular memory optimization for synchronous data-flow languages: application to arrays in a lustre compiler
LCTES '12: Proceedings of the 13th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, Tools and Theory for Embedded SystemsThe generation of efficient sequential code for synchronous data-flow languages raises two intertwined issues: control and memory optimization. While the former has been extensively studied, for instance in the compilation of Lustre and Signal, the ...
A modular memory optimization for synchronous data-flow languages: application to arrays in a lustre compiler
LCTES '12The generation of efficient sequential code for synchronous data-flow languages raises two intertwined issues: control and memory optimization. While the former has been extensively studied, for instance in the compilation of Lustre and Signal, the ...
Comments