3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-15 21:38:44 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-06-15 12:31:21 -05:00
parent 206d7709d3
commit 9c6b29164d

View file

@ -4088,7 +4088,13 @@ def Concat(*args):
def Extract(high, low, a):
"""Create a Z3 bit-vector extraction expression, or create a string extraction expression.
"""Create a Z3 bit-vector extraction expression.
Extract is overloaded to also work on sequence extraction.
The functions SubString and SubSeq are redirected to Extract.
For this case, the arguments are reinterpreted as:
high - is a sequence (string)
low - is an offset
a - is the length to be extracted
>>> x = BitVec('x', 8)
>>> Extract(6, 2, x)