feat: Support more Alt-Ergo primitives#220
Conversation
|
Thanks ! As discussed offline, any primitive that is officially part of the alt-ergo's native language (something that you can actually decide as an alt-ergo dev), should indeed be implemented in dolmen itself (and not require any plugin), independently of whether they map directly to SMT-LIB primitives or not. It's up to you whether you want to add all of the alt-ergo primitives in this PR, or via multiple PRs. Just tell me when you're satisfied with this PR and I'll review and merge it. |
|
After thinking about it I am a bit on the fence on the topic. I would like the Dolmen experience to be consistent w.r.t builtins: either a builtin is fully supported by dolmen, including printing to SMT-LIB, or it is not at all and requires a plugin (once the corresponding PR is merged). Unfortunately this is already not the case (due to e.g. exponentiation and I'll think about it for a bit; in the meantime, I think this PR is uncontroversial and can be merged. |
|
@Gbury I think this can be merged, I'll do another PR with additional Alt-Ergo primitives. |
Gbury
left a comment
There was a problem hiding this comment.
Just one small question, but otherwise good to merge
This patch adds typing support for the following Alt-Ergo primitives: - `fpa_rounding_mode` and its constructors (equivalent to `RoundingMode` in SMT-LIB); - `real_of_int` (equivalent to `to_real` in SMT-LIB); - `real_is_int` (equivalent to `is_int` in SMT-LIB); - `abs_int` (equivalent to `abs` in SMT-LIB); - `int_floor` (equialent to `floor_to_int` in SMT-LIB)
This patch adds typing support for the following Alt-Ergo primitives:
fpa_rounding_modeand its constructors (equivalent toRoundingModein SMT-LIB);real_of_int(equivalent toto_realin SMT-LIB);real_is_int(equivalent tois_intin SMT-LIB);abs_int(equivalent toabsin SMT-LIB);int_floor(equialent tofloor_to_intin SMT-LIB)Note: These have been selected because they map directly to SMT-LIB types and primitives. There are additional floating-point (and real) primitives that do not exist at the SMT-LIB level, such as the
roundfunction. It is not clear at this point whether they should be added in Dolmen itself or in a separate plugin.