24 #include "ppl-config.h"
26 #include "assertions.hh"
36 const char*
empty =
"EM";
37 const char* consys_min =
"CM";
38 const char* gensys_min =
"GM";
39 const char* consys_upd =
"CS";
40 const char* gensys_upd =
"GS";
41 const char* satc_upd =
"SC";
42 const char* satg_upd =
"SG";
43 const char* consys_pending =
"CP";
44 const char* gensys_pending =
"GP";
54 get_field(std::istream& s,
const char* keyword,
bool& positive) {
57 || (str[0] !=
'+' && str[0] !=
'-')
58 || str.substr(1) != keyword) {
61 positive = (str[0] ==
'+');
69 s << (test_zero_dim_univ() ?
'+' :
'-') <<
zero_dim_univ <<
' '
70 << (test_empty() ?
'+' :
'-') <<
empty <<
' '
72 << (test_c_minimized() ?
'+' :
'-') << consys_min <<
' '
73 << (test_g_minimized() ?
'+' :
'-') << gensys_min <<
' '
75 << (test_c_up_to_date() ?
'+' :
'-') << consys_upd <<
' '
76 << (test_g_up_to_date() ?
'+' :
'-') << gensys_upd <<
' '
78 << (test_c_pending() ?
'+' :
'-') << consys_pending <<
' '
79 << (test_g_pending() ?
'+' :
'-') << gensys_pending <<
' '
81 << (test_sat_c_up_to_date() ?
'+' :
'-') << satc_upd <<
' '
82 << (test_sat_g_up_to_date() ?
'+' :
'-') << satg_upd <<
' ';
105 if (!
get_field(s, consys_min, positive)) {
115 if (!
get_field(s, gensys_min, positive)) {
125 if (!
get_field(s, consys_upd, positive)) {
132 reset_c_up_to_date();
135 if (!
get_field(s, gensys_upd, positive)) {
142 reset_g_up_to_date();
145 if (!
get_field(s, consys_pending, positive)) {
155 if (!
get_field(s, gensys_pending, positive)) {
169 set_sat_c_up_to_date();
172 reset_sat_c_up_to_date();
179 set_sat_g_up_to_date();
182 reset_sat_g_up_to_date();
191 PPL::Polyhedron::Status::OK()
const {
197 if (test_zero_dim_univ()) {
210 cerr <<
"The empty flag is incompatible with any other one."
217 if ((test_sat_c_up_to_date() || test_sat_g_up_to_date())
218 && !(test_c_up_to_date() && test_g_up_to_date())) {
221 "If a saturation matrix is up-to-date, constraints and\n"
222 "generators have to be both up-to-date."
228 if (test_c_minimized() && !test_c_up_to_date()) {
230 cerr <<
"If constraints are minimized they must be up-to-date."
236 if (test_g_minimized() && !test_g_up_to_date()) {
238 cerr <<
"If generators are minimized they must be up-to-date."
244 if (test_c_pending() && test_g_pending()) {
246 cerr <<
"There cannot be both pending constraints and pending generators."
252 if (test_c_pending() || test_g_pending()) {
253 if (!test_c_minimized() || !test_g_minimized()) {
256 "If there are pending constraints or generators, constraints\n"
257 "and generators must be minimized."
263 if (!test_sat_c_up_to_date() && !test_sat_g_up_to_date()) {
266 "If there are pending constraints or generators, there must\n"
267 "be at least a saturation matrix up-to-date."
Enable_If< Is_Native_Or_Checked< T >::value, void >::type ascii_dump(std::ostream &s, const T &t)
const char * zero_dim_univ
The standard C++ namespace.
bool test_zero_dim_univ() const
The base class for convex polyhedra.
bool get_field(std::istream &s, const char *keyword, bool &positive)
bool get_field(std::istream &s, const char *keyword, bool &positive)
#define PPL_OUTPUT_DEFINITIONS_ASCII_ONLY(class_name)
A conjunctive assertion about a polyhedron.
The entire library is confined to this namespace.
#define PPL_UNINITIALIZED(type, name)
Enable_If< Is_Native_Or_Checked< T >::value, bool >::type ascii_load(std::ostream &s, T &t)
Ascii load for native or checked.