1 #include <featureTests.h>
2 #ifdef ROSE_ENABLE_SOURCE_ANALYSIS
4 #ifndef AFFINE_INEQUALITY_H
5 #define AFFINE_INEQUALITY_H
7 #include "genericDataflowCommon.h"
8 #include "VirtualCFGIterator.h"
10 #include "CallGraphTraverse.h"
12 #include "divAnalysis.h"
13 #include "printAnalysisStates.h"
14 #include "LogicalCond.h"
63 static const short top=3;
65 static const short constrKnown=2;
70 static const short bottom=0;
82 affineInequality(
int a,
int b,
int c,
bool xZero,
bool yZero, signs xSign, signs ySign);
102 bool semLessThan(
const affineInequality& that,
bool xEqZero,
bool yEqZero)
const;
116 bool semLessThanNeg(
const affineInequality& that,
bool xEqZero,
bool yEqZero)
const;
120 bool set(
int a,
int b,
int c);
121 bool set(
int a,
int b,
int c,
bool xZero,
bool yZero, signs xSign, signs ySign);
146 short getLevel()
const;
148 bool isXZero()
const;
149 bool isYZero()
const;
151 signs getXSign()
const;
152 signs getYSign()
const;
190 static std::string signToString(signs sign);
192 std::string str(std::string indent=
"");
193 std::string str(std::string indent=
"")
const;
195 std::string str(
varID x,
varID y, std::string indent=
"")
const;
197 std::string strNeg(
varID x,
varID y, std::string indent)
const;
229 const varID& getX()
const;
231 const varID& getY()
const;
243 const bool setX(
const varID& x);
245 const bool setY(
const varID& y);
247 const bool setA(
int a);
249 const bool setB(
int b);
251 const bool setC(
int c);
260 std::string str(std::string indent=
"");
262 std::string str(std::string indent=
"")
const;
286 std::set<varAffineInequality> ineqs;
293 this->ineqs = that.ineqs;
298 std::string str(std::string indent=
"");
299 std::string str(std::string indent=
"")
const;
342 void runAffineIneqPlacer(
bool printStates=
false);
345 const std::set<varAffineInequality>& getAffineIneq(
const DataflowNode& n);
348 std::list<std::set<varAffineInequality> > getAffineIneqDesc(
const DataflowNode& n);