[GIT] ppl/ppl(floating_point): Always use add_octagon_constraint to update contraints in

Module: ppl/ppl Branch: floating_point Commit: 8ae6135af4d6a659459fad4c01fd077de32d4562 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=8ae6135af4d6a...
Author: Fabio Bossi bossi@cs.unipr.it Date: Thu Sep 17 17:24:24 2009 +0200
Always use add_octagon_constraint to update contraints in refine_with_linear_form_inequality instead of overwriting blindly.
---
src/Octagonal_Shape.templates.hh | 18 ++++++------------ 1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/Octagonal_Shape.templates.hh b/src/Octagonal_Shape.templates.hh index ecc284f..e33df08 100644 --- a/src/Octagonal_Shape.templates.hh +++ b/src/Octagonal_Shape.templates.hh @@ -791,20 +791,16 @@ Octagonal_Shape<T>::refine_with_linear_form_inequality( dimension_type n_second_var = second_v * 2; linear_form_upper_bound(right_minus_left - first + second, upper_bound); - assign_r(matrix[n_second_var+1][n_first_var+1], - upper_bound, ROUND_NOT_NEEDED); + add_octagonal_constraint(n_second_var+1, n_first_var+1, upper_bound); linear_form_upper_bound(right_minus_left + first + second, upper_bound); - assign_r(matrix[n_second_var+1][n_first_var], - upper_bound, ROUND_NOT_NEEDED); + add_octagonal_constraint(n_second_var+1, n_first_var, upper_bound); linear_form_upper_bound(right_minus_left - first - second, upper_bound); - assign_r(matrix[n_second_var][n_first_var+1], - upper_bound, ROUND_NOT_NEEDED); + add_octagonal_constraint(n_second_var, n_first_var+1, upper_bound); linear_form_upper_bound(right_minus_left + first - second, upper_bound); - assign_r(matrix[n_second_var][n_first_var], - upper_bound, ROUND_NOT_NEEDED); + add_octagonal_constraint(n_second_var, n_first_var, upper_bound); } } } @@ -853,14 +849,12 @@ Octagonal_Shape<T>::refine_with_linear_form_inequality( for (dimension_type i = 0; m_ite != m_end; i += 2) { Row_Reference upper = *m_ite; N& ul = upper[i]; - N& ur = upper[i+1]; - assign_r(ur, ul, ROUND_NOT_NEEDED); + add_octagonal_constraint(i, i+1, ul); assign_r(ul, PLUS_INFINITY, ROUND_NOT_NEEDED); ++m_ite; Row_Reference lower = *m_ite; - N& ll = lower[i]; N& lr = lower[i+1]; - assign_r(ll, lr, ROUND_NOT_NEEDED); + add_octagonal_constraint(i+1, i, lr); assign_r(lr, PLUS_INFINITY, ROUND_NOT_NEEDED); ++m_ite; }
participants (1)
-
Fabio Bossi