@@ -235,7 +235,7 @@ bool polynomial_acceleratort::accelerate(
235
235
// assume(guard);
236
236
// assume(no overflows in previous code);
237
237
238
- program.add_instruction (ASSUME)-> guard =guard ;
238
+ program.add ( goto_programt::make_assumption ( guard)) ;
239
239
240
240
program.assign (
241
241
loop_counter,
@@ -261,7 +261,7 @@ bool polynomial_acceleratort::accelerate(
261
261
return false ;
262
262
}
263
263
264
- program.add_instruction (ASSUME)-> guard = guard_last;
264
+ program.add ( goto_programt::make_assumption ( guard_last)) ;
265
265
program.fix_types ();
266
266
267
267
if (path_is_monotone)
@@ -406,9 +406,7 @@ bool polynomial_acceleratort::fit_polynomial_sliced(
406
406
#endif
407
407
408
408
// Now do an ASSERT(false) to grab a counterexample
409
- goto_programt::targett assertion=program.add_instruction (ASSERT);
410
- assertion->guard =false_exprt ();
411
-
409
+ program.add (goto_programt::make_assertion (false_exprt ()));
412
410
413
411
// If the path is satisfiable, we've fitted a polynomial. Extract the
414
412
// relevant coefficients and return the expression.
@@ -600,7 +598,7 @@ void polynomial_acceleratort::assert_for_values(
600
598
exprt overflow_expr;
601
599
overflow.overflow_expr (rhs, overflow_expr);
602
600
603
- program.add_instruction (ASSUME)-> guard = not_exprt (overflow_expr);
601
+ program.add ( goto_programt::make_assumption ( not_exprt (overflow_expr)) );
604
602
605
603
rhs=typecast_exprt (rhs, target.type ());
606
604
@@ -609,8 +607,7 @@ void polynomial_acceleratort::assert_for_values(
609
607
const equal_exprt polynomial_holds (target, rhs);
610
608
611
609
// Finally, assert that the polynomial equals the variable we're fitting.
612
- goto_programt::targett assumption=program.add_instruction (ASSUME);
613
- assumption->guard =polynomial_holds;
610
+ program.add (goto_programt::make_assumption (polynomial_holds));
614
611
}
615
612
616
613
void polynomial_acceleratort::cone_of_influence (
@@ -680,24 +677,23 @@ bool polynomial_acceleratort::check_inductive(
680
677
++it)
681
678
{
682
679
const equal_exprt holds (it->first , it->second .to_expr ());
683
- program.add_instruction (ASSUME)-> guard = holds;
680
+ program.add ( goto_programt::make_assumption ( holds)) ;
684
681
685
682
polynomials_hold.push_back (holds);
686
683
}
687
684
688
685
program.append (body);
689
686
690
- codet inc_loop_counter=
691
- code_assignt (
692
- loop_counter,
693
- plus_exprt (loop_counter, from_integer (1 , loop_counter.type ())));
694
- program.add_instruction (ASSIGN)->code =inc_loop_counter;
687
+ auto inc_loop_counter = code_assignt (
688
+ loop_counter,
689
+ plus_exprt (loop_counter, from_integer (1 , loop_counter.type ())));
690
+ program.add (goto_programt::make_assignment (inc_loop_counter));
695
691
696
692
for (std::vector<exprt>::iterator it=polynomials_hold.begin ();
697
693
it!=polynomials_hold.end ();
698
694
++it)
699
695
{
700
- program.add_instruction (ASSERT)-> guard = *it;
696
+ program.add ( goto_programt::make_assertion ( *it)) ;
701
697
}
702
698
703
699
#ifdef DEBUG
0 commit comments