
Module: ppl/ppl Branch: bounded_arithmetic Commit: add5f6054a16b8fb72d4fc3f4d6807523c05b8e7 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=add5f6054a16b...
Author: Alberto Gioia <otrebla@spark.(none)> Date: Wed Jan 26 11:31:37 2011 +0100
Renamed FP_Oracle into Oracle, and generalized it to include both floating point and integer values.
---
src/Oracle.hh | 12 ------------ src/linearize.hh | 7 ------- tests/Concrete_Expression/linearize.cc | 3 --- 3 files changed, 0 insertions(+), 22 deletions(-)
diff --git a/src/Oracle.hh b/src/Oracle.hh index da95283..32d58d5 100644 --- a/src/Oracle.hh +++ b/src/Oracle.hh @@ -72,18 +72,6 @@ public: virtual bool get_fp_constant_value( const Floating_Point_Constant<Target>& expr, Interval_Type& result) const = 0; -/*! \brief - Asks the external analyzer for an interval that correctly - approximates the value of integer constant \p expr. - Result is stored into \p result. - - \return <CODE>true</CODE> if the analyzer was able to find a correct - approximation, <CODE>false</CODE> otherwise. - */ - virtual bool get_integer_constant_value( - const Integer_Constant<Target>& expr, - Interval_Type& result) const = 0; -
/*! \brief Asks the external analyzer for an interval that correctly approximates diff --git a/src/linearize.hh b/src/linearize.hh index a8abdf0..dcf0bf0 100644 --- a/src/linearize.hh +++ b/src/linearize.hh @@ -689,13 +689,6 @@ linearize(const Concrete_Expression<Target>& expr, switch(expr.kind()) { case Integer_Constant<Target>::KIND: { - const Integer_Constant<Target>* ic_expr = - expr.template as<Integer_Constant>(); - Interval_Type constant_value; - if (!oracle.get_integer_constant_value(*ic_expr, constant_value)) - return false; - result = Linear_Form(constant_value); - return true; break; } // throw std::runtime_error("PPL internal error: unreachable"); diff --git a/tests/Concrete_Expression/linearize.cc b/tests/Concrete_Expression/linearize.cc index c3d8efb..429d8d2 100644 --- a/tests/Concrete_Expression/linearize.cc +++ b/tests/Concrete_Expression/linearize.cc @@ -43,9 +43,6 @@ public: return true; }
- bool get_integer_constant_value(const Integer_Constant<C_Expr>& expr, - FP_Interval& result) const { } - bool get_integer_expr_value(const Concrete_Expression<C_Expr>& expr, FP_Interval& result) const { if (expr.kind() == INT_CON) {