Skip to content

Change the "no assigns..." and "no decreases..." warnings to higher verbosity #8655

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

Merged
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
24 changes: 12 additions & 12 deletions src/goto-instrument/contracts/dynamic-frames/dfcc_cfg_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,31 +360,31 @@ static struct contract_clausest default_loop_contract_clauses(
else
{
// infer assigns clause targets if none given
log.warning() << "No assigns clause provided for loop " << function_id
<< "." << loop.latch->loop_number << " at "
<< loop.head->source_location() << ". The inferred set {";
log.debug() << "No assigns clause provided for loop " << function_id
<< "." << loop.latch->loop_number << " at "
<< loop.head->source_location() << ". The inferred set {";
bool first = true;
for(const auto &expr : inferred_assigns)
{
if(!first)
{
log.warning() << ", ";
log.debug() << ", ";
}
first = false;
log.warning() << format(expr);
log.debug() << format(expr);
}
log.warning() << "} might be incomplete or imprecise, please provide an "
"assigns clause if the analysis fails."
<< messaget::eom;
log.debug() << "} might be incomplete or imprecise, please provide an "
"assigns clause if the analysis fails."
<< messaget::eom;
result.assigns = inferred_assigns;
}

if(result.decreases_clauses.empty())
{
log.warning() << "No decrease clause provided for loop " << function_id
<< "." << loop.latch->loop_number << " at "
<< loop.head->source_location()
<< ". Termination will not be checked." << messaget::eom;
log.debug() << "No decrease clause provided for loop " << function_id
<< "." << loop.latch->loop_number << " at "
<< loop.head->source_location()
<< ". Termination will not be checked." << messaget::eom;
}
}
return result;
Expand Down
Loading