Thumbnail
Access Restriction
Subscribed

Author Findler, Robert Bruce ♦ Felleisen, Matthias ♦ Dimoulas, Christos
Source ACM Digital Library
Content type Text
Publisher Association for Computing Machinery (ACM)
File Format PDF
Language English
Subject Domain (in DDC) Computer science, information & general works ♦ Computer programming, programs & data
Subject Keyword Random testing ♦ Propabilistic spot checking ♦ Behavioral software contracts ♦ Programming language design
Abstract Many languages support behavioral software contracts so that programmers can describe a component's obligations and promises via logical assertions in its interface. The contract system monitors program execution, checks whether the assertions hold, and, if not, blames the guilty component. Pinning down the violator gets the debugging process started in the right direction. Quality contracts impose a serious run-time cost, however, and programmers therefore compromise in many ways. Some turn off contracts for deployment, but then contracts and code quickly get out of sync during maintenance. Others test contracts randomly or probabilistically. In all cases, programmers have to cope with lack of blame information when the program eventually fails. In response, we propose option contracts as an addition to the contract tool box. Our key insight is that in ordinary contract systems, server components impose their contract on client components, giving them no choice whether to trust the server's promises or check them. With option contracts, server components may choose to tag a contract as an option and clients may choose to exercise the option or accept it, in which case they also shoulder some responsibility. We show that option contracts permit programmers to specify flexible checking policies, that their cost is reasonable, and that they satisfy a complete monitoring theorem.
Description Affiliation: Harvard University, Cambridge, MA, USA (Dimoulas, Christos) || Northeastern University, Boston, MA, USA (Felleisen, Matthias) || Northwestern University, Evanston, IL, USA (Findler, Robert Bruce)
Age Range 18 to 22 years ♦ above 22 year
Educational Use Research
Education Level UG and PG
Learning Resource Type Article
Publisher Date 1983-05-01
Publisher Place New York
Journal ACM SIGPLAN Notices (SIGP)
Volume Number 48
Issue Number 10
Page Count 20
Starting Page 475
Ending Page 494


Open content in new tab

   Open content in new tab
Source: ACM Digital Library