Reachability analysis for annotated code

Well-specified programs enable code reuse and therefore techniques that help programmers to annotate code correctly are valuable. We devised an automated analysis that detects unreachable code in the presence of code annotations. We implemented it as an enhancement of the extended static checker ESC/Java2 where it serves as a check of coherency of specifications and code. In this article we define the notion of semantic unreachability, describe an algorithm for checking it and demonstrate on a case study that it detects a class of errors previously undetected, as well as describe different scenarios of these errors.

[1]  Parosh Aziz Abdulla,et al.  Symbolic Reachability Analysis Based on SAT-Solvers , 2000, TACAS.

[2]  Donald E. Knuth,et al.  Literate Programming , 1984, Comput. J..

[3]  C. A. R. HOARE,et al.  An axiomatic basis for computer programming , 1969, CACM.

[4]  Nicolas Halbwachs,et al.  Automatic discovery of linear restraints among variables of a program , 1978, POPL.

[5]  Patrice Chalin,et al.  Early detection of JML specification errors using ESC/Java2 , 2006, SAVCBS '06.

[6]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[7]  Lisa Friendly,et al.  The Design of Distributed Hyperlinked Programming Documentation , 1995, IWHD.

[8]  M. Chial,et al.  in simple , 2003 .

[9]  David R. Cok,et al.  ESC/Java2: Uniting ESC/Java and JML Progress and Issues in Building and Using ESC/Java2, Including a Case Study Involving the Use of the Tool to Verify Portions of an Internet Voting Tally System , 2005 .

[10]  Eugene L. Lawler,et al.  The recognition of Series Parallel digraphs , 1979, SIAM J. Comput..

[11]  Fabrice Bouquet,et al.  Symbolic Animation of JML Specifications , 2005, FM.

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

[13]  John Launchbury,et al.  Proceedings of the 29th ACM SIGPLAN-SIGACT symposium on Principles of programming languages , 2002, POPL 2002.

[14]  Gary T. Leavens,et al.  Specification and verification challenges for sequential object-oriented programs , 2007, Formal Aspects of Computing.

[15]  Sabine Glesner,et al.  Formal verification of dead code elimination in Isabelle/HOL , 2005, Third IEEE International Conference on Software Engineering and Formal Methods (SEFM'05).

[16]  K. Rustan M. Leino,et al.  Checking Java Programs via Guarded Commands , 1999, ECOOP Workshops.

[17]  Albert L. Baker,et al.  JML: A Notation for Detailed Design , 1999, Behavioral Specifications of Businesses and Systems.

[18]  Todd D. Millstein,et al.  Generating error traces from verification-condition counterexamples , 2005, Sci. Comput. Program..

[19]  Flemming Nielson,et al.  Principles of Program Analysis , 1999, Springer Berlin Heidelberg.

[20]  Cormac Flanagan,et al.  Predicate abstraction for software verification , 2002, POPL '02.

[21]  K. Rustan M. Leino,et al.  Loop Invariants on Demand , 2005, APLAS.

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

[23]  Shuvendu K. Lahiri,et al.  A Reachability Predicate for Analyzing Low-Level Software , 2007, TACAS.

[24]  Ken Kennedy,et al.  AS imple, Fast Dominance Algorithm , 1999 .

[25]  K. Rustan M. Leino,et al.  BoogiePL: A typed procedural language for checking object-oriented programs , 2005 .

[26]  Charles W. Krueger,et al.  Software reuse , 1992, CSUR.

[27]  Michael D. Ernst,et al.  An overview of JML tools and applications , 2003, Electron. Notes Theor. Comput. Sci..

[28]  Mikoláš Janota Assertion-based loop invariant generation , 2007 .

[29]  Cormac Flanagan,et al.  Avoiding exponential explosion: generating compact verification conditions , 2001, POPL '01.

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

[31]  Timothy J. Harvey,et al.  AS imple, Fast Dominance Algorithm , 1999 .

[32]  Bernhard Rumpe,et al.  Behavioral Specifications of Businesses and Systems , 1999, Behavioral Specifications of Businesses and Systems.