3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-08-15 01:15:30 +00:00

More depth tracking

`SbyTask::update_status()` optionally takes the current step/depth, which gets used for some solvers/engines when exiting to pass unknown properties.
btor engine tracks the current step, but it doesn't track/report which property triggered a CEX so it's only useful on exit.
Use data source as a fallback if engine isn't provided (such as when coming from the `task_status` instead of an engine update).
This commit is contained in:
Krystine Sherwin 2025-07-08 15:47:31 +12:00
parent 0367db76f5
commit a332b017e4
No known key found for this signature in database
4 changed files with 18 additions and 7 deletions

View file

@ -77,6 +77,7 @@ def run(mode, task, engine_idx, engine):
common_state.wit_file = None
common_state.assert_fail = False
common_state.running_procs = 0
common_state.current_step = None
def print_traces_and_terminate():
if mode == "cover":
@ -100,7 +101,7 @@ def run(mode, task, engine_idx, engine):
else:
task.error(f"engine_{engine_idx}: Engine terminated without status.")
task.update_status(proc_status.upper())
task.update_status(proc_status.upper(), common_state.current_step)
task.summary.set_engine_status(engine_idx, proc_status)
task.terminate()
@ -205,6 +206,9 @@ def run(mode, task, engine_idx, engine):
if solver_args[0] == "btormc":
if "calling BMC on" in line:
return line
match = re.match(r".*at bound k = (\d+).*", line)
if match:
common_state.current_step = int(match[1])
if "SATISFIABLE" in line:
return line
if "bad state properties at bound" in line:
@ -215,6 +219,9 @@ def run(mode, task, engine_idx, engine):
return line
elif solver_args[0] == "pono":
match = re.match(r".*at bound (\d+).*", line)
if match:
common_state.current_step = int(match[1])
if line == "unknown":
if common_state.solver_status is None:
common_state.solver_status = "unsat"