public class SymbolicExecutionExceptionBreakpoint extends AbstractHitCountBreakpoint
SymbolicExecutionExceptionBreakpoint
represents an exception breakpoint and is responsible to tell the debugger to stop execution when the respective
breakpoint is hit.Modifier and Type | Field and Description |
---|---|
private boolean |
caught
a flag whether to watch for an uncaught exception
|
private java.lang.String |
exceptionName
The exception to watch for
|
private java.util.Set<Node> |
exceptionNodes
a Set of Nodes that represent exceptions
|
private java.util.Set<Node> |
exceptionParentNodes
a list of nodes of the Symbolic Execution Tree whose children represent exceptions
|
private boolean |
suspendOnSubclasses
a flag whether to suspend on subclasses of the exception aswell
|
private boolean |
uncaught
a flag to tell whether to stop at uncaught exceptions or not
|
Constructor and Description |
---|
SymbolicExecutionExceptionBreakpoint(Proof proof,
java.lang.String exceptionName,
boolean caught,
boolean uncaught,
boolean suspendOnSubclasses,
boolean enabled,
int hitCount)
Creates a new
AbstractHitCountBreakpoint . |
Modifier and Type | Method and Description |
---|---|
boolean |
isBreakpointHit(SourceElement activeStatement,
RuleApp ruleApp,
Proof proof,
Node node)
Determines if the breakpoint represented by this BreakpointStopConition is triggered.
|
boolean |
isCaught() |
boolean |
isParentNode(Node node,
Node parent)
Checks if the given node is a parent of the other given node.
|
boolean |
isSuspendOnSubclasses() |
boolean |
isUncaught() |
void |
setCaught(boolean isCaught) |
void |
setSuspendOnSubclasses(boolean suspendOnSubclasses) |
void |
setUncaught(boolean isUncaught) |
void |
updateState(int maxApplications,
long timeout,
Proof proof,
long startTime,
int countApplied,
Goal goal)
This method is called from
StopCondition.isGoalAllowed(int, long, Proof, long, int, Goal)
and can be used to update the state of the IBreakpoint . |
getHitCount, hitcountExceeded, setHitCount
getProof, isEnabled, setEnabled
private java.lang.String exceptionName
private java.util.Set<Node> exceptionNodes
private java.util.Set<Node> exceptionParentNodes
private boolean caught
private boolean suspendOnSubclasses
private boolean uncaught
public SymbolicExecutionExceptionBreakpoint(Proof proof, java.lang.String exceptionName, boolean caught, boolean uncaught, boolean suspendOnSubclasses, boolean enabled, int hitCount)
AbstractHitCountBreakpoint
.proof
- the Proof
that will be executed and should stopexceptionName
- the name of the exception to watch forcaught
- flag to tell if caught exceptions lead to a stopuncaught
- flag to tell if uncaught exceptions lead to a stopsuspendOnSubclasses
- flag to tell if the execution should suspend on subclasses of the exception aswellenabled
- flag if the Breakpoint is enabledhitCount
- the number of hits after which the execution should hold at this breakpointpublic void updateState(int maxApplications, long timeout, Proof proof, long startTime, int countApplied, Goal goal)
StopCondition.isGoalAllowed(int, long, Proof, long, int, Goal)
and can be used to update the state of the IBreakpoint
.updateState
in interface IBreakpoint
updateState
in class AbstractBreakpoint
maxApplications
- The defined maximal number of rules to apply. Can be different to StrategySettings.getMaxSteps()
in side proofs.timeout
- The defined timeout in ms or -1
if disabled. Can be different to StrategySettings.getTimeout()
in side proofs.proof
- The current Proof
.startTime
- The timestamp when the apply strategy has started, computed via System.currentTimeMillis()
countApplied
- The number of already applied rules.goal
- The current Goal
on which the next rule will be applied.public boolean isParentNode(Node node, Node parent)
public boolean isBreakpointHit(SourceElement activeStatement, RuleApp ruleApp, Proof proof, Node node)
isBreakpointHit
in interface IBreakpoint
isBreakpointHit
in class AbstractHitCountBreakpoint
activeStatement
- the activeStatement of the noderuleApp
- the applied RuleApp
proof
- the current proofnode
- the current nodepublic boolean isCaught()
public void setCaught(boolean isCaught)
isCaught
- the isCaught to setpublic boolean isUncaught()
public void setUncaught(boolean isUncaught)
isUncaught
- the isUncaught to setpublic boolean isSuspendOnSubclasses()
public void setSuspendOnSubclasses(boolean suspendOnSubclasses)
suspendOnSubclasses
- the suspendOnSubclasses to set