[GIT] ppl/ppl(floating_point): Do not ignore undefined variables while intervalizing: assert that they

Module: ppl/ppl Branch: floating_point Commit: db823a39805358e61caddc3122c535ffbdb5564f URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=db823a3980535...
Author: Fabio Bossi bossi@cs.unipr.it Date: Mon Sep 7 15:00:37 2009 +0200
Do not ignore undefined variables while intervalizing: assert that they are defined instead.
---
src/Floating_Point_Expression.templates.hh | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/Floating_Point_Expression.templates.hh b/src/Floating_Point_Expression.templates.hh index 03654fb..52b71c7 100644 --- a/src/Floating_Point_Expression.templates.hh +++ b/src/Floating_Point_Expression.templates.hh @@ -73,11 +73,10 @@ Floating_Point_Expression<FP_Interval_Type, FP_Format> for (dimension_type i = 0; i < dimension; ++i) { typename FP_Interval_Abstract_Store::const_iterator next_variable_value = store.find(i); - if (next_variable_value != store.end()) { - FP_Interval_Type current_addend = lf.coefficient(Variable(i)); - current_addend *= next_variable_value->second; - result += current_addend; - } + assert(next_variable_value != store.end()); + FP_Interval_Type current_addend = lf.coefficient(Variable(i)); + current_addend *= next_variable_value->second; + result += current_addend; }
return;
participants (1)
-
Fabio Bossi