Skip to content

Commit

Permalink
[to delete] move untils into utils.py as #4621
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevengre committed Sep 9, 2024
1 parent ca72beb commit a75f8e3
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pyk/src/tests/unit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from typing import TYPE_CHECKING

from pyk.kast.inner import KApply, KLabel, KVariable
from pyk.prelude.kint import geInt, intToken, ltInt
from pyk.prelude.ml import mlEqualsTrue

if TYPE_CHECKING:
from typing import Final
Expand All @@ -16,3 +18,19 @@
f, g, h = map(KLabel, ('f', 'g', 'h'))

k = KLabel('<k>')


def lt(var: str, n: int) -> KApply:
return mlEqualsTrue(ltInt(KVariable(var), intToken(n)))


def ge(var: str, n: int) -> KApply:
return mlEqualsTrue(geInt(KVariable(var), intToken(n)))


def config(var: str) -> KApply:
return KApply('<top>', KVariable(var))


def config_int(n: int) -> KApply:
return KApply('<top>', intToken(n))

0 comments on commit a75f8e3

Please sign in to comment.