Interface InstructionContext
public interface InstructionContext
An InstructionContext offers convenient access to information like control flow successors and such.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanexecute(Frame inFrame, ArrayList<InstructionContext> executionPredecessors, InstConstraintVisitor icv, ExecutionVisitor ev) This method symbolically executes the Instruction held in the InstructionContext.Gets the exception handlers that protect this instruction.Gets the incoming frame.Gets the InstructionHandle this InstructionContext is wrapped around.getOutFrame(ArrayList<InstructionContext> executionPredecessors) Gets the outgoing execution frame situation; therefore it has to be calculated by execute(Frame, ArrayList) first.Gets the usual control flow successors.intgetTag()Gets the tag value used for temporary flagging.voidsetTag(int tag) Sets the tag value used for temporary flagging.
-
Method Details
-
execute
boolean execute(Frame inFrame, ArrayList<InstructionContext> executionPredecessors, InstConstraintVisitor icv, ExecutionVisitor ev) This method symbolically executes the Instruction held in the InstructionContext. It "merges in" the incoming execution frame situation (see The Java Virtual Machine Specification, 2nd edition, page 146). By so doing, the outgoing execution frame situation is calculated. This method is JustIce-specific and is usually of no sense for users of the ControlFlowGraph class. They should use getInstruction().accept(Visitor), possibly in conjunction with the ExecutionVisitor.- Parameters:
inFrame- The incoming frame.executionPredecessors- The execution predecessors.icv- The instruction constraint visitor.ev- The execution visitor.- Returns:
- true - if and only if the "outgoing" frame situation changed from the one before execute()ing.
- See Also:
-
getExceptionHandlers
Gets the exception handlers that protect this instruction. They are special control flow successors.- Returns:
- The exception handlers.
-
getInFrame
-
getInstruction
Gets the InstructionHandle this InstructionContext is wrapped around.- Returns:
- The InstructionHandle this InstructionContext is wrapped around.
-
getOutFrame
Gets the outgoing execution frame situation; therefore it has to be calculated by execute(Frame, ArrayList) first.- Parameters:
executionPredecessors- The execution predecessors.- Returns:
- The outgoing frame.
- See Also:
-
getSuccessors
Gets the usual control flow successors.- Returns:
- The successors.
- See Also:
-
getTag
int getTag()Gets the tag value used for temporary flagging.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.
- Returns:
- The tag value.
- See Also:
-
setTag
Sets the tag value used for temporary flagging.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.
- Parameters:
tag- The tag value.- See Also:
-