Parameterize Thread on Symbolic Memory and Choice Monad on Thread #367
Parameterize Thread on Symbolic Memory and Choice Monad on Thread #367redianthus merged 8 commits intoOCamlPro:mainfrom
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
Threadmodule on the symbolic memory and theChoice_monadmodule on aThread, with @krtab doing the heavy lifting.Summary
This is needed for #357 because we're going to have to use the
Symbolic_choicewithin theSymbolic_memory. The current implementation ofSymbolic_choicewould not allow us to do so since the originalThreadmodule was defined using the symbolic memory itself, causing a circular dependency. Therefore, we parameterizedThreadand subsequentlySymbolic_choice, resulting in the following modules:Thread_with_memory: This is equivalent to the previous implementation ofThreadin 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_choiceand is the module used to build the symbolic interpreter insymbolic.ml.Symbolic_choice_without_memory: A choice module built withThread_without_memoryto be used within thesymbolic_memorymodule in [WIP] Make symbolic memory parametric #357.Notes
The .mlis probably need more work. I purposefully removed
symbolic_choice.mlito 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 😄