Contracts for First-Class Classes

Author:

Strickland T. Stephen1,Dimoulas Christos1,Takikawa Asumu1,Felleisen Matthias1

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)

Subject

Software

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篇论文的施引文献,订阅后可以查看论文全部施引文献

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3