Skip to content

[Anchor Proposal]: Design by Contract #633

Description

@rehsack

Proposed Term

Design by Contract (DbC)

Context

A software-correctness approach devised by Bertrand Meyer for the Eiffel language (1986). Components interact via formal contracts: preconditions (the caller must satisfy), postconditions (the supplier guarantees), and class invariants (always hold). It assigns blame precisely when a contract is violated and is the formal underpinning of the Liskov Substitution Principle (a subtype may weaken preconditions and strengthen postconditions, never the reverse).

Fits design-principles; relatives in the catalog: solid-lsp, postels-law, property-based-testing, cohesion-criteria.

Source: Bertrand Meyer, Object-Oriented Software Construction (1988/1997).

LLM Activation Test Result

Model: Claude (Opus 4.8)
Prompt: "What concepts do you associate with 'Design by Contract'?"
Response: Preconditions, postconditions, invariants; caller/supplier obligations and benefits; "contract" metaphor; Eiffel and Bertrand Meyer; assertion-based correctness; closely tied to the Liskov Substitution Principle and to assertion/require/ensure constructs. Rich, consistent, strongly attributable activation.

Pre-submission Checklist

  • I have searched existing anchors and this term is not already included
  • This term refers to a well-established concept (not something I invented)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions