skip to main content
research-article

Synchronized Shared Memory and Black-box Procedural Abstraction: Toward a Formal Semantics of Blech

Published: 14 August 2024 Publication History

Abstract

Traditional imperative synchronous programming languages heavily rely on a strict separation between data memory and communication signals. Signals can be shared between computational units but cannot be overwritten within a synchronous reaction cycle. Memory can be destructively updated but cannot be shared between concurrent threads. This incoherence makes traditional imperative synchronous languages cumbersome for the programmer. The recent definition of sequentially constructive synchronous languages offers an improvement. It removes the separation between data memory and communication signals and unifies both through the notion of clock synchronized shared memory. However, it still depends on global causality analyses, which precludes black-box procedural abstraction. This complicates reuse and composition of software components. This article shows how black-box procedural abstraction can be accommodated inside the sequentially constructive model of computation. We present the Sequentially Constructive Procedural Language (SCoPL) and its semantic theory of policy-constructive synchronous processes. SCoPL supports black-box procedural abstractions using policy interfaces to ensure that procedure calls are memory-safe and wait-free and their scheduling is determinate and causal. At the same time, a policy interface constrains the level of freedom for the implementation and subsequent refactoring of a procedure. As a result, policies enable separate compilation and composition of procedures. We present our extensions abstractly as a formal semantics for SCoPL and motivate it concretely in the context of the open-source, embedded, real-time language Blech.

References

[1]
F. Gretz, F.-J. Grosch, M. Mendler, and S. Scheele. 2020. Synchronized shared memory and procedural abstraction: Towards a formal semantics of Blech. In Forum on Specification and Design Languages (FDL’20). IEEE.
[2]
G. Berry. 2000. The foundations of Esterel. In Proof, Language and Interaction: Essays in Honour of Robin Milner. MIT Press.
[3]
K. Schneider. 2009. The Synchronous Programming Language Quartz. Internal Report 375. Department of Computer Science, University of Kaiserslautern, Kaiserslautern, Germany.
[4]
S. Andalam, P. Roop, and A. Girault. 2010. Predictable multithreading of embedded applications using PRET-C. In 8th ACM/IEEE International Conference on Formal Methods and Models for Codesign (MEMOCODE’10), 159–168. DOI:
[5]
Eugene Yip, Alain Girault, Partha S. Roop, and Morteza Biglari-Abhari. 2016. The ForeC synchronous deterministic parallel programming language for multicores. In IEEE 10th International Symposium on Embedded Multicore/Many-core Systems-on-Chip (MCSoC’16), Lyon.
[6]
G. F. Lima, R. C. M. Santos, R. Ierusalimschy, E. H. Haeusler, and F. Sant’Anna. 2019. A memory-bounded, deterministic and terminating semantics for the synchronous programming language Céu. J. Syst. Archit. 97 (2019), 239–257.
[7]
Esterel Technologies. 2005. The Esterel v7 Reference Manual Version v7_30 – Initial IEEE Standardization Proposal. Technical Report. Esterel Technologies.
[8]
D. Potop-Butucaru, S. A. Edwards, and G. Berry. 2007. Compiling Esterel (1st ed.). Springer.
[9]
Eric Vecchié, Jean-Pierre Talpin, and Sébastien Boisgérault. 2010. A higher-order extension for imperative synchronous languages. In Proceedings of the 13th International Workshop on Software & Compilers for Embedded Systems (SCOPES’10). DOI:
[10]
R. von Hanxleden, B. Duderstadt, C. Motika, S. Smyth, M. Mendler, J. Aguado, S. Mercer, and O. O’Brien. 2014. SCCharts: Sequentially constructive statecharts for safety-critical applications. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’14), 372–383.
[11]
H. Olivier, P. Laurent, L. B. Yann, and N. Eric. 1999. Cronos: A separate compilation toolset for modular Esterel applications. In World Congress on Formal Methods. Springer, 1836–1853.
[12]
Th. Gautier and P. Le Guernic. 1999. Code generation in the SACRES project. In Safety Critical Systems Symposium (SSS’99). Springer, 127–149.
[13]
Etienne Closse, Michel Poize, Jacques Pulou, Patrick Venier, and Daniel Weil. 2002. SAXO-RT: Interpreting Esterel semantic on a sequential execution structure. In ENTCS, Vol. 65. Elsevier, 80–94.
[14]
D. Biernacki, J-L. Colaço, G. Hamon, and M. Pouzet. 2008. Clock-directed modular code generation of synchronous data-flow languages. In Proceedings of the 2008 ACM SIGPLAN-SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES’08), 121–130.
[15]
E. Vecchie, J. Talpin, and K. Schneider. 2009. Separate compilation and execution of imperative synchronous modules. In Design, Automation and Test in Europe (DATE’09, Nice, France, April 20-24, 2009), 1580–1583.
[16]
Steven Smyth, Christian Motika, Karsten Rathlev, Reinhard von Hanxleden, and Michael Mendler. 2017. SCEst: Sequentially constructive Esterel. ACM TECS—Special Issue on MEMOCODE 2015 17, 2, Article 33 (Dec.2017), 33:1–33:26 pages.
[17]
Friedrich Gretz and Franz-Josef Grosch. 2020. Blech, imperative synchronous programming! In Languages, Design Methods, and Tools for Electronic System Design: Selected Contributions from FDL 2018. 161–186.
[18]
Joaquín Aguado, Michael Mendler, Marc Pouzet, Partha S. Roop, and Reinhard von Hanxleden. 2018. Deterministic concurrency: A clock-synchronised shared memory approach. In 27th European Symposium on Programming. 86–113.
[19]
J. Aguado, M. Mendler, R. v. Hanxleden, and I. Fuhrmann. 2014. Grounding synchronous deterministic concurrency in sequential programming. In Proceedings of the 23rd European Symposium on Programming (ESOP’14), LNCS 8410. Springer, 229–248.
[20]
M. Mendler, T. Shiple, and G. Berry. 2012. Constructive boolean circuits and the exactness of timed ternary simulation. Formal Methods in System Design 40, 3 (2012), 283–329.
[21]
Alexander Schulz-Rosengarten, Steven Smyth, Reinhard von Hanxleden, and Michael Mendler. 2018. On reconciling concurrency, sequentiality and determinacy for reactive systems — A sequentially constructive circuit semantics for Esterel. In 2018 18th International Conference on Application of Concurrency to System Design (ACSD’18). 95–104. DOI:
[22]
M. Pouzet and P. Raymond. 2010. Modular static scheduling of synchronous data-flow networks - An efficient symbolic representation. Design Autom. for Emb. Sys. 14, 3 (2010), 165–192.
[23]
R. Lublinerman, C. Szegedy, and S. Tripakis. 2009. Modular code generation from synchronous block diagrams - Modularity vs. code size. In Proceedings of the 36th Annual Symposium on Principles of Programming Languages (POPL’09), 78–89.
[24]
G. Berry and L. Cosserat. 1984. The ESTEREL synchronous programming language and its mathematical semantics. In Seminar on Concurrency, Carnegie-Mellon University (LNCS), Vol. 197. Springer-Verlag, 389–448.
[25]
J-L. Colaço, B. Pagano, and M. Pouzet. 2017. SCADE 6: A formal language for embedded critical software development (invited paper). In Proceeding of the 11th International Symposium on Theoretical Aspects of Software Engineering (TASE 2017, Sep’17), Nice, 1–10.
[26]
J. Aguado and A. Duenas. 2021. Synchronised shared memory and model checking: A proof of concept. In Forum on Specification and Design Languages (FDL’21). IEEE, 30–37.
[27]
Sharad Malik. 1994. Analysis of cyclic combinational circuits. IEEE Trans. Computer-Aided Design 13, 7 (July1994), 950–956.
[28]
Paul Caspi, Jean-Louis Colaço, Léonard Gérard, Marc Pouzet, and Pascal Raymond. 2009. Synchronous objects with scheduling policies: Introducing safe shared memory in lustre. In Proceedings of the ACM SIGPLAN-SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES’09), 11–20.
[29]
G. Berry. 1999. The Constructive Semantics of Pure Esterel. Draft Book.
[30]
R. von Hanxleden, M. Mendler, J. Aguado, B. Duderstadt, I. Fuhrmann, C. Motika, S. Mercer, and O. O’Brien. 2013. Sequentially constructive concurrency—A conservative extension of the synchronous model of computation. In Design, Automation & Test in Europe Conference & Exhibition (DATE’13). IEEE, Grenoble, France, 581–586.
[31]
D. Potop-Butucaru, R. Simone, and J.-P. Talpin. 2005. The synchronous hypothesis and synchronous languages. In Embedded Systems: Handbook.
[32]
G. Berry. 2007. SCADE: Synchronous design and validation of embedded control software. In Next Generation Design and Verification Methodologies for Distributed Embedded Control Systems. Springer, 19–33.
[33]
P. Caspi and M. Pouzet. 1997. A Co-iterative Characterization of Synchronous Stream Functions. Technical Report Research Report 97-7. VERIMAG, Grenoble.
[34]
G. Baudart, J.-L. Colaço, L. Mandel, M. Mendler, and M. Pouzet. 2020. WiP. A co-iterative synchronous interpreter. In Forum on Specification and Design Languages (FDL’20). IEEE.
[35]
Frédéric Boussinot. 1998. SugarCubes Implementation of Causality. Research Report RR-3487. INRIA.
[36]
J. Wang, M. Mendler, P. Roop, and B. Bodin. 2017. Timing analysis of synchronous programs using WCRT algebra: Scalability through abstraction. ACM Transactions on Embedded Computing Systems (TECS) 16, 5s (October2017), 177:1–177:19.
[37]
Jia Zeng and Stephen A. Edwards. 2005. Separate compilation of synchronous modules. In Proceeding of the Embedded Software and Systems (ICESS’05). 129–140.
[38]
A. Benveniste, B. Caillaud, and J.-B. Raclet. 2012. Applications of interface theories to separate compilation of synchronous programs. In Proceeding of the IEEE 51st Annual Conference on Decision and Control (CDC’12).
[39]
P. Cuoq and M. Pouzet. 2001. Modular causality in a synchronous stream language. In European Symposium on Programming. 237–251.
[40]
E. A. Lee, H. Zheng, and Y. Zhou. 2005. Causality interfaces and compositional causality analysis. In Foundations of Interface Technologies (FIT’05) (ENTCS). Elsevier.
[41]
A. Benveniste, B. Caillaud, D. Nickovic, R. Passerone, J.-B. Raclet, Ph. Reinkemeier, A. Sangiovanni-Vincentelli, W. Damm, Th. A. Henzinger, and K. G. Larsen. 2018. Contracts for system design. Foundations and Trends in Electronic Design Automation 12, 2–3 (2018), 124–400. DOI:

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Embedded Computing Systems
ACM Transactions on Embedded Computing Systems  Volume 23, Issue 5
September 2024
549 pages
EISSN:1558-3465
DOI:10.1145/3613632
  • Editor:
  • Tulika Mitra
Issue’s Table of Contents

Publisher

Association for Computing Machinery

New York, NY, United States

Journal Family

Publication History

Published: 14 August 2024
Online AM: 18 November 2022
Accepted: 27 October 2022
Revised: 09 August 2022
Received: 15 January 2022
Published in TECS Volume 23, Issue 5

Check for updates

Author Tags

  1. Synchronous programming language
  2. clock-synchronised shared memory
  3. procedural abstraction
  4. determinism

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 233
    Total Downloads
  • Downloads (Last 12 months)103
  • Downloads (Last 6 weeks)10
Reflects downloads up to 23 Jan 2025

Other Metrics

Citations

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Full Text

View this article in Full Text.

Full Text

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media