fmrisc.Syntax
Interface ASTVisitor

All Known Implementing Classes:
ASTVisitorBase, BoundVariables, FreeVariables, GroundExpressions, Rewriting, Substitute

public interface ASTVisitor

Interface to visitor of abstract syntax trees.


Method Summary
 boolean isCloned()
          Signal whether tree is to be cloned.
 AST visit(AST tree)
          Visit an abstract syntax tree.
 

Method Detail

visit

AST visit(AST tree)
Visit an abstract syntax tree.

Parameters:
tree - the abstract syntax tree that is visited.
Returns:
the result of the visit which must be of the same type as tree; if the result is null, then an alternative result is computed based on the value of clone(): - if false, the result stays null. - if true, the result is a clone of the tree.

isCloned

boolean isCloned()
Signal whether tree is to be cloned.

Returns:
true iff tree is to be cloned, if visit returns null.