Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
daejunpark committed Nov 19, 2024
1 parent 1202202 commit ca712f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/halmos/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,7 @@ def future_callback(future_model):
f"# of potential paths involving assertion violations: {len(future_models)} / {len(result_exs)} (--solver-threads {args.solver_threads})"
)

# display assertion solving progress
with Status("solving:") as status:
while True:
if args.early_exit and len(counterexamples) > 0:
Expand Down
7 changes: 5 additions & 2 deletions src/halmos/sevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@

# TODO: make this configurable
MAX_MEMORY_SIZE = 2**20
PULSE_INTERVAL = 2**13

FOUNDRY_CALLER = 0x1804C8AB1F12E6BBF3894D4083F33E07309D1F38
FOUNDRY_ORIGIN = FOUNDRY_CALLER
Expand Down Expand Up @@ -2664,11 +2665,13 @@ def finalize(ex: Exec):
prev_step_id: int = item.step
step_id += 1

if step_id % (2**13) == 0:
# display progress
if step_id % PULSE_INTERVAL == 0:
elapsed = timer() - stack.start_time
speed = step_id / elapsed
status.update(
f"pulse: {step_id} ops ({speed:.2f} ops/s) | completed paths: {stack.completed_paths} | outstanding paths: {len(stack)}"
f"pulse: {step_id} ops ({speed:.2f} ops/s) | "
f"completed paths: {stack.completed_paths} | outstanding paths: {len(stack)}"
)

if not ex.path.is_activated():
Expand Down

0 comments on commit ca712f2

Please sign in to comment.