Efficient Well-Definedness Checking

Formal specifications often contain partial functions that may lead to ill-defined terms. A common technique to eliminate ill-defined terms is to require well-definedness conditions to be proven. The main advantage of this technique is that it allows us to reason in a two-valued logic even if the underlying specification language has a three-valued semantics. Current approaches generate well-definedness conditions that grow exponentially with respect to the input formula. As a result, many tools prove shorter, but stronger approximations of these well-definedness conditions instead. We present a procedure which generates well-definedness conditions that grow linearly with respect to the input formula. The procedure has been implemented in the Spec# verification tool. We also present empirical results that demonstrate the improvements made.

[1]  Albert Hoogewijs,et al.  On a Formalization of the Non-Definedness Notion , 1979, Math. Log. Q..

[2]  Patrice Chalin,et al.  Are the Logical Foundations of Verifying Compiler Prototypes Matching user Expectations? , 2007, Formal Aspects of Computing.

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

[4]  J. Shepherdson,et al.  Computer programming and formal systems , 1965 .

[5]  Marsha Chechik,et al.  A Practical Approach to Partial Functions in CVC Lite , 2005, D/PDPAR@IJCAR.

[6]  Alan Bundy,et al.  Automated Deduction — CADE-12 , 1994, Lecture Notes in Computer Science.

[7]  Tobias Nipkow,et al.  A Proof Assistant for Higher-Order Logic , 2002 .

[8]  Albert L. Baker,et al.  Preliminary design of JML: a behavioral interface specification language for java , 2006, SOEN.

[9]  Sergey Berezin,et al.  CVC Lite: A New Implementation of the Cooperating Validity Checker Category B , 2004, CAV.

[10]  Jean-Raymond Abrial,et al.  On Using Conditional Definitions in Formal Theories , 2002, ZB.

[11]  Jonathan P. Bowen,et al.  ZB 2002:Formal Specification and Development in Z and B , 2002, Lecture Notes in Computer Science.

[12]  Rob Arthan Undefinedness in Z: Issues for Specification and Proof , 1996 .

[13]  Patrice Chalin,et al.  A Sound Assertion Semantics for the Dependable Systems Evolution Verifying Compiler , 2007, 29th International Conference on Software Engineering (ICSE'07).

[14]  Stephen Gilmore,et al.  Mobile Resource Guarantees for Smart Devices , 2004, CASSIS.

[15]  Cliff B. Jones,et al.  On the Usability of Logics which Handle Partial Functions , 1991 .

[16]  Stephen Cole Kleene,et al.  On notation for ordinal numbers , 1938, Journal of Symbolic Logic.

[17]  Geoff Sutcliffe,et al.  The TPTP Problem Library , 1994, Journal of Automated Reasoning.

[18]  Lilian Burdy,et al.  Well Defined B , 1998, B.

[19]  J. Michael Spivey,et al.  Understanding Z : A specification language and its formal semantics , 1985, Cambridge tracts in theoretical computer science.

[20]  Jan van Leeuwen,et al.  Computer Science Today , 1995, Lecture Notes in Computer Science.

[21]  Manfred Broy,et al.  Adapting Calculational Logic to the Undefined , 1999, Comput. J..

[22]  Reiner Hähnle,et al.  Many-Valued Logic, Partiality, and Abstraction in Formal Specification Languages , 2005, Log. J. IGPL.

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

[24]  Mandayam K. Srivas,et al.  A Tutorial Introduction to PVS , 1998 .

[25]  Fred B. Schneider,et al.  Avoiding the Undefined by Underspecification , 1995, Computer Science Today.

[26]  Cliff B. Jones,et al.  Systematic software development using VDM , 1986, Prentice Hall International Series in Computer Science.

[27]  David R. Cok,et al.  ESC/Java2: Uniting ESC/Java and JML , 2004, CASSIS.

[28]  Didier Bert B’98: Recent Advances in the Development and Use of the B Method , 1998, Lecture Notes in Computer Science.

[29]  John McCarthy,et al.  A basis for a mathematical theory of computation, preliminary report , 1899, IRE-AIEE-ACM '61 (Western).

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

[31]  Stephen J. Garland,et al.  Larch: Languages and Tools for Formal Specification , 1993, Texts and Monographs in Computer Science.

[32]  Peter Müller,et al.  Checking Well-Formedness of Pure-Method Specifications , 2008, FM.

[33]  K. Rustan M. Leino,et al.  The Spec# Programming System: An Overview , 2004, CASSIS.

[34]  David Detlefs,et al.  Simplify: a theorem prover for program checking , 2005, JACM.

[35]  Cliff B. Jones,et al.  A logic covering undefinedness in program proofs , 1984, Acta Informatica.