SimCheck: An Expressive Type System for Simulink

MATLAB Simulink is a member of a class of visual languages that are used for modeling and simulating physical and cyber-physical system. A Simulink model consists of blocks with input and output ports connected using links that carry signals. We extend the type system of Simulink with annotations and dimensions/units associated with ports and links. These types can capture invariants on signals as well as relations between signals. We define a type-checker that checks the wellformedness of Simulink blocks with respect to these type annotations. The type checker generates proof obligations that are solved by SRI’sYicessolver for satisfiability modulo theories (SMT). This translation can be used to detect type errors, demonstrate counterexamples, generate test cases, or prove the absence of type errors. Our work is an initial step toward the symbolic analysis of MATLAB Simulink models.

[1]  Sriram Sankaranarayanan,et al.  Generating and Analyzing Symbolic Traces of Simulink/Stateflow Models , 2009, CAV.

[2]  Bertrand Meyer,et al.  Design by Contract: Making Object-Oriented Programs that Work , 1997, Proceedings. Technology of Object-Oriented Languages and Systems, TOOLS 25 (Cat. No.97TB100239).

[3]  Natarajan Shankar,et al.  Formal Verification for Fault-Tolerant Architectures: Prolegomena to the Design of PVS , 1995, IEEE Trans. Software Eng..

[4]  Andrew Kennedy,et al.  Relational parametricity and units of measure , 1997, POPL '97.

[5]  Andrew John Kennedy,et al.  Programming languages and dimensions , 1995 .

[6]  Bruce H. Krogh,et al.  Computational techniques for hybrid system verification , 2003, IEEE Trans. Autom. Control..

[7]  Gordon S. Novak Conversion of Units of Measurement , 1995, IEEE Trans. Software Eng..

[8]  Bruce H. Krogh,et al.  Integration of Formal Analysis into a Model-Based Software Development Process , 2007, FMICS.

[9]  Thomas A. Henzinger,et al.  Interface automata , 2001, ESEC/FSE-9.

[10]  C. H. Flood,et al.  The Fortress Language Specification , 2007 .

[11]  Edward A. Lee,et al.  On relational interfaces , 2009, EMSOFT '09.

[12]  Rajeev Alur,et al.  Symbolic analysis for improving simulation coverage of Simulink/Stateflow models , 2008, EMSOFT '08.

[13]  Victor Luchangco,et al.  The Fortress Language Specification Version 1.0 , 2007 .

[14]  Philip B. Clayton,et al.  CLawZ: cost-effective formal verification for control systems , 2005, 24th Digital Avionics Systems Conference.

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

[16]  Stavros Tripakis,et al.  Translating discrete-time simulink to lustre , 2003, TECS.