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