Repository navigation
compiler: integrate static, denotational, dynamic and residual semantics - #1026
Merged
Merged
Conversation
godofecht
marked this pull request as ready for review
September 30, 2026 13:38
This was referenced Sep 30, 2026
Merged
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.
Supersedes #1024 and turns the separate semantic experiments into one Flow-native compiler stack.
Adds:
semantic_facts.flow: shared evidence model with provenance, status and recognition domainsstatic_semantics.flow: bridge from existing static semantics into PROVEN factsdenotation.flow: Flow-native structural denotation for parsed flow declarationsrecognition.flow: recognition contracts and observer-relative projectionsdynamic_invariants.flow: online invariant discovery emitting OBSERVED semantic factsresidual.flow: representation-relative residual extraction plus persistence/predictivity trackingsemantic_pipeline.flow: allocation-free ledger/projection/residual orchestrationThe authority boundary is explicit: observed or structured-residual facts never become unconditional optimisation facts. Only static proof or a runtime guard promotes them to an optimisation-usable status.
tests/lang/test_semantic_stack.flowruns the full path and checks a concrete case where range/sign/alignment are already represented while an observed modular relation remains as the residual.Rebased onto main after #1072, #1076 and #1077. All Flow, no Python. The new modules are not imported by
compiler/src/main.flow, so the flowc bundle and the bootstrap C are unchanged (bootstrap_from_c.sh --verifypasses against the checked-in C). Two doc sentences were reworded for the repository prose hook.Local gates on this head:
./flow test-langfor both new tests,fmt_check.sh --check,parse_coverage.sh --check,check_doc_links.sh,check_doc_coverage.sh,check_doc_examples.sh --check-ledger,python_ratchet.sh,check_tool_layout.sh,bootstrap_from_c.sh --verify.