Structural Contracts – Motivating Contracts to Ensure Extra-Functional Semantics
In our work we aim at a composable and consistent specification and verification of contracts for extra-functional properties, such as power consumption or temperature. To this end, a necessary precondition for the semantical correctness of such properties is to ensure the structurally correct modeling of their interdependences.
While this can be solved by a tailoring of the Component Based Design (CmpBD) frameworks, the resulting design constraints are specific to tools and viewpoints, not being sufficiently configurable for the designers. To solve this problem within the contract framework, Contract Based Design (CBD) with explicit port variables provides also no configurable but sound methodology for structurally relating the properties between different components and views. For that, we propose the idea of structural contracts. Using implicit structural ports, structural guarantees can be given according to the Component Based Design structure. Expressing structural design constraints by the means of structural assumptions, the CmpBD constraints can become part of the Contract Based Design framework and, thus, can be checked for compatibility and refinement.
As a result, structural contracts enable the contract based specification and verification of structural rules for the correct modeling of functional and extra-functional interdependences. Providing both, property specifications and Component Based Design constraints by contracts, the approach is flexible and sound.
KeywordsContracts Contract based design Components Component based design Compositionality Composability Compatibility Structure Extra-functional View Aspect Type Semantics
- 3.Benveniste, A., Caillaud, B., Nickovic, D., Passerone, R., Raclet, J.B., Reinkemeier, P., Sangiovanni-Vincentelli, A., Damm, W., Henzinger, T., Larsen, K.: Contracts for systems design. Technical Report RR-8147, Research Centre Rennes - Bretagne Atlantique, Rennes Cedex (2012)Google Scholar
- 7.Cimatti, A., Dorigatti, M., Tonetta, S.: OCRA: a tool for checking the refinement of temporal contracts. In: 28th IEEE/ACM International Conference on Automated Software Engineering (ASE) (2013)Google Scholar
- 9.Lee, E.A., Sangiovanni-Vincentelli, A.L.: Component-based design for the future. In: Design, Automation & Test in Europe (DATE) (2011)Google Scholar
- 10.Nitsche, G.: Structural contracts - conceptual example in OCRA. https://vhome.offis.de/gnitsche/paper/iess2015/example/