Tim Disney

Contracts for Async Patterns in JavaScript

by Tim Disney, Cormac Flanagan

Abstract

Behavioral contracts are widely used in programming languages including Eiffel, Scheme/Racket, and JavaScript to specify and enforce the dynamic behavior of programs. Much of the work done recently in contract systems has been in extending the expressive power of contracts, for example to handle polymorphic specifications or integrate with types.

In prior work, we proposed a general contract framework for specifying and enforcing higher-order temporal properties. Here, we present several specific contracts that address common temporal patterns found in JavaScript programs.