Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing proof hints feature to be used directly through kevm binary or poetry. #14

Merged
merged 3 commits into from
Aug 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 22 additions & 17 deletions kevm-pyk/src/kevm_pyk/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,24 +598,29 @@ def exec_run(options: RunOptions) -> None:
)

if options.proof_hint:
kore_input = options.input_file.name.split('.')[0] + '.kore'
logging.warning('Proof hints are not supported in the pyk krun at the momment.')
logging.info('Saving the input file as %s', kore_input)
logging.info(
'If you want to emit hints take the krun command shown below and run it replacing the temp file by the kore file generated and append the `--proof-hint` flag to your command.'
logging.warning(
'Running KEVM with proof hint options enabled, remember to not use this with any `--verbose` mode if you are redirecting its output.'
)
output_bytes = kevm.run_proof_hint(
kore_pattern,
depth=options.depth,
parser='cat',
term=True,
expand_macros=options.expand_macros,
debugger=options.debugger,
proof_hint=True,
)
sys.stdout.buffer.write(output_bytes)
else:
kevm.run(
kore_pattern,
depth=options.depth,
term=True,
expand_macros=options.expand_macros,
output=options.output,
check=True,
debugger=options.debugger,
)
with open(kore_input, 'w') as f:
kore_pattern.write(f)

kevm.run(
kore_pattern,
depth=options.depth,
term=True,
expand_macros=options.expand_macros,
output=options.output,
check=True,
debugger=options.debugger,
)


def exec_kast(options: KastOptions) -> None:
Expand Down