Open wangjwchn opened 7 years ago
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 mapInt64.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?