|
ABSTRACT
What we call a''higher-order method" (HOM) is a method that makes mandatory calls to other dynamically-dispatched methods. Examples include template methods as in the Template method design pattern and notify methods in the Observer pattern. HOMs are particularly difficult to reason about, because standard pre- and postcondition specifications cannot describe the mandatory calls. For reasoning about such methods, existing approaches use either higher order logic or traces, but both are complex and verbose. We describe a simple, concise, and modular approach to specifying HOMs We show how to verify calls to HOMs and their code using first-order verification conditions, in asound and modular way. Verification of client code that calls HOMs can take advantage of the client's knowledge about the mandatory calls to make strong conclusions. Our verification technique validates and explains traditional documentation practice for HOMs, which typically shows their code. However, specifications do not have to expose all of the code to clients, but only enough to determine how the HOM makes its mandatory calls.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
| |
2
|
Ralph-Johan J. Back , Abo Akademi , J. Von Wright , F. B. Schneider , D. Gries, Refinement Calculus: A Systematic Introduction, Springer-Verlag New York, Inc., Secaucus, NJ, 1998
|
 |
3
|
|
| |
4
|
M. Barnett, K. R. M. Leino, and W. Schulte. The Spec# programming system: An overview. In G. Barthe, L. Burdy, M. Huisman, J.-L. Lanet, and T. Muntean, editors, Construction and Analysis of Safe, Secure, and Interoperable Smart devices (CASSIS 2004), volume 3362 of Lecture Notes in Computer Science, pages 49--69. Springer-Verlag, 2005.
|
| |
5
|
|
| |
6
|
|
| |
7
|
M. Büchi. Safe language mechanisms for modularization and concurrency. Technical Report TUCS Dissertations No. 28, Turku Center for Computer Science, May 2000.
|
| |
8
|
M. Büchi and W. Weck. A plea for grey-box components. Technical Report 122, Turku Center for Computer Science, Presented at the Workshop on Foundations of Component-Based Systems, Zürich, September 1997, 1997. http://tinyurl.com/2833tr.
|
| |
9
|
|
| |
10
|
|
 |
11
|
|
| |
12
|
W. Damm and B. Josko. A sound and relatively complete Hoare-logic for a language with higher type procedures. Acta Informatica, 20(1):59--101, Oct. 1983.
|
| |
13
|
|
| |
14
|
|
| |
15
|
G. W. Ernst, J. K. Navlakha, and W. F. Ogden. Verification of programs with procedure-type parameters. Acta Informatica, 18(2):149--169, Nov. 1982.
|
 |
16
|
|
 |
17
|
Cormac Flanagan , K. Rustan M. Leino , Mark Lillibridge , Greg Nelson , James B. Saxe , Raymie Stata, Extended static checking for Java, Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, June 17-19, 2002, Berlin, Germany
|
| |
18
|
|
| |
19
|
E. C. R. Hehner. Specified blocks. Verified Software: Theories, Tools, Experiments (VSTTE), Oct. 2005. http://tinyurl.com/2a7kf2.
|
 |
20
|
|
| |
21
|
C. A. R. Hoare. Procedures and parameters: An axiomatic approach. In E. Engeler, editor, Symposium on Semantics of Algorithmic Languages. Springer-Verlag, 1971.
|
 |
22
|
Atshushi Igarashi , Benjamin Pierce , Philip Wadler, Featherwieght Java: a minimal core calculus for Java and GJ, Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.132-146, November 01-05, 1999, Denver, Colorado, United States
|
| |
23
|
G. T. Leavens. JML's rich, inherited specifications for behavioral subtypes. In Z. Liu and H. Jifeng, editors, Formal Methods and Software Engineering: 8th International Conference on Formal Engineering Methods (ICFEM), volume 4260 of Lecture Notes in Computer Science, pages 2--34, New York, NY, Nov. 2006. Springer-Verlag.
|
 |
24
|
|
| |
25
|
|
| |
26
|
|
| |
27
|
G. T. Leavens and D. A. Naumann. Behavioral subtyping, specification inheritance, and modular reasoning. Technical Report 06--20b, Department of Computer Science, Iowa State University, Ames, Iowa, 50011, Sept. 2006.
|
| |
28
|
G. T. Leavens, D. A. Naumann, and S. Rosenberg. Preliminary definition of Core JML. CS Report 2006--07, Stevens Institute of Technology, Sept. 2006.
|
| |
29
|
G. T. Leavens, E. Poll, C. Clifton, Y. Cheon, C. Ruby, D. R. Cok, P. Müller, J. Kiniry, and P. Chalin. JML Reference Manual. Department of Computer Science, Iowa State University. Available from http://www.jmlspecs.org, Feb. 2007.
|
| |
30
|
G. T. Leavens and W. E. Weihl. Specification and verification of Object-Oriented programs using supertype abstraction. Acta Informatica, 32(8):705--778, Nov. 1995.
|
 |
31
|
K. Rustan M. Leino, Data groups: specifying the modification of extended state, Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.144-153, October 18-22, 1998, Vancouver, British Columbia, Canada
|
 |
32
|
|
| |
33
|
|
| |
34
|
|
| |
35
|
|
| |
36
|
D. A. Naumann. Verifying a secure information flow analyzer. In J. Hurd and T. Melham, editors, 18th International Conference on Theorem Proving in Higher Order Logics TPHOLS, volume 3603 of Lecture Notes in Computer Science, pages 211--226, 2005.
|
| |
37
|
E. Olderog. On the notion of expressiveness and the rule of adaptation. Theoretical Comput. Sci., 24:337--347, 1983.
|
| |
38
|
M. J. Parkinson. Local reasoning for Java. Technical Report 654, University of Cambridge Computer Laboratory, Nov. 2005. The author's Ph.D. dissertation.
|
| |
39
|
C. Pierik. Validation Techniques for Object-Oriented Proof Outlines. PhD thesis, Universiteit Utrecht, 2006.
|
| |
40
|
A. Poetzsch-Heffter, P. Müller, and J. Schäfer. The Jive tool. http://tinyurl.com/3cke34, Apr. 2006. Checked August 2, 2006.
|
| |
41
|
|
| |
42
|
N. Soundarajan and S. Fridella. Incremental reasoning for object oriented systems. In O. Owe, S. Krogdahl, and T. Lyche, editors, From Object-Orientation to Formal Methods, Essays in Memory of Ole-Johan Dahl, volume 2635 of Lecture Notes in Computer Science, pages 302--333. Springer-Verlag, 2004.
|
CITED BY
|
|
Neelakantan R. Krishnaswami , Jonathan Aldrich , Lars Birkedal , Kasper Svendsen , Alexandre Buisse, Design patterns in separation logic, Proceedings of the 4th international workshop on Types in language design and implementation, January 24-24, 2009, Savannah, GA, USA
|
INDEX TERMS
Primary Classification:
D.
Software
D.2
SOFTWARE ENGINEERING
D.2.1
Requirements/Specifications
Subjects:
Languages
Additional Classification:
D.
Software
D.2
SOFTWARE ENGINEERING
D.2.1
Requirements/Specifications
Subjects:
Methodologies (e.g., object-oriented, structured)
D.2.4
Software/Program Verification
Subjects:
Programming by contract;
Formal methods;
Correctness proofs
General Terms:
Languages,
Verification
Keywords:
grey-box approach,
higher order method,
hoare logic,
mandatory call,
model program,
refinement calculus,
specification languages,
verification
|