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

Decouple the evaluation cache from the Nickel interpreter #1649

Open
Tracked by #1589
yannham opened this issue Sep 29, 2023 · 0 comments
Open
Tracked by #1589

Decouple the evaluation cache from the Nickel interpreter #1649

yannham opened this issue Sep 29, 2023 · 0 comments

Comments

@yannham
Copy link
Member

yannham commented Sep 29, 2023

As part of the incremental evaluation effort #1589, the first step is to try to decouple as much as possible the interpreter from the specific notion of thunk. Thunks are an implementation device of the call-by-need evaluation strategy (often called lazy evaluation). Call-by-need is, itself, one specific strategy for caching call-by-name evaluation (we choose to cache every 0-ary let-bound expression, and only them).

The whole idea behind our cached call-by-name is to make the interpreter agnostic to the caching and evaluation strategy. We should refactor the current interpreter such that the current notion of thunks is replaced by an abstract cache index type (to be understand as a kind of pointer, but for which we need to go through the cache), and try to remove all explicit references to thunks. This effort has already been started, but isn't finished yet, see #1220.

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