ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
yicesParserLib.h File Reference
#include <iostream>
#include <fstream>
#include <string>
#include <err.h>
#include <SgGraphTemplate.h>
#include <graphProcessing.h>
#include <staticCFG.h>
#include <yices_c.h>
Include dependency graph for yicesParserLib.h:

Go to the source code of this file.

Classes

class  visitorTraversalFunc
 
struct  Vertex2
 
struct  Edge2
 
class  visitorTraversal
 
class  visitorTraversal2
 

Typedefs

typedef myGraph CFGforT
 
typedef boost::adjacency_list
< boost::vecS, boost::vecS,
boost::bidirectionalS, Vertex2,
Edge2
newGraph
 
typedef newGraph::vertex_descriptor VertexID2
 
typedef newGraph::edge_descriptor EdgeID2
 
typedef boost::graph_traits
< newGraph >::vertex_iterator 
vertex_iterator
 
typedef boost::graph_traits
< newGraph >
::out_edge_iterator 
out_edge_iterator
 
typedef boost::graph_traits
< newGraph >::in_edge_iterator 
in_edge_iterator
 
typedef boost::graph_traits
< newGraph >::edge_iterator 
edge_iterator
 

Functions

yices_expr mainParse (vector< SgGraphNode * > expr, yices_context &ctx)
 
string getGraphNodeType (SgGraphNode *sn)
 
void propagateFunctionCall (std::vector< SgGraphNode * > path, int i, int pathnum)
 These should be unsatisfiable under integer logic int main (argc, argv) { int x = argc[0]; int y = argc[1]; if (x > 0 && y < 0) {. More...
 
long getIndex (SgGraphNode *n)
 
int getSource (int &edge, newGraph *&g)
 
int getTarget (int &edge, newGraph *&g)
 
void printCFGNode2 (int &cf, VertexID2 v, newGraph *&g, std::ofstream &o)
 
void printCFGEdge2 (int &cf, newGraph *&cfg, std::ofstream &o)
 
void printHotness2 (newGraph *&g)
 
string getType (SgNode *n)
 
yices_expr evalFunction (std::vector< SgGraphNode * > path, yices_context &ctx, bool mainFlag)
 
std::vector< int > breakTriple (std::vector< SgGraphNode * > expr)
 
string isAtom (SgNode *)
 
bool isLogicalSplit (SgNode *)
 
string getLogicalSplit (SgNode *)
 
string getBinaryLogicOp (SgNode *)
 
bool isBinaryLogicOp (SgNode *)
 
bool isBinaryOp (SgNode *)
 
string getBinaryOp (SgNode *)
 
std::vector< SgGraphNode * > getSlice (std::vector< SgGraphNode * > vv, int i)
 
int yicesCheck (int argc, char **argv)
 

Variables

int FORLOOPS
 
bool inconsistent
 
int qst
 
bool unknown_flag
 
std::map< SgInitializedName
*, yices_var_decl > 
unknowns
 
std::map< yices_var_decl,
SgInitializedName * > 
IName
 
std::vector< yices_var_decl > unknownvdeclis
 
bool usingNots
 
std::map< SgInitializedName
*, std::vector< int > > 
notMap
 
std::map< std::vector
< SgGraphNode * >, std::set
< int > > 
calledMap
 
std::set< SgNode * > unknownFunctions
 
std::map< SgNode
*, std::vector< std::vector
< SgGraphNode * > > > 
FuncPathMap
 
bool forFlag
 
int nvars
 
std::map< SgName, string > nameOf
 
bool noAssert
 
std::map< SgNode *, int > forsts
 
std::map< int, std::vector
< SgGraphNode * > > 
intvecmap
 
std::map< std::vector
< SgGraphNode * >, int > 
vecintmap
 
std::vector< std::vector
< SgGraphNode * > > 
paths
 
std::map< SgName, yices_expr > getExpr
 
newGraphnGraph
 
SgIncidenceDirectedGraphopeng
 
myGraphopenorig
 
StaticCFG::CFGopencfg
 
int rounds
 
int pathnum
 
std::set< std::pair< VertexID2,
VertexID2 > > 
knownEdges
 
std::map< SgGraphNode
*, VertexID2
graphVertex
 
std::map< int, EdgeID2intedgemap
 
std::map< EdgeID2, int > edgeintmap
 
std::map< VertexID2, int > intmap
 
std::vector< VertexIDexprs
 
int ipaths
 
std::set< std::vector
< SgGraphNode * > > 
globalPaths
 
StaticCFG::CFGcfg
 

Typedef Documentation

typedef myGraph CFGforT

Definition at line 19 of file yicesParserLib.h.

typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, Vertex2, Edge2> newGraph

Definition at line 101 of file yicesParserLib.h.

typedef newGraph::vertex_descriptor VertexID2

Definition at line 103 of file yicesParserLib.h.

typedef newGraph::edge_descriptor EdgeID2

Definition at line 104 of file yicesParserLib.h.

typedef boost::graph_traits<newGraph>::vertex_iterator vertex_iterator

Definition at line 106 of file yicesParserLib.h.

typedef boost::graph_traits<newGraph>::out_edge_iterator out_edge_iterator

Definition at line 107 of file yicesParserLib.h.

typedef boost::graph_traits<newGraph>::in_edge_iterator in_edge_iterator

Definition at line 108 of file yicesParserLib.h.

typedef boost::graph_traits<newGraph>::edge_iterator edge_iterator

Definition at line 109 of file yicesParserLib.h.

Function Documentation

string getGraphNodeType ( SgGraphNode sn)
void propagateFunctionCall ( std::vector< SgGraphNode * >  path,
int  i,
int  pathnum 
)

These should be unsatisfiable under integer logic int main (argc, argv) { int x = argc[0]; int y = argc[1]; if (x > 0 && y < 0) {.

if (x == y) { } else if (y > x) { } else if (x*y > 0) { } else { } } else { } return 0;

Therefore there should only be 2 satisfiable paths, the primary if statement being false or the primary if statement being true and everything else false

This should translate to

(set-logic QF_LIA) (declare-fun x () Int) (declare-fun y () Int) (assert (> (x 0))) (assert (< (y 0))) (assert (= (x y))) (check-sat) (pop 1) (push 1) (assert (> (y x))) (check-sat) (pop 1) (push 1) (assert (> (* (x y) ) 0)) (check-sat) (pop 1) (check-sat) (pop 2) (check-sat)

Definition at line 167 of file yicesParserLib.h.

References calledMap, FuncPathMap, SgFunctionDeclaration::get_definition(), SgFunctionDeclaration::get_qualified_name(), SgFunctionCallExp::getAssociatedFunctionDeclaration(), isSgFunctionCallExp(), pathnum, and paths.

Referenced by visitorTraversal::analyzePath().

long getIndex ( SgGraphNode n)

Definition at line 290 of file yicesParserLib.h.

References SgGraphNode::get_index().

int getSource ( int &  edge,
newGraph *&  g 
)
void printCFGNode2 ( int &  cf,
VertexID2  v,
newGraph *&  g,
std::ofstream &  o 
)

Definition at line 332 of file yicesParserLib.h.

Referenced by printHotness2().

void printCFGEdge2 ( int &  cf,
newGraph *&  cfg,
std::ofstream &  o 
)

Definition at line 350 of file yicesParserLib.h.

References getSource(), and getTarget().

Referenced by printHotness2().

void printHotness2 ( newGraph *&  g)

Definition at line 357 of file yicesParserLib.h.

References edgeintmap, intedgemap, intmap, printCFGEdge2(), and printCFGNode2().

std::vector<int> breakTriple ( std::vector< SgGraphNode * >  expr)

Definition at line 1443 of file yicesParserLib.h.

Referenced by mainParse().

bool isLogicalSplit ( SgNode n)

Definition at line 2318 of file yicesParserLib.h.

References isSgAndOp(), isSgNotOp(), and isSgOrOp().

Referenced by mainParse().

std::string getLogicalSplit ( SgNode n)

Definition at line 2325 of file yicesParserLib.h.

References isSgAndOp(), isSgNotOp(), and isSgOrOp().

Referenced by mainParse().

std::string getBinaryLogicOp ( SgNode n)

Definition at line 2341 of file yicesParserLib.h.

References isSgEqualityOp(), isSgGreaterThanOp(), isSgLessThanOp(), and isSgNotEqualOp().

Referenced by mainParse().

bool isBinaryLogicOp ( SgNode n)

Definition at line 2362 of file yicesParserLib.h.

References isSgEqualityOp(), isSgGreaterThanOp(), isSgLessThanOp(), and isSgNotEqualOp().

Referenced by mainParse().

bool isBinaryOp ( SgNode n)

Definition at line 2371 of file yicesParserLib.h.

References isSgAddOp(), isSgDivideOp(), isSgMultiplyOp(), and isSgSubtractOp().

Referenced by mainParse().

std::string getBinaryOp ( SgNode n)

Definition at line 2380 of file yicesParserLib.h.

References isSgAddOp(), isSgDivideOp(), isSgMultiplyOp(), and isSgSubtractOp().

Referenced by mainParse().

std::vector<SgGraphNode*> getSlice ( std::vector< SgGraphNode * >  vv,
int  i 
)

Definition at line 1471 of file yicesParserLib.h.

Variable Documentation

int FORLOOPS

Definition at line 14 of file yicesParserLib.h.

Referenced by evalFunction(), and yicesCheck().

bool inconsistent

Definition at line 15 of file yicesParserLib.h.

Referenced by visitorTraversal::analyzePath(), and evalFunction().

int qst

Definition at line 17 of file yicesParserLib.h.

Referenced by visitorTraversal::analyzePath(), and yicesCheck().

bool unknown_flag

Definition at line 20 of file yicesParserLib.h.

Referenced by evalFunction(), and mainParse().

std::map<SgInitializedName*, yices_var_decl> unknowns

Definition at line 21 of file yicesParserLib.h.

Referenced by visitorTraversal::analyzePath(), evalFunction(), and mainParse().

std::map<yices_var_decl, SgInitializedName*> IName

Definition at line 22 of file yicesParserLib.h.

Referenced by visitorTraversal::analyzePath(), and mainParse().

std::vector<yices_var_decl> unknownvdeclis

Definition at line 23 of file yicesParserLib.h.

Referenced by visitorTraversal::analyzePath(), and mainParse().

bool usingNots

Definition at line 24 of file yicesParserLib.h.

Referenced by visitorTraversal::analyzePath(), evalFunction(), and mainParse().

std::map<SgInitializedName*, std::vector<int> > notMap

Definition at line 25 of file yicesParserLib.h.

Referenced by visitorTraversal::analyzePath(), and mainParse().

std::map<std::vector<SgGraphNode*>, std::set<int> > calledMap

Definition at line 28 of file yicesParserLib.h.

Referenced by visitorTraversal::analyzePath(), and propagateFunctionCall().

std::set<SgNode*> unknownFunctions

Definition at line 29 of file yicesParserLib.h.

Referenced by visitorTraversal::analyzePath(), and mainParse().

std::map<SgNode*, std::vector<std::vector<SgGraphNode*> > > FuncPathMap

Definition at line 67 of file yicesParserLib.h.

Referenced by propagateFunctionCall(), and yicesCheck().

bool forFlag

Definition at line 69 of file yicesParserLib.h.

Referenced by visitorTraversal::analyzePath(), and evalFunction().

int nvars

Definition at line 71 of file yicesParserLib.h.

Referenced by evalFunction(), and mainParse().

std::map<SgName, string> nameOf

Definition at line 72 of file yicesParserLib.h.

Referenced by visitorTraversal::analyzePath(), evalFunction(), and mainParse().

bool noAssert

Definition at line 73 of file yicesParserLib.h.

Referenced by visitorTraversal::analyzePath().

std::map<SgNode*, int> forsts

Definition at line 74 of file yicesParserLib.h.

std::map<int, std::vector<SgGraphNode*> > intvecmap

Definition at line 76 of file yicesParserLib.h.

std::map<std::vector<SgGraphNode*>, int> vecintmap

Definition at line 77 of file yicesParserLib.h.

std::map<SgName, yices_expr> getExpr

Definition at line 253 of file yicesParserLib.h.

Referenced by visitorTraversal::analyzePath(), evalFunction(), and mainParse().

newGraph* nGraph

Definition at line 283 of file yicesParserLib.h.

Definition at line 284 of file yicesParserLib.h.

Referenced by visitorTraversal::analyzePath(), and evalFunction().

myGraph* openorig

Definition at line 285 of file yicesParserLib.h.

Referenced by visitorTraversal::analyzePath().

StaticCFG::CFG* opencfg

Definition at line 286 of file yicesParserLib.h.

Referenced by visitorTraversal::analyzePath(), evalFunction(), and getGraphNodeType().

std::set<std::pair<VertexID2, VertexID2> > knownEdges

Definition at line 301 of file yicesParserLib.h.

std::map<SgGraphNode*, VertexID2> graphVertex

Definition at line 302 of file yicesParserLib.h.

std::map<VertexID2, int> intmap

Definition at line 313 of file yicesParserLib.h.

Referenced by getSource(), getTarget(), and printHotness2().

int ipaths

Definition at line 425 of file yicesParserLib.h.

Referenced by evalFunction(), and yicesCheck().

std::set<std::vector<SgGraphNode*> > globalPaths

Definition at line 430 of file yicesParserLib.h.