Grounding Synchronous Deterministic Concurrency in Sequential Programming

Using a new domain-theoretic characterisation we show that Berry's constructive semantics is a conservative approximation of the recently proposed sequentially constructive SC model of computation. We prove that every Berry-constructive program is deterministic and deadlock-free under sequentially admissible scheduling. This gives, for the first time, a natural interpretation of Berry-constructiveness for shared-memory, multi-threaded programming in terms of synchronous cycle-based scheduling, where previous results were cast in terms of synchronous circuits. This opens the door to a direct mapping of Esterel's signal mechanism into boolean variables that can be set and reset under the programmer's control within a tick. We illustrate the practical usefulness of this mapping by discussing how signal reincarnation is handled efficiently by this transformation, which is of linear complexity in program size, in contrast to earlier techniques that had quadratic overhead.

[1]  Carl-Johan H. Seger,et al.  Design of Asynchronous Circuits , 1995 .

[2]  Tobias Schüle,et al.  Causality analysis of synchronous programs with delayed actions , 2004, CASES '04.

[3]  Frédéric Boussinot,et al.  FairThreads: mixing cooperative and preemptive threads in C , 2006, Concurr. Comput. Pract. Exp..

[4]  Nicolas Halbwachs,et al.  LUSTRE: a declarative language for real-time programming , 1987, POPL '87.

[5]  C. A. R. Hoare,et al.  Communicating sequential processes , 1978, CACM.

[6]  Sharad Malik,et al.  Analysis of cyclic combinational circuits , 1993, ICCAD '93.

[7]  Stephen A. Edwards,et al.  Tutorial: Compiling concurrent languages for sequential processors , 2003, TODE.

[8]  Tobias Schüle,et al.  Maximal causality analysis , 2005, Fifth International Conference on Application of Concurrency to System Design (ACSD'05).

[9]  Stephen A. Edwards,et al.  Compiling Esterel , 2007 .

[10]  Michael Mendler,et al.  Constructive Boolean circuits and the exactness of timed ternary simulation , 2012, Formal Methods Syst. Des..

[11]  Andrew W. Appel,et al.  SSA is functional programming , 1998, SIGP.

[12]  K. Schneider,et al.  A new method for compiling schizophrenic synchronous programs , 2001, CASES '01.

[13]  Thomas R. Shiple,et al.  Constructive analysis of cyclic circuits , 1996, Proceedings ED&TC European Design and Test Conference.

[14]  Marc Pouzet,et al.  Modular static scheduling of synchronous data-flow networks: an efficient symbolic representation , 2009, EMSOFT '09.

[15]  Thierry Gautier,et al.  Programming real-time applications with SIGNAL , 1991, Proc. IEEE.

[16]  Gordon D. Plotkin,et al.  A structural approach to operational semantics , 2004, J. Log. Algebraic Methods Program..

[17]  Stephen A. Edwards,et al.  Scheduling-independent threads and exceptions in SHIM , 2006, EMSOFT '06.

[18]  Klaus Schneider,et al.  The Synchronous Programming Language Quartz , 2009 .

[19]  Per Brinch Hansen,et al.  Java's insecure parallelism , 1999, SIGP.

[20]  Vivek Sarkar,et al.  Automatic Verification of Determinism for Structured Parallel Programs , 2010, SAS.

[21]  Gérard Berry,et al.  The foundations of Esterel , 2000, Proof, Language, and Interaction.

[22]  Gérard Berry,et al.  The constructive semantics of pure esterel , 1996 .

[23]  Nicolas Halbwachs,et al.  LUSTRE: A declarative language for programming synchronous systems* , 1987 .

[24]  Stephen A. Edwards,et al.  The synchronous languages 12 years later , 2003, Proc. IEEE.

[25]  Robert de Simone,et al.  Curing schizophrenia by program rewriting in Esterel , 2004, Proceedings. Second ACM and IEEE International Conference on Formal Methods and Models for Co-Design, 2004. MEMOCODE '04..

[26]  Joaquín Aguado,et al.  Sequentially constructive concurrency A conservative extension of the synchronous model of computation , 2014, 2013 Design, Automation & Test in Europe Conference & Exhibition (DATE).

[27]  Carlos Delgado Kloos,et al.  Formal Semantics for VHDL , 1995 .

[28]  Partha S. Roop,et al.  Deterministic, predictable and light-weight multithreading using PRET-C , 2010, 2010 Design, Automation & Test in Europe Conference & Exhibition (DATE 2010).

[29]  Frédéric Boussinot,et al.  Reactive C: An extension of C to program reactive systems , 1991, Softw. Pract. Exp..

[30]  G. Plotkin,et al.  Proof, language, and interaction: essays in honour of Robin Milner , 2000 .

[31]  Tomofumi Yuki,et al.  Array dataflow analysis for polyhedral X10 programs , 2013, PPoPP '13.

[32]  Reinhard von Hanxleden,et al.  SyncCharts in C: a proposal for light-weight, deterministic concurrency , 2009, EMSOFT '09.

[33]  Stephen A. Edwards,et al.  The challenges of hardware synthesis from C-like languages , 2005, Design, Automation and Test in Europe.

[34]  Ryan Newton,et al.  Freeze after writing: quasi-deterministic parallel programming with LVars , 2014, POPL.

[35]  Ch. Andre,et al.  Synccharts: A visual representation of reactive behaviors , 1995 .

[36]  Klaus Schneider,et al.  Clock refinement in imperative synchronous languages , 2013, EURASIP J. Embed. Syst..

[37]  Stephen A. Edwards,et al.  The semantics and execution of a synchronous block-diagram language , 2003, Sci. Comput. Program..

[38]  Sorin Lerner,et al.  Verifying GPU kernels by test amplification , 2012, PLDI.

[39]  Klaus Schneider,et al.  Improving Constructiveness in Code Generators , 2005 .

[40]  Gérard Berry,et al.  The Esterel Synchronous Programming Language: Design, Semantics, Implementation , 1992, Sci. Comput. Program..

[41]  Stephen A. Edwards,et al.  The Synchronous Languages Twelve Years Later , 1997 .

[42]  Joaquín Aguado,et al.  Constructive semantics for instantaneous reactions , 2011, Theor. Comput. Sci..

[43]  Edward A. Lee The problem with threads , 2006, Computer.

[44]  Stephen A. Edwards,et al.  Compiling Concurrent Languages for Sequential Processors , 2001 .

[45]  M. Shams Asynchronous Circuits , 2005 .

[46]  Brian A. Davey,et al.  An Introduction to Lattices and Order , 1989 .

[47]  Marc Pouzet,et al.  Time refinement in a functional synchronous language , 2013, PPDP.

[48]  E.A. Lee,et al.  Synchronous data flow , 1987, Proceedings of the IEEE.

[49]  Frédéric Boussinot FairThreads: mixing cooperative and preemptive threads in C: Research Articles , 2006 .