Repository navigation
Conversation
Introduce Yield syntax, denotation, finite-pool scheduling, erased/visible interpretation APIs, and initial proof-surface scheduler regressions. AI-Assisted-By: GPT-5.5
Author
Implementation NotesTask: Implement research/docs/2026-06-01-yield2-cooperative-multithreading-ictrees.md work on new branch lang/yield Running Notes
Iteration 1 Notes
Iteration 2 Notes
Iteration 3 Notes
Iteration 4 Notes
Iteration 4 Notes
Iteration 5 Notes
|
Land Phases 4-6 of the Yield cooperative scheduler bisimulation: focused-thread matching, the coinductive sbisim_schedule congruence theorem, and the sbisim_scheduled_visible corollary. SBisim.v grows to 954 lines with 0 Admitted and only standard axioms. Wire SBisim into the Lang.Yield facade export. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Author
Implementation NotesTask: Complete specs/2026-06-02-complete-specs-2026-06-02-sbisim-schedule-proof-md.md using the rocq skill Iteration 1/10 — 2026-06-02Orchestration deviation
State found at start of iteration
Design decisions / spec resolutions realised in the landed code
Validation outcomes (this iteration)
NOT completed this iteration (deferred to iteration 2+)
Precise technical blocker for Phase 4/5 (handoff)The Some-focus simulation case cannot be discharged with the currently-available
No secrets/credentials involved (proof-only change). Iteration 2/10 — 2026-06-04Orchestration
P0 RESOLVED
Iteration-1 "blocker" was INACCURATE — corrected
Phases 4/5/6 — COMPLETE (verified)
Design decisions / deviations from spec
Validation outcomes (orchestrator-verified, not just subagent-claimed)
State / not committed
|
Update Yield source syntax so YFork accepts a single child body and use flow-sensitive statement denotation to keep spawned children from inheriting surrounding continuations. Restore fork-facing façade/regression lemmas for the public Yield surface while preserving the raw scheduler boundary. Assistant-model: GPT-5.5
Author
Implementation NotesTask: Implement the change in specs/2026-06-04-yfork-single-body.md Running Notes
Iteration 1 Notes
Iteration 2 Notes
Iteration 3 Notes
Iteration 4 Notes
|
Add generic expression, assignment, sequence, branch, while, and fork structural proof doors for the Yield language, including the public while invariant lemma. AI-Assisted-By: GPT-5.5
Author
Implementation NotesTask: Implement specs/2026-06-04-yield-structural-lemma-plan.md, take as much time as needed to prove everything. No admitted! Running Notes
Iteration 1/20 notes — 2026-06-05Preflight and setup
Implementation decisions
Validation outcomesIndependent validation passed:
Residual work / deferred items
Worktree summary
Iteration 3/20 notes — 2026-06-05Preflight and setup
Analysis decisions
Implementation decisions
Validation outcomes
Residual risks / deferred work
|
Introduce an additive scheduler-offer proof facade for Yield, including live-slot offer observations, return/spawn transport lemmas, non-circular scheduling-point fairness, and a stuttering erasure theorem tying the observed scheduler back to schedule. Validation: dune build theories/Lang/Yield/SchedulerFairness.vo theories/Lang/Yield.vo Assistant-model: GPT-5.5
Add shared heap events and 130 structural TICL rules for nondeterministic and round-robin CSL execution. Preserve backend allocation, fault, free, and observation policies. Promote queue, segment, trace, ghost-iteration, and ranking machinery into reusable libraries. Deduplicate heap and rotation proofs and migrate all consumers. Verified with dune build, all 130 public rule checks, cross-backend and temporal consumers, polymorphic trace smoke proofs, and assumption audits.
Move reusable allocator/queue example machinery into canonical ICTree,
Utils and Events owners and delete the test, smoke and fixture modules.
- Utils: ExtLib Roption / Stdlib RelProd replace local result relations;
periodic choices and window list facts move to Utils.Lists.
- Events.HeapModel owns stride-two geometry and link initialization; the
queue and allocator layouts reuse it. Adds block_pto_overlap_false and
hfree_absent_noop.
- ICTree.Interp.Yield.Execution: strengthened selected_segment_deterministic,
selected_segment_complete, worker guarantees, source_execution_complete,
pool_simulation_reachable, source_execution_of_slots_valid, and
model_rr_emit_batches.
- ICTree.Logic: emit_batches_agaf proved directly by suffix coinduction;
model_rr_agaf; singleton scheduler rules reproved from Interp equations.
State.Mod no longer imports Logic.Trans.
- Lang: HeapImp instruction equations, equ_guard_stuck, productive/silent
CUntilNone loop theorems, queue four-pop and empty-heap stuck/no-AG results.
- Allocator: turn_proper is the sole congruence; turn_view_complete carries
the ownership transition; raw executions use the library Execution and
pool_execution_valid; recurrence goes through model_rr_agaf. Starvation
and owner-stall counterexamples live in Allocator/Counterexamples.v and
ABA safety in Liveness, with section-local witnesses.
- Delete GeneralizationSmoke, StructuralTemporalSmoke, HeapEventTests,
CSL/{PcmTests,HeapTests,RoundRobinTests,InterpTests,TiclTests,QueueTests,
NegativeTests,Layout}, Allocator/{Tests,NegativeTests}.
The 130 CSL structural rules are unchanged. All audited results depend only
on the inherited eq_rect_eq and functional_extensionality_dep.
Move the operational half of ICTree/Logic/SchedulerFairness.v into the
new ICTree/Interp/Yield/Observed.v, leaving only temporal content behind;
the Interp tier needs no Logic dependency.
Generalize example machinery into the library:
- segment_interp_{nd,rr} take the current slot, absorbing the
pool_replace_current detour repeated by six callers
- pool_simulation_turn_nd factors the one-turn ND fact that
pool_simulation_nd_bisim inlined and the allocator contracts restate
- PoolSimulation section parameters become maximal implicits
- interp_schedule_rr_user_bind replaces CSL's interp_rr_user_bind
- observe_eq_equ replaces a file-local equ-from-observe helper
- execution_script_{state,emitted} replace window glue repeated five
times in the allocator counterexamples
Prune dead declarations across examples, ICTree/Interp, Utils/Execution,
Lang/CSL/Interp and Lang/Yield, and merge the duplicate Ctx definitions
onto Lang.Maps.Ctx.Ctx.
Net: -30 definitions, -4 Ltac, -126 lemmas, -1674 LOC. No TICL judgement
lemma removed; the 130 CSL rules and the allocator contracts are
unchanged, and every checked root keeps its previous axiom set.
…free
ICTree/Interp/CSL/Mod.v is the one CSL interpreter (sE, SSig, the
payload-polymorphic sh, CEff, raw free and select rules) and
Lang/CSL/Mod.v the one CSL language (CProg, denotation, execution
equations, exact segment rules, structural matrix). The split
Lang/CSL/{Heap,Syntax,Denote,Interp,Segments,Ticl}.v modules and the
Lang/CSL.v facade are removed; the queue development moves to
examples/CSL/Queue, and h_qE/Sig give way to sh (A:=nat)/SSig.
Memory carries allocation provenance: ManagedHeap pairs the data heap
with an extent table, and ProductPCM gives it separation. heap_handler
records each malloc extent; HFree/CFree releases exactly a recorded
block, free 0 is a no-op, and interior, unknown and double frees are
stuck. The CSL matrix gains ten *_free rules (140 in total), and
examples/CSL/Memory.v pins the lifecycle, reuse and fault behavior.
Adds AGENTS.md and the examples load path to _CoqProject.
… workers - Move Lang/Maps.v to Utils/Maps.v so the interpreter can use the context. - CSL state is now ManagedHeap * (Ctx.Ctx * nat) with observations Ctx.Ctx + indexed A; sh combines heap, context and indexed-emission handlers. - One CProg AST gains CExp, CEval, CAssign, CIf and CWhile; variable reads yield once, missing variables are stuck. Full-state and pool runners. - Port the Yield structural rules onto CSL and delete Lang/Yield*. - Generic guard alignment (galigned) gives unconditional guard-equivalent pool congruence for ND and RR; closed-turn segment loops; ClosedTurns/RankedTurns pool invariance and eventuality rules with source specializations. - Migrate all CSL examples; add Control.v and Queue/Shared.v (AG AF recurrence for the allocated shared queue under ND and RR, prefix and empty-queue fault).
- Observed: prove forget_scheduler_offers_preserves_schedule via galigned/galigned_sbisim; drop transition-matching helpers - Eq/Core: derive equ Proper instances from Equivalence_equ; resum lemmas via unfold_resumICtree - SSim/SBisim: weq_ssim/weq_sbisim via gfp_weq - Trans: trigger transitions via bind_trigger - Congruence: AG/EG and/or lemmas via impl_ticll_global - Ret: single-direction ticll_ret_equiv, applied both ways - State: use deterministic *_bind_r_eq lemmas directly - Frame: qrepX_frame via qrep_agree_fp (moved before it) Statements and axiom sets unchanged; ~980 fewer lines.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the Yield language, cooperative scheduler, scheduler bisimulation proof layer, and TICL-facing structural lemma surface for source-level Yield reasoning.
Changes
YFork bodyas a single-body spawn where child execution remains separate from the parent continuation.Admitted,admit, orAxiomintheories/Lang/Yield.Validation
dune build theories/Lang/Yield/Ticl.vo theories/Lang/Yield/SBisim.vo theories/Lang/Yield.vodune buildrg -n "Admitted\\.|admit\\b|Axiom\\b" theories/Lang/Yield --glob '!_build/**'(no matches; exit 1)git diff --check origin/mainNotes
Untracked local planning/research documents remain in
specs/andresearch/; they were inspected for PR prep and intentionally not staged into this code PR.