Skip to content

Commit c83380f

Browse files
committed
matching: #matchAssoc: Patterns may use set variables too
1 parent 865587f commit c83380f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

prover/strategies/matching.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,26 +243,27 @@ Recurse over assoc-only constructors (including `pto`):
243243
)
244244
requires notBool P in Vs
245245
246-
// ground variable: non-identical
247246
rule #matchAssoc( terms: T, Ts
248-
, pattern: P:Variable, Ps
247+
, pattern: P, Ps
249248
, variables: Vs
250249
, subst: _
251250
, rest: REST
252251
)
253-
=> #error( "No valid substitution" ), .MatchResults
252+
=> #error("Ground term does not match")
254253
requires T =/=K P
254+
andBool (isSetVariable(T) orBool isVariable(T))
255255
andBool notBool P in Vs
256256
257257
// ground variable: non-identical
258258
rule #matchAssoc( terms: T, Ts
259-
, pattern: P:SetVariable, Ps
259+
, pattern: P, Ps
260260
, variables: Vs
261261
, subst: _
262262
, rest: REST
263263
)
264264
=> #error( "No valid substitution" ), .MatchResults
265265
requires T =/=K P
266+
andBool (isSetVariable(P) orBool isVariable(P))
266267
andBool notBool P in Vs
267268
268269
// free variable: different sorts
@@ -799,4 +800,3 @@ Instantiate the axiom: `\forall { L, D } (pto L D) -> L != nil
799800
```k
800801
endmodule
801802
```
802-

0 commit comments

Comments
 (0)