API Protocol Compliance in Object-Oriented Software

Abstract

Modern software development is highly reliant on reusable APIs. APIs often define usage protocols that API clients must follow in order for code implementing the API to work correctly. Loosely speaking, API protocols define legal sequences of method calls on objects. In this work, protocols are defined based on typestates (Strom and Yemini, 1986; DeLine and Fahndrich, 2004b). Typestates leverage the familiar intuition of abstract state machines to define usage protocols. The goal of this work is to give developers comprehensive help in defining and following API protocols in object-oriented software. Two key technical contributions enable the proposed approach: (1) Object state spaces are defined with hierarchical state refinements. Hierarchical state spaces make specifications more succinct, elegantly deal with subtyping, express uncertainty, and enable more precise reasoning about aliasing. (2) A novel abstraction, called access permissions, combines typestate and aliasing information. Access permissions capture developers' design intent regarding API protocols and enable sound modular verification of API protocol compliance while allowing a great deal of flexibility in aliasing objects.

Open PDF

Document Details

Document Type
Technical Report
Publication Date
Apr 23, 2009
Accession Number
ADA501766

Entities

People

  • Kevin Bierhoff

Organizations

  • Carnegie Mellon University

Tags

Communities of Interest

  • C4I

DTIC Thesaurus Topics

  • Agile Software Development
  • Coding
  • Computer Programming
  • Computer Programs
  • Computer Science
  • Computers
  • Debugging
  • Formal Languages
  • Object Oriented Programming
  • Operating Systems
  • Programming Languages
  • Software Development
  • Software Development Tools
  • Software Testing
  • Test And Evaluation
  • Test Methods
  • Theoretical Computer Science

Fields of Study

  • Computer science
  • Engineering

Readers

  • Database Systems and Applications

Technology Areas

  • Space