Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
ISO/IEC 25436 defines the Eiffel method for software analysis and design — a disciplined, contract-driven approach to constructing object-oriented systems. Developed by Bertrand Meyer and formalized through decades of industrial application, the Eiffel method places Design by Contract (DbC) at its core: every software element explicitly specifies its obligations and benefits through preconditions, postconditions, and class invariants.
Design by Contract draws an analogy with commercial contracts: a routine (the supplier) guarantees a result provided the caller (the client) satisfies certain conditions. This framework is codified through three mechanisms:
| Contract Element | Role | Example | Violation Consequence |
|---|---|---|---|
| Precondition (require) | Obligation on the caller | “stack.count > 0” before pop | Caller is at fault — exception raised in caller |
| Postcondition (ensure) | Obligation on the routine | “Result = old stack.top” after pop | Routine is at fault — exception raised in routine |
| Class Invariant | Always-true condition for all instances | “stack.count >= 0” for all STACK objects | Class implementation is inconsistent |
ISO/IEC 25435 extends DbC beyond implementation into analysis and design phases. During analysis, contracts capture domain rules without committing to implementation details: “A withdrawal transaction must not exceed the current account balance.” During design, contracts are refined into software component interfaces: “The withdraw(amount) routine requires balance >= amount and ensures balance = old balance – amount.”
The Eiffel method introduces Business Object Notation (BON) for visually representing class clusters — groups of classes that collaborate to fulfill a system responsibility. Unlike UML’s relatively flat class diagrams, BON emphasizes cluster-level relationships: reused clusters, client-supplier dependencies, and inheritance hierarchies are rendered as first-class visual elements.
A BON cluster diagram organizes classes into rounded rectangles (clusters) connected by labeled edges representing client-supplier or inheritance relationships. Each cluster carries an explicit contract summary showing the combined preconditions and postconditions of its public routines. This enables architects to reason about system properties at the cluster level without descending into individual class details.
The standard recommends a maximum cluster size of 7-12 classes, following Miller’s Law for human information processing. Clusters exceeding this size should be decomposed into subclusters, each with its own contract summary. This hierarchical decomposition mirrors the composition rules of primitive control operations in ISO/IEC 25435, creating a consistent intellectual framework across analysis, design, and implementation.
Adopting ISO/IEC 25436 in a development organization requires changes across three dimensions: tooling, process, and culture.
Tooling: The Eiffel method is supported by EiffelStudio, which provides integrated contract compilation, runtime assertion monitoring, and automatic documentation generation. For teams using other languages, DbC can be implemented through libraries (Contracts for Java, PyContracts for Python, Code Contracts for .NET) but without the same level of language integration.
Process: Contract writing should be integrated into the definition of done for every user story. A story is not complete until the preconditions, postconditions, and invariants of all affected routines are specified. This rule prevents the common pattern where contracts are deferred indefinitely under schedule pressure.
Culture: The Eiffel method requires a shift from defensive programming to contract-based programming. In defensive programming, every routine checks everything; in DbC, each side checks only its own obligations. This reduces code bloat by eliminating redundant checks and clarifies responsibility boundaries, but it requires organizational trust that suppliers will honor their contracts.