Typestate-oriented programming
- 25 October 2009
- conference paper
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 1015-1022
- https://doi.org/10.1145/1639950.1640073
Abstract
Objects model the world, and state is fundamental to a faith- ful modeling. Engineers use state machines to understand and reason about state transitions, but programming lan- guages provide little support for reasoning about or imple- menting these state machines, causing software defects and lost productivity when objects are misused. We propose Typestate-Oriented Programming as a nat- ural extension to the object paradigm, where objects are modeled not just in terms of classes, but in terms of chang- ing states. Each state may have its own representation and methods which may transition the object into a new state. A flow-sensitive, permission-based type system helps develop- ers track which state objects are in. First-class typestates are a powerful abstraction that will help developers model and reuse objects more efficiently and correctly.Keywords
This publication has 14 references indexed in Scilit:
- Practical API Protocol Checking with Access PermissionsLecture Notes in Computer Science, 2009
- Collaborative Runtime Verification with TracematchesJournal of Logic and Computation, 2008
- Effective typestate verification in the presence of aliasingACM Transactions on Software Engineering and Methodology, 2008
- The early history of SmalltalkACM SIGPLAN Notices, 1993
- A new model for handling inputACM Transactions on Information Systems, 1990
- Objects with rolesPublished by Association for Computing Machinery (ACM) ,1990
- Self: The power of simplicityPublished by Association for Computing Machinery (ACM) ,1987
- Statecharts: a visual formalism for complex systemsScience of Computer Programming, 1987
- Typestate: A programming language concept for enhancing software reliabilityIEEE Transactions on Software Engineering, 1986
- SIMULA: an ALGOL-based simulation languageCommunications of the ACM, 1966