-
Notifications
You must be signed in to change notification settings - Fork 33
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
The formulae top
and bot
are constant
#868
Conversation
This is somewhat conflicting with the direction I thought were trying to take with #798. Can you explain why it is important that these environments are constants? I would also advise against writing functional queues for the |
I think the main change here is to make clear that |
I have given a longer thought about this, and I really don't like the introduction of let top = top ()
let bot = bot () directly in |
You should be able to do `module Combine : sig include Sig.X val top : r val bot : r end` shadowing the `unit -> r` versions of `top` and `bot` I think.
|
The `top` and `bottom` are constant but we use closures to define them because of limitation of the recursive module. This commit refactors the way we define them. Now, `top` and `bot` are constants exposed by the module `Shostak.Combine`.
I removed my comment because I found this solution... :D |
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.
Ah, I was not sure if this was a GitHub bug that it didn't appear in the UI hence why I replied by email :) All good then!
top
and bot
are constant
This PR makes clear that the environments of both CC(X) and UF(X) are constant. The previous signature of the constructors for these environments was
unit -> t
and nott
only because they use thetop
andbot
semantic values. As the module Combine inShostak
cannot contain constants because of limitations with recursive module in OCaml, we have put these constants in a trivial closure.I create a new module X which is an alias of
Shostak.Combine
and contains the constantstop
andbot
.Note: I don't remove all the aliases
module X = Shostak.Combine
in many modules of AE. We can do it gradually and modifying all the files will be painful while rebasing our current PRs.Note: I cannot turn the environment of Theory into a constant because this environment uses mutable states to enqueue facts. I plan to fix that in another PR (probably by writing a module for functional queues but I have to check how the current environment behaves while backtracking).