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

Replace pc/stack with dynamic Script #7

Open
ELLIOTTCABLE opened this issue Jun 19, 2013 · 0 comments
Open

Replace pc/stack with dynamic Script #7

ELLIOTTCABLE opened this issue Jun 19, 2013 · 0 comments

Comments

@ELLIOTTCABLE
Copy link
Member

At the moment, we've got a Script that acts as a static representation of combinations: an Execution maintains a pointer into that, of some sort. The Script doesn't change, and as the Execution dives into the combinations, it maintains a ->stack attribute of combinations-in-progress.

The alternative: copy the Script for each clone of the Execution, store it as a part of the data-type, then as the Execution is realized, we gradually replace nodes with the results of their respective combination:

L'foo' L'bar' L'baz'
O<foo> L'bar' L'baz'
O<bar> L'baz'
O<baz>

This precludes the necessity of a stack entirely. However, implementationally, it'd require a lot more copying.

(Also, this is kinda implementation-details-y. But, at the moment, the spec is an ugly hybrid of implementation-details and operational-semantics. So, an easier-way-to-understand-it description is the purpose of this issue.)

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

No branches or pull requests

1 participant