Linking operational semantics and algebraic semantics for a probabilistic timed shared-variable language

Complex sfotware systems typically involve features like time, concurrency and probability, and probabilistic computations are playing an increasing role. However it is currently challenging to formalize languages incorporating all those features. Recently the language PTSC has been proposed to integrate probability and time with shared-variable concurrency [56, 59], where the operational semantics has been explored and a set of algebraic laws has been investigated via bisimulation. This paper investigates the link between the operational and algebraic semantics of PTSC, highlighting both its theoretical and practical aspects. The link is obtained by deriving the operational semantics from the algebraic, an approach which may be understood as establishing soundness of the operational semantics with respect to the algebraic semantics. Algebraic laws are provided which suffice to convert any PTSC program into a form consisting of a guarded choice or an internal choice between programs which are initially deterministic. That form corresponds to a simple execution of the program, so it is used as a basis for an operational semantics. In that way, the operational semantics is derived from the algebraic, with transition rules resulting from the derivation strategy. In fact the derived transition rules and the derivation strategy are shown to be equivalent, which may be understood as establishing completeness of the operational semantics with respect to the algebraic semantics. That theoretical approach to the link is complemented by a practical one, which animates the link using Prolog. The link between the two semantics proceeds via head normal form. Firstly, generation of head normal form is explored, in particular animating the expansion laws for probabilistic interleaving. Then the derivation of the operational semantics is animated using a strategy which exploits head normal form. The operational semantics is also animated. Those animations, which again supports to claim soundness and completeness of the operational semantics with respect to the algebraic, are interesting because they provide a practical demonstration of the theoretical results.

[1]  C. A. R. Hoare,et al.  Laws of programming , 1987, CACM.

[2]  Eric C. R. Hehner Predicative programming Part II , 1984, CACM.

[3]  Jifeng He Provably Correct Systems: Modelling of Communication Languages and Design of Optimized Compilers , 1994 .

[4]  Erik P. de Vink,et al.  Mixing Up Nondeterminism and Probability: a preliminary report , 1998, PROBMIV.

[5]  Wolfgang Bibel Predicative programming , 2009, New Generation Computing.

[6]  Steve Dunne,et al.  Unifying Theories of Programming, First International Symposium, UTP 2006, Walworth Castle, County Durham, UK, February 5-7, 2006, Revised Selected Papers , 2006, UTP.

[7]  Huibiao Zhu,et al.  Linking the semantics of a multithreaded discrete event simulation language , 2005 .

[8]  Jifeng He,et al.  An animatable operational semantics of the Verilog hardware description language , 2000, ICFEM 2000. Third IEEE International Conference on Formal Engineering Methods.

[9]  Krzysztof R. Apt,et al.  Ten Years of Hoare's Logic: A Survey—Part I , 1981, TOPL.

[10]  Manuel Núñez,et al.  Acceptance Trees for Probabilistic Processes , 1995, CONCUR.

[11]  He Jifeng,et al.  Formalising VERILOG , 2000, ICECS 2000. 7th IEEE International Conference on Electronics, Circuits and Systems (Cat. No.00EX445).

[12]  Eric C. R. Hehner,et al.  Predicative programming Part I , 1984, CACM.

[13]  David de Frutos-Escrig,et al.  Testing Semantics for Probabilistic LOTOS , 1995, FORTE.

[14]  He Jifeng An Algebraic Approach to the VERILOG Programming , 2003 .

[15]  J. W. deBakker,et al.  Control flow semantics , 1996 .

[16]  John C. Reynolds Toward a Grainless Semantics for Shared-Variable Concurrency , 2004, FSTTCS.

[17]  William F. Clocksin,et al.  Programming in Prolog , 1987, Springer Berlin Heidelberg.

[18]  Annabelle McIver,et al.  Abstraction, Refinement And Proof For Probabilistic Systems (Monographs in Computer Science) , 2004 .

[19]  Stephen D. Brookes,et al.  Full abstraction for a shared variable parallel language , 1993, [1993] Proceedings Eighth Annual IEEE Symposium on Logic in Computer Science.

[20]  Annabelle McIver,et al.  Probabilistic Models for the Guarded Command Language , 1997, Sci. Comput. Program..

[21]  Jifeng He,et al.  Deriving operational semantics from denotational semantics for Verilog , 2001, Proceedings Eighth Asia-Pacific Software Engineering Conference.

[22]  Shamim Ripon,et al.  Executable Semantics for Compensating CSP , 2005, EPEW/WS-FM.

[23]  Annabelle McIver,et al.  Probabilistic predicate transformers , 1996, TOPL.

[24]  Jeff W. Sanders,et al.  Reasoning about a Distributed Probabilistic System , 2009, CATS.

[25]  Eric C. R. Hehner,et al.  Probabilistic Predicative Programming , 2004, MPC.

[26]  Erik P. de Vink,et al.  Metric Semantics and Full Abstractness for Action Refinement and Probabilistic Choice , 2001, MFCSIT.

[27]  Jeremy Manson,et al.  The Java memory model , 2005, POPL '05.

[28]  Jing Li,et al.  An Operational Approach to BPEL-like Programming , 2007, 31st IEEE Software Engineering Workshop (SEW 2007).

[29]  Annabelle McIver,et al.  Partial correctness for probabilistic demonic programs , 2001, Theor. Comput. Sci..

[30]  Zohar Manna,et al.  The Temporal Logic of Reactive and Concurrent Systems , 1991, Springer New York.

[31]  Frank S. de Boer A Sound and Complete Shared-Variable Concurrency Model for Multi-threaded Java Programs , 2007, FMOODS.

[32]  Nimal Nissanke Realtime systems , 1997, Prentice Hall series in computer science.

[33]  Zohar Manna,et al.  Temporal verification of reactive systems - safety , 1995 .

[34]  den Jeremy Ian Hartog,et al.  Probabilistic Extensions of Semantical Models , 2002 .

[35]  Karen Seidel,et al.  Probabilistic Communicating Processes , 1992, Theor. Comput. Sci..

[36]  Joseph E. Stoy,et al.  Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory , 1981 .

[37]  C. A. R. Hoare,et al.  Unifying theories of programming , 1998, RelMiCS.

[38]  Shengchao Qin,et al.  Integrating Probability with Time and Shared-Variable Concurrency , 2006, 2006 30th Annual IEEE/NASA Software Engineering Workshop.

[39]  C. A. R. Hoare,et al.  From Algebra to Operational Semantics , 1993, Inf. Process. Lett..

[40]  Krzysztof R. Apt,et al.  Ten Years of Hoare's Logic: A Survey Part II: Nondeterminism , 1984, Theor. Comput. Sci..

[41]  Erik P. de Vink,et al.  Verifying Probabilistic Programs Using a Hoare Like Logic , 2002, Int. J. Found. Comput. Sci..

[42]  Jifeng He,et al.  From algebraic semantics to denotational semantics for Verilog , 2006, 11th IEEE International Conference on Engineering of Complex Computer Systems (ICECCS'06).

[43]  Shengchao Qin,et al.  PTSC: probability, time and shared-variable concurrency , 2009, Innovations in Systems and Software Engineering.

[44]  Jifeng He,et al.  From Operational Semantics to Denotational Semantics for Verilog , 2001, CHARME.

[45]  Ieee Standards Board IEEE Standard hardware Description language : based on the Verilog hardware description language , 1996 .

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

[47]  Sebastian Thrun,et al.  A probabilistic language based upon sampling functions , 2005, POPL '05.

[48]  Rajeev Motwani,et al.  Randomized Algorithms , 1995, SIGA.

[49]  Jozef Hooman,et al.  Concurrency Verification: Introduction to Compositional and Noncompositional Methods , 2001, Cambridge Tracts in Theoretical Computer Science.

[50]  Jifeng He An Algebraic Approach to the VERILOG Programming , 2002, 10th Anniversary Colloquium of UNU/IIST.

[51]  Manuel Núñez,et al.  Algebraic theory of probabilistic processes , 2003, J. Log. Algebraic Methods Program..

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

[53]  Matthew Hennessy,et al.  Algebraic theory of processes , 1988, MIT Press series in the foundations of computing.

[54]  Edsger W. Dijkstra,et al.  The structure of the “THE”-multiprogramming system , 1968, CACM.

[55]  Jonathan P. Bowen Combining Operational Semantics, Logic Programming and Literate Programming in the Specification and Animation of the Verilog Hardware Description Language , 2000, IFM.

[56]  Stephen Brookes A Grainless Semantics for Parallel Programs with Shared Mutable Data , 2005, MFPS.

[57]  Jifeng He,et al.  Unifying Probability , 2006, UTP.

[58]  Per Brinch Hansen,et al.  Structured multiprogramming , 1972, CACM.