Skip to content

capability syntax, step A: parse capability, transition, state facts - #45

Merged
vic merged 1 commit into
mainfrom
capability-a
Nov 9, 2026
Merged

vic merged 1 commit into
mainfrom
capability-a

Conversation

@vic

@vic vic commented Nov 9, 2026

Copy link
Copy Markdown
Owner

This step adds the capability syntax. The parser turns it into the same Ast a protocol makes, so the checker does not change.

  • capability Name: with optional state and start lines. With no state line there is one state Live, and every def stays in it. stop replaces end.
  • transition r A -> B, B -> C declares a relation. A def moves by it: def knock <s knocks t> (): I64 <t>. A def also moves by <A> .. <B>. A def with no facts stays in each state. A relation that the capability does not declare is error[parse].
  • In <> facts: x: T is at(x, T), a r b is r(a, b), a r is r(a).
  • protocol, op and end still parse. Step B moves the sources and removes them (2-step bootstrap).
  • tests: prog/capability is rules.srs in the new syntax, plus a capability with no states and one with <A> .. <B>. It prints 9. neg/cap_norel (parse) and neg/cap_order (capability-not-ended).
  • The gate passes with 210 ok and 0 FAIL. The seed is updated.
  • Mutants: m9 makes <A> .. <B> move A to A, and m10 makes no-facts defs move nowhere. m11 swaps the args of x: T. Each one fails prog/capability.

…one state Live), `stop`, `transition r A -> B, ...`, defs that move by <A> .. <B> or <s r t> .. <t>; in <> facts x: T is at(x, T), a r b is r(a, b), a r is r(a). The parser desugars to the same Ast; protocol/op/end still parse until the sources move
@vic
vic merged commit 599604e into main Nov 9, 2026
3 checks passed
@vic
vic deleted the capability-a branch November 17, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant