| Modifier and Type | Class and Description |
|---|---|
| private class | ControlFlowGraph.InstructionContextImpl
Objects of this class represent a node in a ControlFlowGraph. |
| Modifier and Type | Field and Description |
|---|---|
| private final ExceptionHandlers | exceptionhandlers
The ExceptionHandlers object for the method whose control flow is represented by this ControlFlowGraph. |
| private final Map | instructionContexts
All InstructionContext instances of this ControlFlowGraph. |
| private final Subroutines | subroutines
The Subroutines object for the method whose control flow is represented by this ControlFlowGraph. |
| Access | Constructor and Description |
|---|---|
| public | ControlFlowGraph(final MethodGen
the method generator instance methodGen)A Control Flow Graph; with additional JustIce checks |
| public | ControlFlowGraph(final MethodGen
the method generator instance methodGen, final boolean if true, additional JustIce checks are performed enableJustIceCheck)A Control Flow Graph. |
| Modifier and Type | Method and Description |
|---|---|
| public InstructionContext | |
| public InstructionContext[] | contextsOf(final InstructionHandle[] insts)
Returns the InstructionContext[] of a given InstructionHandle[], in a naturally ordered manner. |
| public InstructionContext[] | getInstructionContexts()
Returns an InstructionContext[] with all the InstructionContext instances for the method whose control flow is represented by this ControlFlowGraph (NOT ORDERED!). |
| public boolean | isDead(final InstructionHandle i)
Returns true, if and only if the said instruction is not reachable; that means, if it is not part of this ControlFlowGraph. |
| exceptionhandlers | back to summary |
|---|---|
| private final ExceptionHandlers exceptionhandlers The ExceptionHandlers object for the method whose control flow is represented by this ControlFlowGraph. | |
| instructionContexts | back to summary |
|---|---|
| private final Map<InstructionHandle, InstructionContext> instructionContexts All InstructionContext instances of this ControlFlowGraph. | |
| subroutines | back to summary |
|---|---|
| private final Subroutines subroutines The Subroutines object for the method whose control flow is represented by this ControlFlowGraph. | |
| ControlFlowGraph | back to summary |
|---|---|
| public ControlFlowGraph(final MethodGen methodGen) A Control Flow Graph; with additional JustIce checks
| |
| ControlFlowGraph | back to summary |
|---|---|
| public ControlFlowGraph(final MethodGen methodGen, final boolean enableJustIceCheck) A Control Flow Graph.
| |
| contextOf | back to summary |
|---|---|
| public InstructionContext contextOf(final InstructionHandle inst) Returns the InstructionContext of a given instruction. | |
| contextsOf | back to summary |
|---|---|
| public InstructionContext[] contextsOf(final InstructionHandle[] insts) Returns the InstructionContext[] of a given InstructionHandle[], in a naturally ordered manner. | |
| getInstructionContexts | back to summary |
|---|---|
| public InstructionContext[] getInstructionContexts() Returns an InstructionContext[] with all the InstructionContext instances for the method whose control flow is represented by this ControlFlowGraph (NOT ORDERED!). | |
| isDead | back to summary |
|---|---|
| public boolean isDead(final InstructionHandle i) Returns true, if and only if the said instruction is not reachable; that means, if it is not part of this ControlFlowGraph. | |
| Modifier and Type | Field and Description |
|---|---|
| private List | executionPredecessors
The 'execution predecessors' - a list of type InstructionContext of those instances that have been execute()d before in that order. |
| private final Map | inFrames
The 'incoming' execution Frames. |
| private final InstructionHandle | instruction
The InstructionHandle this InstructionContext is wrapped around. |
| private final Map | outFrames
The 'outgoing' execution Frames. |
| private int | TAG
The TAG field is here for external temporary flagging, such as graph coloring. |
| Access | Constructor and Description |
|---|---|
| public | InstructionContextImpl(final InstructionHandle inst)
Creates an InstructionHandleImpl object from an InstructionHandle. |
| Modifier and Type | Method and Description |
|---|---|
| private InstructionHandle[] | _getSuccessors()
A utility method that calculates the successors of a given InstructionHandle That means, a RET does have successors as defined here. |
| public boolean | Returns: true - if and only if the "outgoing" frame situation changed from the one before execute()ing.Implements org. |
| private void | extendMessageWithFlow(final StructuralCodeConstraintException e)
Extends the StructuralCodeConstraintException ("e") object with an at-the-end-extended message. |
| public ExceptionHandler[] | getExceptionHandlers()
Implements org. |
| private String | |
| public Frame | |
| public InstructionHandle | getInstruction()
Implements org. |
| public Frame | getOutFrame(final ArrayList<InstructionContext> execChain)
Implements org. |
| public InstructionContext[] | getSuccessors()
Implements org. |
| public int | getTag()
Implements org. |
| private ControlFlowGraph. | lastExecutionJSR()
Returns the InstructionContextImpl with an JSR/JSR_W that was last in the ExecutionChain, without a corresponding RET, i.e. we were called by this one. |
| private boolean | |
| public void | setTag(final int tag)
Implements org. |
| public String | toString()
Overrides java. |
| executionPredecessors | back to summary |
|---|---|
| private List<InstructionContext> executionPredecessors The 'execution predecessors' - a list of type InstructionContext of those instances that have been execute()d before in that order. | |
| inFrames | back to summary |
|---|---|
| private final Map<InstructionContext, Frame> inFrames The 'incoming' execution Frames. | |
| instruction | back to summary |
|---|---|
| private final InstructionHandle instruction The InstructionHandle this InstructionContext is wrapped around. | |
| outFrames | back to summary |
|---|---|
| private final Map<InstructionContext, Frame> outFrames The 'outgoing' execution Frames. | |
| TAG | back to summary |
|---|---|
| private int TAG The TAG field is here for external temporary flagging, such as graph coloring.
| |
| InstructionContextImpl | back to summary |
|---|---|
| public InstructionContextImpl(final InstructionHandle inst) Creates an InstructionHandleImpl object from an InstructionHandle. Creation of one per InstructionHandle suffices. Don't create more. | |
| _getSuccessors | back to summary |
|---|---|
| private InstructionHandle[] _getSuccessors() A utility method that calculates the successors of a given InstructionHandle That means, a RET does have successors as defined here. A JsrInstruction has its target as its successor (opposed to its physical successor) as defined here. | |
| execute | back to summary |
|---|---|
| public boolean execute(final Frame inFrame, final ArrayList<InstructionContext> execPreds, final InstConstraintVisitor icv, final ExecutionVisitor ev) Implements org. "Merges in" (vmspec2, page 146) the "incoming" frame situation; executes the instructions symbolically and therefore calculates the "outgoing" frame situation. Returns: True iff the "incoming" frame situation changed after merging with "inFrame". The execPreds ArrayList must contain the InstructionContext objects executed so far in the correct order. This is just one execution path [out of many]. This is needed to correctly "merge" in the special case of a RET's successor. The InstConstraintVisitor and ExecutionVisitor instances must be set up correctly.
| |
| extendMessageWithFlow | back to summary |
|---|---|
| private void extendMessageWithFlow(final StructuralCodeConstraintException e) Extends the StructuralCodeConstraintException ("e") object with an at-the-end-extended message. This extended message will then reflect the execution flow needed to get to the constraint violation that triggered the throwing of the "e" object. | |
| getExceptionHandlers | back to summary |
|---|---|
| public ExceptionHandler[] getExceptionHandlers() Implements org. Returns the exception handlers of this instruction.
| |
| getExecutionChain | back to summary |
|---|---|
| private String getExecutionChain() Returns the control flow execution chain. This is built while execute(Frame, ArrayList)-ing the code represented by the surrounding ControlFlowGraph. | |
| getInFrame | back to summary |
|---|---|
| public Frame getInFrame() Implements org.
| |
| getInstruction | back to summary |
|---|---|
| public InstructionHandle getInstruction() Implements org. Doc from org. Returns the InstructionHandle this InstructionContext is wrapped around.
| |
| getOutFrame | back to summary |
|---|---|
| public Frame getOutFrame(final ArrayList<InstructionContext> execChain) Implements org. Returns a clone of the "outgoing" frame situation with respect to the given ExecutionChain.
| |
| getSuccessors | back to summary |
|---|---|
| public InstructionContext[] getSuccessors() Implements org. Doc from org. Returns the usual control flow successors.
| |
| getTag | back to summary |
|---|---|
| public int getTag() Implements org. Doc from org. The getTag and setTag methods may be used for temporary flagging, such as graph coloring. Nothing in the InstructionContext object depends on the value of the tag. JustIce does not use it.
| |
| lastExecutionJSR | back to summary |
|---|---|
| private ControlFlowGraph. Returns the InstructionContextImpl with an JSR/JSR_W that was last in the ExecutionChain, without a corresponding RET, i.e. we were called by this one. Returns null if we were called from the top level. | |
| mergeInFrames | back to summary |
|---|---|
| private boolean mergeInFrames(final Frame inFrame) Does the actual merging (vmspec2, page 146). Returns true IFF this.inFrame was changed in course of merging with inFrame. | |
| setTag | back to summary |
|---|---|
| public void setTag(final int tag) Implements org. Doc from org. The getTag and setTag methods may be used for temporary flagging, such as graph coloring. Nothing in the InstructionContext object depends on the value of the tag. JustIce does not use it.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a simple String representation of this InstructionContext.
| |