You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// TODO: Implement handling of branch statement inside a function
68
-
/// Return true means a feasible path, false otherwise
67
+
/// TODO: Implement handling of branch statements inside a function
68
+
/// Return true if the path is feasible, false otherwise.
69
+
/// A given branch on the ICFG looks like the following:
70
+
/// ICFGNode1 (condition %cmp)
71
+
/// 1 / \ 0
72
+
/// ICFGNode2 ICFGNode3
73
+
/// edge->getCondition() returns the branch condition variable (%cmp) of type SVFValue* (for if/else) or a numeric condition variable (for switch).
74
+
/// Given the condition variable, you could obtain the SVFVar ID via "svfir->getValueNode(edge->getCondition())""
75
+
/// edge->getCondition() returns nullptr if this IntraCFGEdge is not a branch.
76
+
/// edge->getSuccessorCondValue() returns the actual condition value (1/0 for if/else) when this branch/IntraCFGEdge is executed. For example, the successorCondValue is 1 on the edge from ICFGNode1 to ICFGNode2, and 0 on the edge from ICFGNode1 to ICFGNode3
/// cmp->getOpVarID(0)/cmp->getOpVarID(1) returns the first/second operand, i.e., "a" and "b"
113
+
/// cmp->getResID() returns the result operand "r" and cmp->getPredicate() gives you the predicate ">"
114
+
/// Find the comparison predicates in "class CmpStmt:Predicate" under SVF/svf/include/SVFIR/SVFStatements.h
115
+
/// You are only required to handle integer predicates, including ICMP_EQ, ICMP_NE, ICMP_UGT, ICMP_UGE, ICMP_ULT, ICMP_ULE, ICMP_SGT, ICMP_SGE, ICMP_SLE
116
+
/// We assume integer-overflow-free in this assignment
0 commit comments