Package kodkod.ast.visitor

Contains visitors for Kodkod formulas, expressions, and integer expressions.

See:
          Description

Interface Summary
ReturnVisitor<E,F,D,I> A visitor that visits every node in the AST, returning some value for each.
VoidVisitor A visitor that visits every node in the AST.
 

Class Summary
AbstractCollector<T> A depth first collector.
AbstractDetector A depth first detector.
AbstractReplacer A depth first replacer.
AbstractVoidVisitor Implements a depth first traversal of the kodkod AST.
 

Package kodkod.ast.visitor Description

Contains visitors for Kodkod formulas, expressions, and integer expressions.

Package Specification

Provides two interfaces for traversing the Kodkod AST using the visitor pattern. A VoidVisitor visits the nodes but returns no values. A ReturnVisitor can be parametrized to return values of specific types for Decls, Expression, IntExpression, and Formula nodes.

Several skeletal implementations of the VoidVisitor and ReturnVisitor interfaces are also provided. These traverse the AST in a depth-first manner and optionally cache the results of visiting specified nodes. The caching functionality makes it convenient to implement visitors that visit shared nodes only once.

Related Documentation

See Also:
VoidVisitor, ReturnVisitor