[GIT] ppl/ppl(bounded_arithmetic): Added the definition of the class Int_Constant<C_Expr>, defined on a Intero_Interval.

Module: ppl/ppl Branch: bounded_arithmetic Commit: 0c26e9823dc777cf9f38045115b647e4c525017f URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=0c26e9823dc77...
Author: Alberto Gioia alberto.gioi1@studenti.unipr.it Date: Fri Jun 24 17:32:56 2011 +0200
Added the definition of the class Int_Constant<C_Expr>, defined on a Intero_Interval.
---
tests/Concrete_Expression/C_Expr.defs.hh | 13 +++++-------- tests/Concrete_Expression/C_Expr.inlines.hh | 16 ++++------------ 2 files changed, 9 insertions(+), 20 deletions(-)
diff --git a/tests/Concrete_Expression/C_Expr.defs.hh b/tests/Concrete_Expression/C_Expr.defs.hh index c3beaf8..5b4adb5 100644 --- a/tests/Concrete_Expression/C_Expr.defs.hh +++ b/tests/Concrete_Expression/C_Expr.defs.hh @@ -36,7 +36,7 @@ enum C_Expr_Kind { INT_CON, INTEGER_CON, FP_CON, - APPROX_REF + APPROX_REF, };
//! Toy class for testing analysis of floating point computations. @@ -185,7 +185,7 @@ class Integer_Constant<C_Expr> public: //! Constructor from type and value. Integer_Constant<C_Expr>(Concrete_Expression_Type type, - const Integer_Interval& val); + const Integer_Interval& val);
//! Do-nothing destructor. ~Integer_Constant<C_Expr>(); @@ -206,9 +206,8 @@ class Int_Constant<C_Expr> public Int_Constant_Common<C_Expr> { public: //! Constructor from value. - Int_Constant<C_Expr>(//Concrete_Expression_Type type, - const char* value_string, - unsigned int string_size); + Int_Constant<C_Expr>(Concrete_Expression_Type type, + const Intero_Interval& val);
//! Do-nothing destructor. ~Int_Constant<C_Expr>(); @@ -220,10 +219,8 @@ public: enum { KIND = INTEGER_CON };
//! The Integer constant as written. - //char* value_bin - char* value; + Intero_Interval value;
-// int value_dec;
};
diff --git a/tests/Concrete_Expression/C_Expr.inlines.hh b/tests/Concrete_Expression/C_Expr.inlines.hh index 949a0a4..dc5b3b4 100644 --- a/tests/Concrete_Expression/C_Expr.inlines.hh +++ b/tests/Concrete_Expression/C_Expr.inlines.hh @@ -145,22 +145,14 @@ Integer_Constant<C_Expr>::~Integer_Constant<C_Expr>() {
inline Int_Constant<C_Expr>:: -Int_Constant(//Concrete_Expression_Type type, - const char* value_string, - const unsigned int string_size) - : Concrete_Expression<C_Expr>(Concrete_Expression_Type::bounded_integer(BITS_8, SIGNED_2_COMPLEMENT, OVERFLOW_WRAPS), INTEGER_CON), - value(new char[string_size]) { - strcpy(value, value_string); +Int_Constant(Concrete_Expression_Type type, + const Intero_Interval& val) + : Concrete_Expression<C_Expr>(type, INTEGER_CON), + value(val) { }
inline Int_Constant<C_Expr>::~Int_Constant<C_Expr>() { - delete[] value; -} - -inline Concrete_Expression_Type -Int_Constant<C_Expr>::type() const { - return expr_type; }
inline
participants (1)
-
Alberto Gioia