Repository navigation
Research: recognition-indexed SSA refinement (RSSA) - #907
Merged
Merged
Conversation
compiler/src/recognition_ssa.flow is the executable certificate model: attractor signatures (fixed points, basin labels, stability, invariants), contracts with an epsilon budget and weights, Hausdorff/Chebyshev distances with basin changes as hard violations, and lowering of a recognize declaration to contracts through recognition.flow. With no contracts, legality is exactly the discrete refinement judgement. tests/lang/test_recognition_ssa.flow covers the conservative extension, mandatory discrete refinement, drift inside and outside the budget, basin changes, malformed contracts and the recognize lowering. The original Python model and pytest file are not added.
godofecht
marked this pull request as ready for review
September 30, 2026 14:00
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.
Introduces the first executable RSSA core combining ordinary SSA/effect refinement with Recognition Dynamics contracts and continuous attractor certificates.
Ported to Flow. The Python model (
src/flow/recognition_ssa.py) and its pytest file are not added;src/flowwas deleted in #1072 and the ratchet holds Python at zero. The model is nowcompiler/src/recognition_ssa.flow, built oncompiler/src/recognition.flowfrom #1026:FlowcAttractorSignature(fixed points, basin labels, stability, invariants),FlowcRecognitionContract(domain bit, epsilon, four weights), witnesses and a certificate.flowc_rssa_checktakes the discrete judgement as a flag and the before/after signatures per contract, since the adapter supplies both. With no contracts, legality is exactly the discrete judgement.flowc_rssa_contracts_from_flowlowers arecognize { ... }declaration into one contract per declared domain, with per-domain budget overrides; an override for an undeclared domain is an error.tests/lang/test_recognition_ssa.flowcovers the five Python tests plus a tighter-budget rejection, violation masks, a malformed contract and the undeclared-domain error. Mutating the basin comparison makes it fail (exit 8).docs/research/recognition-ssa.mdpoints at the Flow module.Gates on this head:
./flow test-lang(RSSA and semantic stack tests),fmt_check.sh --check,parse_coverage.sh --check,bootstrap_from_c.sh --verify(module not in the flowc bundle, bootstrap unchanged), doc links, doc coverage, doc examples ledger, tool layout,python_ratchet.sh.