-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add static module for top-level Control Spec context #801
Conversation
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.
Currently, neither ControlSpecC
nor the already existing control_context
seem to be used, or am I missing something?
This should be used by #220 (or the ARINC analyses, but I'll open a PR to drop them tomorrow). |
That's correct. I initially tried to use this for #796 in order to track constraint variables where a witness hint was already used, but that didn't work as well as I had hoped (not the fault of this PR). I also thought whether I could reimplement So there's no immediate need for this unless we plan to refactor #220 to use this. |
Since unassuming once turned out to be a futile idea according to GobCon discussions, this will not be used by #796. However, since #812 removes |
This adds the static
Analyses.ControlSpecC
module, which corresponds to the context of the entire top-levelSpec
. This allows individual analyses to actually usectx.control_context
, get a result of meaningful type and use them (opaquely) inside its own domains and global constraint variables.Previously this was problematic in multiple ways:
analyzer/src/analyses/arinc.ml
Lines 253 to 255 in 1dcd967
This in itself is prone to two problems:
Spec
functor instead, which wraps the entire combined analysis and can thus directly access itsC
module. The GraphML witness generation takes this route.Implementing such an analysis as a functor is inconvenient and composes poorly with other analyses.