KContext
Constructors
Types
Enable or disable Garbage Collection of unused KSMT expressions.
Allow or disallow concurrent execution of KContext operations (e.g. expression creation)
Enable or disable expression simplification during expression creation.
Functions
Create boolean AND expression.
Create boolean binary AND expression.
Create an Int/Real arithmetic addition expression.
Create an Int/Real arithmetic addition expression.
Create an Int/Real arithmetic division expression.
Create an Int/Real arithmetic division expression.
Create an Int/Real arithmetic >=
(greater-or-equal) expression.
Create an Int/Real arithmetic >
(greater) expression.
Create an Int/Real arithmetic <=
(less-or-equal) expression.
Create an Int/Real arithmetic <
(less) expression.
Create an Int/Real arithmetic multiplication expression.
Create an Int/Real arithmetic multiplication expression.
Create an Int/Real arithmetic power expression.
Create an Int/Real arithmetic power expression.
Create an Int/Real arithmetic subtraction expression.
Create an Int/Real arithmetic subtraction expression.
Create an Int/Real arithmetic negation expression.
Create an Int/Real arithmetic negation expression.
Create n-ary array store expression (store array_0 ... indices_n value) without cache. Cache is used to speed up mkArrayNSelect operation simplification but can result in a huge memory consumption.
Create an array select expression (select array).
Create an array select expression (select array).
Create an array store expression (store array value) without cache. Cache is used to speed up mkArraySelect operation simplification but can result in a huge memory consumption.
Create an array store expression (store array index1) without cache. Cache is used to speed up mkArraySelect operation simplification but can result in a huge memory consumption.
Create an array store expression (store array index1 value) without cache. Cache is used to speed up mkArraySelect operation simplification but can result in a huge memory consumption.
Create a Bool sort.
Create a BitVec sort with 16 bits length (_ BitVec 16).
Create a BitVec sort with 32 bits length (_ BitVec 32).
Create a BitVec sort with 64 bits length (_ BitVec 64).
Create BitVec arithmetic addition (bvadd
) expression.
Create BitVec add-no-overflow check expression. Determines that BitVec arithmetic addition does not overflow. An overflow occurs when the addition result value is greater than max supported value.
Create BitVec add-no-overflow check expression. Determines that BitVec arithmetic addition does not overflow. An overflow occurs when the addition result value is greater than max supported value.
Create BitVec add-no-underflow check expression. Determines that BitVec arithmetic addition does not underflow. An underflow occurs when the addition result value is lower than min supported value.
Create bitwise AND (bvand
) expression.
Create BitVec arithmetic shift right (bvashr
) expression. The shifted expressions is padded with sign (leftmost, highest) bits.
Create BitVec concatenation (concat
) expression.
Create BitVec div-no-overflow check expression. Determines that BitVec arithmetic signed division does not overflow.
Create BitVec logical shift right (bvlshr
) expression. The shifted expressions is padded with zero bits.
Create BitVec arithmetic multiplication (bvmul
) expression.
Create BitVec mul-no-overflow check expression. Determines that BitVec arithmetic multiplication does not overflow. An overflow occurs when the multiplication result value is greater than max supported value.
Create BitVec mul-no-overflow check expression. Determines that BitVec arithmetic multiplication does not overflow. An overflow occurs when the multiplication result value is greater than max supported value.
Create BitVec mul-no-underflow check expression. Determines that BitVec arithmetic multiplication does not underflow. An underflow occurs when the multiplication result value is lower than min supported value.
Create BitVec mul-no-underflow check expression. Determines that BitVec arithmetic multiplication does not underflow. An underflow occurs when the multiplication result value is lower than min supported value.
Create bitwise NAND (bvnand
) expression.
Create BitVec arithmetic negation (bvneg
) expression.
Create BitVec neg-no-overflow check expression. Determines that BitVec arithmetic negation does not overflow.
Create bitwise NOR (bvnor
) expression.
Create bitwise NOT (bvnot
) expression.
Create bitwise AND reduction (bvredand
) expression. Reduce all bits to a single bit with AND operation.
Create bitwise OR reduction (bvredor
) expression. Reduce all bits to a single bit with OR operation.
Create BitVec repeat (repeat
) expression. Returns a BitVec expression with repeatNumber concatenated copies of value.
Create BitVec rotate left (rotateleft
) expression. The result expression is rotated left rotation times.
Create BitVec rotate left (rotateleft
) expression. The result expression is rotated left rotation times.
Create BitVec rotate right (rotateright
) expression. The result expression is rotated right rotation times.
Create BitVec rotate right (rotateright
) expression. The result expression is rotated right rotation times.
Create BitVec shift left (bvshl
) expression.
Create BitVec arithmetic signed division (bvsdiv
) expression. The division result sign depends on the arguments signs.
Create BitVec signed greater (bvsgt
) expression.
Create BitVec signed greater-or-equal (bvsge
) expression.
Create BitVec signed less (bvslt
) expression.
Create BitVec signed less-or-equal (bvsle
) expression.
Create BitVec arithmetic signed mod (bvsmod
) expression.
Create BitVec arithmetic signed reminder (bvsrem
) expression.
Create BitVec signed extension (signext
) expression. Returns a BitVec expression with extensionSize extra sign (leftmost, highest) bits. The extra bits are prepended to the provided value.
Create BitVec signed extension (signext
) expression. Returns a BitVec expression with extensionSize extra sign (leftmost, highest) bits. The extra bits are prepended to the provided value.
Create BitVec arithmetic subtraction (bvsub
) expression.
Create BitVec sub-no-overflow check expression. Determines that BitVec arithmetic subtraction does not overflow. An overflow occurs when the subtraction result value is greater than max supported value.
Create BitVec sub-no-underflow check expression. Determines that BitVec arithmetic subtraction does not underflow. An underflow occurs when the subtraction result value is lower than min supported value.
Create BitVec sub-no-underflow check expression. Determines that BitVec arithmetic subtraction does not underflow. An underflow occurs when the subtraction result value is lower than min supported value.
Create Fp from BitVec value. Rounding is performed according to the roundingMode.
Create Fp from BitVec value. Rounding is performed according to the roundingMode.
Create BitVec arithmetic unsigned division (bvudiv
) expression.
Create BitVec unsigned greater (bvugt
) expression.
Create BitVec unsigned greater-or-equal (bvuge
) expression.
Create BitVec unsigned less (bvult
) expression.
Create BitVec unsigned less-or-equal (bvule
) expression.
Create BitVec arithmetic unsigned reminder (bvurem
) expression.
Create bitwise XNOR (bvxnor
) expression.
Create bitwise XOR (bvxor
) expression.
Create BitVec zero extension (zeroext
) expression. Returns a BitVec expression with extensionSize extra zero bits. The extra bits are prepended to the provided value.
Create BitVec zero extension (zeroext
) expression. Returns a BitVec expression with extensionSize extra zero bits. The extra bits are prepended to the provided value.
Create DISTINCT expression.
Create existential quantifier (exists
).
Create FP128 from the IEEE binary representation. Note: unbiasedExponent here is unbiased, i.e. signed.
Create FP128 from the IEEE binary representation. Note: biasedExponent here is biased, i.e. unsigned.
Create FP128 NaN value.
Create a 128-bit IEEE floating point sort (_ FloatingPoint 15 113).
Create FP16 from the value.
Create FP16 NaN value.
Create a 16-bit IEEE floating point sort (_ FloatingPoint 5 11).
Create FP32 from the value.
Create FP32 NaN value.
Create a 32-bit IEEE floating point sort (_ FloatingPoint 8 24).
Create FP64 from the value.
Create FP64 NaN value.
Create a 64-bit IEEE floating point sort (_ FloatingPoint 11 53).
Create Fp absolute value (fp.abs
) expression.
Create Fp addition (fp.add
) expression. The result is rounded according to the provided roundingMode.
Create Fp addition (fp.add
) expression. The result is rounded according to the provided roundingMode.
Create FP with a custom size from the IEEE binary representation. Important: unbiasedExponent here is an unbiased value.
Create FP with a custom size from the IEEE binary representation. Important: biasedExponent here is an biased value.
Create Fp division (fp.div
) expression. The result is rounded according to the provided roundingMode.
Create Fp division (fp.div
) expression. The result is rounded according to the provided roundingMode.
Create Fp equality comparison (fp.eq
) expression. Checks arguments equality using IEEE 754-2008 rules.
Create Fp fused multiplication and addition (fp.fma
) expression. Computes (arg0 * arg1) + arg2. The result is rounded according to the provided roundingMode.
Create Fp greater comparison (fp.gt
) expression.
Create Fp greater-or-equal comparison (fp.geq
) expression.
Create Fp is-inf check (fp.isInfinite
) expression.
Create Fp is-nan check (fp.isNaN
) expression.
Create Fp is-negative check (fp.isNegative
) expression.
Create Fp is-normal check (fp.isNormal
) expression.
Create Fp is-positive check (fp.isPositive
) expression.
Create Fp is-subnormal check (fp.isSubnormal
) expression.
Create Fp is-zero check (fp.isZero
) expression.
Create Fp less comparison (fp.lt
) expression.
Create Fp less-or-equal comparison (fp.leq
) expression.
Create Fp maximum (fp.max
) expression.
Create Fp minimum (fp.min
) expression.
Create Fp multiplication (fp.mul
) expression. The result is rounded according to the provided roundingMode.
Create Fp multiplication (fp.mul
) expression. The result is rounded according to the provided roundingMode.
Create Fp negation (fp.neg
) expression.
Create Fp IEEE remainder (fp.IEEERem
) expression.
Create Fp rounding mode.
Create a floating point rounding mode sort.
Create Fp round to integral (fp.roundToIntegral
) expression. The rounding is performed according to the provided roundingMode.
Create Fp round to integral (fp.roundToIntegral
) expression. The rounding is performed according to the provided roundingMode.
Create Fp square root (fp.sqrt
) expression. The result is rounded according to the provided roundingMode.
Create Fp square root (fp.sqrt
) expression. The result is rounded according to the provided roundingMode.
Create Fp subtraction (fp.sub
) expression. The result is rounded according to the provided roundingMode.
Create Fp subtraction (fp.sub
) expression. The result is rounded according to the provided roundingMode.
Create Fp to BitVec conversion (fp.to_sbv
, fp.to_ubv
) expression. Provided Fp value is rounded to the nearest integral according to the roundingMode.
Create Fp to BitVec conversion (fp.to_sbv
, fp.to_ubv
) expression. Provided Fp value is rounded to the nearest integral according to the roundingMode.
Create Fp to another Fp. Rounding is performed according to the roundingMode.
Create Fp to another Fp. Rounding is performed according to the roundingMode.
Create Fp to IEEE BitVec conversion expression. Converts Fp value to the corresponding IEEE 754-2008 binary format.
Create Fp to Real conversion (fp.to_real
) expression.
Create a function-as-array expression (_ as-array function).
Create boolean =>
(implication) expression.
Create an Int mod expression.
Create an Int value.
Create an Int rem expression.
Convert an Int expression to a corresponding Real expression.
Convert an Int expression to a corresponding Real expression.
Create boolean NOT expression.
Create boolean OR expression.
Create boolean binary OR expression.
Check whether the given Real expression has an integer value.
Check whether the given Real expression has an integer value.
Create a Real value.
Create a Real value from a string of the form "123/456"
.
Create a Real sort.
Create Fp from Real expression. Rounding is performed according to the roundingMode.
Create Fp from Real expression. Rounding is performed according to the roundingMode.
Convert Real expression to an Int expression (floor division).
Convert Real expression to an Int expression (floor division).
Create an uninterpreted sort named name.
Create uninterpreted sort value.
Create universal quantifier (forall
).
Properties
Extensions
(extract (concat a b)) ==> (concat (extract a) (extract b))
(= (concat a b) c) ==> (and (= a (extract (0, ) c)) (= b (extract (, + ) c)) )
(rotateLeft a x) ==> (concat (extract size-1-x:0 a) (extract size-1:size-x a))
(rotateRight a x) ==> (rotateLeft a (- size x))
(ite c true e) ==> (or c e) (ite c false e) ==> (and (not c) e) (ite c t true) ==> (or (not c) t) (ite c t false) ==> (and c t)
(ite c t c) ==> (and c t) (ite c c e) ==> (or c e)
(concat const1 (concat const2 a)) ==> (concat (concat const1 const2) a) (concat (concat a const1) const2) ==> (concat a (concat const1 const2))
(extracthigh:low (extract_:nestedLow x)) ==> (extracthigh+nestedLow : low+nestedLow x)
(bvlshr x shift) ==> (concat 0.shift.0 (extract size-1:shift x))
(bvnot (concat a b)) ==> (concat (bvnot a) (bvnot b))
(bvshl x shift) ==> (concat (extract size-1-shift:0 x) 0.shift.0)
(bvshl (bvshl x nestedShift) shift) ==> (ite (bvule nestedShift (+ nestedShift shift)) (bvshl x (+ nestedShift shift)) 0)
(urem a x), x == 2^n ==> (concat 0 (extract n-1:0 a))
(bvand (concat a b) c) ==> (concat (bvand (extract (0, ) c)) (bvand b (extract (, + ) c)) )
(bvor (concat a b) c) ==> (concat (bvor (extract (0, ) c)) (bvor b (extract (, + ) c)) )
(bvxor (concat a b) c) ==> (concat (bvxor (extract (0, ) c)) (bvxor b (extract (, + ) c)) )
(ite c t1 (ite c2 t1 t2)) ==> (ite (or c c2) t1 t2)
Simplify select from a chain of array store expressions.