Making Specifications Complete Through Models
Author(s) -
Bernd Schoeller,
Tobias Widmer,
Bertrand Meyer
Publication year - 2006
Publication title -
lecture notes in computer science
Language(s) - English
Resource type - Book series
SCImago Journal Rank - 0.249
H-Index - 400
eISSN - 1611-3349
pISSN - 0302-9743
ISBN - 3-540-35800-5
DOI - 10.1007/11786160_3
Subject(s) - computer science , design by contract , soundness , assertion , programming language , abstraction , software engineering , formal specification , class (philosophy) , theoretical computer science , software , software development , artificial intelligence , software construction , philosophy , epistemology
Good components need precise contracts. In the practice of Design by ContractTM, applications and libraries typically express, in their postconditions and class invariants, only a subset of the relevant properties. We present: An approach to making these contract elements complete without extending the assertion language, by relying on “model classes” directly deduced from mathematical concepts. An actual “Mathematical Model Library” (MML) built for that purpose A method for using MML to express complete contracts through abstraction functions, and an associated theory of specification soundness. As a direct application of these ideas, a new version of a widely used data structure and algorithms library equipped with complete contracts through MML. All the software is available for download. The approach retains the pragmatism of the Design by Contract method, suitable for ordinary applications and understandable to ordinary programmers, while potentially achieving the benefits of much heavier formal specifications. The article concludes with a discussion of applications to testing and program proving, and of remaining issues.
Accelerating Research
Robert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom
Address
John Eccles HouseRobert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom