Affiliation:
1. Northeastern University
Abstract
First-class classes enable programmers to abstract over patterns in the class hierarchy and to experiment with new forms of object-oriented programming such as mixins and traits. This increase in expressive power calls for tools to control the complexity of the software architecture. A contract system is one possible tool that has seen much use in object-oriented programming languages, but existing contract systems cannot cope with first-class classes. On the one hand, the typical contract language deals only with plain values such as numbers, while classes are higher-order values. On the other hand, contract specifications are usually contained within class definitions, while classes as values call for a separate contract language.
This article presents the design and implementation of a contract system for first-class classes as well as a two-pronged evaluation. The first one states and proves a “blame correctness” theorem for a model of our language. The theorem shows that when the contract system assigns blame to a component for a contract violation, the component is indeed responsible for providing the nonconforming value. The second part, consisting of benchmarks and case studies, demonstrates the need for the rich contract language and validates that our implementation approach is performant with respect to time.
Funder
Air Force Office of Scientific Research
National Science Foundation
Defense Advanced Research Projects Agency
Publisher
Association for Computing Machinery (ACM)
Reference59 articles.
1. A first-class approach to genericity
2. Eric Allen David Chase Joe Hallett Victor Luchangco Jan-Willem Maessen Sukyoung Ryu Guy L. Steele Jr. and Sam Tobin-Hochstadt. 2008. The Fortress Language Specification Version 1.0. Sun Microsystems. Eric Allen David Chase Joe Hallett Victor Luchangco Jan-Willem Maessen Sukyoung Ryu Guy L. Steele Jr. and Sam Tobin-Hochstadt. 2008. The Fortress Language Specification Version 1.0. Sun Microsystems.
3. Jam---designing a Java extension with mixins
4. Thomas H. Austin Tim Disney and Cormac Flanagan. 2010. Virtual values for language extension. Tech. rep. UCSC-SOE-10-25. University of California Santa Cruz. Thomas H. Austin Tim Disney and Cormac Flanagan. 2010. Virtual values for language extension. Tech. rep. UCSC-SOE-10-25. University of California Santa Cruz.
5. The Spec# Programming System: An Overview
Cited by
11 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献