|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpolyglot.visit.NodeVisitor
polyglot.visit.HaltingVisitor
polyglot.visit.ErrorHandlingVisitor
polyglot.visit.DataFlow
jif.visit.ArrayIndexChecker
public class ArrayIndexChecker
###TODO
Nested Class Summary |
---|
Nested classes/interfaces inherited from class polyglot.visit.DataFlow |
---|
polyglot.visit.DataFlow.BoolItem, polyglot.visit.DataFlow.ConditionNavigator, polyglot.visit.DataFlow.FlowGraphSource, polyglot.visit.DataFlow.Item |
Field Summary |
---|
Fields inherited from class polyglot.visit.DataFlow |
---|
dataflowOnEntry, flowCounter, flowgraphStack, forward |
Fields inherited from class polyglot.visit.ErrorHandlingVisitor |
---|
error, job, nf, ts |
Constructor Summary | |
---|---|
ArrayIndexChecker(polyglot.frontend.Job job,
polyglot.types.TypeSystem ts,
polyglot.ast.NodeFactory nf)
Constructor |
Method Summary | |
---|---|
protected void |
check(polyglot.visit.FlowGraph graph,
polyglot.ast.Term n,
polyglot.visit.DataFlow.Item inItem,
java.util.Map outItems)
For each array access, determine if the array access could throw an ArrayIndexOutOfBoundsException, and annotate the node appropriately. |
protected polyglot.visit.DataFlow.Item |
confluence(java.util.List items,
polyglot.ast.Term node,
polyglot.visit.FlowGraph graph)
The confluence operator is essentially intersection: a bound must be in all DataFlowItems going into the confluence for it to be valid. |
protected polyglot.visit.DataFlow.Item |
createInitialItem(polyglot.visit.FlowGraph graph,
polyglot.ast.Term node)
Create an initial Item for the dataflow analysis. |
java.util.Map |
flow(polyglot.visit.DataFlow.Item in,
polyglot.visit.FlowGraph graph,
polyglot.ast.Term n,
java.util.Set succEdgeKeys)
Implement the flow equations for this dataflow analysis. |
Methods inherited from class polyglot.visit.DataFlow |
---|
confluence, constructItemsFromCondition, createCFGBuilder, currentFlowGraph, dataflow, dataflow, dumpFlowGraph, enterCall, filterItems, filterItemsExceptionSubclass, filterItemsNonError, filterItemsNonException, findSCCs, flow, flow, flowBooleanConditions, flowToBooleanFlow, hasTrueFalseBranches, initGraph, itemsToMap, itemToMap, leave, leaveCall, post, safeConfluence, safeConfluence, safeConfluence |
Methods inherited from class polyglot.visit.ErrorHandlingVisitor |
---|
begin, catchErrors, enter, enterCall, enterError, errorQueue, hasErrors, job, leaveCall, leaveCall, nodeFactory, typeSystem |
Methods inherited from class polyglot.visit.HaltingVisitor |
---|
bypass, bypass, bypassChildren, override, visitChildren |
Methods inherited from class polyglot.visit.NodeVisitor |
---|
copy, enter, finish, finish, leave, override, toString, visitEdge, visitEdgeNoOverride |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ArrayIndexChecker(polyglot.frontend.Job job, polyglot.types.TypeSystem ts, polyglot.ast.NodeFactory nf)
Method Detail |
---|
protected polyglot.visit.DataFlow.Item createInitialItem(polyglot.visit.FlowGraph graph, polyglot.ast.Term node)
createInitialItem
in class polyglot.visit.DataFlow
public java.util.Map flow(polyglot.visit.DataFlow.Item in, polyglot.visit.FlowGraph graph, polyglot.ast.Term n, java.util.Set succEdgeKeys)
flow
in class polyglot.visit.DataFlow
protected polyglot.visit.DataFlow.Item confluence(java.util.List items, polyglot.ast.Term node, polyglot.visit.FlowGraph graph)
confluence
in class polyglot.visit.DataFlow
protected void check(polyglot.visit.FlowGraph graph, polyglot.ast.Term n, polyglot.visit.DataFlow.Item inItem, java.util.Map outItems) throws polyglot.types.SemanticException
check
in class polyglot.visit.DataFlow
polyglot.types.SemanticException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |