sota.ast.nodes
Class ASTIfNode
java.lang.Object
sota.ast.nodes.ASTNode
sota.ast.nodes.ASTStatementNode
sota.ast.nodes.ASTBranchNode
sota.ast.nodes.ASTIfNode
- All Implemented Interfaces:
- java.lang.Comparable<ASTNode>, IConditionNode, IStatementNode
- Direct Known Subclasses:
- JavaASTIfNode
public abstract class ASTIfNode
- extends ASTBranchNode
- implements IConditionNode
AST-Knoten für If- oder If-Else-Anweisung
..
ASTNode entryNode
ASTIfNode this
ASTStatementNode trueNode
> ..
ASTJumpNode -> endNode
ASTNode elseNode
ASTStatementNode falseNode
> ..
ASTStatementNode endNode
..
Fields inherited from class sota.ast.nodes.ASTNode |
ascContent, BRANCH, CASE, CATCH, CONDITION, content, controlingBranchNode, DO, functionNode, id, IF, isDirectReachable, isReachable, isVirtual, ITERATION, JUMP, lineNr, next, NODE, prev, SCOPE, STATEMENT, SWITCH, TRY |
Methods inherited from class sota.ast.nodes.ASTBranchNode |
addExitNode, addFollowUpNode, getEndNode, getEntryNode, getExitString, getSetOfExitNodes, getSetOfFollowUpNodes, isWithinBranchConstruct, printExits, setEndNode, setEntryNode |
Methods inherited from class sota.ast.nodes.ASTNode |
appendToASCContent, compareTo, createASCContent, getASCContent, getContent, getControlingBranchNode, getFunctionNode, getID, getLineNr, getNextNode, getPrevNode, getReachString, getType, isDirectReachable, isDirectReachable, isReachable, isReachable, isVirtual, isVirtual, print, printReach, setASCContent, setContent, setControlingBranchNode, setFunctionNode, setID, setNextNode, setPrevNode, typeToString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cond
protected Condition cond
- Bei der Konstruktion zu setzende Informationen und Verknüpfungen *
elseNode
protected ASTNode elseNode
falseNode
protected ASTStatementNode falseNode
nrConditions
protected int nrConditions
setOfTruthVectors
protected java.util.HashSet<java.lang.String> setOfTruthVectors
- Von ASTBranchNode: *
protected ASTNode entryNode
protected ASTStatementNode endNode
/
trueNode
protected ASTStatementNode trueNode
ASTIfNode
public ASTIfNode(int ln,
java.lang.String s,
Condition c)
completeNode
public void completeNode()
- implementiert ASTBranchNode-Funktion *
- Specified by:
completeNode
in class ASTBranchNode
computeConditionCoverage
public void computeConditionCoverage()
- Specified by:
computeConditionCoverage
in interface IConditionNode
fillConditions
public void fillConditions(java.util.TreeSet<java.lang.String> list)
- fügt Conditions mit Booleanstring aus Logfile
- Specified by:
fillConditions
in interface IConditionNode
getCondition
public Condition getCondition()
- Specified by:
getCondition
in interface IConditionNode
getElseNode
public ASTNode getElseNode()
getEvaluatedTVString
public java.lang.String getEvaluatedTVString(java.lang.String s)
- Specified by:
getEvaluatedTVString
in interface IConditionNode
getFalseNode
public ASTStatementNode getFalseNode()
getMetrics
public Metrics getMetrics()
- Specified by:
getMetrics
in interface IConditionNode
getNodeString
public java.lang.String getNodeString()
- Overrides:
getNodeString
in class ASTStatementNode
getNrAtomEvaluations
public int getNrAtomEvaluations()
getNrAtoms
public int getNrAtoms()
getNrConditionEvaluations
public int getNrConditionEvaluations()
getNrConditions
public int getNrConditions()
getNrMcdcPairs
public int getNrMcdcPairs()
getTrueNode
public ASTStatementNode getTrueNode()
getTruthVectors
public java.util.HashSet<java.lang.String> getTruthVectors()
- Specified by:
getTruthVectors
in interface IConditionNode
hasElse
public boolean hasElse()
hasNonTrivialCondition
public boolean hasNonTrivialCondition()
- Specified by:
hasNonTrivialCondition
in interface IConditionNode
numerateCondition
public int numerateCondition(int i)
- numeriert die Konditionen, startend mit Parameterwert
- Specified by:
numerateCondition
in interface IConditionNode
printCFG
public void printCFG()
- Overrides:
printCFG
in class ASTStatementNode
printNode
public void printNode()
- Ausgabe und Info-Methoden *
- Overrides:
printNode
in class ASTStatementNode
resetHits
public void resetHits()
- Specified by:
resetHits
in interface IConditionNode
- Specified by:
resetHits
in interface IStatementNode
- Overrides:
resetHits
in class ASTStatementNode
setElseNode
public void setElseNode(ASTNode en)
setFalseNode
public void setFalseNode(ASTStatementNode fn)
setTrueNode
public void setTrueNode(ASTStatementNode tn)