{
  "status": "unknown",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-11",
  "slug": "happened-before",
  "term": "Happened-before relation",
  "aliases": [
    "Happens-before relation",
    "Causal precedence"
  ],
  "definition": "The happened-before relation is a strict partial order generated by process-local event order, message sending before receipt, and transitivity.",
  "note": "Concurrency means neither event precedes the other, not that they occur simultaneously. The relation describes potential influence within the modeled communication, not proof that one event changed another's value. [lamport-clocks]\n\nIn COPS, storage dependencies include client program order and reading a value written by another operation. Its model assumes inter-thread communication passes through the store; dependencies carried outside that model require separate treatment. [cops-clocks]\n\nThe chosen event boundary matters: message arrival and execution of its interrupt handler need not have the same ordering. Declare which event is timestamped when interpreting a trace. [lamport-clocks]",
  "related": [
    "lamport-clock",
    "causal-consistency",
    "session-guarantees"
  ],
  "citations": [
    {
      "id": "lamport-clocks",
      "title": "Leslie Lamport. Time, Clocks, and the Ordering of Events in a Distributed System. Communications of the ACM 21(7), 558-565, July 1978; pp. 559-562.",
      "url": "https://lamport.azurewebsites.net/pubs/time-clocks.pdf",
      "accessed": "2026-11-10"
    },
    {
      "id": "cops-clocks",
      "title": "Lloyd et al. Don't Settle for Eventual: Scalable Causal Consistency for Wide-Area Storage with COPS. SOSP 2011, sections 3, 4.4 and 5.3.",
      "url": "https://www.cs.cmu.edu/~dga/papers/cops-sosp2011.pdf",
      "accessed": "2026-11-10"
    }
  ],
  "provenance": [
    "Lamport 1978, printed p. 559: event relation and concurrency; p. 562: communication outside the modeled system.",
    "COPS 2011, section 3: storage-operation dependency relation and communication assumption. This record concerns distributed events, not a language-specific memory-model definition."
  ]
}
