Class LongValue
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,Long>
de.uzl.its.swat.symbolic.value.primitive.numeric.integral.LongValue
public class LongValue
extends NumericalValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,Long>
Wrapper for longs to represent symbolic and concrete information on the symbolic stack
-
Field Summary
Fields inherited from class de.uzl.its.swat.symbolic.value.primitive.numeric.NumericalValue
imgr
-
Constructor Summary
ConstructorDescriptionLongValue
(org.sosy_lab.java_smt.api.SolverContext context, long concrete) Creates a LongValue without symbolic information but a concrete value.LongValue
(org.sosy_lab.java_smt.api.SolverContext context, long concrete, org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula formula) Creates a LongValue with prior symbolic information and a concrete value. -
Method Summary
Modifier and TypeMethodDescriptionorg.sosy_lab.java_smt.api.BooleanFormula
Creates aBooleanFormula
that asserts that a value is not zeroorg.sosy_lab.java_smt.api.BooleanFormula
getBounds
(boolean upper) Creates a formula that asserts that this symbolic value is withing the bounds of this typeL2D()
Converts a long into a doubleL2F()
Converts a long into a floatL2I()
Converts a long into an intAdds two longsCalculates the bitwise and of two longs in binary representationCompares two longs and returns: 0 if both values are equal 1 if this long is greater -1 if the parameter is greater ToDo (Nils): This method is not validatedDivides two longsMultiplies two longsLNEG()
Negates a longCalculates the bitwise or of two longsCalculates the modulo of two longsCalculates the bitwise left shift of a longCalculates the bitwise arithmetic right shift of a longSubtracts two longsCalculates the bitwise logical right shift of a longCalculates the bitwise exclusive or of two longsTurns this LongValue into a symbolic variableMAKE_SYMBOLIC
(long idx) Turns this IntValue into a symbolic variableMAKE_SYMBOLIC
(String namePrefix) Turns this LongValue 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
asBooleanValue, asByteValue, asCharValue, asDoubleValue, asFloatValue, asIntValue, asNumericalValue, asObjectValue, asShortValue, getConcrete, getName, getType, initSymbolic, initSymbolic, reset
-
Constructor Details
-
LongValue
public LongValue(org.sosy_lab.java_smt.api.SolverContext context, long concrete) Creates a LongValue without symbolic information but a concrete value.- Parameters:
context
- The SolverContext to create formulas in the native Solver environment.concrete
- The concrete (long) value.
-
LongValue
public LongValue(org.sosy_lab.java_smt.api.SolverContext context, long concrete, org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula formula) Creates a LongValue with prior symbolic information and a concrete value.- Parameters:
context
- The SolverContext to create formulas in the native Solver environment.concrete
- The concrete (long) value.formula
- The formula representing the symbolic information.
-
-
Method Details
-
MAKE_SYMBOLIC
Turns this LongValue into a symbolic variable- Overrides:
MAKE_SYMBOLIC
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Long> - Parameters:
namePrefix
-- Returns:
- The numerical identifier of this symbolic variable
-
MAKE_SYMBOLIC
Turns this LongValue into a symbolic variable- Overrides:
MAKE_SYMBOLIC
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Long> - 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,
Long> - Parameters:
idx
-- 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 -
LADD
Adds two longs -
checkZero
public org.sosy_lab.java_smt.api.BooleanFormula checkZero()Creates aBooleanFormula
that asserts that a value is not zero- Returns:
- The resulting
BooleanFormula
-
LAND
Calculates the bitwise and of two longs in binary representation -
LDIV
Divides two longs -
LMUL
Multiplies two longs -
LNEG
Negates a long- Returns:
- The resulting
LongValue
-
LOR
Calculates the bitwise or of two longs -
LREM
Calculates the modulo of two longs- Parameters:
l
- The otherLongValue
- Returns:
- The resulting IntValue
-
LSHL
Calculates the bitwise left shift of a long- Parameters:
i
- The amount to shift- Returns:
- The resulting
LongValue
-
LSHR
Calculates the bitwise arithmetic right shift of a long- Parameters:
i
- The amount to shift- Returns:
- The resulting
LongValue
-
LSUB
Subtracts two longs -
LUSHR
Calculates the bitwise logical right shift of a long- Parameters:
i
- The amount to shift- Returns:
- The resulting
LongValue
-
LXOR
Calculates the bitwise exclusive or of two longs- Parameters:
l
- The otherLongValue
- Returns:
- The resulting IntValue
-
LCMP
Compares two longs and returns: 0 if both values are equal 1 if this long is greater -1 if the parameter is greater ToDo (Nils): This method is not validated- Parameters:
l
- The otherLongValue
Value- Returns:
- The resulting IntValue with the boolean conditions
-
L2D
Converts a long into a double- Returns:
- The resulting DoubleValue
-
L2F
Converts a long into a float- Returns:
- The resulting FloatValue
-
L2I
Converts a long into an int- Returns:
- The resulting IntValue
-
asLongValue
- Overrides:
asLongValue
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Long>
-
asStringValue
- Overrides:
asStringValue
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Long>
-
getConcreteEncoded
- Overrides:
getConcreteEncoded
in classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,
Long>
-
toString
Returns the string representation of the value used to visualize the stack. The representation is not complete.
-