https://github.com/philzook58/ocaml_z3_silly
A toy repo to figure out the z3 api
https://github.com/philzook58/ocaml_z3_silly
Last synced: 7 months ago
JSON representation
A toy repo to figure out the z3 api
- Host: GitHub
- URL: https://github.com/philzook58/ocaml_z3_silly
- Owner: philzook58
- Created: 2019-09-30T17:04:25.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-04T02:09:39.000Z (about 6 years ago)
- Last Synced: 2025-01-08T15:35:37.035Z (9 months ago)
- Language: OCaml
- Size: 10.4 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ocaml_z3_silly
`dune exec ./main.exe`
Gaving difficulty getting the model out of an arrya
FuncInterp seems like the functionality that I want, but does not appear to be obviously working.
Using Model.eval to work my way around doesn't seem to be workingI could deconstruct the ast, but feels hacky.
Most relevant stack overflow answer appears here.
https://stackoverflow.com/questions/22885457/read-func-interp-of-a-z3-array-from-the-z3-model/22918197#22918197```
sat
(define-fun f () (Array Int Int)
(store ((as const (Array Int Int)) 41) 4 7723))
constdecls (declare-fun f () (Array Int Int))
decls: (declare-fun f () (Array Int Int))
Fatal error: exception Z3.Error("Argument was not an array constant")
```(Z3.Model.get_func_interp model f_decl) leads to
Fatal error: exception Z3.Error("Argument was not an array constant")
get_const_interp also errors out.