Typestate: A programming language concept for enhancing software reliability

  title={Typestate: A programming language concept for enhancing software reliability},
  author={Robert E. Strom and Shaula Yemini},
  journal={IEEE Transactions on Software Engineering},
  • R. Strom, S. Yemini
  • Published 1986
  • Computer Science
  • IEEE Transactions on Software Engineering
The authors introduce a new programming language concept, called typestate, which is a refinement of the concept of type. Whereas the type of a data object determines the set of operations over permitted on the object, typestate determines the subset of these operations which is permitted in a particular context. Typestate tracking is a program analysis technique which enhances program reliability by detecting at compile-time syntactically legal but semantically undefined execution sequences… Expand
A Type Checked Prototype-Based Model with Linearity
This paper provides a more structured facility for dynamic inheritance, where a type system tracks the changes in an object's interface that occur as the inheritance hierarchy is changed and proves that the type system is sound in that it prevents run-time type errors. Expand
Typestates for Objects
A programming model of typestates for objects with a sound modular checking algorithm that handles typical aspects of object-oriented programs such as down-casting, virtual dispatch, direct calls, and subclassing is developed. Expand
Foundations of Typestate-Oriented Programming
This article lays foundations for TSOP by formalizing a nominal object-oriented language with mutable state that integrates typestate change and typestate checking as primitive concepts and extends the notion of gradual typing to account for typestate. Expand
Papaya: Global Typestate Analysis of Aliased Objects Extended Version
This paper presents a type system for an object-oriented language with typestate annotations, which allows for unrestricted aliasing, and as opposed to previous approaches it does not require linearity constraints. Expand
Gradual Typestate
A nominal object-oriented language with mutable state that integrates typestate change and typestate checking as primitive concepts and extends the notion of gradual typing to account for typestate: gradual typestate Checking seamlessly combines static and dynamic checking by automatically inserting runtime checks into programs. Expand
Papaya: Global Typestate Analysis of Aliased Objects
Typestates are state machines used in object-oriented programming to specify and verify correct order of method calls on an object. To avoid inconsistent object states, typestates enforce linearExpand
Efficient Typestate Verification for Java
In this thesis, we investigate the feasability of supporting software development by static program analysis. We present an algorithm for partly interprocedural context-sensitive typestate analysisExpand
Masked Types : Technical report
This paper presents a type-based solution to the long-standing problem of object initialization. Constructors, the conventional mechanism for object initialization, have semantics that are surprisingExpand
Formal foundations for hybrid effect analysis
This thesis describes intensional effect polymorphism, a new foundation for effect systems that integrates static and dynamic effect checking, and introduces the idea of first-class effects, where the computational effect of an expression can be programmatically reflected, passed around as values, and analyzed at run time. Expand
Types for correct concurrent api usage
As a result of the work presented, it is possible to guarantee the absence of certain API usage errors even in concurrent programs, and to do so with a low burden on programmers. Expand


Mechanisms for compile-time enforcement of security
Features of a secure systems programming language designed and implemented at IBM's Watson Research Lab are discussed, including typestate checking, a new mechanism in which the compiler guarantees that for all execution paths, the sequence of operations on each variable obeys a finite state grammar associated with that variable's type. Expand
The NIL distributed systems programming language: a status report
A summary of ongoing research activities related to the programming language NIL, a high level language for concurrent and distributed systems developed at IBM Yorktown, and issues related to providing a semantic theory for NIL are discussed. Expand
Access-Right Expressions
A notation is provided in which to express sequential constraints, which are here called accessright expressions, and it is suggested that these expressions should be declared in a programming language that supports the definition of monitors or resource managers. Expand
Viewing Ada from a process model perspective
This paper compares two programming language paradigms for large software systems. The first is based upon nested block structure and static binding, augmented with abstract data types andExpand
Toward Modular Verifiable Exception Handling
This paper proposes a solution for one category of exceptions, namely errors, where an externally visible condition name is the link between an error's occurrence and some externally visible but internally programmed handler for it. Expand
Modular verification of concurrent programs
This paper model a parallel program as a set of modules that interact by procedure calls that are proved using a sequential-program verification technique, and can be used to prove safety and liveness properties of parallel programs. Expand
A New Programming Methodology for Long-Lived Software Systems
A new software development methodology based on the language NIL is presented that reduces life-cycle costs and improves software quality because (a) errors are detected earlier, and (b) a single functional design can be re-used to produce many implementations. Expand
A unified approach to global program optimization
A technique is presented for global analysis of program structure in order to perform compile time optimization of object code generated for expressions that includes constant propagation, common subexpression elimination, elimination of redundant register load operations, and live expression analysis. Expand
A methodology for programming abstract data types in Ada
Conventions to be followed for the use of initialization, finalization, assignment, private types, and generic packages in writing transportable and interchangeable abstract data types in Ada are developed. Expand
The specification of process synchronization by path expressions
It is shown that the method's ability to express synchronization rules is equivalent to that of P and V operations, and a means of automatically translating path expressions to existing primitive synchronization operations is given. Expand