Skip to content

Commit 882d567

Browse files
committed
drivers/base: Merge <claim> and <k> cells
1 parent 3218af0 commit 882d567

39 files changed

Lines changed: 221 additions & 223 deletions

prover/drivers/base.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Configuration
33

44
The configuration consists of a assoc-commutative bag of goals. Only goals
55
marked `<active>` are executed to control the non-determinism in the system. The
6-
`<claim>` cell contains the Matching Logic Pattern for which we are searching for a
6+
`<k>` cell contains the Matching Logic Pattern for which we are searching for a
77
proof. The `<strategy>` cell contains an imperative language that controls which
88
(high-level) proof rules are used to complete the goal. The `<trace>` cell
99
stores a log of the strategies used in the search of a proof and other debug
@@ -21,20 +21,18 @@ module PROVER-CONFIGURATION
2121
2222
configuration
2323
<prover>
24-
<k> $COMMANDLINE:CommandLine ~> $PGM:Pgm </k>
2524
<exit-code exit=""> 1 </exit-code>
2625
<goals>
2726
<goal multiplicity="*" type="Set" format="%1%i%n%2, %3, %4%n%5%n%6%n%7%n%8%n%d%9">
2827
<active format="active: %2"> true:Bool </active>
2928
<id format="id: %2"> .K </id>
3029
<parent format="parent: %2"> .K </parent>
31-
<claim> .K </claim>
30+
<k> $COMMANDLINE:CommandLine ~> $PGM:Pgm </k>
3231
<strategy> .K </strategy>
3332
<expected> .K </expected>
3433
<local-context>
3534
<local-decl multiplicity="*" type="Set"> .K </local-decl>
3635
</local-context>
37-
3836
<trace> .K </trace>
3937
</goal>
4038
</goals>

prover/drivers/kore-driver.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,18 @@ in the subgoal and the claim of the named goal remains intact.
6767
...
6868
</k>
6969
70-
rule <k> claim NAME : PATTERN
71-
strategy STRAT
72-
=> .K
73-
...
74-
</k>
75-
<goals>
70+
rule <goals>
71+
<k> claim NAME : PATTERN
72+
strategy STRAT
73+
=> .K
74+
...
75+
</k>
7676
( .Bag =>
7777
<goal>
7878
<id> NAME </id>
7979
<active> true:Bool </active>
8080
<parent> .K </parent>
81-
<claim> PATTERN </claim>
81+
<k> PATTERN </k>
8282
<strategy> subgoal(PATTERN, STRAT) </strategy>
8383
<expected> success </expected>
8484
<local-context> .Bag </local-context>

prover/drivers/smt-driver.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -318,18 +318,18 @@ module DRIVER-SMT
318318
rule #containsSpatialPatterns(.Patterns, _) => false
319319
rule #containsSpatialPatterns((P, Ps), S) => #containsSpatial(P, S) orBool #containsSpatialPatterns(Ps, S)
320320
321-
rule <k> #goal( goal: (\exists{Vs} \and(Ps)) #as PATTERN, strategy: STRAT, expected: EXPECTED)
322-
~> (check-sat)
323-
=> #goal( goal: PATTERN, strategy: STRAT, expected: EXPECTED)
324-
...
325-
</k>
326-
<goals>
321+
rule <goals>
322+
<k> #goal( goal: (\exists{Vs} \and(Ps)) #as PATTERN, strategy: STRAT, expected: EXPECTED)
323+
~> (check-sat)
324+
=> #goal( goal: PATTERN, strategy: STRAT, expected: EXPECTED)
325+
...
326+
</k>
327327
( .Bag =>
328328
<goal>
329329
<id> !N:ClaimName </id>
330330
<active> true:Bool </active>
331331
<parent> .K </parent>
332-
<claim> \implies(\and(#filterPositive(Ps)), \and(\or(#filterNegative(Ps)))) </claim>
332+
<k> \implies(\and(#filterPositive(Ps)), \and(\or(#filterNegative(Ps)))) </k>
333333
<strategy> STRAT </strategy>
334334
<expected> EXPECTED </expected>
335335
<local-context> .Bag </local-context>

prover/strategies/apply-equation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ module STRATEGY-APPLY-EQUATION
119119
)
120120
...
121121
</strategy>
122-
<claim> T </claim>
122+
<k> T </k>
123123
124124
syntax KItem ::= "#apply-equation3"
125125
"(" "hypothesis:" Pattern
@@ -138,9 +138,9 @@ module STRATEGY-APPLY-EQUATION
138138
=> instantiateAssumptions(Subst, P)
139139
~> createSubgoalsWithStrategies(strats: Ss, result: noop)
140140
...</strategy>
141-
<claim>
141+
<k>
142142
_ => cool(heated: Heated, term: substMap(R, Subst))
143-
</claim>
143+
</k>
144144
145145
syntax KItem ::= "createSubgoalsWithStrategies"
146146
"(" "strats:" Strategies

prover/strategies/apply.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module STRATEGY-APPLY
3737
Strat
3838
)
3939
...</strategy>
40-
<claim> G </claim>
40+
<k> G </k>
4141
4242
4343
syntax KItem ::= #apply1(Pattern, MatchResult, Strategy)

prover/strategies/core.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Proving a goal may involve proving other subgoals:
116116
<active> true </active>
117117
<parent> PARENT </parent>
118118
<strategy> SUBSTRAT </strategy>
119-
<claim> SUBGOAL </claim>
119+
<k> SUBGOAL </k>
120120
<local-context> LC </local-context>
121121
<trace> TRACE </trace>
122122
...
@@ -151,7 +151,7 @@ all succeed, it succeeds:
151151
rule <prover>
152152
<goal>
153153
<strategy> ((S1 & S2) => subgoal(GOAL, S1) ~> #hole & S2) </strategy>
154-
<claim> GOAL:Pattern </claim>
154+
<k> GOAL:Pattern </k>
155155
...
156156
</goal>
157157
...
@@ -177,7 +177,7 @@ approach succeeds:
177177
rule <prover>
178178
<goal>
179179
<strategy> ((S1 | S2) => subgoal(GOAL, S1) ~> #hole | S2 ) </strategy>
180-
<claim> GOAL:Pattern </claim>
180+
<k> GOAL:Pattern </k>
181181
...
182182
</goal>
183183
...
@@ -199,7 +199,7 @@ Internal strategy used to implement `or-split` and `and-split`.
199199

200200
```k
201201
syntax Strategy ::= "replace-goal" "(" Pattern ")"
202-
rule <claim> _ => NEWGOAL </claim>
202+
rule <k> _ => NEWGOAL </k>
203203
<strategy> replace-goal(NEWGOAL) => noop ... </strategy>
204204
```
205205

@@ -212,7 +212,7 @@ Internal strategy used to implement `or-split` and `and-split`.
212212
```
213213

214214
```k
215-
rule <claim> \or(GOALS) </claim>
215+
rule <k> \or(GOALS) </k>
216216
<strategy> or-split => #orSplit(GOALS) ... </strategy>
217217
218218
syntax Strategy ::= "#orSplit" "(" Patterns ")" [function]
@@ -230,16 +230,16 @@ Internal strategy used to implement `or-split` and `and-split`.
230230
```
231231

232232
```k
233-
rule <claim> \implies(LHS, \exists { Vs } \and(\or(RHSs), REST)) </claim>
233+
rule <k> \implies(LHS, \exists { Vs } \and(\or(RHSs), REST)) </k>
234234
<strategy> or-split-rhs => #orSplitImplication(LHS, Vs, RHSs, REST) ... </strategy>
235235
236-
rule <claim> \implies(LHS, \exists { Vs } \and(RHSs, REST)) </claim>
236+
rule <k> \implies(LHS, \exists { Vs } \and(RHSs, REST)) </k>
237237
<strategy> or-split-rhs => noop ... </strategy>
238238
requires notBool isDisjunction(RHSs)
239-
rule <claim> \implies(LHS, \exists { Vs } \and(.Patterns)) </claim>
239+
rule <k> \implies(LHS, \exists { Vs } \and(.Patterns)) </k>
240240
<strategy> or-split-rhs => noop ... </strategy>
241241
242-
rule <claim> \implies(LHS, \exists { Vs } \and(.Patterns)) </claim>
242+
rule <k> \implies(LHS, \exists { Vs } \and(.Patterns)) </k>
243243
<strategy> or-split-rhs => noop ... </strategy>
244244
245245
syntax Strategy ::= "#orSplitImplication" "(" Pattern "," Patterns "," Patterns "," Patterns ")" [function]
@@ -257,7 +257,7 @@ Internal strategy used to implement `or-split` and `and-split`.
257257
```
258258

259259
```k
260-
rule <claim> \and(GOALS) </claim>
260+
rule <k> \and(GOALS) </k>
261261
<strategy> and-split => #andSplit(GOALS) ... </strategy>
262262
263263
syntax Strategy ::= "#andSplit" "(" Patterns ")" [function]

prover/strategies/inst-exists.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ module STRATEGY-INST-EXISTS
1616
inst-exists(V, T, Strat)
1717
=> subgoal(\functionalPattern(T), Strat) & noop
1818
...</strategy>
19-
<claim>
19+
<k>
2020
P => instExists(P, V, T)
21-
</claim>
21+
</k>
2222
2323
syntax Pattern ::= instExists(Pattern, Variable, Pattern) [function]
2424

prover/strategies/intros.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module STRATEGY-INTROS
1111
imports KORE-HELPERS
1212
1313
rule <strategy> intros Name => noop ...</strategy>
14-
<claim> \implies(H, G) => G </claim>
14+
<k> \implies(H, G) => G </k>
1515
<local-context> (.Bag =>
1616
<local-decl> axiom Name : H </local-decl>
1717
) ...

0 commit comments

Comments
 (0)