|
11 | 11 | from pyk.kast.inner import KApply, KAtt, KInner, KRewrite, KToken
|
12 | 12 | from pyk.kast.manip import flatten_label, get_cell, minimize_term, push_down_rewrites
|
13 | 13 | 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 |
15 | 15 | from pyk.ktool.kit import KIT
|
16 | 16 | from pyk.ktool.kompile import KompileBackend
|
17 | 17 | from pyk.ktool.krun import KRunOutput, _krun
|
@@ -391,10 +391,11 @@ def exec_foundry_prove(
|
391 | 391 | _LOGGER.info(f'Expanding macros in target state for test: {test}')
|
392 | 392 | target_term = KDefinition__expand_macros(foundry.definition, target_term)
|
393 | 393 | 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)) |
398 | 399 | cfg = KCFG__replace_node(cfg, cfg.get_unique_init().id, CTerm(init_term))
|
399 | 400 | cfg = KCFG__replace_node(cfg, cfg.get_unique_target().id, CTerm(target_term))
|
400 | 401 | kcfgs[test] = (cfg, kcfg_file)
|
@@ -438,7 +439,6 @@ def prove_it(_id_and_cfg: Tuple[str, Tuple[KCFG, Path]]) -> bool:
|
438 | 439 | return len(failure_nodes) == 0
|
439 | 440 |
|
440 | 441 | with ProcessPool(ncpus=workers) as process_pool:
|
441 |
| - foundry.close_kore_rpc() |
442 | 442 | results = process_pool.map(prove_it, kcfgs.items())
|
443 | 443 | process_pool.close()
|
444 | 444 |
|
|
0 commit comments