Skip to content

simplify creating invalid operation on BVs #7434

Closed
@rmcclure-nv

Description

Running the following snippet of python code:

import z3
a = z3.BitVec('a', 5)
b = z3.BitVec('b', 3)
cond = z3.simplify(z3.BV2Int(a) == z3.BV2Int(b))

The simplify call fails with:

z3.z3types.Z3Exception: b'Sorts (_ BitVec 5) and (_ BitVec 3) are incompatible'

possibly because it is trying to unwrap the two BV2Int calls without making sure the underlying BVs are the same length.
This reproduces with the 4.13.1 release (and later). It does not show up in 4.13.0.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions