Repository navigation
trace: traces_por — trace-faithful persistent-set enumeration (#64) - #73
Merged
Merged
Conversation
Phase 7. Turns the correctness path's option-3 blow-up into option 2: at each state, when some event is independent of every other enabled one (disjoint consumed occurrences + distinct channel) and future-stable (no other component could ever present a partner on its channel — reusing the barb-POR reasoning, but with every Comm relevant), fire only it and defer the rest. Redundant interleavings of independent events are pruned before they are generated; genuine conflicts never satisfy the condition and are always fully expanded. The shared `enumerate` core also returns the number of maximal runs explored, exposing the reduction to tests. Gated by a differential test: - por_matches_full_on_corpus — traces_por ≡ traces (as trace-sets) across a varied corpus (diamond, reflective chain, race, reflective fork, inherited conflict, 3/4 independent pairs, terminal). - por_reduces_independent_interleavings — 4 independent reactions: the full path explores 4! = 24 runs, POR explores 1; both yield the one trace. Conservative by construction (returns None when in doubt); no cycle proviso, so trace-faithful for terminating profiles (both paths truncate otherwise). Refs #64 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rpus Review nit: add two danger-class terms so the pinned differential test itself witnesses the persistent-set guards, not just independence — - a reflective unfreeze whose deferred Comm wakes a second partner on the candidate's channel (mentions_channel must block deferral), and - a channel synthesized by substitution via a received name (has_var_channel must block deferral). Both stay trace-faithful (traces_por ≡ traces). Refs #64 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Phase 7 — the final milestone. Turns the correctness path (#60) into the optimized one.
What
traces_por(start, max_events, max_traces)instratum-lts— the trace-set under a trace-faithful persistent-set reduction.At each state,
singleton_persistentlooks for an event that is:out/inpOccKeys) and a distinct firing channel; andhas_var_channel/mentions_channel, nowpub(crate), as in the barb POR ofLts::explore_por, but with everyCommtreated as relevant).If found, only that event is fired and the rest deferred — pruning the redundant interleavings of independent events before generating them. Genuine branches (conflicts share an occurrence) never satisfy the condition, so they are always fully expanded. Conservative by construction:
Nonewhen in doubt — forgoing reduction, never soundness.tracesandtraces_porshare anenumeratecore that also returns the number of maximal runs explored (before dedup), exposing the reduction to tests.Tests (the faithfulness gate)
por_matches_full_on_corpus—traces_poryields the identical trace-set astracesacross a varied corpus: diamond, reflective chain, race, reflective fork (x ; (a ∥ b)), race-with-downstream (inherited conflict), 3 and 4 independent pairs, and the terminal term.por_reduces_independent_interleavings— 4 independent reactions: the full path explores4! = 24maximal runs, POR explores 1; both yield the one trace.Caveat (documented)
No cycle proviso, so faithfulness is guaranteed for terminating profiles (the differential corpus); for a non-terminating profile both paths truncate at
max_eventsand the reduction is best-effort.fmt / clippy
-D warnings/cargo test --workspacegreen locally.Closes #64