-
Notifications
You must be signed in to change notification settings - Fork 11
Improvements to IOSim compatibility #12
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
Conversation
@abailly Have a look at this - I think it's pretty cool how this works out! |
And yes, this is a major breaking change and we need to discuss how to best handle that. I also haven't finished everthing, but I think it's good getting a bit of a spotlight on this. |
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.
Could you elaborate on the reason behind those changes? I am a bit confused because we already use the StateModel
in hydra along with IOSim
and it works fine. Perhaps we are doing things in a naive way?
Have a look at the changes to the registry example. To be able to write properties where the state isn't indexed by s (which you need to be able to work properly with DL properties) you need the state type not to mention the s parameter. |
568b51e
to
7b4250d
Compare
and implement improved compatibility layer for IOSim in StateModel.
7b4250d
to
31eca33
Compare
@abailly-iohk do you know why the build isn't working? |
It seems zlib-dev is missing but I don't understand why it fails now and wasn't before, you did not change anything in the dependencies. Adding |
I think I'm pretty happy with the code now. I'll just bump the version and we can merge this. |
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.
I am still not entirely convinced we need the Realized
typeclass to be part of the library: The Model
should be completely independent of whatever Monad
instance the RunModel
is expressed in, and it should the latter's role to provide a translation layer which is specific to this execution engine. But I feel you know better so I will defer to your expertise.
Could you please update the CHANGELOG.md with some high-level statement about this change and also format the code with fourmolu
for consistency's sake?
quickcheck-dynamic-iosim/test/Spec/DynamicLogic/RegistryModel.hs
Outdated
Show resolved
Hide resolved
@abailly-iohk I understand the concern about the
|
Also the model is now completely independent of the monad that What we could add back is a model postcondition. But since this would have to talk about the ideal return type of an action it's not clear what this would mean. It's certainly not clear that you can always obtain a value of the ideal return type (e.g. in a symbolic or |
Interestingly, we now have a failing test: https://github.com/input-output-hk/quickcheck-dynamic/runs/8183759215?check_suite_focus=true#step:7:36 🎉 🤔 |
Yes! That's on purpose ;) We could disable that test for now and I'll submit a new PR that turns it on. A fix to this failing test will hopefully be merged in |
Understood. But then we can expect the failure so that it now passes and when iosim gets updated, it will fail again? |
When |
Waiting for it to turn green and then I'll merge and get started on the |
This PR significantly simplifies the IOSim compatibility module by re-organizing
StateModel
to differentiate between the "model type" and the "perform type". One big plus of this is that we've won the ability to have models with different backends where the types might even by symbolic! (One can always hope!)