-
Notifications
You must be signed in to change notification settings - Fork 109
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
Exposing application parameters #238
Comments
A little followup, I implemented a possible API for this over at dp1/z3.rs/decl-params. I wrapped the possible result types in a if ast.is_app() && ast.decl().kind() == DeclKind::ZERO_EXT {
let DeclParam::Int(amt) = ast.decl().nth_param(0).unwrap() else { unreachable!(); };
println!("ZeroExt by {amt} bits");
} If there's any interest I can open a PR for it, or rework it if there's a better solution |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be useful to expose application parameters, such as the
high
andlow
limits of aZ3_OP_EXTRACT
.The python bindings expose them with a
params()
method onFuncDeclRef
, which may be a good way here as well.For my specific application I only need access to integer parameters (for extract, zero and sign extend), but it makes sense to think of the other parameter types too. I may have time to work on this, but I don't have a clear idea of what would be a good api to expose.
The text was updated successfully, but these errors were encountered: