Escher Technologies Escher Technologies
Home Products Services Support News Company Contact Associates Publications
Escher Technologies
More:
arrowAbout Perfect Developer
arrowWhat others say about PD
arrowBug-free software
arrowSafety-critical software
arrowTeaching computer science
arrowA step-by-step guide
arrowYour development process
arrowVerified Design-by-Contract
arrowCorrect by Construction
arrowModel-Driven Development
arrowHow it works
arrowThe technology behind it
arrowPerfect Developer editions
arrowProduct details
arrowScreen shots
arrowWhy use Perfect Developer?
arrowFAQs



Perfect Developer - Making software bugs extinct!
 

Verified Design By Contract

What is Verified Design-by-Contract?

Verified Design-by-Contract is the natural evolution of Design-by-Contract, which was a new name (introduced with the Eiffel programming language) for some well-established but under-used principles. It is a correct by construction approach to developing software.

The basic principles of Design-by-Contract are:

  • For each class method, a precondition and a postcondition are specified;
  • Whenever a class method is called, the client and the method are bound by a contract. The client guarantees to satisfy the precondition at the point of call; in return the method guarantees to satisfy the postcondition at the point of return;
  • To assist in ensuring that contracts are honoured, additional elements such as class invariants and assertions may be included in the specification.

The Design By Contract principle is a powerful addition to object-oriented software development techniques. Unfortunately, it is hard to ensure that all contracts are honoured. When applied to software developed in traditional programming languages enhanced by notation for contracts, it is in general possible to perform only limited verification of contracts for the following reasons:

  • The specified contracts are frequently incomplete (often because the notation used is not expressive enough);
  • Even with class invariants and assertions, insufficient information is available to prove that contracts are honoured;
  • Contracts are most naturally and simply expressed in terms of a simple abstract data model of a class, whereas the programming language only allows the implementation model to be described;
  • The presence of unconstrained polymorphism and reference aliasing introduce too many unknowns;
  • The contracts may be incorrectly specified and not meet the requirements.

These problems are avoided in Verified Design-by-Contract as supported by Perfect Developer:

  • Contracts are completely specified (without unnecessarily constraining the implementation);
  • Contracts are expressed in terms of an abstract data model, which has a specified relationship to the implementation model (if different);
  • Additional information such as ghost methods, recursion variants and post-assertions completes the information needed to make manual or automatic verification of contracts possible;
  • Polymorphism and aliasing occur only on demand instead of by default;
  • Required or expected behaviour of classes and methods may be described in addition to the basic contracts.

By extending the Design-by-Contract principle in this way and using advanced Automated Reasoning technology, Perfect Developer provides verification from requirements right through to code - hence Verified Design-by-Contract.

More information is available in this paper.

 


TOPTOP
Copyright © 1997-2008 Escher Technologies Limited. All rights reserved. Information in this document is subject to change without notice.