JKelloy: A Proof Assistant for Relational Specifications of Java Programs

Alloy is a relational specification language with a built-in transitive closure operator which makes it particularly suitable for writing concise specifications of linked data structures. Several tools support Alloy specifications for Java programs. However, they can only check the validity of those specifications with respect to a bounded domain, and thus, in general, cannot provide correctness proofs. This paper presents JKelloy, a tool for deductive verification of Java programs with Alloy specifications. It includes automatically-generated coupling axioms that bridge between specifications and Java states, and two sets of calculus rules that 1 generate verification conditions in relational logic and 2 simplify reasoning about them. All rules have been proved correct. To increase automation capabilities, proof strategies are introduced that control the application of those rules. Our experiments on linked lists and binary graphs show the feasibility of the approach.

[1]  Bertrand Meyer,et al.  Applying 'design by contract' , 1992, Computer.

[2]  Yde Venema,et al.  Dynamic Logic by David Harel, Dexter Kozen and Jerzy Tiuryn. The MIT Press, Cambridge, Massachusetts. Hardback: ISBN 0–262–08289–6, $50, xv + 459 pages , 2002, Theory and Practice of Logic Programming.

[3]  Shuvendu K. Lahiri,et al.  Verifying properties of well-founded linked lists , 2006, POPL '06.

[4]  Mattias Ulbrich,et al.  A Proof Assistant for Alloy Specifications , 2012, TACAS.

[5]  Kousha Etessami,et al.  Analysis of Recursive Game Graphs Using Data Flow Equations , 2004, VMCAI.

[6]  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.

[7]  Sarfraz Khurshid,et al.  Integrating Model Checking and Theorem Proving for Relational Reasoning , 2003, RelMiCS.

[8]  James C. King,et al.  Symbolic execution and program testing , 1976, CACM.

[9]  Alan J. Hu,et al.  An Inference-Rule-Based Decision Procedure for Verification of Heap-Manipulating Programs with Mutable Data and Cyclic Data Structures , 2007, VMCAI.

[10]  Viktor Kuncak,et al.  Full functional verification of linked data structures , 2008, PLDI '08.

[11]  Mana Taghdiri,et al.  Automating modular program verification by refining specifications , 2008 .

[12]  Shmuel S. Tyszberowicz,et al.  Specifying a Linked Data Structure in JML for Formal Verification and Runtime Checking , 2013, SBMF.

[13]  Mandana Vaziri-Farahani,et al.  Finding bugs in software with a constraint solver , 2004 .

[14]  Georg Struth,et al.  Relational and Kleene-Algebraic Methods in Computer Science , 2003, Lecture Notes in Computer Science.

[15]  Neil Immerman,et al.  Simulating Reachability Using First-Order Logic with Applications to Verification of Linked Data Structures , 2005, CADE.

[16]  Daniel Jackson,et al.  Software Abstractions - Logic, Language, and Analysis , 2006 .

[17]  Edsger W. Dijkstra,et al.  Guarded commands, nondeterminacy and formal derivation of programs , 1975, Commun. ACM.

[18]  Marcelo F. Frias,et al.  Dynamite 2.0: New Features Based on UnSAT-Core Extraction to Improve Verification of Software Requirements , 2010, ICTAC.

[19]  Frank Tip,et al.  Finding bugs efficiently with a SAT solver , 2007, ESEC-FSE '07.

[20]  Kuat T Yessenov A Lightweight Specification Language for Bounded Program Verification , 2009 .

[21]  Benjamin Weiß,et al.  Deductive verification of object-oriented software: dynamic frames, dynamic logic and predicate abstraction , 2011 .

[22]  Ajitha Rajan,et al.  Requirements Coverage as an Adequacy Measure for Conformance Testing , 2008, ICFEM.

[23]  Nazareno Aguirre,et al.  Towards Abstraction for DynAlloy Specifications , 2008, ICFEM.

[24]  Bernhard Beckert,et al.  Verification of Object-Oriented Software. The KeY Approach - Foreword by K. Rustan M. Leino , 2007, The KeY Approach.

[25]  Bernhard Beckert,et al.  Dynamic Logic , 2007, The KeY Approach.

[26]  MeyerBertrand,et al.  Design by Contract , 1997 .

[27]  Rajeev Alur,et al.  A Temporal Logic of Nested Calls and Returns , 2004, TACAS.