[PPL-devel] [GIT] ppl/ppl(floating_point): Use values of enum Floating_Point_Format
Fabio Bossi
bossi at cs.unipr.it
Tue Jul 27 10:33:01 CEST 2010
Module: ppl/ppl
Branch: floating_point
Commit: e245a2b77ec1a1d7f5f4662e74226a008d80717c
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=e245a2b77ec1a1d7f5f4662e74226a008d80717c
Author: Fabio Bossi <bossi at cs.unipr.it>
Date: Tue Jul 27 10:30:51 2010 +0200
Use values of enum Floating_Point_Format
for ANALYZED_FP_FORMAT.
C_Expr:
- Added method type().
---
tests/Concrete_Expression/C_Expr.defs.hh | 2 +-
tests/Concrete_Expression/C_Expr.inlines.hh | 25 +++++++++++
tests/Concrete_Expression/Makefile.am | 18 ++++----
tests/ppl_test.hh | 62 ---------------------------
4 files changed, 35 insertions(+), 72 deletions(-)
diff --git a/tests/Concrete_Expression/C_Expr.defs.hh b/tests/Concrete_Expression/C_Expr.defs.hh
index fb94904..039d97f 100644
--- a/tests/Concrete_Expression/C_Expr.defs.hh
+++ b/tests/Concrete_Expression/C_Expr.defs.hh
@@ -215,7 +215,7 @@ private:
const char* value;
};
-// We currently only consider variable references.
+// We currently only consider references to floating point variables.
template <>
class Approximable_Reference<C_Expr>
: public Approximable_Reference_Base<C_Expr> {
diff --git a/tests/Concrete_Expression/C_Expr.inlines.hh b/tests/Concrete_Expression/C_Expr.inlines.hh
index 7263eae..689fe29 100644
--- a/tests/Concrete_Expression/C_Expr.inlines.hh
+++ b/tests/Concrete_Expression/C_Expr.inlines.hh
@@ -25,6 +25,11 @@ site: http://www.cs.unipr.it/ppl/ . */
namespace Parma_Polyhedra_Library {
+inline Concrete_Expression_Type
+Concrete_Expression<C_Expr>::type() const {
+ return Concrete_Expression_Type::floating_point(ANALYZED_FP_FORMAT);
+}
+
inline
Binary_Operator<C_Expr>
::Binary_Operator(int binary_operator,
@@ -39,6 +44,11 @@ inline
Binary_Operator<C_Expr>::~Binary_Operator<C_Expr>() {
}
+inline Concrete_Expression_Type
+Binary_Operator<C_Expr>::type() const {
+ return Concrete_Expression_Type::floating_point(ANALYZED_FP_FORMAT);
+}
+
inline Concrete_Expression_Kind
Binary_Operator<C_Expr>::kind() const {
return KIND;
@@ -71,6 +81,11 @@ inline
Unary_Operator<C_Expr>::~Unary_Operator<C_Expr>() {
}
+inline Concrete_Expression_Type
+Unary_Operator<C_Expr>::type() const {
+ return Concrete_Expression_Type::floating_point(ANALYZED_FP_FORMAT);
+}
+
inline Concrete_Expression_Kind
Unary_Operator<C_Expr>::kind() const {
return KIND;
@@ -132,6 +147,11 @@ inline
Floating_Point_Constant<C_Expr>::~Floating_Point_Constant<C_Expr>() {
}
+inline Concrete_Expression_Type
+Floating_Point_Constant<C_Expr>::type() const {
+ return Concrete_Expression_Type::floating_point(ANALYZED_FP_FORMAT);
+}
+
inline Concrete_Expression_Kind
Floating_Point_Constant<C_Expr>::kind() const {
return KIND;
@@ -152,6 +172,11 @@ inline
Approximable_Reference<C_Expr>::~Approximable_Reference<C_Expr>() {
}
+inline Concrete_Expression_Type
+Approximable_Reference<C_Expr>::type() const {
+ return Concrete_Expression_Type::floating_point(ANALYZED_FP_FORMAT);
+}
+
inline Concrete_Expression_Kind
Approximable_Reference<C_Expr>::kind() const {
return KIND;
diff --git a/tests/Concrete_Expression/Makefile.am b/tests/Concrete_Expression/Makefile.am
index 015f0f8..9c105e0 100644
--- a/tests/Concrete_Expression/Makefile.am
+++ b/tests/Concrete_Expression/Makefile.am
@@ -70,15 +70,15 @@ ALL_TESTS = $(ORIGINAL_TESTS) $(DERIVED_TESTS)
# This will be overridden by the `run_tests' script.
if SUPPORTED_FLOAT
FLOAT_FLAGS = \
--DANALYZER_FP_FORMAT=float -DANALYZED_FP_FORMAT=float_ieee754_single
+-DANALYZER_FP_FORMAT=float -DANALYZED_FP_FORMAT=IEEE754_SINGLE
else
if SUPPORTED_DOUBLE
DOUBLE_FLAGS = \
--DANALYZER_FP_FORMAT=double -DANALYZED_FP_FORMAT=float_ieee754_double
+-DANALYZER_FP_FORMAT=double -DANALYZED_FP_FORMAT=IEEE754_DOUBLE
else
if SUPPORTED_LONG_DOUBLE
LONG_DOUBLE_FLAGS = \
--DANALYZER_FP_FORMAT=long_double -DANALYZED_FP_FORMAT=float_ieee754_quad
+-DANALYZER_FP_FORMAT=long_double -DANALYZED_FP_FORMAT=IEEE754_QUAD
endif
endif
endif
@@ -100,18 +100,18 @@ XFAIL_TESTS =
# Analyzer format should be less precise or equal than analyzed format.
if SUPPORTED_FLOAT
FLOAT_INSTANCES= \
-float/float_ieee754_single \
-float/float_ieee754_double \
-float/float_ieee754_quad
+float/IEEE754_SINGLE \
+float/IEEE754_DOUBLE \
+float/IEEE754_QUAD
endif
if SUPPORTED_DOUBLE
DOUBLE_INSTANCES= \
-double/float_ieee754_double \
-double/float_ieee754_quad
+double/IEEE754_DOUBLE \
+double/IEEE754_QUAD
endif
if SUPPORTED_LONG_DOUBLE
LONG_DOUBLE_INSTANCES= \
-long_double/float_ieee754_quad
+long_double/IEEE754_QUAD
endif
# Do not change the ordering in what follows.
diff --git a/tests/ppl_test.hh b/tests/ppl_test.hh
index 66ad60b..30cdbf4 100644
--- a/tests/ppl_test.hh
+++ b/tests/ppl_test.hh
@@ -483,68 +483,6 @@ typedef std::map<dimension_type, FP_Linear_Form>
FP_Linear_Form_Abstract_Store;
/*! \brief
- The incarnation of Floating_Point_Expression under test for analyzing
- floating point computations.
-*/
-typedef Floating_Point_Expression<FP_Interval, ANALYZED_FP_FORMAT>
- FP_Expression;
-
-/*! \brief
- The incarnation of Cast_Floating_Point_Expression under test for
- analyzing floating point computations.
-*/
-typedef Cast_Floating_Point_Expression<FP_Interval,
- ANALYZED_FP_FORMAT> Cast_FP_Expression;
-
-/*! \brief
- The incarnation of Constant_Floating_Point_Expression under test for
- analyzing floating point computations.
-*/
-typedef Constant_Floating_Point_Expression<FP_Interval,
- ANALYZED_FP_FORMAT> Con_FP_Expression;
-
-/*! \brief
- The incarnation of Variable_Floating_Point_Expression under test for
- analyzing floating point computations.
-*/
-typedef Variable_Floating_Point_Expression<FP_Interval,
- ANALYZED_FP_FORMAT> Var_FP_Expression;
-
-/*! \brief
- The incarnation of Sum_Floating_Point_Expression under test for
- analyzing floating point computations.
-*/
-typedef Sum_Floating_Point_Expression<FP_Interval,
- ANALYZED_FP_FORMAT> Sum_FP_Expression;
-
-/*! \brief
- The incarnation of Difference_Floating_Point_Expression under test for
- analyzing floating point computations.
-*/
-typedef Difference_Floating_Point_Expression<FP_Interval,
- ANALYZED_FP_FORMAT> Dif_FP_Expression;
-/*! \brief
- The incarnation of Multiplication_Floating_Point_Expression under test for
- analyzing floating point computations.
-*/
-typedef Multiplication_Floating_Point_Expression<FP_Interval,
- ANALYZED_FP_FORMAT> Mul_FP_Expression;
-
-/*! \brief
- The incarnation of Division_Floating_Point_Expression under test for
- analyzing floating point computations.
-*/
-typedef Division_Floating_Point_Expression<FP_Interval,
- ANALYZED_FP_FORMAT> Div_FP_Expression;
-
-/*! \brief
- The incarnation of Multiplication_Floating_Point_Expression under test for
- analyzing floating point computations.
-*/
-typedef Opposite_Floating_Point_Expression<FP_Interval,
- ANALYZED_FP_FORMAT> Opp_FP_Expression;
-
-/*! \brief
The incarnation of BD_Shape under test for analyzing
floating point computations.
*/
More information about the PPL-devel
mailing list