00001 /* Poly_Con_Relation class implementation (non-inline functions). 00002 Copyright (C) 2001-2010 Roberto Bagnara <bagnara@cs.unipr.it> 00003 Copyright (C) 2010-2011 BUGSENG srl (http://bugseng.com) 00004 00005 This file is part of the Parma Polyhedra Library (PPL). 00006 00007 The PPL is free software; you can redistribute it and/or modify it 00008 under the terms of the GNU General Public License as published by the 00009 Free Software Foundation; either version 3 of the License, or (at your 00010 option) any later version. 00011 00012 The PPL is distributed in the hope that it will be useful, but WITHOUT 00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00014 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00015 for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program; if not, write to the Free Software Foundation, 00019 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA. 00020 00021 For the most up-to-date information see the Parma Polyhedra Library 00022 site: http://www.cs.unipr.it/ppl/ . */ 00023 00024 #include <ppl-config.h> 00025 00026 #include "Poly_Con_Relation.defs.hh" 00027 00028 #include <iostream> 00029 #include <string> 00030 #include "assert.hh" 00031 00032 namespace PPL = Parma_Polyhedra_Library; 00033 00034 void 00035 PPL::Poly_Con_Relation::ascii_dump(std::ostream& s) const { 00036 flags_t f = flags; 00037 if (f == NOTHING) { 00038 s << "NOTHING"; 00039 return; 00040 } 00041 00042 while (true) { 00043 if (implies(f, IS_DISJOINT)) { 00044 s << "IS_DISJOINT"; 00045 f &= ~IS_DISJOINT; 00046 } 00047 else if (implies(f, STRICTLY_INTERSECTS)) { 00048 s << "STRICTLY_INTERSECTS"; 00049 f &= ~STRICTLY_INTERSECTS; 00050 } 00051 else if (implies(f, IS_INCLUDED)) { 00052 s << "IS_INCLUDED"; 00053 f &= ~IS_INCLUDED; 00054 } 00055 else if (implies(f, SATURATES)) { 00056 s << "SATURATES"; 00057 f &= ~SATURATES; 00058 } 00059 if (f != NOTHING) 00060 s << " & "; 00061 else 00062 break; 00063 } 00064 } 00065 00066 PPL_OUTPUT_DEFINITIONS(Poly_Con_Relation) 00067 00068 00069 std::ostream& 00070 PPL::IO_Operators::operator<<(std::ostream& s, const Poly_Con_Relation& r) { 00071 r.ascii_dump(s); 00072 return s; 00073 } 00074 00075 bool 00076 PPL::Poly_Con_Relation::OK() const { 00077 return true; 00078 }
1.6.3