Repository navigation
s2/flow: protocol rule defs in entry facts - #10
Merged
Merged
Conversation
A protocol is its own Datalog program: each binder protocol with rule defs is solved once over its next facts (one per transition), and a rule atom in a def's entry facts holds when its tuple is in that model. Rule defs become D rules: variables are the lowercase names in state positions, numbered from the params; every arg of a rule atom is a state position (as s1 statePos), so a variable that appears only in a rule atom, like s3 in twoKnocks(s, s3), is enumerated too. tests/s2/flow: tests/rules.srs (twoKnocks; reach with two clauses and recursion) at the call sites and in the bodies, a call whose rule atom has no solution, a call that holds only through the recursive clause, and one whose state has two ops where the rule names one. Mutants: rule atoms always hold, rule atoms without state positions, only the first clause of each rule: each changes the output.
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.
FLOW rung: entry facts may use the rule defs of a binder protocol (s1 facts.srs:238-322).
nextfacts. A rule atom in a def's entry facts holds when its tuple is in that model.statePos), so a variable that appears only in a rule atom is enumerated.Tests (tests/s2/flow, 28 cases): tests/rules.srs (
twoKnocks;reachwith two clauses and recursion) at the call sites and in the bodies, a call with no solution, a call that holds only through the recursive clause, and a state with two ops where the rule names one.Mutants: rule atoms always hold, rule atoms without state positions, only the first clause of each rule. Each changes the output. A fourth mutant (the op of next as a variable) proved equivalent, so the dead guard it targeted was removed. Local tests/run.sh: 182 ok, 0 FAIL.