@@ -1236,38 +1236,6 @@ static exprt negation_of_not_contains_constraint(
1236
1236
return and_exprt (univ_bounds, get (constraint.premise ()), equal_strings);
1237
1237
}
1238
1238
1239
- // / Negates the constraint to be fed to a solver. The intended usage is to find
1240
- // / an assignment of the universal variable that would violate the axiom. To
1241
- // / avoid false positives, the symbols other than the universal variable should
1242
- // / have been replaced by their valuation in the current model.
1243
- // / \pre Symbols other than the universal variable should have been replaced by
1244
- // / their valuation in the current model.
1245
- // / \param axiom: the not_contains constraint to add the negation of
1246
- // / \return: the negation of the axiom under the current evaluation
1247
- static exprt negation_of_constraint (const string_constraintt &axiom)
1248
- {
1249
- // If the for all is vacuously true, the negation is false.
1250
- const exprt &lb=axiom.lower_bound ();
1251
- const exprt &ub=axiom.upper_bound ();
1252
- if (lb.id ()==ID_constant && ub.id ()==ID_constant)
1253
- {
1254
- const auto lb_int = numeric_cast<mp_integer>(lb);
1255
- const auto ub_int = numeric_cast<mp_integer>(ub);
1256
- if (!lb_int || !ub_int || ub_int<=lb_int)
1257
- return false_exprt ();
1258
- }
1259
-
1260
- // If the premise is false, the implication is trivially true, so the
1261
- // negation is false.
1262
- if (axiom.premise ()==false_exprt ())
1263
- return false_exprt ();
1264
-
1265
- and_exprt premise (axiom.premise (), axiom.univ_within_bounds ());
1266
- and_exprt negaxiom (premise, not_exprt (axiom.body ()));
1267
-
1268
- return negaxiom;
1269
- }
1270
-
1271
1239
// / Debugging function which outputs the different steps an axiom goes through
1272
1240
// / to be checked in check axioms.
1273
1241
static void debug_check_axioms_step (
@@ -1365,7 +1333,7 @@ static std::pair<bool, std::vector<exprt>> check_axioms(
1365
1333
const string_constraintt axiom_in_model (
1366
1334
univ_var, get (bound_inf), get (bound_sup), get (body));
1367
1335
1368
- exprt negaxiom= negation_of_constraint ( axiom_in_model);
1336
+ exprt negaxiom = axiom_in_model. negation ( );
1369
1337
negaxiom = simplify_expr (negaxiom, ns);
1370
1338
1371
1339
stream << indent << i << " .\n " ;
0 commit comments