-
Notifications
You must be signed in to change notification settings - Fork 10
Improved support for IntMod type in symbolic backends #93
Conversation
There is still a bit more work to do here, related to the To get this in a better state, we first need to add a |
Also reimplement `IntMod` type in simulator backends to use it.
Also convert primitive implementations to use it.
Quantified variables of type `IntMod n` should work again in the what4/sbv backends.
…nds. When we generate an uninterpreted function in a symbolic backend that takes an argument of type `IntMod n`, we normalize the symbolic integer argument by reducing mod n. This ensures that the resulting expression will respect the underlying equivalence relation for the `IntMod n` type.
Also add `getLabelValues` function from saw-script to saw-core-what4.
I think this is ready to merge now. There are some additional refactorings that could be done to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK to me.
The What4 prover interface now uses `getLabelValues` from the saw-core-what4 package.
It had been broken since #93 introduced a separate value constructor for the `IntMod` type. (GaloisInc/saw-script#936)
This fixes some of the problems mentioned as part of GaloisInc/saw-script#745, specifically the ones involving uninterpreted functions over the integers-mod-n type: GaloisInc/saw-script#745 (comment)