public final class BranchTrace
extends java.lang.Object
BranchTrace represents an execution trace of a branch instruction.| Constructor and Description |
|---|
BranchTrace() |
| Modifier and Type | Method and Description |
|---|---|
void |
add()
Adds an execution to the trace.
|
void |
addExecution(boolean conditionalBranch)
Adds an execution to the trace.
|
void |
clear()
Removes all executions from the trace.
|
BranchTrace |
clone() |
BranchExecution |
get(int i) |
int |
getChangeNumber()
Returns the number of condition changes in the trace.
|
int |
getChangePosition()
Returns the first position of condition change for simple branching.
|
boolean |
getCondition(int i)
Returns the condition value of the given execution.
|
int |
getFalseNumber()
Returns the number of false conditions in the trace.
|
BranchExecution |
getLastExecution()
Returns the last execution of the trace.
|
int |
getTrueNumber()
Returns the number of true conditions in the trace.
|
boolean |
isEmpty() |
boolean |
isFictitious()
Checks whether the branch is fictitious (condition does not change) or not.
|
boolean |
isPointed()
Checks whether the branch is pointed (there is only one branch execution which condition
equals to the negation of the first one.
|
boolean |
isSimple()
Checks whether the branch is simple (condition does not change more than one time) or not.
|
void |
removeLastExecution()
Removes the last execution from the trace.
|
int |
size() |
java.lang.String |
toString() |
public int size()
public boolean isEmpty()
public BranchExecution get(int i)
public BranchExecution getLastExecution()
public void clear()
public void add()
public void addExecution(boolean conditionalBranch)
conditionalBranch - the type of the branch instruction.public void removeLastExecution()
public int getTrueNumber()
public int getFalseNumber()
public int getChangeNumber()
public int getChangePosition()
public boolean isFictitious()
true if the branch is fictitious; false otherwise.public boolean isSimple()
true if the branch is simple; false otherwise.public boolean isPointed()
true if the branch is pointed; false otherwise.public boolean getCondition(int i)
i - the execution index.public java.lang.String toString()
toString in class java.lang.Objectpublic BranchTrace clone()
clone in class java.lang.Object