public static class ExecutionNodeReader.KeYlessValue extends ExecutionNodeReader.AbstractKeYlessExecutionElement implements IExecutionValue
IExecutionValue which is independent
from KeY and provides such only children and default attributes.| Modifier and Type | Field and Description |
|---|---|
private java.util.List<IExecutionVariable> |
childVariables
The child variables.
|
private java.lang.String |
conditionString
The condition as
String. |
private java.util.List<IExecutionConstraint> |
constraints
The related
IExecutionConstraints. |
private java.lang.String |
typeString
The type string.
|
private boolean |
valueAnObject
Is the value an object?
|
private java.lang.String |
valueString
The value string.
|
private boolean |
valueUnknown
Is the value unknown?
|
private IExecutionVariable |
variable
The parent
IExecutionVariable if available. |
| Constructor and Description |
|---|
KeYlessValue(IExecutionVariable variable,
java.lang.String typeString,
java.lang.String valueString,
java.lang.String name,
boolean valueUnknown,
boolean valueAnObject,
java.lang.String conditionString)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChildVariable(IExecutionVariable variable)
Adds the given child
IExecutionVariable. |
void |
addConstraint(IExecutionConstraint constraint)
Adds the given
IExecutionConstraint. |
IExecutionVariable[] |
getChildVariables()
Returns contained child variables which forms complex data types.
|
Term |
getCondition()
Returns the condition under which the variable (
IExecutionValue.getVariable())
has this value. |
java.lang.String |
getConditionString()
Returns the condition under which the variable (
IExecutionValue.getVariable())
has this value as human readable String. |
IExecutionConstraint[] |
getConstraints()
Returns all available
IExecutionConstraints. |
java.lang.String |
getElementType()
Returns a human readable element type name.
|
PosInOccurrence |
getModalityPIO()
Returns the
PosInOccurrence of the modality of interest including updates. |
java.lang.String |
getTypeString()
Returns the type of the variable as human readable string.
|
Term |
getValue()
Returns the value of the variable.
|
java.lang.String |
getValueString()
Returns the value of the variable as human readable string representation.
|
IExecutionVariable |
getVariable()
Returns the parent
IExecutionVariable. |
boolean |
isValueAnObject()
Checks if the value represents an object or an attribute of the object
defined by the parent
IExecutionValue. |
boolean |
isValueUnknown()
Checks if the value is unknown.
|
getAppliedRuleApp, getInitConfig, getName, getProof, getProofNode, getProofNodeInfo, getServices, getSettings, isDisposed, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAppliedRuleApp, getInitConfig, getName, getProof, getProofNode, getProofNodeInfo, getServices, getSettings, isDisposedprivate final IExecutionVariable variable
IExecutionVariable if available.private final java.lang.String typeString
private final java.lang.String valueString
private final boolean valueUnknown
private final boolean valueAnObject
private final java.util.List<IExecutionVariable> childVariables
private final java.lang.String conditionString
String.private final java.util.List<IExecutionConstraint> constraints
IExecutionConstraints.public KeYlessValue(IExecutionVariable variable, java.lang.String typeString, java.lang.String valueString, java.lang.String name, boolean valueUnknown, boolean valueAnObject, java.lang.String conditionString)
variable - The parent IExecutionVariable.typeString - The type string.valueString - The value string.name - The name.valueUnknown - Is the value unknown?valueAnObject - Is the value an object?conditionString - The condition as human readable String.public void addChildVariable(IExecutionVariable variable)
IExecutionVariable.variable - The child IExecutionVariable to add.public java.lang.String getValueString()
throws ProofInputException
getValueString in interface IExecutionValueProofInputExceptionpublic java.lang.String getTypeString()
getTypeString in interface IExecutionValuepublic java.lang.String getConditionString()
throws ProofInputException
IExecutionValue.getVariable())
has this value as human readable String.getConditionString in interface IExecutionValueString.ProofInputException - Occurred Exception.public IExecutionVariable getVariable()
IExecutionVariable.getVariable in interface IExecutionValueIExecutionVariable.public IExecutionVariable[] getChildVariables() throws ProofInputException
getChildVariables in interface IExecutionValueProofInputExceptionpublic boolean isValueUnknown()
throws ProofInputException
Checks if the value is unknown.
Imagine the following class:
public class A {
private A next;
public int main() {
return 42; // breakpoint
}
}
If the main method is debugged symbolically and stopped at the statement
marked with the comment // breakpoint the field self.next
has the symbolic value SVself.next. And its field
self.next.next has again a symbolic value SVself.next.next.
This chain is infinite deep. But on the other side the Sequent contains
no information about self.next so the symbolic value can be
null or a concrete object. Such symbolic values which are not
founded in the Sequent are treated in the symbolic execution API as
"unknown" to avoid infinite deep value hierarchies if they are not cyclic.
isValueUnknown in interface IExecutionValuetrue value is unknown, false value is known.ProofInputExceptionpublic boolean isValueAnObject()
throws ProofInputException
Checks if the value represents an object or an attribute of the object
defined by the parent IExecutionValue.
All values which are not a basic datatype (integer, boolean, ...) and not an instance of a library class will be treated as object.
isValueAnObject in interface IExecutionValuetrue is an object, false is an attribute of the object defined by the parent IExecutionValue.ProofInputException - Occurred Exception.public Term getValue() throws ProofInputException
getValue in interface IExecutionValueProofInputExceptionpublic java.lang.String getElementType()
getElementType in interface IExecutionElementpublic Term getCondition() throws ProofInputException
IExecutionValue.getVariable())
has this value.getCondition in interface IExecutionValueProofInputException - Occurred Exception.public void addConstraint(IExecutionConstraint constraint)
IExecutionConstraint.constraint - The IExecutionConstraint to add.public IExecutionConstraint[] getConstraints() throws ProofInputException
IExecutionConstraints.getConstraints in interface IExecutionValueIExecutionConstraints.ProofInputException - Occurred Exception.public PosInOccurrence getModalityPIO()
PosInOccurrence of the modality of interest including updates.getModalityPIO in interface IExecutionElementPosInOccurrence of the modality of interest including updates.