Skip to content

Commit 8f7ffc4

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 23150a4 commit 8f7ffc4

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
@@ -124,6 +124,16 @@ void update_status_of_not_checked_properties(
124124
propertiest &properties,
125125
std::unordered_set<irep_idt> &updated_properties);
126126

127+
/// Sets the property status of UNKNOWN properties to PASS.
128+
/// \param [in,out] properties: The status is updated in this data structure
129+
/// \param [in,out] updated_properties: The set of property IDs of
130+
/// updated properties
131+
/// Note: we currently declare everything PASS that is UNKNOWN at the
132+
/// end of the model checking algorithm.
133+
void update_status_of_unknown_properties(
134+
propertiest &properties,
135+
std::unordered_set<irep_idt> &updated_properties);
136+
127137
// clang-format off
128138
#define OPT_BMC \
129139
"(program-only)" \

0 commit comments

Comments
 (0)