Comments (10)
It is for COLIBRI, we have an OCaml to Prolog bridge, so since our previous prolog parser was flaky, using dolmen is more than a bliss.
Thanks for the advices @Gbury!
from dolmen.
I think it's safe to say @Gbury isn't working on it 🙂
Are you writing SMT solvers in OCaml, still, @bobot ?
from dolmen.
I can confirm that I'm not working on it, so if you have the time and motivation, that's great !
For writing the theory, I would give the following advices:
- get inspiration from the other theories written for smtlib
- add together with the theory implementation the reference description of the theory from smtlib (i.e. the
fp.smt2
file describing the theory). It helps having it directly next to the implementation and when/if it changes, diffing the new version will help upgrading the theory. - but most of all, give attention to the error cases, as can be seen in other theories, the code handling the error cases takes quite a lot of place (and time to write), but it is very important, hence why there are quite a lot of helper functions in the
base.ml
file that you can probably re-use as much as possible (for checking arity, dealing with associative and/or chainable operations, etc...).
The fact that builtins are not exported in Dolmen.Expr
is clearly a mistake. As you say, the goal is indeed to match on these builtins as much as possible (rather than testing equality of declared symbols). I'll try and fix it asap, ^^
from dolmen.
Good to hear. Is colibri amenable to be re-written in OCaml, or is it too big a stretch? :p
from dolmen.
Not in OCaml too easy, in Why3 it is better 😉
from dolmen.
@bobot I just pushed bbbe607 which exports and documents the builtins in Dolmen.Expr
. Don't hesitate to make any remarks about it, ^^
from dolmen.
Additionally, do you think dolmen should to export the following function (It basically tries and match the type of a term with a bitvector type and if successful extracts the length of the bitvector), or do you think it is simple enough that users can re-implement their variant of it (returning an option, or some other error) ?
Lines 2109 to 2112 in bbbe607
from dolmen.
I think it is not necessary, because I think in most use cases one will match on all the possible builtin at the same time.
from dolmen.
The MR #31 should implement the theory.
from dolmen.
I have some small fixes that I will MR in bulk once when COLIBRI+dolmen works fully.
from dolmen.
Related Issues (20)
- Additional builtins in the State? HOT 1
- Wrong check-model
- Bitvectors of size 0 should be forbidden
- Ill-typed statement on Bitvector is accepted by Dolmen HOT 1
- Expose `with_cache`? HOT 1
- Support Alt-Ergo's `cut` and `check` HOT 12
- Add authors files
- Unclear error message during model checking HOT 7
- Spec errors on the difference logic benchmarks of the SMT-LIB HOT 2
- Reject names starting with `@` and `.` outside of models
- Handling of `set-option :global-declarations`
- Handling of named terms HOT 2
- Check sat assuming HOT 2
- DIMACS variables do not appear as decls HOT 1
- Uncaught exception on buggy file
- 4.08 support broken (`List.concat_map`) HOT 10
- Quoted identifiers can be keywords HOT 12
- Warning regarding the `dolmen_type` file HOT 2
- Support non-incremental parsing from stdin HOT 1
- Handling abstract values in `(get-value)` statements HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dolmen.