Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplification yields f/n applied to x₁...xₘ with m≠n #7179

Closed
janvrany opened this issue Mar 21, 2024 · 1 comment
Closed

Simplification yields f/n applied to x₁...xₘ with m≠n #7179

janvrany opened this issue Mar 21, 2024 · 1 comment

Comments

@janvrany
Copy link
Contributor

I noticed that simplification sometimes yields an application AST with more children than corresponding function declaration arity. For example:

from z3 import BitVec, simplify

a = BitVec('a', 8)
b = BitVec('b', 8)
c = BitVec(1, 8)

original = a + b + c
simplified = simplify(original)

assert original.decl().arity() == len(original.children())
assert simplified.decl().arity() == len(simplified.children())

Here the first assertion holds, the second does not, because simplified.decl().arity() is 2 whereas simplified has 3 children (a, b and c).

I'd intuitively expect that number of application arguments is always the same as corresponding function declarations' arity.

shingarov added a commit to shingarov/MachineArithmetic that referenced this issue Mar 21, 2024
@NikolajBjorner
Copy link
Contributor

you will have to configure

set_param("rewriter.flat", false)

The parameter was ignored in an optimizaton that flattens function applications that occur only with single reference count.

shingarov added a commit to shingarov/MachineArithmetic that referenced this issue Mar 21, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue Mar 21, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue Mar 21, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue Mar 21, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue Mar 21, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue Mar 21, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue Mar 21, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue Mar 21, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 3, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 3, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 3, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 3, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 3, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 3, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 3, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 5, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 5, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 5, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 5, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 5, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 5, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 5, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 5, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 5, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 5, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 5, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 9, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 9, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 9, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 9, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 9, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 9, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 9, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 9, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 9, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 9, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 9, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 9, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 9, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 9, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 9, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 22, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 22, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 22, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 22, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 22, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 22, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 22, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 22, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 22, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 22, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 22, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 22, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 22, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 22, 2024
shingarov added a commit to shingarov/MachineArithmetic that referenced this issue May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants