Abstract
We discuss how separate compilation and usage of structured data can be achieved in a synchronous imperative programming language for embedded systems. Our focus is on the practical aspects of these questions regarding expressiveness in programs as well as causality analysis and code generation. The approach is illustrated by means of examples written in our new language Blech. In particular, we revisit the stopwatch example from the literature to discuss causality, separate compilation, and other aspects of software engineering in more depth. This is an extended version of a previously published article.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Blech is German and colloquially translates to “bare metal” highlighting our focus on deeply embedded architectures.
- 2.
For a quick overview see [16].
- 3.
Here let should not be confused with the same keyword in functional languages where it binds a free variable in a subsequent subexpression.
- 4.
By default enumerations are opened and hence their tags may be accessed without specifying the type name.
- 5.
It is not a predefined keyword as in Java but an arbitrary identifier as in F#.
- 6.
- 7.
- 8.
In Simulink, delays are used in the same fashion to resolve algebraic loops.
- 9.
With the need for creating a software library for different platforms, it is obvious that support for interface-based programming is clearly a requirement for Blech.
References
Aguado, J., Mendler, M., Pouzet, M., Roop, P. S., & von Hanxleden, R. (2017). Clock-synchronised shared objects for determinisitic concurrency. In Research Report Bamberger Beiträge zur Wirtschaftsinformatik und Angewandten Informatik, p. 102. Bamberg: Otto-Friedrich-Universität.
Aguado, J., Mendler, M., Pouzet, M., Roop, P. S., & von Hanxleden, R. (2018). Deterministic concurrency: A clock-synchronised shared memory approach. In A. Ahmed (Ed.), Proceedings of Programming Languages and Systems—27th European Symposium on Programming, ESOP 2018, Held As Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2018, Thessaloniki 14–20 April 2018. Lecture notes in computer science (Vol. 10801, pp. 86–113). Berlin: Springer.
Ahamad, M., Neiger, G., Burns, J. E., Kohli, P., & Hutto, P. W. (1995). Causal memory: Definitions, implementation, and programming. Distributed Computing, 9(1), 37–49.
Benveniste, A., Caspi, P., Edwards, S. A., Halbwachs, N., Le Guernic, P., & De Simone, R. (2003). The synchronous languages 12 years later. Proceedings of the IEEE, 91(1), 64–83.
Benveniste, A., Caillaud, B., & Raclet, J. B. (2012). Application of interface theories to the separate compilation of synchronous programs. In Proceedings of the 51th IEEE Conference on Decision and Control, CDC 2012, Maui, 10–13 December 2012 (pp. 7252–7258). Piscataway: IEEE.
Berry, G. (1989). Programming a digital watch in Esterel v3. Le Chesnay: INRIA. Research Report RR-1032.
Brandt, J., & Schneider, K. (2009). Separate compilation for synchronous programs. In Falk, H. (Ed.), 12th International Workshop on Software and Compilers for Embedded Systems, SCOPES ’09, Nice, 23–24 April 2009 (pp. 1–10). New York: ACM.
Colaço, J. L., Pagano, B., & Pouzet, M. (2017). SCADE 6: A formal language for embedded critical software development (invited paper). In Mallet, F., Zhang, M., & Madelaine, E. (Eds.), 11th International Symposium on Theoretical Aspects of Software Engineering, TASE 2017, Sophia Antipolis, 13–15 September 2017 (pp. 1–11). Piscataway: IEEE.
Hanxleden, R. V., Mendler, M., Aguado, J., Duderstadt, B., Fuhrmann, I., Motika, C., et al. (2013). Sequentially constructive concurrency—A conservative extension of the synchronous model of computation. Kiel: Christian-Albrechts-Universität zu Kiel, Department of Computer Science. Technical Report 1308. ISSN 2192-6247.
Hanxleden, R. V., Mendler, M., Aguado, J., Duderstadt, B., Fuhrmann, I., Motika, C., et al. (2014). Sequentially constructive concurrency—A conservative extension of the synchronous model of computation. ACM Transactions on Embedded Computing Systems, 13(4s), 144:1–144:26.
Lublinerman, R., Szegedy, C., & Tripakis, S. (2009). Modular code generation from synchronous block diagrams: Modularity vs. code size. In Shao, Z., & Pierce, B. C. (Eds.), Proceedings of the 36th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2009, Savannah, 21–23 January 2009, pp. 78–89. New York: ACM.
Potop-Butucaru, D., Edwards, S. A., & Berry, G. (2007). Compiling esterel. Berlin: Springer.
Sant’Anna, F., Ierusalimschy, R., Rodriguez, N., Rossetto, S., & Branco, A. (2017). The design and implementation of the synchronous language CÉU. ACM Transactions on Embedded Computing Systems, 16(4), 98:1–98:26.
Schneider, K., & Brandt, J. (2017). Quartz: A synchronous language for model-based design of reactive embedded systems (pp. 29–58). Dordrecht: Springer.
Von Hanxleden, R., Duderstadt, B., Motika, C., Smyth, S., Mendler, M., Aguado, J., Mercer, S., & O’Brien, O. (2014). Sccharts: Sequentially constructive statecharts for safety-critical applications: Hw/sw-synthesis for a conservative extension of synchronous statecharts. In O’Boyle, M. F. P., & Pingali, K. (Eds.), ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’14, Edinburgh, 09–11 June 2014 (pp. 372–383). New York: ACM.
Wikipedia contributors (2019). Pid controller—Wikipedia, the free encyclopedia. https://en.wikipedia.org/wiki/PID_controller. Accessed 2 May 2019.
Acknowledgements
The original version of this article appeared at the FDL 2018 and we thank Prof. Michael Mendler for his invitation to contribute. We also thank the anonymous reviewers as well as Mark Andrew, Jens Brandt, Stephan Scheele, Matthias Terber and Simon Wegendt for their valuable feedback. Finally, we thank Daniel Große, Tom Kazmierski and Sebastian Steinhorst for their invitation to extend and contribute our article to this book.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Gretz, F., Grosch, FJ. (2020). Blech, Imperative Synchronous Programming!. In: Kazmierski, T., Steinhorst, S., Große, D. (eds) Languages, Design Methods, and Tools for Electronic System Design. Lecture Notes in Electrical Engineering, vol 611. Springer, Cham. https://doi.org/10.1007/978-3-030-31585-6_9
Download citation
DOI: https://doi.org/10.1007/978-3-030-31585-6_9
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-31584-9
Online ISBN: 978-3-030-31585-6
eBook Packages: EngineeringEngineering (R0)