3-5 July 2006
CERN, Geneva
Europe/Zurich timezone

Design by Contract in Python: Present and Future

3 Jul 2006, 14:35
30m
40-S2-A01 (CERN, Geneva)

40-S2-A01

CERN, Geneva

Python Language and Libraries Python Language and Libraries

Speaker

Mr Aaron Bingham (Cenix BioScience GmbH)

Description

Design by Contract (DbC), as proposed by Bertrand Meyer, is an approach to software development whereby the expectations (preconditions) and guarantees (postconditions and class invariants) of methods are formally specified. These formally-specified contracts can then be checked automatically at runtime. First, Design by Contract as proposed by Meyer is defined, its strengths and limitations are described, and the rationale behind the various aspects of the definition are explained. Second, several implementations of DbC for Python, each taking a different approach, are introduced. The implementations are compared to one another and to Meyer's proposal, with particular attention to their suitability for production use. (At least one implementation will be demonstrated live.) Third, attributes desired of a future production-quality DbC system for Python are outlined, and possible evoltionary paths based on existing implementations are proposed.

Primary author

Mr Aaron Bingham (Cenix BioScience GmbH)

Presentation Materials