1 /* Copyright (C) 2001-2010 Roberto Bagnara <bagnara@cs.unipr.it>
2    Copyright (C) 2010-2016 BUGSENG srl (http://bugseng.com)
3 
4 This file is free software; as a special exception the author gives
5 unlimited permission to copy and/or distribute it, with or without
6 modifications, as long as this notice is preserved.
7 
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
10 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. */
12 
13 #ifndef PPL_Concrete_Expression_types_hh
14 #define PPL_Concrete_Expression_types_hh 1
15 
16 namespace Parma_Polyhedra_Library {
17 
18 /*
19   NOTE: Doxygen seems to ignore documentation blocks attached to
20   template class declarations that are not provided with a definition.
21   This justifies (here below) the explicit use of Doxygen command \class.
22 */
23 
24 /*! \brief The base class of all concrete expressions.
25   \class Parma_Polyhedra_Library::Concrete_Expression
26 */
27 template <typename Target>
28 class Concrete_Expression;
29 
30 /*! \brief A binary operator applied to two concrete expressions.
31   \class Parma_Polyhedra_Library::Binary_Operator
32 */
33 template <typename Target>
34 class Binary_Operator;
35 
36 /*! \brief A unary operator applied to one concrete expression.
37   \class Parma_Polyhedra_Library::Unary_Operator
38 */
39 template <typename Target>
40 class Unary_Operator;
41 
42 /*! \brief A cast operator converting one concrete expression to some type.
43   \class Parma_Polyhedra_Library::Cast_Operator
44 */
45 template <typename Target>
46 class Cast_Operator;
47 
48 /*! \brief An integer constant concrete expression.
49   \class Parma_Polyhedra_Library::Integer_Constant
50 */
51 template <typename Target>
52 class Integer_Constant;
53 
54 /*! \brief A floating-point constant concrete expression.
55   \class Parma_Polyhedra_Library::Floating_Point_Constant
56 */
57 template <typename Target>
58 class Floating_Point_Constant;
59 
60 /*! \brief A concrete expression representing a reference to some approximable.
61   \class Parma_Polyhedra_Library::Approximable_Reference
62 */
63 template <typename Target>
64 class Approximable_Reference;
65 
66 class Concrete_Expression_Type;
67 
68 /*! \brief
69   Encodes the kind of concrete expression.
70 
71   The values should be defined by the particular instance
72   and uniquely identify one of: Binary_Operator, Unary_Operator,
73   Cast_Operator, Integer_Constant, Floating_Point_Constant, or
74   Approximable_Reference.  For example, the Binary_Operator kind
75   integer constant should be defined by an instance as the member
76   <CODE>Binary_Operator\<T\>::%KIND</CODE>.
77 */
78 typedef int Concrete_Expression_Kind;
79 
80 /*! \brief
81   Encodes a binary operator of concrete expressions.
82 
83   The values should be uniquely defined by the particular instance and
84   named: ADD, SUB, MUL, DIV, REM, BAND, BOR, BXOR, LSHIFT, RSHIFT.
85 */
86 typedef int Concrete_Expression_BOP;
87 
88 /*! \brief
89   Encodes a unary operator of concrete expressions.
90 
91   The values should be uniquely defined by the particular instance and
92   named: PLUS, MINUS, BNOT.
93 */
94 typedef int Concrete_Expression_UOP;
95 
96 } // namespace Parma_Polyhedra_Library
97 
98 #endif // !defined(PPL_Concrete_Expression_types_hh)
99