Skip to content

Commit 06e364a

Browse files
Set final status of UNKNOWN properties
Utility function to set all UNKNOWN properties to PASS when the verification algorithm has finished. Corresponds to the current behaviour of CBMC replying 'successful' when the given bounds have been reached.
1 parent 17d006b commit 06e364a

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/goto-checker/bmc_util.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,22 @@ void update_status_of_not_checked_properties(
270270
}
271271
}
272272

273+
void update_status_of_unknown_properties(
274+
propertiest &properties,
275+
std::unordered_set<irep_idt> &updated_properties)
276+
{
277+
for(auto &property_pair : properties)
278+
{
279+
if(property_pair.second.status == property_statust::UNKNOWN)
280+
{
281+
// This could have any status except NOT_CHECKED.
282+
// We consider them PASS because we do verification modulo bounds.
283+
property_pair.second.status = property_statust::PASS;
284+
updated_properties.insert(property_pair.first);
285+
}
286+
}
287+
}
288+
273289
void output_coverage_report(
274290
const std::string &cov_out,
275291
const abstract_goto_modelt &goto_model,

src/goto-checker/bmc_util.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,16 @@ void update_status_of_not_checked_properties(
117117
propertiest &properties,
118118
std::unordered_set<irep_idt> &updated_properties);
119119

120+
/// Sets the property status of UNKNOWN properties to PASS.
121+
/// \param [inout] properties: The status is updated in this data structure
122+
/// \param [inout] updated_properties: The set of property IDs of
123+
/// updated properties
124+
/// Note: we currently declare everything PASS that is UNKNOWN at the
125+
/// end of the model checking algorithm.
126+
void update_status_of_unknown_properties(
127+
propertiest &properties,
128+
std::unordered_set<irep_idt> &updated_properties);
129+
120130
// clang-format off
121131
#define OPT_BMC \
122132
"(program-only)" \

0 commit comments

Comments
 (0)