Skip to content

Commit

Permalink
Strengthen pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
tothtamas28 committed Nov 29, 2024
1 parent c62709e commit d99531a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyk/src/pyk/kore/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import TYPE_CHECKING, final

from .prelude import inj
from .syntax import And, App, Axiom, Ceil, Equals, EVar, Implies, In, Not, Rewrites, SortVar, String, Top
from .syntax import DV, And, App, Axiom, Ceil, Equals, EVar, Implies, In, Not, Rewrites, SortApp, SortVar, String, Top

if TYPE_CHECKING:
from typing import Final
Expand Down Expand Up @@ -232,7 +232,7 @@ def _extract_condition(pattern: Pattern) -> Pattern | None:
match pattern:
case Top():
return None
case Equals(left=cond):
case Equals(left=cond, right=DV(SortApp('SortBool'), String('true'))):
return cond
case _:
raise ValueError(f'Cannot extract condition from pattern: {pattern.text}')
Expand Down

0 comments on commit d99531a

Please sign in to comment.