First-class state change in plaid

  • Authors:
  • Joshua Sunshine;Karl Naden;Sven Stork;Jonathan Aldrich;Éric Tanter

  • Affiliations:
  • Carnegie Mellon University, Pittsburgh, PA, USA;Carnegie Mellon University, Pittsburgh, PA, USA;Carnegie Mellon University, University of Coimbra, Pittsburgh, PA, USA;Carnegie Mellon University, Pittsburgh, PA, USA;University of Chile, Santiago, Chile

  • Venue:
  • Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Objects model the world, and state is fundamental to a faithful modeling. Engineers use state machines to understand and reason about state transitions, but programming languages provide little support for building software based on state abstractions. We propose Plaid, a language in which objects are modeled not just in terms of classes, but in terms of changing abstract states. Each state may have its own representation, as well as methods that may transition the object into a new state. A formal model precisely defines the semantics of core Plaid constructs such as state transition and trait-like state composition. We evaluate Plaid through a series of examples taken from the Plaid compiler and the standard libraries of Smalltalk and Java. These examples show how Plaid can more closely model state-based designs, enhancing understandability, enhancing dynamic error checking, and providing reuse benefits.