Skip to content
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

Is it possible to integrate with dejafu? #53

Open
fishtreesugar opened this issue Nov 24, 2022 · 2 comments
Open

Is it possible to integrate with dejafu? #53

fishtreesugar opened this issue Nov 24, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@fishtreesugar
Copy link
Contributor

Is your feature request related to a problem? Please describe.
dejafu provided great facilities to test concurrent programs, tho dejafu using concurrency to provide IO classes which very similar to io-classes I believe. so Is it possible integrate with dejafu?

Describe the solution you'd like
fork dejafu, a new package called io-sim-dejafu which build on top of io-classes

Describe alternatives you've considered
is it possible to merge io-classes and concurrency?

Additional context
@barrucadu WDYT?

Are you willing to implement it?
Nah, just an idea 🤣

@fishtreesugar fishtreesugar added the enhancement New feature or request label Nov 24, 2022
@fishtreesugar fishtreesugar changed the title Is it possible integrate with dejafu? Is it possible to integrate with dejafu? Nov 24, 2022
@coot
Copy link
Collaborator

coot commented Nov 24, 2022

If I understand you correctly you're proposing to have the same interface (io-classes with some possible changes) for both io-sim and dejafu. That would be definitely something good to see.

@dcoutts
Copy link
Contributor

dcoutts commented Nov 25, 2022

I did consider using dejafu rather than writing io-sim in the first place. In particular, the bounded partial order reduction stuff is really cool.

However dejafu does not handle time, and for our applications time is critical. Because dejafu focuses on finding concurrency bugs and playing with the schedules, it is hard for it to have a notion of time. So for example it implements threadDelay as yield: it allows it to be rescheduled whenever. But that's no good for running simulations (as opposed to concurrency bug testing). For simulations we really need control over time: to simulate how long certain things take to run. This is what lets us do performance simulations.

Also, at the time I was initially considering dejafu, the type classes that provided the IO interfaces were all like the real IO libs but always slightly different. It looks like the situation has improved (looking at the latest concurrency lib), the differences appear to be fewer. But I felt that for using something like this in a real application that it was really important for programmers to be given the normal API: the same names with the same behaviour. So we've strived to make the io-classes match as close as possible. Indeed, in the lead up to the hackage release we're reviewing it and trying to eliminate remaining differences.

We do have an implementation of partial order reduction in io-sim, though I suspect it's not as elegant as the dejafu one. I suspect that it remains an open question how to do (B)POR well when a simulation also includes time. It's certainly not obvious to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: No status
Development

No branches or pull requests

3 participants