Chapter 1 Are Synchronous Programs Logic Programs ?

Synchronous languages have been introduced as programming languages that directly reflect the nature of reactive systems: Their execution is divided into discrete reaction steps such that in each reaction step, inputs are read from the environment and outputs are instantaneously computed. Reaction steps, which are also called macro steps, consist thereby of a set of atomic micro step actions that are executed in the variable environment associated with the macro step. At the beginning of the macro step, only the values of the input variables are known in this variable environment, and the values of the remaining variables have to be computed according to the data-dependencies. Since the micro step actions depend on the variable environment that they also create, it might be the case that there are cyclic dependencies. Whether such cyclic dependencies can be constructively resolved has to be checked by a compile-time causality analysis which will ensure that there is for all inputs a suitable schedule of the micro steps. If the synchronous programs are converted to guarded actions as done in the author’s Averest system, some relationships with logic programs can be found: In particular, the concepts of reaction-to-absence of synchronous languages and negation-to-failure of logic programs seem to be the same; another analogy is found for the generation of equation-based code of synchronous programs and the completion of logic programs, and also for the fix-point analyses defined in both paradigms. This paper outlines these analogies between the two paradigms of programming languages and discusses whether further known semantics of logic programs like well-founded and stable models may find useful counterparts in the synchronous world in future. Klaus Schneider TU Kaiserslautern, 67653 Kaiserslautern, Germany, https://es.cs.uni-kl.de, e-mail: schneider@cs.uni-kl.de Marc Dahlem Insiders Technologies GmbH, Kaiserslautern, Germany, https:// insiders-technologies.de, e-mail: m_dahlem@cs.uni-kl.de

[1]  William H. Kautz,et al.  The Necessity of Closed Circuit Loops in Minimal Combinational Circuits , 1970, IEEE Transactions on Computers.

[2]  D. Huffman COMBINATIONAL CIRCUITS WITH FEEDBACK , 1971 .

[3]  Robert A. Kowalski,et al.  Predicate Logic as Programming Language , 1974, IFIP Congress.

[4]  Robert A. Kowalski,et al.  The Semantics of Predicate Logic as a Programming Language , 1976, JACM.

[5]  Keith L. Clark,et al.  Negation as Failure , 1987, Logic and Data Bases.

[6]  Ronald L. Rivest The Necessity of Feedback in Minimal Monotone Combinational Circuits , 1977, IEEE Transactions on Computers.

[7]  Gérard Berry,et al.  The ESTEREL Synchronous Programming Language and its Mathematical Semantics , 1984, Seminar on Concurrency.

[8]  Jean H. Gallier,et al.  Linear-Time Algorithms for Testing the Satisfiability of Propositional Horn Formulae , 1984, J. Log. Program..

[9]  Amir Pnueli,et al.  On the Development of Reactive Systems , 1989, Logics and Models of Concurrent Systems.

[10]  Melvin Fitting,et al.  A Kripke-Kleene Semantics for Logic Programs , 1985, J. Log. Program..

[11]  Paul Le Guernic,et al.  SIGNAL: A declarative language for synchronous programming of real-time systems , 1987, FPCA.

[12]  Randal E. Bryant,et al.  Boolean Analysis of MOS Circuits , 1987, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems.

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

[14]  Carl-Johan H. Seger,et al.  An Optimistic Ternary Simulation of Gate Races , 1988, Theor. Comput. Sci..

[15]  V. Lifschitz,et al.  The Stable Model Semantics for Logic Programming , 1988, ICLP/SLP.

[16]  Christos H. Papadimitriou,et al.  Why not negation by fixpoint? , 1988, PODS '88.

[17]  Kenneth Kunen,et al.  Signed Data Dependencies in Logic Programs , 1989, J. Log. Program..

[18]  J. A Brzozowski,et al.  Advances in asynchronous circuit theory. Part I : gate and unbounded inertial delay , 1990 .

[19]  Randal E. Bryant,et al.  Formal Verification of Digital Circuits Using Symbolic Ternary System Models , 1990, CAV.

[20]  Kenneth A. Ross,et al.  The well-founded semantics for general logic programs , 1991, JACM.

[21]  Amir Pnueli,et al.  What is in a Step: On the Semantics of Statecharts , 1991, TACS.

[22]  Frédéric Boussinot,et al.  The ESTEREL language , 1991, Proc. IEEE.

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

[24]  Pascal Raymond,et al.  The synchronous data flow programming language LUSTRE , 1991, Proc. IEEE.

[25]  Janusz A. Brzozowski,et al.  On the Delay-Sensitivity of Gate Networks , 1992, IEEE Trans. Computers.

[26]  Leon Stok,et al.  False loops through resource sharing , 1992, ICCAD '92.

[27]  François Fages,et al.  Consistency of Clark's completion and existence of stable models , 1992, Methods Log. Comput. Sci..

[28]  Philippe Roussel,et al.  The birth of Prolog , 1993, HOPL-II.

[29]  Michael von der Beeck,et al.  A Comparison of Statecharts Variants , 1994, FTRTFT.

[30]  Sharad Malik Analysis of cyclic combinational circuits , 1994, IEEE Trans. Comput. Aided Des. Integr. Circuits Syst..

[31]  Carl-Johan H. Seger,et al.  Asynchronous Circuits , 1995, Monographs in Computer Science.

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

[33]  Amnon Naamad,et al.  The STATEMATE semantics of statecharts , 1996, TSEM.

[34]  Thomas J. Bergin,et al.  History of programming languages---II , 1996 .

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

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

[37]  Ellen Sentovich,et al.  Quick conservative causality analysis , 1997, Proceedings. Tenth International Symposium on System Synthesis (Cat. No.97TB100114).

[38]  Nicolas Halbwachs,et al.  Synchronous Programming of Reactive Systems , 1992, CAV.

[39]  Esra Erdem,et al.  Transformations of Logic Programs Related to Causality and Planning , 1999, LPNMR.

[40]  G. Mints A Short Introduction to Intuitionistic Logic , 2000 .

[41]  Fangzhen Lin,et al.  ASSAT: computing answer sets of a logic program by SAT solvers , 2002, Artif. Intell..

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

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

[44]  Willem P. de Roever,et al.  29 New Unclarities in the Semantics of UML 2.0 State Machines , 2005, ICFEM.

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

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

[47]  Thomas Eiter,et al.  Answer Set Programming: A Primer , 2009, Reasoning Web.

[48]  Klaus Schneider,et al.  Separate compilation for synchronous programs , 2009, SCOPES.

[49]  Willem P. de Roever,et al.  What Is in a Step: New Perspectives on a Classical Question , 2010, Essays in Memory of Amir Pnueli.

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

[51]  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).

[52]  Sandeep K. Shukla,et al.  Embedding Polychrony into Synchrony , 2013, IEEE Transactions on Software Engineering.

[53]  Sandeep K. Shukla,et al.  Constructive polychronous systems , 2013, Sci. Comput. Program..

[54]  Joaquín Aguado,et al.  Grounding Synchronous Deterministic Concurrency in Sequential Programming , 2014, ESOP.

[55]  Mamoun Filali,et al.  A verified transformation: from polychronous programs to a variant of clocked guarded actions , 2014, SCOPES.

[56]  Joaquín Aguado,et al.  SCCharts: sequentially constructive statecharts for safety-critical applications: HW/SW-synthesis for a conservative extension of synchronous statecharts , 2014, PLDI.

[57]  Michael Mendler,et al.  SCEst: Sequentially constructive esterel , 2015, MEMOCODE.

[58]  Mamoun Filali,et al.  A refinement-based compiler development for synchronous languages , 2017, MEMOCODE.