Package polyglot.visit

Contains the standard visitor which provide type checking as well as output.

See:
          Description

Class Summary
AlphaRenamer The AlphaRenamer runs over the AST and alpha-renames any local variable declarations that it encounters.
AmbiguityRemover A visitor which traverses the AST and remove ambiguities found in fields, method signatures and the code itself.
AmbiguityRemover.AmbChecker  
AscriptionVisitor Visitor which allows type information to be utilized to perform AST modifications.
BodyDisambiguator A visitor which traverses the AST and remove ambiguities found in fields, method signatures and the code itself.
CFGBuilder Class used to construct a CFG.
CFGBuilder.EdgeKeyTermPair  
ClassSerializer Visitor which serializes class objects and adds a field to the class containing the serialization.
CodeCleaner The CodeCleaner runs over the AST and performs some trivial dead code elimination, while flattening blocks wherever possible.
ConstantChecker Visitor which performs type checking on the AST.
ConstantChecker.TypeCheckChecker  
ConstantFolder Visitor which performs constant folding.
ConstructorCallChecker Visitor which ensures that constructor calls are not recursive.
ContextVisitor A visitor which maintains a context throughout the visitor's pass.
CopyPropagator Visitor which performs copy propagation.
CopyPropagator.DataFlowItem  
CopyPropagator.DataFlowItem.CopyInfo  
DataFlow Abstract dataflow Visitor, to allow simple dataflow equations to be easily implemented.
DataFlow.BoolItem Deprecated. Use flowBooleanConditions
DataFlow.ConditionNavigator Deprecated.  
DataFlow.FlowGraphSource  
DataFlow.Item An Item contains the data which flows during the dataflow analysis.
DeadCodeEliminator Visitor which performs dead code elimination.
DeadCodeEliminator.DataFlowItem  
DeadCodeEliminator.DefUseFinder  
DisambiguationDriver A visitor which traverses the AST and remove ambiguities found in fields, method signatures and the code itself.
Disambiguator Visitor which performs type checking on the AST.
DumpAst Visitor which dumps the AST to a file.
ErrorHandlingVisitor  
ExceptionChecker Visitor which checks if exceptions are caught or declared properly.
ExceptionChecker.CodeTypeReporter  
ExceptionChecker.UncaughtReporter  
ExitChecker Visitor which checks that all (terminating) paths through a method must return.
ExitChecker.DataFlowItem  
ExtensionCleaner This visitor overwrites all extension object refs with null, sets delegate object refs to point back to the node, and strips type information out.
FinalLocalExtractor This visitor converts non-final local variables into final local variables.
FinalLocalExtractor.LocalDeclFixer  
FlattenVisitor The FlattenVisitor flattens the AST,
FlowGraph  
FlowGraph.Edge This class represents an edge in the flow graph.
FlowGraph.EdgeKey This class provides an identifying label for edges in the flow graph.
FlowGraph.ExceptionEdgeKey This class extends EdgeKey and is the key for edges that are taken when an exception of type t is thrown.
FlowGraph.ListKey Class to be used for inserting Lists in hashtables using collection equality (as defined in CollectionUtil).
FlowGraph.Peer A Peer is an occurance of an AST node in a flow graph.
FwdReferenceChecker Visitor which ensures that field intializers and initializers do not make illegal forward references to fields.
HaltingVisitor A HaltingVisitor is used to prune the traversal of the AST at a particular node.
HandoffVisitor This visitor adds jobs for SourceFiles in the AST to the schedule of another extension.
InitChecker Visitor which checks that all local variables must be defined before use, and that final variables and fields are initialized correctly.
InitChecker.BottomItem  
InitChecker.ClassBodyInfo This class is just a data structure containing relevant information needed for performing initialization checking of a class declaration.
InitChecker.DataFlowItem Dataflow items for this dataflow are maps of VarInstances to counts of the min and max number of times those variables/fields have been initialized.
InitChecker.InitCount Class representing the initialization counts of variables.
InitChecker.MinMaxInitCount Class to record counts of the minimum and maximum number of times a variable or field has been initialized or assigned to.
InitImportsVisitor Visitor which traverses the AST constructing type objects.
InnerClassAbstractRemover  
InnerClassConstructorFixer  
InnerClassRemover  
InnerClassRewriter  
InnerTranslator  
LocalClassRemover  
NodeScrambler The NodeScrambler is test case generator of sorts.
NodeVisitor The NodeVisitor represents an implementation of the "Visitor" style of tree traversal.
OuterScopeDisambiguator A visitor which traverses the AST and remove ambiguities found in fields, method signatures and the code itself.
PrettyPrinter A PrettyPrinter generates output code from the processed AST.
PruningVisitor A PruningVisitor is used to prune the traversal of the AST at a particular node.
ReachChecker Visitor which checks that all statements must be reachable
ReachChecker.DataFlowItem  
RedundantCastRemover RedundantCastRemover removes redundant casts.
SignatureDisambiguator A visitor which traverses the AST and remove ambiguities found in fields, method signatures and the code itself.
SupertypeDisambiguator A visitor which traverses the AST and remove ambiguities found in fields, method signatures and the code itself.
Translator A Translator generates output code from the processed AST.
TypeBuilder Visitor which traverses the AST constructing type objects.
TypeChecker Visitor which performs type checking on the AST.
TypeChecker.AmbChecker  
 

Exception Summary
CFGBuildError Exception thrown when the CFG cannot be built.
 

Package polyglot.visit Description

Contains the standard visitor which provide type checking as well as output. The visitor specification is defined in polyglot.visit.NodeVisitor. HaltingVisitor provides a method to prune the visitor traversal. ContextVisitor contains code to automatically enter and leave scopes and to manage error messages. Most other visitors are subclasses of this class. PrettyPrinter is not a visitor (the package name is a misnomer for historical reasons). It contains methods for pretty printing the AST. The code generator is implemented by the Translator translator class, which is PrettyPrinter that opens appropriate Java output files.