Modular verification of higher-order methods with mandatory calls specified by model programs

Steve M. Shaner, Gary T. Leavens, David A. Naumann

Research output: Contribution to journalArticlepeer-review

3 Scopus citations

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 higherorder 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 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.

Original languageEnglish
Pages (from-to)351-367
Number of pages17
JournalACM SIGPLAN Notices
Volume42
Issue number10
DOIs
StatePublished - Oct 2007

Keywords

  • Grey-box approach
  • Higher order method
  • Hoare logic
  • Mandatory call
  • Model program
  • Refinement calculus
  • Specification languages
  • Verification

Fingerprint

Dive into the research topics of 'Modular verification of higher-order methods with mandatory calls specified by model programs'. Together they form a unique fingerprint.

Cite this