Repository navigation
capability syntax, step A: parse capability, transition, state facts - #45
Merged
Merged
Conversation
…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
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.
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 optionalstateandstartlines. With no state line there is one stateLive, and every def stays in it.stopreplacesend.transition r A -> B, B -> Cdeclares 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].<>facts:x: Tisat(x, T),a r bisr(a, b),a risr(a).protocol,opandendstill parse. Step B moves the sources and removes them (2-step bootstrap).prog/capabilityisrules.srsin the new syntax, plus a capability with no states and one with<A> .. <B>. It prints 9.neg/cap_norel(parse) andneg/cap_order(capability-not-ended).<A> .. <B>move A to A, and m10 makes no-facts defs move nowhere. m11 swaps the args ofx: T. Each one failsprog/capability.