Modelling and Analysis of Real Time Systems with Logic Programming and Constraints

Embedded systems are increasingly being deployed in a wide variety of applications. Most, if not all, of these applications involve an electronic controller with discrete behaviour controlling a continuously evolving plant. Because of their hybrid behaviour (discrete and continuous) and reactive behaviour, the formal verification of embedded systems pose new challenges. Linear Hybrid Automata (LHA) is a language for specifying systems with linear hybrid behaviour. Abstract interpretation is a formal theory for approximating the semantics of programming languages. Model checking is a technique to verify the reactive behaviour of concurrent systems. Computation Tree Logic (CTL) is a temporal property specification language. Logic programming is a general purpose programming language based on predicate logic. In this dissertation, the LHA models are verified by encoding them as constraint logic programs. The constraint logic program (CLP) encoding an LHA model is first specialised and then a concrete minimal model (or possibly an abstract minimal model) for the residual program is computed. The abstract minimal model is computed by applying the theory of abstract interpretation. The computed minimal model forms the basis for verifying the LHA model. We consider two techniques to verify the reactive properties specified as CTL formulas: (i) reachability analysis and (ii) model checking. A systematic translation of LHA models into constraint logic programs is defined. This is mechanised by a compiler. To facilitate forward and backward reasoning, two different ways to model an LHA are defined. A framework consisting of general purpose constraint logic program tools is presented to accomplish the reachability analysis to verify a class of safety and liveness properties. A tool to compute the concrete minimal model is implemented. The model checking of CTL is defined as a concrete CTL-semantic function. Since model checking of infinite state systems, which LHAs are, does not terminate, we apply the theory of abstract interpretation to model checking that ensures termination at the cost of loss in precision. An abstract CTL-semantic function is constructed as an abstract interpretation of the CTL-semantic function. This abstract CTL-semantic function is implemented using a SMT solver resulting in an abstract model checker. We consider two abstract domains: (i) the domain of constraints and (ii) the domain of convex polyhedra, for both abstract model checking and abstract minimal model computation. We demonstrate the applicability of the proposed theory with examples taken from the literature.

[1]  T. Henzinger,et al.  Algorithmic Analysis of Nonlinear Hybrid Systems , 1998, CAV.

[2]  Leslie Lamport,et al.  A fast mutual exclusion algorithm , 1987, TOCS.

[3]  Bowen Alpern,et al.  Defining Liveness , 1984, Inf. Process. Lett..

[4]  Bowen Alpern,et al.  Recognizing safety and liveness , 2005, Distributed Computing.

[5]  J. W. Lloyd,et al.  Foundations of logic programming; (2nd extended ed.) , 1987 .

[6]  Roberto Giacobazzi,et al.  Incompleteness, Counterexamples, and Refinements in Abstract Model-Checking , 2001, SAS.

[7]  S. Narain,et al.  A logic for simulating discontinous systems , 1989, WSC '89.

[8]  Maurice Bruynooghe,et al.  Abstracting s-semantincs Using A Model-Theoretic Approach , 1994, PLILP.

[9]  Radha Jagadeesan,et al.  Abstraction-Based Model Checking Using Modal Transition Systems , 2001, CONCUR.

[10]  Patrick Cousot,et al.  Systematic design of program analysis frameworks , 1979, POPL.

[11]  Kim G. Larsen,et al.  A Tutorial on Uppaal , 2004, SFM.

[12]  Amir Pnueli,et al.  The temporal logic of programs , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

[13]  Robert W. Floyd,et al.  Assigning Meanings to Programs , 1993 .

[14]  John P. Gallagher,et al.  Convex Hull Abstractions in Specialization of CLP Programs , 2002, LOPSTR.

[15]  Robert A. Kowalski,et al.  Algorithm = logic + control , 1979, CACM.

[16]  Enrico Pontelli,et al.  A constraint-based approach for specification and verification of real-time systems , 1997, Proceedings Real-Time Systems Symposium.

[17]  Armin Biere,et al.  A survey of recent advances in SAT-based formal verification , 2005, International Journal on Software Tools for Technology Transfer.

[18]  David Arthur Fahrland,et al.  Combined discrete event continuous systems simulation , 1970 .

[19]  Jeff Rothenberg,et al.  Proving temporal properties of hybrid systems , 1990, 1990 Winter Simulation Conference Proceedings.

[20]  Rob Gerth,et al.  Semantics of Reactive Systems in Abstract Time , 1991, REX Workshop.

[21]  Patrick Cousot,et al.  Refining Model Checking by Abstract Interpretation , 2004, Automated Software Engineering.

[22]  Thierry Massart,et al.  Infinite State Model Checking by Abstract Interpretation and Program Specialisation , 1999, LOPSTR.

[23]  Maurice Bruynooghe,et al.  A Systematic Construction of Abstract Domains , 1994, SAS.

[24]  Edmund M. Clarke,et al.  Using Branching Time Temporal Logic to Synthesize Synchronization Skeletons , 1982, Sci. Comput. Program..

[25]  Flemming Nielson,et al.  Principles of Program Analysis , 1999, Springer Berlin Heidelberg.

[26]  Thomas A. Henzinger,et al.  HYTECH: A Model Checker for Hybrid Systems , 1997, CAV.

[27]  Pierre Wolper,et al.  An Automata-Theoretic Approach to Automatic Program Verification (Preliminary Report) , 1986, LICS.

[28]  Peter J. Stuckey,et al.  Constructive negation for constraint logic programming , 1991, [1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.

[29]  Roberto Bagnara,et al.  Widening operators for powerset domains , 2007, Int. J. Softw. Tools Technol. Transf..

[30]  John P. Gallagher,et al.  Practical Model-Based Static Analysis for Definite Logic Programs , 1995, ILPS.

[31]  A. Udaya Shankar,et al.  A Relational Notation for State Transition Systems , 1990, IEEE Trans. Software Eng..

[32]  Farn Wang,et al.  Formal verification of timed systems: a survey and perspective , 2004, Proceedings of the IEEE.

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

[34]  Magdy S. Abadir,et al.  A Survey of Hybrid Techniques for Functional Verification , 2007, IEEE Design & Test of Computers.

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

[36]  John Wylie Lloyd,et al.  Foundations of Logic Programming , 1987, Symbolic Computation.

[37]  Robert M. Keller,et al.  Formal verification of parallel programs , 1976, CACM.

[38]  Edmund M. Clarke,et al.  Formal Methods: State of the Art and Future Directions Working Group Members , 1996 .

[39]  Thomas A. Henzinger,et al.  Reachability Verification for Hybrid Automata , 1998, HSCC.

[40]  Leslie Lamport,et al.  Proving the Correctness of Multiprocess Programs , 1977, IEEE Transactions on Software Engineering.

[41]  Goran Frehse PHAVer: Algorithmic Verification of Hybrid Systems Past HyTech , 2005, HSCC.

[42]  Bruno Dutertre,et al.  A Fast Linear-Arithmetic Solver for DPLL(T) , 2006, CAV.

[43]  C. Ramakrishnan,et al.  Efficient Real-Time Model Checking Using Tabled Logic Programming and Constraints , 2002, ICLP.

[44]  George J. Pappas,et al.  Discrete abstractions of hybrid systems , 2000, Proceedings of the IEEE.

[45]  Alberto L. Sangiovanni-Vincentelli,et al.  Languages and Tools for Hybrid Systems Design , 2006, Found. Trends Electron. Des. Autom..

[46]  Giorgio Delzanno,et al.  Model Checking in CLP , 1999, TACAS.

[47]  Nicolas Halbwachs,et al.  Verification of Real-Time Systems using Linear Relation Analysis , 1997, Formal Methods Syst. Des..

[48]  Patrick Cousot,et al.  Temporal abstract interpretation , 2000, POPL '00.

[49]  Jeannette M. Wing A specifier's introduction to formal methods , 1990, Computer.

[50]  E. Allen Emerson,et al.  Temporal and Modal Logic , 1991, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[51]  C. A. R. Hoare,et al.  A Model for Communicating Sequential Processes , 1980, On the Construction of Programs.

[52]  Nicolas Halbwachs,et al.  Verification of Linear Hybrid Systems by Means of Convex Approximations , 1994, SAS.

[53]  Aarti Gupta,et al.  Formal hardware verification methods: A survey , 1992, Formal Methods Syst. Des..

[54]  John P. Gallagher,et al.  Experiments with a Convex Polyhedral Analysis Tool for Logic Programs , 2007, ArXiv.

[55]  John Gallagher A Bottom-Up Analysis Toolkit , 1995 .

[56]  Alberto Pettorossi,et al.  Verifying CTL properties of infinite state systems by specializing constraint logic programs , 2001 .

[57]  Neil D. Jones,et al.  Transformation by interpreter specialisation , 2004, Sci. Comput. Program..

[58]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[59]  Edmund M. Clarke,et al.  Model Checking , 1999, Handbook of Automated Reasoning.

[60]  Timothy J. Hickey,et al.  Using Analytic CLP to Model and Analyze Hybrid Systems , 2004, FLAIRS Conference.

[61]  Natarajan Shankar,et al.  Abstract and Model Check While You Prove , 1999, CAV.

[62]  Edmund M. Clarke,et al.  Design and Synthesis of Synchronization Skeletons Using Branching Time Temporal Logic , 2008, 25 Years of Model Checking.

[63]  Andrew E. Santosa,et al.  Modeling Systems in CLP , 2005, ICLP.

[64]  Timothy J. Hickey Analytic constraint solving and interval arithmetic , 2000, POPL '00.

[65]  John P. Gallagher,et al.  Techniques for Scaling Up Analyses Based on Pre-interpretations , 2005, ICLP.

[66]  Anil Nerode,et al.  Modal Logics and Topological Semantics for Hybrid Systems , 1997 .

[67]  René David,et al.  On Hybrid Petri Nets , 2001, Discret. Event Dyn. Syst..

[68]  A. Tarski A LATTICE-THEORETICAL FIXPOINT THEOREM AND ITS APPLICATIONS , 1955 .

[69]  Nicolas Halbwachs,et al.  Automatic discovery of linear restraints among variables of a program , 1978, POPL.

[70]  Ulf Nilsson,et al.  Logic, programming and Prolog , 1990 .

[71]  C. Petri Kommunikation mit Automaten , 1962 .

[72]  Thomas A. Henzinger,et al.  Hybrid Automata: An Algorithmic Approach to the Specification and Verification of Hybrid Systems , 1992, Hybrid Systems.

[73]  Ulf Nilsson,et al.  Constraint Logic Programming for Local and Symbolic Model-Checking , 2000, Computational Logic.

[74]  Moreno Falaschi,et al.  Under Consideration for Publication in Theory and Practice of Logic Programming Automatic Verification of Timed Concurrent Constraint Programs * , 2022 .

[75]  John P. Gallagher,et al.  Constraint-Based Abstract Semantics for Temporal Logic: A Direct Approach to Design and Implementation , 2010, LPAR.

[76]  Hisao Tamaki,et al.  OLD Resolution with Tabulation , 1986, ICLP.

[77]  Jonathan S. Ostroff,et al.  Formal methods for the specification and design of real-time safety critical systems , 1992, J. Syst. Softw..

[78]  T. Henzinger The theory of hybrid automata , 1996, LICS 1996.

[79]  Rajeev Alur,et al.  A Theory of Timed Automata , 1994, Theor. Comput. Sci..

[80]  Neil D. Jones,et al.  The Essence of Program Transformation by Partial Evaluation and Driving , 1999, Logic, Language and Computation.

[81]  Michael Leuschel,et al.  Efficient Specialisation in Prolog Using the Hand-Written Compiler Generator LOGEN , 1999, WOID@ICLP.

[82]  Gilles Kahn,et al.  The Semantics of a Simple Language for Parallel Programming , 1974, IFIP Congress.

[83]  J. M. Davoren,et al.  Modal logics for continuous dynamics , 1998 .

[84]  Joost P. Katoen,et al.  Concepts, Algorithms, and Tools for Model Checking , 1999 .

[85]  C. R. Ramakrishnan,et al.  Real-Time Verification Techniques for Untimed Systems , 2000, Electron. Notes Theor. Comput. Sci..

[86]  A. Udaya Shankar,et al.  An introduction to assertional reasoning for concurrent systems , 1993, CSUR.

[87]  Karen Rudie,et al.  A survey of modeling and control of hybrid systems , 1997 .

[88]  Zohar Manna,et al.  Verification of concurrent programs, Part I: The temporal framework , 1981 .

[89]  Christel Baier,et al.  Principles of Model Checking (Representation and Mind Series) , 2008 .

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

[91]  Joxan Jaffar,et al.  Constraint logic programming , 1987, POPL '87.

[92]  C. A. R. Hoare,et al.  An axiomatic basis for computer programming , 1969, CACM.

[93]  Timothy J. Hickey CLIP: A CLP(Intervals) Dialect for Metalevel Constraint Solving , 2000, PADL.

[94]  Anders P. Ravn,et al.  Specifying and Verifying Requirements of Real-Time Systems , 1993, IEEE Trans. Software Eng..

[95]  Orna Grumberg,et al.  Abstract interpretation of reactive systems , 1997, TOPL.

[96]  Nancy A. Lynch,et al.  Hybrid I/O automata , 1995, Inf. Comput..

[97]  John P. Gallagher,et al.  Analysis of Linear Hybrid Systems in CLP , 2008, LOPSTR.

[98]  William C. Rounds,et al.  A Spatial Logic for the Hybrid p-Calculus , 2004, HSCC.

[99]  Ernst-Rüdiger Olderog,et al.  Real-time systems - formal specification and automatic verification , 2008 .

[100]  Joseph Sifakis,et al.  Specification and verification of concurrent systems in CESAR , 1982, Symposium on Programming.

[101]  Thomas A. Henzinger,et al.  The Algorithmic Analysis of Hybrid Systems , 1995, Theor. Comput. Sci..

[102]  Kim Steen Henriksen,et al.  A Logic Programming Based Approach to Applying Abstract Interpretation to Embedded Software , 2007 .

[103]  Leslie Lamport,et al.  The temporal logic of actions , 1994, TOPL.

[104]  Christoph Brzoska Temporal Logic Programming in Dense Time , 1995, ILPS.

[105]  Kim G. Larsen,et al.  A modal process logic , 1988, [1988] Proceedings. Third Annual Information Symposium on Logic in Computer Science.

[106]  John P. Gallagher,et al.  Abstract Domains Based on Regular Types , 2004, ICLP.

[107]  Luciano Lavagno,et al.  Models of computation for embedded system design , 1999 .

[108]  Thomas A. Henzinger,et al.  Automatic Symbolic Verification of Embedded Systems , 1996, IEEE Trans. Software Eng..

[109]  Roberto Bagnara,et al.  The Parma Polyhedra Library: Toward a complete set of numerical abstractions for the analysis and verification of hardware and software systems , 2006, Sci. Comput. Program..