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

Laws #2

Open
armanbilge opened this issue Apr 29, 2021 · 0 comments
Open

Laws #2

armanbilge opened this issue Apr 29, 2021 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@armanbilge
Copy link
Owner

armanbilge commented Apr 29, 2021

Thoughts:

  • The laws for Random are probably best tested with something like TestU01?
  • Probably should introduce a type e.g. GenSpawnRandom that extends both Spawn and Random and has laws asserting the statistical independence of the spawned fibers. In fact, this should probably extend down the entire Spawn hiearchy, and when users want both Random and Spawn/Concurrent/Temporal/etc. they should really ask for e.g. ConcurrentRandom assuming they want this guarantee of statistical independence (i.e., almost always).
  • There is some trickiness for MonadError through MonadCancel due to loss of state in error/cancellation channels. A naïve StateT-based implementation of Random would have independence issues here. But I think the only way to observe this issue would be via some side-effect that can only be implemented with Concurrent or Sync. So maybe also a SyncRandom type is needed, with corresponding laws to enforce statistical independence in these cases as well *grumble*.
  • Finally, what to do about the distribution families. I wonder if their laws can be defined in terms of the laws for Random i.e. it should be possible to define Random in terms of any distribution by transforming via the CDF.
@armanbilge armanbilge added the enhancement New feature or request label Apr 29, 2021
@armanbilge armanbilge changed the title Laws for DistT? Laws for RandomT? May 1, 2021
@armanbilge armanbilge pinned this issue May 1, 2021
@armanbilge armanbilge added the help wanted Extra attention is needed label May 20, 2021
@armanbilge armanbilge changed the title Laws for RandomT? Laws for RVT? Oct 13, 2021
@armanbilge armanbilge changed the title Laws for RVT? Laws Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant