-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implement proposed smtlib2 bitvector overflow predicates #6715
Implement proposed smtlib2 bitvector overflow predicates #6715
Conversation
Currently, for example, the function declaration symbol member for checking whether multiplication *does not* overflow is called `m_bv_smul_ovfl`. Since we are introducing the upcoming smtlib2 symbols that check that multpliciation *does* overflow, the not overflow check symbols are renamed to `m_bv_smul_no_ovfl` etc.
Smtlib2 is being extended to include overflow predicates for bit vectors (see https://groups.google.com/u/1/g/smt-lib/c/J4D99wT0aKI). This commit introduces the predicates `bvumulo` and `bvsmulo` that return `true` if the unsigned multiplication overflows or the signed multiplication underflows or overflows, respectively.
846b0e0
to
6f70788
Compare
@microsoft-github-policy-service agree company="Certora" |
I checked this branch against cvc5's overflow regression tests in https://github.com/cvc5/cvc5/tree/main/test/regress/cli/regress0/bv/overflow and everything passes. |
Is there any way for API users to access these functions yet? I think they have not been added to the C or C++ APIs yet, but is there a way for a project using API calls also interact with these newly-added functions too? |
there are already functions accessible over the API that serve this functionality. They have different names. They have been available for a very long time. They are not new. |
Adds the `bvsaddo` SMT-LIB operator. This operator is due to be standardized in SMT-LIB 2.7, and is already supported in Z3. https://groups.google.com/g/smt-lib/c/J4D99wT0aKI Z3Prover/z3#6715
Smtlib2 is being extended to include overflow predicates for bit vectors (see https://groups.google.com/u/1/g/smt-lib/c/J4D99wT0aKI). This PR introduces the predicates
bvumulo
,bvsmulo
,bvsdivo
,bvnego
,bvuaddo
,bvsaddo
,bvusubo
, andbvssubo
.