Protocol Programmability

Abstract

Application Programming Interfaces (APIs) often define protocols-- restrictions on the order of client calls to API methods. API protocols are common and difficult to follow, which has generated tremendous research into the specification and verification of protocols. However, verification techniques do little to alleviate several major challenges programmers face when using API protocols: fixing protocol violations, learning protocol rules, and finding state transitions. To understand these challenges better, I mined developer forums to identify problems that developers have with protocols. Then, I performed a think-aloud observational study, in which I systematically observed professional programmers struggle with these same problems to get more detail on the nature of their struggles and how they used available resources. In my observations, programmer time was spent primarily on four types of searches of the protocol state space. To alleviate the protocol programmability challenges, I embed state modeling techniques directly into code and developer documentation. I design and formalize a programming language, Plaid, in which objects are modeled not just in terms of classes, but in terms of changing abstract states. Each state may have its own fields and methods, as well as methods that transition the object into a new state. I also developed a documentation tool called Plaiddoc, which is like Javadoc except it organizes methods by state instead of by class and it includes explicit state transitions, state-based type specifications, and rich state relationships. I evaluate Plaid through a series of examples taken from the Plaid compiler and standard libraries of Smalltalk and Java. These examples show how Plaid can more closely model state-based designs, enhancing understandability, automating error checking, and providing reuse benefits.

Open PDF

Document Details

Document Type
Technical Report
Publication Date
Dec 01, 2013
Accession Number
ADA598225

Entities

People

  • Joshua Sunshine

Organizations

  • Carnegie Mellon University

Tags

Communities of Interest

  • C4I
  • Engineered Resilient Systems

DTIC Thesaurus Topics

  • Computer Languages
  • Computer Programming
  • Computer Programs
  • Computer Science
  • Computers
  • Debugging
  • Graphical User Interface
  • Information Systems
  • Language
  • Lepidoptera
  • Object Oriented Programming
  • Object-Oriented Programming Language
  • Operating Systems
  • Programming Languages
  • Psychology
  • Software Development
  • Test Methods

Fields of Study

  • Computer science

Readers

  • Computer Networking
  • Database Systems and Applications
  • Political Violence and Terrorism Studies.

Technology Areas

  • Space