-
Notifications
You must be signed in to change notification settings - Fork 19
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
Parameterize Thread on Symbolic Memory and Choice Monad on Thread #367
Conversation
4054a37
to
e685531
Compare
OK, I read the code a first time and left minor comments. I'll probably have to re-read it in a few days and spend more time on it if you want a proper review. Otherwise, I'm fine with merging as is. Did you get @chambart's feedback on the change? (We never know if there's a magic way to make this simpler...) |
Yeah this is not urgent so feel free to take your time :)
Arthur and I briefly discussed this with Pierre, but we haven't heard his take on it just yet. |
ca26078
to
987e5dc
Compare
840270a
to
2d4780b
Compare
@filipeom, could you add the missing |
Creates `symbolic_choice_intf.ml` to define the symbolic choice monad's interface and `eval` type definition for easier reuse.
2d4780b
to
8a20a39
Compare
Reintroduced |
Thanks! |
This PR parameterizes the
Thread
module on the symbolic memory and theChoice_monad
module on aThread
, with @krtab doing the heavy lifting.Summary
This is needed for #357 because we're going to have to use the
Symbolic_choice
within theSymbolic_memory
. The current implementation ofSymbolic_choice
would not allow us to do so since the originalThread
module was defined using the symbolic memory itself, causing a circular dependency. Therefore, we parameterizedThread
and subsequentlySymbolic_choice
, resulting in the following modules:Thread_with_memory
: This is equivalent to the previous implementation ofThread
in that it contains a reference to the symbolic memory. This module is used to constructSymbolic_choice_with_memory
.Thread_without_memory
: A thread without references to the symbolic memory.Symbolic_choice_with_memory
: This is equivalent to the previous implementation ofSymbolic_choice
and is the module used to build the symbolic interpreter insymbolic.ml
.Symbolic_choice_without_memory
: A choice module built withThread_without_memory
to be used within thesymbolic_memory
module in [WIP] Make symbolic memory parametric #357.Notes
The .mlis probably need more work. I purposefully removed
symbolic_choice.mli
to appease the type checker, but we should probably add it again to avoid having dead code withinsymbolic_choice.ml
. Nevertheless, I think this is ready-ish for review 😄