-
Notifications
You must be signed in to change notification settings - Fork 17
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
Supporting evaluation for custom functions #203
Comments
After consideration, adding definitions to the input problem won't solve the issue because this definition will probably involve quantifiers and Dolmen doesn't support model checking of quantified problems. |
Technically, adding support for these function is quite easy (in terms of code needed for typing and evaluation). However, the main problem I see are the following:
|
Would it make sense to use dune-site's plugin mechanism for this? Dolmen could expose a registry of builtins that plugins can register themselves into to provide the implementation of such functions. The easiest would be that the plugin also expose a name so that the builtins provided by, say, the "alt-ergo" plugin are enabled iff the command line This way, the custom functions do not live in Dolmen itself, but there could be separate packages such as |
(sorry for the delay) |
I took a quick look. It is more complicated than I expected because we also need to be able to type the builtins, which I think the right way to do would be to register typing extensions, but typing extensions can only be registered after instantiated the Alternatively, typing extensions could be moved out of the functor. This would mean that they are global rather than per-instantiation; I'd say that this is OK but will let you be the judge. (One advantage of going global is that the extensions can be shared between multiple users of the functor; for instance for Alt-Ergo we could have a single plugin for |
This patch adds support for model extensions in `Dolmen_loop` using a similar mechanism to typing extensions. Model extensions and typing extensions are now loaded by the binary through Dune's plugin mechanism, and the existing `bvconv` extension is moved to use the plugin mechanism. Fixes Gbury#203
This patch adds support for model extensions in `Dolmen_loop` using a similar mechanism to typing extensions. Model extensions and typing extensions are now loaded by the binary through Dune's plugin mechanism, and the existing `bvconv` extension is moved to use the plugin mechanism. Fixes Gbury#203
This patch adds support for model extensions in `Dolmen_loop` using a similar mechanism to typing extensions. Model extensions and typing extensions are now loaded by the binary through Dune's plugin mechanism, and the existing `bvconv` extension is moved to use the plugin mechanism. Fixes Gbury#203
If an input file contains custom built-in functions, Dolmen's binary cannot check the model as Dolmen's evaluation function doesn't know this built-in.
For instance
Alt-Ergo
has a custom built-inround
function which isn't a part of the SMT-LIB standard.As we discussed offline, this low-priority feature is annoying to implement.
A naive way to support this feature in AE without modifying Dolmen consists in adding definitions for these builtins in the input problem which means we have to add an option in AE to check models with Dolmen's library instead of calling the binary on the outputted model by the solver.
The text was updated successfully, but these errors were encountered: