Refinement Types for tla +

tla + is a specification language, mainly intended for concurrent and distributed systems. Its non-temporal fragment is based on a variant of untyped zf set theory. Motivated by the integration of the tla + Proof System with smt solvers or similar tools based on multi-sorted first-order logic, we define a type system for tla + and we prove its soundness. The system includes refinement types, which fit naturally in set theory. Combined with dependent function types, we obtain type annotations on top of an untyped specification language, getting the best of both the typed and untyped approaches. After implementing the type inference algorithm, we show that the resulting typing discipline improves the verification capabilities of the proof system.

[1]  David Aspinall,et al.  Subtyping dependent types , 1996, Proceedings 11th Annual IEEE Symposium on Logic in Computer Science.

[2]  Claude Kirchner,et al.  Solving Equations in Abstract Algebras: A Rule-Based Survey of Unification , 1991, Computational Logic - Essays in Honor of Alan Robinson.

[3]  David Déharbe Integration of SMT-solvers in B and Event-B development environments , 2013, Sci. Comput. Program..

[4]  Kenneth Knowles,et al.  Type Reconstruction for General Refinement Types , 2007, ESOP.

[5]  Leslie Lamport,et al.  Should your specification language be typed , 1999, TOPL.

[6]  François Pottier,et al.  Simplifying subtyping constraints , 1996, ICFP '96.

[7]  J. Michael Spivey,et al.  The Z notation - a reference manual , 1992, Prentice Hall International Series in Computer Science.

[8]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[9]  Ganesh Gopalakrishnan,et al.  Proceedings of the 23rd international conference on Computer aided verification , 2011 .

[10]  Hélène Kirchner,et al.  Programming with Equalitiers, Subsorts, Overloading and Parametrization in OBJ , 1992, J. Log. Program..

[11]  Stephan Merz,et al.  Harnessing SMT Solvers for TLA+ Proofs , 2012, Electron. Commun. Eur. Assoc. Softw. Sci. Technol..

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

[13]  Frank Pfenning,et al.  Refinement types for ML , 1991, PLDI '91.

[14]  Frank Pfenning,et al.  Dependent types in practical programming , 1999, POPL '99.

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

[16]  Jurriaan Hage,et al.  Generalizing Hindley-Milner Type Inference Algorithms , 2002 .

[17]  Natarajan Shankar,et al.  Subtypes for Specifications: Predicate Subtyping in PVS , 1998, IEEE Trans. Software Eng..

[18]  María Manzano,et al.  Extensions of First-Order Logic , 1996 .

[19]  Martin Odersky,et al.  Type Inference with Constrained Types , 1999, Theory Pract. Object Syst..

[20]  Gilles Dowek,et al.  Collections, sets and types , 1999, Mathematical Structures in Computer Science.