Skip to content

Commit 21539ad

Browse files
Add has_properties_to_check
1 parent dcefb13 commit 21539ad

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/goto-checker/properties.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,3 +233,17 @@ resultt determine_result(const propertiest &properties)
233233
}
234234
return static_cast<resultt>(status);
235235
}
236+
237+
bool has_properties_to_check(const propertiest &properties)
238+
{
239+
for(const auto &property_pair : properties)
240+
{
241+
if(
242+
property_pair.second.status == property_statust::NOT_CHECKED ||
243+
property_pair.second.status == property_statust::UNKNOWN)
244+
{
245+
return true;
246+
}
247+
}
248+
return false;
249+
}

src/goto-checker/properties.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ int result_to_exit_code(resultt result);
8989
/// Return the number of properties with given \p status
9090
std::size_t count_properties(const propertiest &, property_statust);
9191

92+
/// Return true if there as a property with NOT_CHECKED or UNKNOWN status.
93+
bool has_properties_to_check(const propertiest &properties);
94+
9295
property_statust &operator|=(property_statust &, property_statust const &);
9396
property_statust &operator&=(property_statust &, property_statust const &);
9497
resultt determine_result(const propertiest &properties);

0 commit comments

Comments
 (0)