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
ConstructorsConstructorDescriptionLongValue(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.BooleanFormulaCreates aBooleanFormulathat asserts that a value is not zeroorg.sosy_lab.java_smt.api.BooleanFormulagetBounds(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, wrapShortMethods 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_SYMBOLICin 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_SYMBOLICin 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_SYMBOLICin 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 aBooleanFormulathat 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 otherLongValueValue- 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:
asLongValuein classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,Long>
-
asStringValue
- Overrides:
asStringValuein classValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,Long>
-
getConcreteEncoded
- Overrides:
getConcreteEncodedin 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.
-