smt - Getting symbolic values of bit vectors in Z3 -
I want to use Z3 for reasoning from a few vectors. Along with a satisfactory decision, I also want to symbolically represent the bit vectors so that I can apply their own computations to them as per need. For example:
Come,
- X [3: 0], Y [3: 0], Z [4: 0] is declared a bit vector
- Print X [3: 0]
- X [3: 0] without launching any value < - X [3: 0]> gt; & Gt; 1 [logical change]
- Print X [3: 0]
- Z [4: 0]
- Print Z [4: 0]
- .......
desired output (something symbolic like this):
& gt; 2. [x3 x2x1x0] & gt; 4. [0 x3 x2 x1] & gt; 6. [s4 s3 s2 s1 s0]
Is it possible to use Z3? Generally, this is not possible after the simplification of the formula, Z3 is a bit-blaster (boolean).
Translates into variables and runs a set solver, which usually assigns an assignment to all boolean variables (and thus, after translation, in the bit-vector variable).
Strategy that Z3 has given employment for QFVVV formulas. For some (simple) formulas, in your case bit may be enough to remove the formula after bit-blasting; It describes how to prepare and implement such strategies.
Comments
Post a Comment