Skip to content

Commit 03364df

Browse files
Add has_properties_to_check
1 parent 145553b commit 03364df

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
@@ -235,3 +235,17 @@ resultt determine_result(const propertiest &properties)
235235
}
236236
return static_cast<resultt>(status);
237237
}
238+
239+
bool has_properties_to_check(const propertiest &properties)
240+
{
241+
for(const auto &property_pair : properties)
242+
{
243+
if(
244+
property_pair.second.status == property_statust::NOT_CHECKED ||
245+
property_pair.second.status == property_statust::UNKNOWN)
246+
{
247+
return true;
248+
}
249+
}
250+
return false;
251+
}

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)