2005 · 29 citations · 11 references
ComputingComputer ScienceDesignContractsDiagrammingSoftware EngineeringModel-driven DevelopmentModel-driven Software EngineeringSoftware ConstructionSoftware DesignSoftware ModelingSpecification LanguagesBehavioral Interface SpecificationDesign By ContractExecutable ContractsExecutable SpecificationsFormal ModelingRuntime Assertion CheckingUml Object DiagramsUnified Modeling Language
Design by contract (DbC) is widely acknowledged to be a powerful technique for creating reliable software. DbC allows developers to specify the behavior of an operation precisely by pre- and post-conditions. Existing DbC approaches predominantly use textual representations of contracts to annotate the actual program code with assertions. In the unified modeling language (UML), the textual object constraint language (OCL) supports the specification of preand post-conditions by constraining the model elements that occur in UML diagrams. However, textual specifications in OCL can become complex and cumbersome, especially for software developers who are typically not used to OCL. In this paper, we propose to specify the pre-and post-conditions of an operation visually by a pair of UML object diagrams (visual contract). We define a mapping of visual contracts into Java classes that are annotated with behavioral interface specifications in the Java modeling language (JML). The mapping supports testing the correctness of the implementation against the specification using JML tools, which include a runtime assertion checker. Thus we make the visual contracts executable.
11
Bertrand Meyer · Computer · 1992 · 2.1K citations
Computing, Computer Science, Design +15
Gary T. Leavens, Albert L. Baker, Clyde Ruby · ACM SIGSOFT Software Engineering Notes · 2006 · 787 citations