Skip to content

Commit 55da8d3

Browse files
Add has_properties_to_check
1 parent 89c7580 commit 55da8d3

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/goto-checker/properties.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,18 @@ count_properties(const propertiest &properties, property_resultt result)
134134
}
135135
return count;
136136
}
137+
138+
/// Returns true if there as a property with NOT_REACHED or UNKNOWN result.
139+
bool has_properties_to_check(const propertiest &properties)
140+
{
141+
for(const auto &property_pair : properties)
142+
{
143+
if(
144+
property_pair.second.result == property_resultt::NOT_REACHED ||
145+
property_pair.second.result == property_resultt::UNKNOWN)
146+
{
147+
return true;
148+
}
149+
}
150+
return false;
151+
}

src/goto-checker/properties.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,6 @@ int result_to_exit_code(resultt result);
8484
std::size_t
8585
count_properties(const propertiest &properties, property_resultt result);
8686

87+
bool has_properties_to_check(const propertiest &properties);
88+
8789
#endif // CPROVER_GOTO_CHECKER_PROPERTIES_H

0 commit comments

Comments
 (0)