Add Zig-influenced source syntax laboratory and semantic density tooling - #2
Merged
Conversation
Owner
Author
CI and initial tournament resultsThe final CI run passed on Rust 1.79.0:
The initial 23-claim tournament produced:
The minimal human candidate currently has the fewest lexical units. The canonical semantic form is smallest by bytes, non-whitespace characters, and line count. This is useful evidence for retaining separate human and machine representations rather than selecting one notation from a single compactness metric. CI run: https://github.com/epi13/mncs-language/actions/runs/30795283088 |
epi13
marked this pull request as ready for review
August 3, 2026 07:55
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
Implements the first evidence-producing source syntax research track on top of the merged MNCS Language foundation.
This PR does not select a final grammar. It establishes a three-representation model, adds concrete equivalent syntax candidates, and introduces executable semantic-density tooling so later syntax decisions can be based on complete meaning rather than character count alone.
Representation model
The proposed direction distinguishes:
Recursive changes are represented as semantic patches against stable subjects rather than unrestricted whole-file text replacement.
What changed
RFC and specification
Experimental syntax corpus
Adds four representations of the same account-transfer program:
A tournament manifest declares 23 shared semantic claims. Candidates are therefore compared only when they carry equivalent information about types, contracts, effects, capabilities, failure behavior, and resource bounds.
Semantic patch example
Adds a bounded repair patch showing:
Executable tooling
Adds the
mncs-syntaxRust crate with deterministic, tokenizer-neutral measurements:Extends
mncs-cliwith:The tournament reports lexical units and non-whitespace characters per declared semantic claim.
CI
GitHub Actions now runs the account-transfer syntax tournament in addition to formatting, Clippy, tests, semantic-manifest validation, and invalid-example rejection.
Design decisions
Validation
This PR includes unit tests for the lexical scanner and runs the tournament through CI. The draft should remain unmerged until GitHub Actions confirms formatting, strict Clippy, workspace tests, and example execution.
Deliberately unresolved
specclauses;