Modular Verification of Higher-Order Methods with Mandatory Calls Specified by Model Programs







Deposit Papers 


Shaner, Steve M., Leavens, Gary T. and Naumann, David A. (2007) Modular Verification of Higher-Order Methods with Mandatory Calls Specified by Model Programs. Technical Report TR #07-04a, Computer Science, Iowa State University.

Full text available as:Adobe PDF

This is the latest version of this eprint.


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 unintuitive and verbose. We describe a simple, intuitive, and modular approach to specifying HOMs We show how to verify calls to HOMs and their code using first-order verification conditions, in a sound 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.

Keywords:Model program, verification, specification languages, grey-box approach, higher order method, mandatory call, Hoare logic, refinement calculus.
Subjects:Software: PROGRAMMING TECHNIQUES (E): Object-oriented Programming
Software: SOFTWARE ENGINEERING (K.6.3): Requirements/Specifications (D.3.1)
Software: SOFTWARE ENGINEERING (K.6.3): Software/Program Verification (F.3.1)
Software: PROGRAMMING LANGUAGES: Language Constructs and Features (E.2)
Theory of Computation: LOGICS AND MEANINGS OF PROGRAMS: Specifying and Verifying and Reasoning about Programs (D.2.1, D.2.4, D.3.1, E.1)
ID code:00000536
Deposited by:Gary T. Leavens on 06 April 2007
Alternative Locations:

Available Versions of This Paper

Contact site administrator at: