Skip to content

Commit f66413f

Browse files
committed
kevm_pyk/__main__: use new upstream KCFGExplore class
1 parent 58b3ff5 commit f66413f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

kevm-pyk/src/kevm_pyk/__main__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from pyk.kast.inner import KApply, KAtt, KInner, KRewrite, KToken
1212
from pyk.kast.manip import flatten_label, get_cell, minimize_term, push_down_rewrites
1313
from pyk.kast.outer import KDefinition, KFlatModule, KImport, KRequire, KRule
14-
from pyk.kcfg import KCFG, KCFGViewer
14+
from pyk.kcfg import KCFG, KCFGExplore, KCFGViewer
1515
from pyk.ktool.kit import KIT
1616
from pyk.ktool.kompile import KompileBackend
1717
from pyk.ktool.krun import KRunOutput, _krun
@@ -391,10 +391,11 @@ def exec_foundry_prove(
391391
_LOGGER.info(f'Expanding macros in target state for test: {test}')
392392
target_term = KDefinition__expand_macros(foundry.definition, target_term)
393393
if simplify_init:
394-
_LOGGER.info(f'Simplifying initial state for test: {test}')
395-
init_term = foundry.simplify(CTerm(init_term))
396-
_LOGGER.info(f'Simplifying target state for test: {test}')
397-
target_term = foundry.simplify(CTerm(target_term))
394+
with KCFGExplore(foundry, port=3010) as kcfg_explore:
395+
_LOGGER.info(f'Simplifying initial state for test: {test}')
396+
init_term = kcfg_explore.cterm_simplify(CTerm(init_term))
397+
_LOGGER.info(f'Simplifying target state for test: {test}')
398+
target_term = kcfg_explore.cterm_simplify(CTerm(target_term))
398399
cfg = KCFG__replace_node(cfg, cfg.get_unique_init().id, CTerm(init_term))
399400
cfg = KCFG__replace_node(cfg, cfg.get_unique_target().id, CTerm(target_term))
400401
kcfgs[test] = (cfg, kcfg_file)
@@ -438,7 +439,6 @@ def prove_it(_id_and_cfg: Tuple[str, Tuple[KCFG, Path]]) -> bool:
438439
return len(failure_nodes) == 0
439440

440441
with ProcessPool(ncpus=workers) as process_pool:
441-
foundry.close_kore_rpc()
442442
results = process_pool.map(prove_it, kcfgs.items())
443443
process_pool.close()
444444

0 commit comments

Comments
 (0)