@@ -180,33 +180,31 @@ void static_verifier(
180
180
{
181
181
auto &property_status = property.second .status ;
182
182
const goto_programt::const_targett &property_location = property.second .pc ;
183
- exprt condition = property_location->get_condition ();
184
- const std::shared_ptr<const ai_baset::statet> predecessor_state_copy =
185
- ai.abstract_state_before (property_location);
186
- // simplify the condition given the domain information we have
187
- // about the state right before the assertion is evaluated
188
- predecessor_state_copy->ai_simplify (condition, ns);
189
- // if the condition simplifies to true the assertion always succeeds
190
- if (condition.is_true ())
183
+
184
+ auto result = check_assertion (ai, property_location, " unused" , ns);
185
+
186
+ switch (result.status )
191
187
{
188
+ case static_verifier_resultt::TRUE :
189
+ // if the condition simplifies to true the assertion always succeeds
192
190
property_status = property_statust::PASS;
193
- }
194
- // if the condition simplifies to false the assertion always fails
195
- else if (condition.is_false ())
196
- {
191
+ break ;
192
+ case static_verifier_resultt::FALSE :
193
+ // if the condition simplifies to false the assertion always fails
197
194
property_status = property_statust::FAIL;
198
- }
199
- // if the domain state is bottom then the assertion is definitely
200
- // unreachable
201
- else if (predecessor_state_copy->is_bottom ())
202
- {
195
+ break ;
196
+ case static_verifier_resultt::BOTTOM:
197
+ // if the domain state is bottom then the assertion is definitely
198
+ // unreachable
203
199
property_status = property_statust::NOT_REACHABLE;
204
- }
205
- // if the condition isn't definitely true, false or unreachable
206
- // we don't know whether or not it may fail
207
- else
208
- {
200
+ break ;
201
+ case static_verifier_resultt::UNKNOWN:
202
+ // if the condition isn't definitely true, false or unreachable
203
+ // we don't know whether or not it may fail
209
204
property_status = property_statust::UNKNOWN;
205
+ break ;
206
+ default :
207
+ UNREACHABLE;
210
208
}
211
209
}
212
210
}
0 commit comments