We study the relation between specifications of component behaviors and contracts providing means to specify assumptions on environments as well as component guarantees. We show how a contract framework can be built in a generic way on top of any specification theory which supports composition and specification refinement. Our contract framework lifts refinement to the level of contracts and proposes a notion of contract composition on the basis of dominating contracts. Contract composition satisfies a universal property and can be constructively defined if the underlying specification theory is complete, i.e. it offers operators for quotienting and conjoining specifications. We illustrate our generic construction of contracts by moving a specification theory for modal transition systems to contracts and we show that a (previously proposed) trace-based contract theory is an instance of our framework.
The relationship between specifications of component behaviors and contracts is further studied by Bauer et al. REF where a contract framework can be built on top of any specification theory equipped with a composition operator and a refinement relation which satisfy certain properties.
Moving from Specifications to Contracts in Component-Based Design
FASE
Computer Science