-
Notifications
You must be signed in to change notification settings - Fork 544
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
iff AST Node #571
Comments
Indeed, in your (duplicate #409) |
Gotcha. Is there plans to support this? This actually came up immediately on simplifying rip after a conditional jump, so likely it is something that z3 would use a lot of. |
yep, the problem is that |
|
Maybe a potential way could be to ask to z3 to do not use such node during its simplification process (but dunno if it's possible). |
So I thought the z3 wrapper just exposed it as an object. Why do we need to be able to express |
Do you have an example? |
Just trying to understand the problem. Not sure why Triton has to be able to represent |
it's ok about z3 but how do we display our AST when |
my personal opinion on that is to simply make up some format for it. i would think the benefits of having it optimized would outweigh not having a legit way to print the representation out in python. Also, I wouldn't think anyone would need to directly evaluate the python representation itself. I see that more as a description of the ast (and obviously already leaves out size of the bitvector for example). |
What about using an instrinsic? It would break My whole "I want a Z3 expression in python" issue was specifically because of this issue. EDIT: In the other issue (#409) you mention that the operator must be ternary... Is that true? Maybe I'm missing something but it doesn't look like it. It's
|
Notes for myself: The evaluation part regarding the symbolic emulation: ; $ z3 -smt2 iff.smt2
; sat
; true
; false
; false
; true
(check-sat)
(eval
(iff
(= (_ bv1 16) (_ bv1 16))
(= (_ bv10 16) (_ bv10 16))
)
)
(eval
(iff
(= (_ bv1 16) (_ bv1 16))
(= (_ bv20 16) (_ bv10 16))
)
)
(eval
(iff
(= (_ bv2 16) (_ bv1 16))
(= (_ bv10 16) (_ bv10 16))
)
)
(eval
(iff
(= (_ bv2 16) (_ bv1 16))
(= (_ bv20 16) (_ bv10 16))
)
) The Python representation (solution 1):
The Python representation (solution 2):
Z3's API: pub unsafe extern "C" fn Z3_mk_iff(
c: Z3_context,
t1: Z3_ast,
t2: Z3_ast
) -> Z3_ast |
Merged into |
I'm getting an error about iff AST nodes:
I don't see any
iff
operations in there.The text was updated successfully, but these errors were encountered: