2021-11-30 13:06:30 -08:00
|
|
|
Bit-Vectors
|
|
|
|
|
============
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
Basic Bit-Vector Term Builders
|
|
|
|
|
----------------------------------
|
2022-03-03 03:16:09 +01:00
|
|
|
.. autofunction:: cvc5.pythonic.BitVec
|
|
|
|
|
.. autofunction:: cvc5.pythonic.BitVecVal
|
|
|
|
|
.. autofunction:: cvc5.pythonic.BitVecSort
|
|
|
|
|
.. autofunction:: cvc5.pythonic.BitVecs
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
Bit-Vector Overloads
|
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
|
|
See the following operator overloads for building bit-vector terms.
|
|
|
|
|
Each kind of term can also be built with a builder function below.
|
|
|
|
|
|
|
|
|
|
* arithmetic
|
|
|
|
|
|
|
|
|
|
addition (``+``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.BitVecRef.__add__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
subtraction (``-``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.BitVecRef.__sub__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
multiplication (``*``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.BitVecRef.__mul__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
division (``/``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.BitVecRef.__div__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
* bit-wise
|
|
|
|
|
|
|
|
|
|
or (``|``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.BitVecRef.__or__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
and (``&``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.BitVecRef.__and__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
xor (``^``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.BitVecRef.__xor__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
bit complement (``~``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.BitVecRef.__invert__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
negation (``-``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.BitVecRef.__neg__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
left shift (``<<``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.BitVecRef.__lshift__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
right shift (``>>``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.BitVecRef.__rshift__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
* comparisons
|
|
|
|
|
|
|
|
|
|
signed greater than (``>``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.BitVecRef.__gt__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
signed less than (``<``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.BitVecRef.__lt__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
signed greater than or equal to (``>=``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.BitVecRef.__ge__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
signed less than or equal to (``<=``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.BitVecRef.__le__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
equal (``==``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.ExprRef.__eq__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
not equal (``!=``)
|
2022-03-03 03:16:09 +01:00
|
|
|
:py:meth:`cvc5.pythonic.ExprRef.__ne__`
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
Bit-Vector Term Builders
|
|
|
|
|
------------------------
|
|
|
|
|
|
2022-03-03 03:16:09 +01:00
|
|
|
.. autofunction:: cvc5.pythonic.BV2Int
|
|
|
|
|
.. autofunction:: cvc5.pythonic.Int2BV
|
|
|
|
|
.. autofunction:: cvc5.pythonic.Concat
|
|
|
|
|
.. autofunction:: cvc5.pythonic.Extract
|
|
|
|
|
.. autofunction:: cvc5.pythonic.ULE
|
|
|
|
|
.. autofunction:: cvc5.pythonic.ULT
|
|
|
|
|
.. autofunction:: cvc5.pythonic.UGE
|
|
|
|
|
.. autofunction:: cvc5.pythonic.UGT
|
|
|
|
|
.. autofunction:: cvc5.pythonic.SLE
|
|
|
|
|
.. autofunction:: cvc5.pythonic.SLT
|
|
|
|
|
.. autofunction:: cvc5.pythonic.SGE
|
|
|
|
|
.. autofunction:: cvc5.pythonic.SGT
|
|
|
|
|
.. autofunction:: cvc5.pythonic.UDiv
|
|
|
|
|
.. autofunction:: cvc5.pythonic.URem
|
|
|
|
|
.. autofunction:: cvc5.pythonic.SDiv
|
|
|
|
|
.. autofunction:: cvc5.pythonic.SMod
|
|
|
|
|
.. autofunction:: cvc5.pythonic.SRem
|
|
|
|
|
.. autofunction:: cvc5.pythonic.LShR
|
|
|
|
|
.. autofunction:: cvc5.pythonic.RotateLeft
|
|
|
|
|
.. autofunction:: cvc5.pythonic.RotateRight
|
|
|
|
|
.. autofunction:: cvc5.pythonic.SignExt
|
|
|
|
|
.. autofunction:: cvc5.pythonic.ZeroExt
|
|
|
|
|
.. autofunction:: cvc5.pythonic.RepeatBitVec
|
|
|
|
|
.. autofunction:: cvc5.pythonic.BVRedAnd
|
|
|
|
|
.. autofunction:: cvc5.pythonic.BVRedOr
|
|
|
|
|
.. autofunction:: cvc5.pythonic.BVAdd
|
|
|
|
|
.. autofunction:: cvc5.pythonic.BVMult
|
|
|
|
|
.. autofunction:: cvc5.pythonic.BVSub
|
|
|
|
|
.. autofunction:: cvc5.pythonic.BVOr
|
|
|
|
|
.. autofunction:: cvc5.pythonic.BVAnd
|
|
|
|
|
.. autofunction:: cvc5.pythonic.BVXor
|
|
|
|
|
.. autofunction:: cvc5.pythonic.BVNeg
|
|
|
|
|
.. autofunction:: cvc5.pythonic.BVNot
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
Testers
|
|
|
|
|
-------------------
|
2022-03-03 03:16:09 +01:00
|
|
|
.. autofunction:: cvc5.pythonic.is_bv_sort
|
|
|
|
|
.. autofunction:: cvc5.pythonic.is_bv
|
|
|
|
|
.. autofunction:: cvc5.pythonic.is_bv_value
|
2021-12-17 10:42:48 -08:00
|
|
|
|
|
|
|
|
Classes (with overloads)
|
|
|
|
|
-----------------------------
|
|
|
|
|
|
2022-03-03 03:16:09 +01:00
|
|
|
.. autoclass:: cvc5.pythonic.BitVecSortRef
|
2021-12-17 10:42:48 -08:00
|
|
|
:members:
|
|
|
|
|
:special-members:
|
2022-03-03 03:16:09 +01:00
|
|
|
.. autoclass:: cvc5.pythonic.BitVecRef
|
2021-12-17 10:42:48 -08:00
|
|
|
:members:
|
|
|
|
|
:special-members:
|
2022-03-03 03:16:09 +01:00
|
|
|
.. autoclass:: cvc5.pythonic.BitVecNumRef
|
2021-12-17 10:42:48 -08:00
|
|
|
:members:
|
|
|
|
|
:special-members:
|