Behavioral Interface Contracts for Java

dc.contributor.authorFelleisen, Matthiasen_US
dc.contributor.authorFindler, Robert Bruceen_US
dc.date.accessioned2017-08-02T22:02:48Zen_US
dc.date.available2017-08-02T22:02:48Zen_US
dc.date.issued2005-08-25en_US
dc.date.noteAugust 25, 2005en_US
dc.description.abstractPrograms should consist of off-the-shelf, interchangeable, black-box components that are produced by a network of independent software companies. These components should not only come with type signatures but also with contracts that describe other aspects of their behavior. One way to express contracts is to state preand postconditions for externally visible functions. These preand post-conditions should then be validated during evaluation or possibly even during compilation. If a function call fails to satisfy its contract, the run-time system should blame the faulty program component. Behavioral contracts in the form of assertions are well-understood in the world of procedural languages. Their addition to class and interface hierarchies in object-oriented programming languages, however, raises many new and interesting questions. The most complicating factor is that objects can pass between components and trigger call-backs. Another problem is that object-oriented languages allow objects to satisfy several interfaces at once. In this paper, we analyze existing approaches to adding contracts to class-based languages and show how they blame the wrong component in certain situations for breach of contract. We then present a conservative extension of Java that allows programmers to specify method contracts in interfaces. The extension is a compromise between a consistent enforcement of contracts and language design concerns. In the future, we plan to clarify the relationship between contracts and contract violations with a rigorous analysis.en_US
dc.format.extent22 ppen_US
dc.identifier.citationFelleisen, Matthias and Findler, Robert Bruce. "Behavioral Interface Contracts for Java." (2005) https://hdl.handle.net/1911/96279.en_US
dc.identifier.digitalTR00-366en_US
dc.identifier.urihttps://hdl.handle.net/1911/96279en_US
dc.language.isoengen_US
dc.rightsYou are granted permission for the noncommercial reproduction, distribution, display, and performance of this technical report in any format, but this permission is only for a period of forty-five (45) days from the most recent time that you verified that this technical report is still available from the Computer Science Department of Rice University under terms that include this permission. All other rights are reserved by the author(s).en_US
dc.titleBehavioral Interface Contracts for Javaen_US
dc.typeTechnical reporten_US
dc.type.dcmiTexten_US
Files
Original bundle
Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
TR00-366.pdf
Size:
1.47 MB
Format:
Adobe Portable Document Format