You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to map this library to Bitvectors in Z3. How can I make the coq-smt-check support this library? I tried, but it looks complicated. The main problem is, the int64 is constructed by Z (repr: Z -> int64), and I want to map int64 to BitVec 64 directly.
For example, I want to map Int64.repr 5 into #x5. I can get something like (+ 1 (* (+ 1 1) (+ 1 1))) by using coq-smt-check or coq-plugin-utils. If we deal with Int or Real in Z3, it is ok to pass this syntax to Z3, like coq-smt-check did. But Z3 doesn't allow such syntax when build a BitVec. How can I get the result5 in hexadecimal format so that I can add the prefix #x, then pass it to Z3?
The text was updated successfully, but these errors were encountered:
I don't have a way right now to set up custom types. Perhaps we could do it by having a way to map Coq constr into strings on the SMT side of things. You'd need to do something like:
SMT Add Symbol and "and".
SMT Add Symbol or "or".
I'm not sure that I know a generic way to get the hex formatting though. You could always special-case it.
Hi @gmalecha ,
Suppose I have a user-defined integer library as shown bellow(ignored the semantics).
I want to map this library to
Bitvectors
in Z3. How can I make thecoq-smt-check
support this library? I tried, but it looks complicated. The main problem is, theint64
is constructed byZ
(repr:Z
->int64
), and I want to mapint64
toBitVec 64
directly.For example, I want to map
Int64.repr 5
into#x5
. I can get something like(+ 1 (* (+ 1 1) (+ 1 1)))
by usingcoq-smt-check
orcoq-plugin-utils
. If we deal withInt
orReal
in Z3, it is ok to pass this syntax to Z3, likecoq-smt-check
did. But Z3 doesn't allow such syntax when build aBitVec
. How can I get the result5
in hexadecimal format so that I can add the prefix#x
, then pass it to Z3?The text was updated successfully, but these errors were encountered: