Title
Option contracts
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.
Year
DOI
Venue
2013
10.1145/2509136.2509548
OOPSLA
Keywords
DocType
Volume
guilty component,ordinary contract system,client component,contract tool box,option contract,behavioral software contract,quality contract,contract system,test contract,server component
Conference
48
Issue
ISSN
Citations 
10
0362-1340
3
PageRank 
References 
Authors
0.38
14
3
Name
Order
Citations
PageRank
Christos Dimoulas1966.44
Robert Bruce Findler290467.67
Matthias Felleisen33001272.57