From a75f8e37b9182ce26014760aa086edc093c4c2fc Mon Sep 17 00:00:00 2001 From: JianhongZhao Date: Wed, 4 Sep 2024 15:46:34 +0800 Subject: [PATCH] [to delete] move untils into utils.py as #4621 --- pyk/src/tests/unit/utils.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pyk/src/tests/unit/utils.py b/pyk/src/tests/unit/utils.py index 73ed9ff8776..bdac4c8d626 100644 --- a/pyk/src/tests/unit/utils.py +++ b/pyk/src/tests/unit/utils.py @@ -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 @@ -16,3 +18,19 @@ f, g, h = map(KLabel, ('f', 'g', 'h')) k = KLabel('') + + +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('', KVariable(var)) + + +def config_int(n: int) -> KApply: + return KApply('', intToken(n))