{
 "library": "bootstrap",
 "version": "0.11.0",
 "root": "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5",
 "license": null,
 "slug": "SpecBinding",
 "ref": "SpecBinding#16e5",
 "hash": "sema:SpecBinding#mh:SHA-256:16e5d03844bf2b95629b6fedc9f9067d2611a701431dc6f933395e7f0911f2e5",
 "stub": "16e5",
 "layer": "Mind",
 "type": "Reasoning",
 "summary": "Bind an implementation to an external specification by a pinned version, a two-way map and a ledger of deviations",
 "mechanism": "An implementation, such as code, a procedure or a set of controls, is bound to an external Spec#c953, such as a paper, a standard, a regulation or a design document, in four ways. One document is named authoritative and its exact version pinned, such as a commit, an edition or a dated consolidated text. Every restatement, summary, comment or test is marked as derived, never as a second source. A two-way map links each rule of the specification to the part of the implementation that carries it out, and links each consequential part to the rule it serves or to a recorded implementation choice; the binding states its criterion for what is consequential. A deviation ledger records rules not implemented, choices the specification leaves open (precision, rounding, ordering, or how a vague clause is read) and places where the implementation knowingly differs. When the pin or a mapped part changes, the map is checked again before the change is accepted, and a value whose meaning changes is swept as in MeaningChangeSweep#b1e0. Verification#c8de against the binding establishes conformance to the pinned version only, not that the specification is right.",
 "invariants": [
  "Exactly one source is authoritative for each rule, and its version is pinned.",
  "Every specification rule maps to part of the implementation, to a test, or to a ledger entry stating why it does not.",
  "Every part of the implementation that the binding's stated criterion marks as consequential maps to a rule or to a recorded implementation choice.",
  "A change to the pin or to a mapped part of the implementation triggers the map check before the change is accepted."
 ],
 "parameters": {},
 "signature": [],
 "preconditions": [],
 "postconditions": [],
 "failure_modes": [
  "Floating pin: the implementation cites the specification without a version, so a later edit silently changes what it claims to implement.",
  "Second source: a summary, a lighter edition or a test suite drifts and is treated as authoritative.",
  "One-way map: rules map to the implementation, but consequential parts of it map to nothing, so unspecified behaviour stays hidden.",
  "Ledger rot: a recorded deviation, comment or test keeps describing an implementation or meaning that has since changed."
 ],
 "domain": "",
 "caution": "",
 "sources": [],
 "name": "SpecBinding",
 "builds_on": [
  {
   "alias": "verification",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Verification",
   "ref": "Verification#c8de",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Verification"
  },
  {
   "alias": "meaning_change_sweep",
   "relation": "references",
   "library": "bootstrap",
   "slug": "MeaningChangeSweep",
   "ref": "MeaningChangeSweep#b1e0",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/MeaningChangeSweep"
  },
  {
   "alias": "spec",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Spec",
   "ref": "Spec#c953",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Spec"
  }
 ],
 "related": [
  {
   "alias": null,
   "relation": "related",
   "library": "bootstrap",
   "slug": "SpecIntentCheck",
   "ref": "SpecIntentCheck#29a2",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/SpecIntentCheck"
  },
  {
   "alias": null,
   "relation": "related",
   "library": "bootstrap",
   "slug": "Trace",
   "ref": "Trace#b68d",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Trace"
  }
 ],
 "used_by": [],
 "url": "https://semahash.org/vocabularies/bootstrap/patterns/SpecBinding",
 "md_url": "https://semahash.org/vocabularies/bootstrap/patterns/SpecBinding.md",
 "library_url": "https://semahash.org/vocabularies/bootstrap"
}
