|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.palamedes.kif.core.ast.ASTVisitor
org.eclipse.palamedes.kif.core.ast.visitor.DefaultVisitor
org.eclipse.palamedes.kif.core.ast.visitor.GroundChecker
public class GroundChecker
The GroundChecker recursively checks whether a given ASTNode contains a variable. This class serves the purpose nevertheless its quite inefficient since it keeps checking even after a variable was found. The next implementation should create an exception and stop searching after a variable was found. To be even more efficient an static exception should be thrown to avoid creating a stack report for the exceptions every time.
Field Summary |
---|
Fields inherited from class org.eclipse.palamedes.kif.core.ast.visitor.DefaultVisitor |
---|
currentTopLevelNode, IMP_HEAD_FIRST, IMP_HEAD_LAST, insideBody, insideHead, insideImplication |
Constructor Summary | |
---|---|
GroundChecker()
|
Method Summary | |
---|---|
boolean |
isGround(ASTNode node)
This method checks the given ASTNode whether it contains a KIFIndVar or not. |
void |
visit(KIFIndVar node)
|
Methods inherited from class org.eclipse.palamedes.kif.core.ast.visitor.DefaultVisitor |
---|
isHeadFirst, postVisitComplexNode, postVisitFormNode, preVisitComplexNode, preVisitFormNode, setHeadFirst, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitBasicNode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GroundChecker()
Method Detail |
---|
public void visit(KIFIndVar node)
visit
in class DefaultVisitor
public boolean isGround(ASTNode node)
node
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |