Skip to content

Commit 016c6b2

Browse files
committed
simlify the implementation
1 parent a4cc2cc commit 016c6b2

File tree

3 files changed

+199
-251
lines changed

3 files changed

+199
-251
lines changed

kevm-pyk/src/kevm_pyk/__main__.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from pyk.proof.tui import APRProofViewer
3333
from pyk.utils import FrozenDict, hash_str, single
3434

35-
from kevm_pyk.summarizer import KEVMSummarizer, get_todo_list, summarize
35+
from kevm_pyk.summarizer import summarize
3636

3737
from . import VERSION, config
3838
from .cli import _create_argument_parser, generate_options, get_argument_type_setter, get_option_string_destination
@@ -637,18 +637,28 @@ def exec_kast(options: KastOptions) -> None:
637637

638638

639639
def exec_summarize(options: ProveOptions) -> None:
640-
proof_dir = Path(__file__).parent / 'proofs'
641-
save_directory = Path(__file__).parent / 'summaries'
642-
p = APRProof.read_proof_data(Path(__file__).parent / 'proofs', 'STOP-SUMMARY-16-TO-10')
643-
# print('proof initial state -------------------------------')
644-
# print(p.kcfg.node(p.init).cterm)
645-
summarizer = KEVMSummarizer(proof_dir, save_directory)
646-
summarizer.explore(p)
647-
640+
# Path(__file__).parent / 'proofs'
641+
# Path(__file__).parent / 'summaries'
642+
# kevm = KEVM(kdist.get('evm-semantics.haskell'))
643+
# p = APRProof.read_proof_data(Path(__file__).parent / 'proofs', 'BALANCE_1_SPEC')
644+
# node_printer = kevm_node_printer(kevm, p)
645+
# proof_show = APRProofShow(kevm, node_printer=node_printer)
646+
647+
# res_lines = proof_show.show(
648+
# p,
649+
# nodes=[node.id for node in p.kcfg.nodes],
650+
# )
651+
# for res_line in res_lines:
652+
# print(res_line)
653+
# # print('proof initial state -------------------------------')
654+
# # print(p.kcfg.node(p.init).cterm)
655+
# summarizer = KEVMSummarizer(proof_dir, save_directory)
656+
# summarizer.explore(p)
657+
648658
# batch_summarize()
649659
# next_opcode = get_todo_list()
650660
# _LOGGER.info(f'summarizing {next_opcode}')
651-
# summarize(next_opcode[0])
661+
summarize('BALANCE')
652662
# analyze_proof('CREATE_3', 3)
653663

654664

0 commit comments

Comments
 (0)