{"title":
 "R7: Retained behaviour: a resolved code entry is typed at its reference's type",
 "producer":
 ["GENERATED by tools/Drivers/Semantics.lean (make gen-semantics); do not edit",
  "format: effect4-semantics-report v8",
  "command: make gen-semantics",
  "inputs: tools/ProofGraph/Registry.lean, tools/Tools/Semantics.lean, tools/Drivers/Semantics.lean, tools/Tools/SemanticsDisplay.lean, tools/Tools/SemanticsDocument.lean, tools/Tools/Document.lean, tools/Tools/Document/Json.lean, src/Effect4/Laws/Auto/Semantics.lean, Test/Counterexamples/REGISTER.md, docs/core/decisions.md, lean-toolchain"],
 "format": "effect4-document/1",
 "body":
 [{"lines":
   [[{"text":
      "Open, waits on a ruling (decisions row 82: typed behaviour values): resolve_typed: a resolved code entry is typed at its reference's type, with capture layout fixed at resolution and identity by allocation or structure (decisions row 82, open)"}],
    [{"text":
      "Open, waits on a ruling (decisions row 82: typed behaviour values): code-valued services with a capture law, R5's through R7 (decisions row 82)"}],
    [{"text":
      "Open, not triaged: the reserved contract of a retained behaviour: its entry, captures, invocation context and lifetime, designed now for the planned Cache, Pool and callback modules; the value form and its evaluator wait for the first of them (decisions row 234)"}],
    [{"text":
      "Open, worded as a proposed claim: posted-body-entry-typed (proposed claim; residual-program-typing): a checked Eff body supplied at a posting site, with its resolved entry, typed lexical environment and selected service policy, stays typed under world extension (decisions rows 82, 225)"}]],
   "kind": "items"},
  {"title": "Requirement R7: Retained behaviour",
   "kind": "part",
   "key": "about:req:R7",
   "body":
   [{"line":
     [{"text":
       "This page explains requirement R7 in Effect4. It covers what the requirement asks for stored code entries, why typed code resolution matters, and how the property is checked."}],
     "kind": "para"},
    {"title": "What the requirement asks",
     "kind": "part",
     "key": "about:req:R7:what-it-asks",
     "body":
     [{"line":
       [{"text":
         "Requirement R7 demands that stored code behaviors resolve into typed entries with fixed capture layouts ("},
        {"code": "docs/core/system-map.md"},
        {"text": " §8, "},
        {"code": "docs/core/machine-state.md"},
        {"text": " §5):"}],
       "kind": "para"},
      {"lines":
       [[{"text":
          "Typed resolution: a resolved code entry is typed at its reference type through "},
         {"code": "resolve_typed"},
         {"text": "."}],
        [{"text":
          "Fixed capture layout: captured services and environment variables fix their layout at resolution."}],
        [{"text":
          "Stable identity: code entry identity is established by allocation or structural equality."}],
        [{"text":
          "Owner resolution: stored behavior references resolve into the canonical "},
         {"code": "Eff"},
         {"text": " program owner rather than storing host closures."}]],
       "kind": "items"},
      {"line":
       [{"text":
         "Captured control state and reusable behavior content must remain distinct syntactic sorts."}],
       "kind": "para"}]},
    {"title": "Why it matters",
     "kind": "part",
     "key": "about:req:R7:why-it-matters",
     "body":
     [{"line":
       [{"text":
         "Advanced Effect modules like PubSub, Mailbox, and actor pools store and dispatch deferred execution tasks."}],
       "kind": "para"},
      {"line":
       [{"text":
         "If stored behaviors captured arbitrary host closures, internal execution state would leak into value sorts and defeat reification."}],
       "kind": "para"},
      {"line":
       [{"text":
         "Typed first-order resolution lets a stored routine be serialized, replayed and checked across runs."}],
       "kind": "para"}]},
    {"title": "How it is checked",
     "kind": "part",
     "key": "about:req:R7:how-it-is-checked",
     "body":
     [{"line":
       [{"text":
         "The requirement is checked by formalizing code resolution and capture typing contracts:"}],
       "kind": "para"},
      {"lines":
       [[{"text": "Code entry typing is governed by the "},
         {"code": "resolve_typed"},
         {"text":
          " specification connecting code references to target typing signatures."}],
        [{"text":
          "Posted body entry typing asks that a queued task run under a fitting environment (decisions rows 82 and 225)."}],
        [{"text":
          "Reserved contracts for retained behavior prevent execution details from freezing into data values (decisions row 234)."}]],
       "kind": "items"},
      {"line":
       [{"text":
         "The plan on this page gives each theorem's status and the goals it rests on."}],
       "kind": "para"}]}]},
  {"rows": [],
   "kind": "table",
   "headers": ["Node", "Status", "Rests on", "Nearest nodes"]}]}
