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

ocaml: fix is_arithmetic_numeral and is_bv_numeral #6003

Merged
merged 1 commit into from
Apr 27, 2022

Conversation

percontation
Copy link
Contributor

No description provided.

@percontation
Copy link
Contributor Author

Currently, newly created numerals aren't APP_AST, they're NUMERAL_AST, so this was happening:

utop # let ctxt = Z3.mk_context [];;
val ctxt : Z3.context = <abstr>
utop # let num = Z3.BitVector.mk_numeral ctxt "1" 1;;
val num : Z3.Expr.expr = <abstr>
utop # Z3.BitVector.is_bv_numeral num;;
- : bool = false

One Z3 internals question I'm unclear about: Is it somehow still possible to see OP_ANUM or OP_BNUM as an APP_AST? If so, I suppose is_arithmetic_numeral and is_bv_numeral should be checking for either AST.is_app x || AST.is_numeral x.

@NikolajBjorner NikolajBjorner merged commit 99e299b into Z3Prover:master Apr 27, 2022
@percontation percontation deleted the ocaml_fixes branch June 9, 2023 12:07
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

Successfully merging this pull request may close these issues.

2 participants