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

Determinacy detection #83

Closed
giovinazzo-kevin opened this issue Dec 6, 2023 · 1 comment
Closed

Determinacy detection #83

giovinazzo-kevin opened this issue Dec 6, 2023 · 1 comment

Comments

@giovinazzo-kevin
Copy link
Owner

giovinazzo-kevin commented Dec 6, 2023

Determining whether a predicate is determinate is important for a variety of optimizations.

First of all, it makes TCO more sound in the context of #56.
Second of all, it can be used in the context of solution generators which are a recent addition for representing large amounts of solutions without allocating a ton of memory.

A simple example of a solution generator is for/4: if the continuation is determinate, then the loop can be unrolled into a solution generator that yields its solutions when they are actually accessed and not one moment before. If the continuation were not determinate this optimization would not work.

@giovinazzo-kevin
Copy link
Owner Author

Closed by #84. Not all predicates have been marked as det yet, but it can be done gradually because the worst thing that can happen is that some optimizations are not applied.

See VMFlags.IsContinuationDet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant