Repository navigation
Conversation
…interop matrix) Pre-registered expectations for issue limitlessprojects#4899, committed before the implementation run per spike convention: corpus 18 CLEAN, corpus 02 flagged at its managed line, fx1/fx2 blamed exactly, fx3 DECLINED, Gate 3 falsification expected to fire at 75% not-sealed.
Mutex-category witness model over the issue's corpus anchors: corpus 18 CLEAN (16 guarded mutations), corpus 02 flagged (8 unguarded mutations of counts, blame :70 - the declared runner mutex does not exist in the program). fx1 wrong-mutex and fx2 escaped-after-exit each blamed exactly; fx3 actor DECLINED. Gate 3 falsification fires: 3/12 SEALED, not-sealed 75% > 20%. Gate 1 zero-cost leg holds in the model; the Go overhead leg is NOT MEASURED (no hy-emit integration, no Go toolchain here).
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.
Spike for #4899 (Wildcard Track): an executable model of the Sound Gradual Ownership witness for ONE category (mutex), plus the Gate 3 interop falsification matrix. No Hybrid language or compiler change; standalone directory
spikes/w4899-gradual-ownership/, Python 3 stdlib only.What it does
witness_model.pyreads real .hy sources, findsmanaged(..., "mutex", ...)frontiers, extracts managed bindings, guard mutexes, task spawns, lock/unlock/mutation/escape ops, and simulates three task schedules against the witness contract: R1 lockset (a mutation is legal only while the mutating task holds the binding's guard mutex), R2 owner epoch (no mutation after frontier exit), R3 escape seal (references stashed outside the block stay tracked). Every violation blames the exact file:line of the managed declaration, parsed from the source.interop_matrix.pyclassifies 12 idiomatic Go interop shapes as SEALED / EXIT-ONLY / UNSEALABLE under a stated decision rule (no deep-copy, no reflection), with three executable demonstrations of the defeat mechanisms.Measured results
countsare unguarded and blame line 70. The block declares a "runner mutex" that does not exist anywhere in the program (no lock operation at all), so the witness catches the declaration as unbacked - the deterministic form of the corpus file's own honesty note.l.muwhile the guard isa.mu; blame fixtures/fx1-wrong-mutex.hy:27.any/ behavioral-interface / pointer-field / callback / channel shapes are unsealable without deep-copy or reflection.Tests
python3 -m unittest discover -s tests).Limits, honestly: this is an executable model of the proposed witness semantics, not an hy-emit implementation: no code generation, no runtime/go helpers, no task-token threading. The extractor is a narrow line-based reader for the corpus idiom (struct-field mutexes, task spawns, index/field mutations); a binding whose guard it cannot identify is treated as unguarded, the conservative direction. Reads are not guarded. Categories actor, atomic, finalizer, interop have no witness here; interop is studied only through the Gate 3 matrix.