PPL  1.2
Poly_Gen_Relation_defs.hh
Go to the documentation of this file.
1 /* Poly_Gen_Relation class declaration.
2  Copyright (C) 2001-2010 Roberto Bagnara <bagnara@cs.unipr.it>
3  Copyright (C) 2010-2016 BUGSENG srl (http://bugseng.com)
4 
5 This file is part of the Parma Polyhedra Library (PPL).
6 
7 The PPL is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11 
12 The PPL is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
20 
21 For the most up-to-date information see the Parma Polyhedra Library
22 site: http://bugseng.com/products/ppl/ . */
23 
24 #ifndef PPL_Poly_Gen_Relation_defs_hh
25 #define PPL_Poly_Gen_Relation_defs_hh 1
26 
28 #include "globals_defs.hh"
29 #include <iosfwd>
30 
31 namespace Parma_Polyhedra_Library {
32 
33 // Put them in the namespace here to declare them friend later.
34 
36 
37 bool operator==(const Poly_Gen_Relation& x, const Poly_Gen_Relation& y);
38 
40 
41 bool operator!=(const Poly_Gen_Relation& x, const Poly_Gen_Relation& y);
42 
44 
45 Poly_Gen_Relation operator&&(const Poly_Gen_Relation& x,
46  const Poly_Gen_Relation& y);
47 
54 Poly_Gen_Relation operator-(const Poly_Gen_Relation& x,
55  const Poly_Gen_Relation& y);
56 
57 namespace IO_Operators {
58 
60 
61 std::ostream& operator<<(std::ostream& s, const Poly_Gen_Relation& r);
62 
63 } // namespace IO_Operators
64 
65 } // namespace Parma_Polyhedra_Library
66 
67 
69 
74 private:
76  typedef unsigned int flags_t;
77 
79 
80  static const flags_t NOTHING = 0U;
81  static const flags_t SUBSUMES = 1U << 0;
83 
85  static const flags_t EVERYTHING
87 
89  flags_t flags;
90 
92  static bool implies(flags_t x, flags_t y);
93 
95  Poly_Gen_Relation(flags_t mask);
96 
97  friend bool
99  friend bool
100  operator!=(const Poly_Gen_Relation& x, const Poly_Gen_Relation& y);
101 
102  friend Poly_Gen_Relation
103  operator&&(const Poly_Gen_Relation& x, const Poly_Gen_Relation& y);
104 
105  friend Poly_Gen_Relation
106  operator-(const Poly_Gen_Relation& x, const Poly_Gen_Relation& y);
107 
108  friend std::ostream&
110  IO_Operators::operator<<(std::ostream& s, const Poly_Gen_Relation& r);
111 
112 public:
113 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
114 
118 #endif
119  flags_t get_flags() const;
120 
121 public:
123  static Poly_Gen_Relation nothing();
124 
126  static Poly_Gen_Relation subsumes();
127 
129 
131  bool implies(const Poly_Gen_Relation& y) const;
132 
134  bool OK() const;
135 };
136 
138 
139 #endif // !defined(PPL_Poly_Gen_Relation_defs_hh)
bool operator!=(const Box< ITV > &x, const Box< ITV > &y)
Definition: Box_inlines.hh:264
static Poly_Gen_Relation subsumes()
Adding the generator would not change the polyhedron.
friend Poly_Gen_Relation operator&&(const Poly_Gen_Relation &x, const Poly_Gen_Relation &y)
unsigned int flags_t
Poly_Gen_Relation is implemented by means of a finite bitset.
flags_t flags
This holds the current bitset.
std::ostream & operator<<(std::ostream &s, const Ask_Tell< D > &x)
static const flags_t EVERYTHING
All assertions together.
#define PPL_OUTPUT_DECLARATIONS
friend Poly_Gen_Relation operator-(const Poly_Gen_Relation &x, const Poly_Gen_Relation &y)
friend bool operator==(const Poly_Gen_Relation &x, const Poly_Gen_Relation &y)
bool OK() const
Checks if all the invariants are satisfied.
The entire library is confined to this namespace.
Definition: version.hh:61
friend bool operator!=(const Poly_Gen_Relation &x, const Poly_Gen_Relation &y)
bool operator==(const Box< ITV > &x, const Box< ITV > &y)
flags_t get_flags() const
Access the internal flags: this is needed for some language interfaces.
static bool implies(flags_t x, flags_t y)
True if and only if the conjunction x implies the conjunction y.
Enable_If< Is_Singleton< T >::value, Interval< B, Info > >::type operator-(const Interval< B, Info > &x, const T &y)
static Poly_Gen_Relation nothing()
The assertion that says nothing.
The relation between a polyhedron and a generator.
Poly_Gen_Relation(flags_t mask)
Construct from a bit-mask.