Translating TLA + to B for Validation with ProB

TLA+ and B share the common base of predicate logic, arithmetic and set theory. However, there are still considerable differences, such as very different approaches to typing and modularization. There is also considerable difference in the available tool support. In this paper, we present a translation of the non-temporal part of TLA+ to B, which makes it possible to feed TLA+ specifications into existing tools for B. Part of this translation must include a type inference algorithm, in order to produce typed B specifications. There are many other tricky aspects, such as translating modules as well as let/in and if/then/else expressions. We also present an integration of our translation into ProB. ProB thus provides a complementary tool to the explicit state model checker TLC, with convenient animation and constraint solving for TLA+. We also present a series of case studies, highlighting the complementarity to TLC. In particular, we highlight the sometimes dramatic difference in performance when it comes to solving complicated constraints in TLA+.

[1]  J. R. Abrial,et al.  The B-Book: Mathematics , 1996 .

[2]  Michael Leuschel,et al.  Constraint-based deadlock checking of high-level specifications , 2011, Theory Pract. Log. Program..

[3]  Stephan Merz TLA + Case Study: A Resource Allocator , 2004 .

[4]  Jim Woodcock,et al.  Theoretical Aspects of Computing - ICTAC 2010, 7th International Colloquium, Natal, Rio Grande do Norte, Brazil, September 1-3, 2010. Proceedings , 2010, ICTAC.

[5]  Leslie Lamport,et al.  Model Checking TLA+ Specifications , 1999, CHARME.

[6]  Thierry Massart,et al.  Efficient approximate verification of B and Z models via symmetry markers , 2010, Annals of Mathematics and Artificial Intelligence.

[7]  Leslie Lamport,et al.  Specifying Systems: The TLA+ Language and Tools for Hardware and Software Engineers [Book Review] , 2002, Computer.

[8]  Frank Wolter,et al.  Monodic fragments of first-order temporal logics: 2000-2001 A.D , 2001, LPAR.

[9]  N. Meyers,et al.  H = W. , 1964, Proceedings of the National Academy of Sciences of the United States of America.

[10]  Olfa Mosbahi,et al.  A Formal Approach for the Development of Automated Systems , 2007, ICSOFT.

[11]  J. R. Abrial,et al.  The B-Book: Programming , 1996 .

[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]  Frank Pfenning,et al.  Logic Programming and Automated Reasoning , 1994, Lecture Notes in Computer Science.

[14]  George J. Milne,et al.  Correct Hardware Design and Verification Methods , 2003, Lecture Notes in Computer Science.

[15]  Stefania Gnesi,et al.  FME 2003: Formal Methods: International Symposium of Formal Methods Europe, Pisa, Italy, September 8-14, 2003. Proceedings , 2003, Lecture Notes in Computer Science.

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

[17]  Frank Waters,et al.  The B Book , 1971 .

[18]  Stephan Merz,et al.  Automatic Verification of TLA + Proof Obligations with SMT Solvers , 2012, LPAR.

[19]  Stephan Merz,et al.  Animating TLA Specifications , 1999, LPAR.

[20]  Michael Leuschel,et al.  Efficient Approximate Verification of B via Symmetry Markers , 2007 .

[21]  Stephan Merz,et al.  Verifying Safety Properties with the TLA+ Proof System , 2010, IJCAR.

[22]  Stephan Merz,et al.  The TLA+ Proof System: Building a Heterogeneous Verification Platform , 2010, ICTAC.