Skip to content

Commit b1d73c0

Browse files
Merge priority rules (#1898)
* Tests for merging priority rules * Merge priority rules * Fix lint errors * AntiLeft test * Fix review comment * Fix review comments. Co-authored-by: Virgil Serbanuta <virgil.serbanuta> Co-authored-by: rv-jenkins <admin@runtimeverification.com>
1 parent d5436e7 commit b1d73c0

File tree

18 files changed

+1083
-43
lines changed

18 files changed

+1083
-43
lines changed

docs/2020-06-30-Combining-Priority-Axioms.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ priority rewrite rule.
5353
...
5454
∧ ¬ (∃ Xn . φn(Xn) ∧ Pn(Xn))
5555
56-
// If β(X₁) is functional then β(X₁)∧ φ(X) = β(X₁) ∧ ⌈β(X₁)∧ φ(X)⌉
57-
= ⌈ β(X₁) ∧ ⌈β(X₁)∧ φ(X)⌉ ∧ P(X)
56+
// If β(X₁) is functional then β(X₁) ∧ φ(X) = β(X₁) ∧ ⌈β(X₁) ∧ φ(X)⌉
57+
= ⌈ β(X₁) ∧ ⌈β(X₁) ∧ φ(X)⌉ ∧ P(X)
5858
∧ ¬ (∃ X₁ . φ₁(X₁) ∧ P₁(X₁))
5959
...
6060
∧ ¬ (∃ Xn . φn(Xn) ∧ Pn(Xn))

kore/src/Kore/ASTVerifier/SentenceVerifier.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ import Kore.Internal.TermLike.TermLike
8383
( freeVariables
8484
)
8585
import Kore.Sort
86+
import qualified Kore.Step.AntiLeft as AntiLeft
87+
( toTermLike
88+
)
8689
import Kore.Step.Rule
8790
( QualifiedAxiomPattern (..)
8891
, fromSentenceAxiom
@@ -426,7 +429,8 @@ verifyClaimSentence sentence =
426429
where
427430
rightVars, leftVars :: Set (SomeVariable VariableName)
428431
rightVars = freeVariables rhs & FreeVariables.toSet
429-
lhs = catMaybes [antiLeft] <> [left, unwrapPredicate requires]
432+
lhs = Foldable.toList (AntiLeft.toTermLike <$> antiLeft)
433+
<> [left, unwrapPredicate requires]
430434
leftVars = foldMap freeVariables lhs & FreeVariables.toSet
431435

432436
verifySorts :: [ParsedSentence] -> SentenceVerifier ()

0 commit comments

Comments
 (0)