Writing a Model Checker in 80 Days: Reusable Libraries and Custom Implementation

During a course on model checking we developed BMoth, a full-stack model checker for classical B, featuring both explicit-state and symbolic model checking. Given that we only had a single university term to finish the project, a particular focus was on reusing existing libraries to reduce implementation workload. In the following, we report on a selection of reusable libraries, which can be combined into a prototypical model checker relatively easily. Additionally, we discuss where custom code depending on the specification language to be checked is needed and where further optimization can take place. To conclude, we compare to other model checkers for classical B.

[1]  Michael Leuschel,et al.  Proof assisted bounded and unbounded symbolic model checking of software and system models , 2017, Sci. Comput. Program..

[2]  Philippe Schnoebelen,et al.  Temporal logic with forgettable past , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[3]  Jean-Raymond Abrial,et al.  The B-book - assigning programs to meanings , 1996 .

[4]  Michael Leuschel,et al.  Proof Assisted Symbolic Model Checking for B and Event-B , 2016, ABZ.

[5]  Emina Torlak,et al.  Kodkod: A Relational Model Finder , 2007, TACAS.

[6]  Mary Sheeran,et al.  Checking Safety Properties Using Induction and a SAT-Solver , 2000, FMCAD.

[7]  Sebastian Krings,et al.  Experience Report on an Inquiry-Based Course on Model Checking , 2019, SEUH.

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

[9]  Stephan Merz,et al.  Encoding TLA ^+ + into Many-Sorted First-Order Logic , 2016, ABZ.

[10]  Jean-Pierre Jacquot,et al.  JeB: Safe Simulation of Event-B Models in JavaScript , 2013, 2013 20th Asia-Pacific Software Engineering Conference (APSEC).

[11]  Michael Leuschel,et al.  LTL Model Checking under Fairness in ProB , 2016, SEFM.

[12]  Michael Leuschel,et al.  Seven at one stroke: LTL model checking for high-level specifications in B, Z, CSP, and more , 2009, International Journal on Software Tools for Technology Transfer.

[13]  Michael J. Butler,et al.  ProB: A Model Checker for B , 2003, FME.

[14]  Mats Carlsson,et al.  An Open-Ended Finite Domain Constraint Solver , 1997, PLILP.

[15]  Michael Leuschel,et al.  From Animation to Data Validation: The ProB Constraint Solver 10 Years On , 2014 .

[16]  Terence Parr,et al.  The Definitive ANTLR 4 Reference , 2013 .

[17]  Pascal Fontaine,et al.  Integrating SMT solvers in Rodin , 2014, Sci. Comput. Program..

[18]  Dirk Beyer,et al.  JavaSMT: A Unified Interface for SMT Solvers in Java , 2016, VSTTE.

[19]  Michael J. Butler,et al.  ProB: an automated analysis toolset for the B method , 2008, International Journal on Software Tools for Technology Transfer.

[20]  Jean-Raymond Abrial,et al.  Modeling in event-b - system and software engineering by Jean-Raymond Abrial , 2010, SOEN.

[21]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[22]  Pierre Wolper,et al.  Simple on-the-fly automatic verification of linear temporal logic , 1995, PSTV.

[23]  Amir Pnueli,et al.  Checking that finite state concurrent programs satisfy their linear specification , 1985, POPL.

[24]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[25]  Markus Triska,et al.  The Finite Domain Constraint Solver of SWI-Prolog , 2012, FLOPS.

[26]  François Bobot,et al.  Why3: Shepherd Your Herd of Provers , 2011 .

[27]  Michael Leuschel,et al.  Checking Computations of Formal Method Tools - A Secondary Toolchain for ProB , 2014, F-IDE.

[28]  Thai Son Hoang,et al.  Rodin: an open toolset for modelling and reasoning in Event-B , 2010, International Journal on Software Tools for Technology Transfer.

[29]  Joël Ouaknine,et al.  Completeness and Complexity of Bounded Model Checking , 2004, VMCAI.

[30]  Michael Leuschel,et al.  SMT Solvers for Validation of B and Event-B Models , 2016, IFM.

[31]  Stephan Merz,et al.  Model Checking , 2000 .

[32]  Armin Biere,et al.  Bounded model checking , 2003, Adv. Comput..