Skip to content

Commit

Permalink
????
Browse files Browse the repository at this point in the history
  • Loading branch information
nishantjr committed May 6, 2020
1 parent 55f1f47 commit 9a16be7
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
1 change: 1 addition & 0 deletions prover/build
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ prover_smt = prover('prover-smt', '--main-module DRIVER-SMT --syntax-module D
# ----------------

prover_kore.tests(inputs = glob('t/*.kore'), implicit_inputs = glob('t/definitions/*.kore'), flags = '-cCOMMANDLINE=.CommandLine')
prover_kore.tests(inputs = glob('t/ltl/*.kore'), implicit_inputs = glob('t/definitions/*.kore'), flags = '-cCOMMANDLINE=.CommandLine')
prover_smt .tests(inputs = glob('t/*.smt2'), flags = '-cCOMMANDLINE=.CommandLine')

def log_on_success(file, message):
Expand Down
2 changes: 1 addition & 1 deletion prover/drivers/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module PROVER-CONFIGURATION
<prover>
<exit-code exit=""> 1 </exit-code>
<goals>
<goal multiplicity="*" type="List" format="%1%i%n%2, %3%n%4%n%5n%6%n%7%n%d%8">
<goal multiplicity="*" type="List" format="%1%i%n%2, %3%n%4%n%5%n%6%n%7%n%d%8">
<id format="id: %2"> .K </id>
<parent format="parent: %2"> .K </parent>
<k> $COMMANDLINE:CommandLine ~> $PGM:Pgm </k>
Expand Down
3 changes: 2 additions & 1 deletion prover/drivers/kore-driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ in the subgoal and the claim of the named goal remains intact.
</k>
rule <k> claim NAME : PATTERN
strategy STRAT
=> subgoal(NAME, PATTERN, subgoal(PATTERN, STRAT))
=> .K
...
</k>
<strategy> .K => subgoal(NAME, PATTERN, STRAT) </strategy>
```

```k
Expand Down
1 change: 1 addition & 0 deletions prover/lang/kore-lang.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ only in this scenario*.
| "\\exists" "{" Patterns "}" Pattern [klabel(exists)]
| "\\forall" "{" Patterns "}" Pattern [klabel(forall)]
| "\\mu" SetVariable "." Pattern [klabel(mu)]
/* Sugar for \iff, \mu and application */
| "\\iff-lfp" "(" Pattern "," Pattern ")" [klabel(ifflfp)]
Expand Down
8 changes: 4 additions & 4 deletions prover/strategies/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ Proving a goal may involve proving other subgoals:
rule <strategy> subgoal(GOAL, STRAT) => subgoal(!ID:Int, GOAL, STRAT) ... </strategy>
syntax Strategy ::= "subgoal" "(" GoalId "," Pattern "," Strategy ")"
rule <prover>
rule <goals>
( .Bag =>
<goal>
<id> ID:Int </id>
<id> ID </id>
<parent> PARENT </parent>
<strategy> SUBSTRAT </strategy>
<k> SUBGOAL </k>
Expand All @@ -124,13 +124,13 @@ Proving a goal may involve proving other subgoals:
)
<goal>
<id> PARENT </id>
<strategy> subgoal(ID, SUBGOAL, SUBSTRAT) => goalStrat(ID:Int) ... </strategy>
<strategy> subgoal(ID, SUBGOAL, SUBSTRAT) => goalStrat(ID) ... </strategy>
<local-context> LC::Bag </local-context>
<trace> TRACE </trace>
...
</goal>
...
</prover>
</goals>
```

Sometimes, we may need to combine the proofs of two subgoals to construct a proof
Expand Down
2 changes: 2 additions & 0 deletions prover/strategies/knaster-tarski.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ for guessing an instantiation of the inductive hypothesis.
rule getKTUnfoldables(R(ARGS), REST)
=> R(ARGS), getKTUnfoldables(REST)
requires isUnfoldable(R)
rule getKTUnfoldables(\mu X . Phi, REST)
=> \mu X . Phi, getKTUnfoldables(REST)
rule getKTUnfoldables(S:Symbol, REST)
=> getKTUnfoldables(REST)
requires notBool isUnfoldable(S)
Expand Down
11 changes: 10 additions & 1 deletion prover/strategies/simplification.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,19 @@ Normalize:
rule <k> P::Pattern => \and(P) </k>
<strategy> normalize ... </strategy>
requires \and(...) :/=K P andBool \implies(...) :/=K P
requires \and(...) :/=K P andBool \implies(...) :/=K P
rule <k> \and(P) => \implies(\and(.Patterns), \and(P)) </k>
<strategy> normalize ... </strategy>
rule <k> \implies(LHS, RHS) => \implies(LHS, \and(RHS)) </k>
<strategy> normalize ... </strategy>
requires \and(...) :/=K RHS
andBool \exists { _ } \and(_) :/=K RHS
rule <k> \implies(LHS, RHS) => \implies(\and(LHS), RHS) </k>
<strategy> normalize ... </strategy>
requires \and(...) :/=K LHS
rule <k> \implies(LHS, \and(RHS))
=> \implies(LHS, \exists { .Patterns } \and(RHS))
Expand Down

0 comments on commit 9a16be7

Please sign in to comment.