Comparison Between Model Fields and Abstract Predicates

To modularly specify and verify object oriented programs on some abstract level, we need abstraction techniques to hide the implementation details of the classes. Model fields and abstract predicates are two most important approaches to address the requirements. In this paper, we mainly compare their expressiveness. We develop two translation algorithms, which can translate a program with model fields based specification to one with abstract predicates based specification. We prove that the translation algorithms are correct, and the resulting specifications are well-encapsulated and well-formed. This shows that the abstract predicates technique is more expressive. On the other hand, the model fields based specifications are more user friendly and useful in automatic verification. In addition, we discuss the different characteristics of the two approaches in framing, inheritance, and recursion.

[1]  K. Rustan M. Leino,et al.  A Verification Methodology for Model Fields , 2006, ESOP.

[2]  John C. Reynolds,et al.  Separation logic: a logic for shared mutable data structures , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[3]  Liu Yijing,et al.  Modular verification of OO programs with interfaces , 2012, ICFEM 2012.

[4]  Gavin M. Bierman,et al.  Separation logic and abstraction , 2005, POPL '05.

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

[6]  Daniel Bruns Formal Semantics for the Java Modeling Language. , 2010 .

[7]  Stephen H. Edwards,et al.  Model variables: cleanly supporting abstraction in design by contract , 2005, Softw. Pract. Exp..

[8]  Frank Piessens,et al.  The VeriFast program verifier , 2008 .

[9]  Gavin M. Bierman,et al.  Separation logic, abstraction and inheritance , 2008, POPL '08.

[10]  K. R Leino,et al.  Towards Reliable Modular Programs , 1995 .

[11]  Stephen H. Edwards,et al.  Model variables: cleanly supporting abstraction in design by contract: Research Articles , 2005 .

[12]  James Noble,et al.  Ownership types for flexible alias protection , 1998, OOPSLA '98.

[13]  Gary T. Leavens,et al.  Information Hiding and Visibility in Interface Specifications , 2007, 29th International Conference on Software Engineering (ICSE'07).

[14]  NobleJames,et al.  Ownership types for flexible alias protection , 1998 .

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

[16]  K. Rustan M. Leino,et al.  Data groups: specifying the modification of extended state , 1998, OOPSLA '98.

[17]  K. Rustan M. Leino,et al.  Practical Reasoning About Invocations and Implementations of Pure Methods , 2007, FASE.

[18]  ParkinsonMatthew,et al.  Separation logic and abstraction , 2005 .

[19]  Liu Yijing,et al.  Inheritance and Modularity in Specification and Verification of OO Programs , 2011, 2011 Fifth International Conference on Theoretical Aspects of Software Engineering.

[20]  Gary T. Leavens,et al.  Modular specification of frame properties in JML , 2003, Concurr. Comput. Pract. Exp..