Skip to content

Commit

Permalink
Adjust bound and witness when monitor state is added to TS (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanoKobalamyne authored Oct 2, 2024
1 parent 035c002 commit b620e4e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pono.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@ ProverResult check_prop(PonoOptions pono_options,
assert(!ts.inputvars().size());
}

bool has_monitor = false;
if (!ts.only_curr(prop)) {
logger.log(1,
"Got next state or input variables in property. "
"Generating a monitor state.");
prop = add_prop_monitor(ts, prop);
has_monitor = true;
}

if (pono_options.assume_prop_) {
Expand Down Expand Up @@ -141,11 +143,16 @@ ProverResult check_prop(PonoOptions pono_options,
}
else
{
r = prover->check_until(pono_options.bound_);
r = prover->check_until(pono_options.bound_ + has_monitor);
}

if (r == FALSE && pono_options.witness_) {
bool success = prover->witness(cex);
if (has_monitor) {
// Witness will always have at least one element, because the monitor is constrained
// to start true.
cex.pop_back();
}
if (!success) {
logger.log(
0,
Expand Down

0 comments on commit b620e4e

Please sign in to comment.