Class IntValue
java.lang.Object
de.uzl.its.swat.symbolic.value.Value<T,K>
de.uzl.its.swat.symbolic.value.primitive.numeric.NumericalValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,Integer>
de.uzl.its.swat.symbolic.value.primitive.numeric.integral.IntValue
public class IntValue
extends NumericalValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,Integer>
IntValue contains a pair of concrete value and a path constraint. Note that the path constraint
flip the boolean signs according to the evaluated concrete value.
-
Field Summary
Fields inherited from class de.uzl.its.swat.symbolic.value.primitive.numeric.NumericalValue
imgr
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionNumericalValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Integer> org.sosy_lab.java_smt.api.BooleanFormula
Creates a formula that asserts that a value is positiveorg.sosy_lab.java_smt.api.BooleanFormula
org.sosy_lab.java_smt.api.BooleanFormula
getBounds
(boolean upper) Creates a formula that asserts that this symbolic value is withing the bounds of this typeI2B()
I2C()
I2D()
Converts anIntValue
into aDoubleValue
I2F()
Converts anIntValue
into aFloatValue
I2L()
I2S()
Converts anIntValue
into aShortValue
Adds two integersCalculates the bitwise and of two integers in binary representationDivides two integersorg.sosy_lab.java_smt.api.BooleanFormula
Checks if the two integers are equalorg.sosy_lab.java_smt.api.BooleanFormula
Checks if the integer is greater or equal to the second integerorg.sosy_lab.java_smt.api.BooleanFormula
Checks if the integer is greater than the second integerorg.sosy_lab.java_smt.api.BooleanFormula
Checks if the integer is less or equal to the second integerorg.sosy_lab.java_smt.api.BooleanFormula
Checks if the integer is less than the second integerorg.sosy_lab.java_smt.api.BooleanFormula
Checks if the two integers are not equalorg.sosy_lab.java_smt.api.BooleanFormula
IFEQ()
Checks if the current Value is 0org.sosy_lab.java_smt.api.BooleanFormula
IFGE()
Checks if the current Value is greater or equal to 0org.sosy_lab.java_smt.api.BooleanFormula
IFGT()
Checks if the current Value is greater then 0org.sosy_lab.java_smt.api.BooleanFormula
IFLE()
Checks if the current Value is less or equal to 0org.sosy_lab.java_smt.api.BooleanFormula
IFLT()
Checks if the current Value is greater then 0org.sosy_lab.java_smt.api.BooleanFormula
IFNE()
Checks if the current Value is not equal to 0IINC
(int increment) Increments an integerMultiplies two integersINEG()
Negates an integerCalculates the bitwise or of two integersCalculates the modulo of two integersCalculates the bitwise left shift of an integerCalculates the bitwise arithmetic right shift of an integerSubtracts two integersCalculates the bitwise logical right shift of an integerCalculates the bitwise exclusive or of two integersTurns this IntValue into a symbolic variableMAKE_SYMBOLIC
(long idx) Turns this IntValue into a symbolic variableMAKE_SYMBOLIC
(String namePrefix) Turns this IntValue into a symbolic variabletoString()
Returns the string representation of the value used to visualize the stack.Methods inherited from class de.uzl.its.swat.symbolic.value.primitive.numeric.NumericalValue
genericToString, wrapByte, wrapCharacter, wrapInteger, wrapLong, wrapShort
Methods inherited from class de.uzl.its.swat.symbolic.value.Value
asDoubleValue, asFloatValue, asObjectValue, getConcrete, getName, getType, initSymbolic, initSymbolic, reset
-
Constructor Details
-
IntValue
public IntValue(org.sosy_lab.java_smt.api.SolverContext context, int concrete) Instantiates a new Int value.- Parameters:
context
- the contextconcrete
- the concrete
-
IntValue
public IntValue(org.sosy_lab.java_smt.api.SolverContext context, int concrete, org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula formula) Instantiates a new Int value.- Parameters:
context
- the contextconcrete
- the concreteformula
- the formula
-
-
Method Details
-
MAKE_SYMBOLIC
Turns this IntValue into a symbolic variable- Overrides:
MAKE_SYMBOLIC
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Integer> - Parameters:
namePrefix
-- Returns:
- The numerical identifier of this symbolic variable
-
MAKE_SYMBOLIC
Turns this IntValue into a symbolic variable- Overrides:
MAKE_SYMBOLIC
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Integer> - Parameters:
idx
-- Returns:
- The numerical identifier of this symbolic variable
-
MAKE_SYMBOLIC
Turns this IntValue into a symbolic variable- Overrides:
MAKE_SYMBOLIC
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Integer> - Returns:
- The numerical identifier of this symbolic variable
-
getBounds
public org.sosy_lab.java_smt.api.BooleanFormula getBounds(boolean upper) Creates a formula that asserts that this symbolic value is withing the bounds of this type -
checkPositive
public org.sosy_lab.java_smt.api.BooleanFormula checkPositive()Creates a formula that asserts that a value is positive- Returns:
- The
BooleanFormula
that represents the check
-
IADD
Adds two integers -
ISUB
Subtracts two integers -
IMUL
Multiplies two integers -
IDIV
Divides two integers -
IREM
Calculates the modulo of two integers -
INEG
Negates an integer- Returns:
- The resulting
IntValue
-
IINC
Increments an integer- Parameters:
increment
- The amount to increment- Returns:
- The incremented
IntValue
-
IAND
Calculates the bitwise and of two integers in binary representation -
ISHL
Calculates the bitwise left shift of an integer- Parameters:
i
- The amount to shift- Returns:
- The resulting
IntValue
-
ISHR
Calculates the bitwise arithmetic right shift of an integer- Parameters:
i
- The amount to shift- Returns:
- The resulting
IntValue
-
IUSHR
Calculates the bitwise logical right shift of an integer- Parameters:
i
- The amount to shift- Returns:
- The resulting
IntValue
-
IOR
Calculates the bitwise or of two integers -
IXOR
Calculates the bitwise exclusive or of two integers -
IFEQ
public org.sosy_lab.java_smt.api.BooleanFormula IFEQ()Checks if the current Value is 0- Returns:
- A
BooleanFormula
that represents this check
-
IFGE
public org.sosy_lab.java_smt.api.BooleanFormula IFGE()Checks if the current Value is greater or equal to 0- Returns:
- A
BooleanFormula
that represents this check
-
IFGT
public org.sosy_lab.java_smt.api.BooleanFormula IFGT()Checks if the current Value is greater then 0- Returns:
- A
BooleanFormula
that represents this check
-
IFLE
public org.sosy_lab.java_smt.api.BooleanFormula IFLE()Checks if the current Value is less or equal to 0- Returns:
- A
BooleanFormula
that represents this check
-
IFLT
public org.sosy_lab.java_smt.api.BooleanFormula IFLT()Checks if the current Value is greater then 0- Returns:
- A
BooleanFormula
that represents this check
-
IFNE
public org.sosy_lab.java_smt.api.BooleanFormula IFNE()Checks if the current Value is not equal to 0- Returns:
- A
BooleanFormula
that represents this check
-
IF_ICMPEQ
Checks if the two integers are equal- Parameters:
i
- The otherIntValue
- Returns:
- A
BooleanFormula
that represents this check
-
IF_ICMPGE
Checks if the integer is greater or equal to the second integer- Parameters:
i
- The otherIntValue
- Returns:
- A
BooleanFormula
that represents this check
-
IF_ICMPGT
Checks if the integer is greater than the second integer- Parameters:
i
- The otherIntValue
- Returns:
- A
BooleanFormula
that represents this check
-
IF_ICMPLE
Checks if the integer is less or equal to the second integer- Parameters:
i
- The otherIntValue
- Returns:
- A
BooleanFormula
that represents this check
-
IF_ICMPLT
Checks if the integer is less than the second integer- Parameters:
i
- The otherIntValue
- Returns:
- A
BooleanFormula
that represents this check
-
IF_ICMPNE
Checks if the two integers are not equal- Parameters:
i
- The otherIntValue
- Returns:
- A
BooleanFormula
that represents this check
-
I2D
Converts anIntValue
into aDoubleValue
- Returns:
- The resulting
DoubleValue
-
I2F
Converts anIntValue
into aFloatValue
- Returns:
- The resulting
FloatValue
-
I2L
- Returns:
- The resulting
LongValue
-
I2B
- Returns:
- The resulting
ByteValue
-
I2C
- Returns:
- The resulting
CharValue
-
I2S
Converts anIntValue
into aShortValue
- Returns:
- The resulting
ShortValue
-
checkZero
public org.sosy_lab.java_smt.api.BooleanFormula checkZero() -
asIntValue
- Overrides:
asIntValue
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Integer>
-
asCharValue
- Overrides:
asCharValue
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Integer>
-
asBooleanValue
- Overrides:
asBooleanValue
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Integer>
-
asLongValue
- Overrides:
asLongValue
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Integer>
-
asShortValue
- Overrides:
asShortValue
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Integer>
-
asByteValue
- Overrides:
asByteValue
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Integer>
-
asStringValue
- Overrides:
asStringValue
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Integer>
-
asNumericalValue
public NumericalValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,Integer> asNumericalValue()- Overrides:
asNumericalValue
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Integer>
-
getConcreteEncoded
- Overrides:
getConcreteEncoded
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Integer>
-
toString
Returns the string representation of the value used to visualize the stack. The representation is not complete.
-