You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been exploring the v4-lib interpreter and parser internals over the last few days to understand how execution is currently structured. I started from the main v4 repository, then moved into v4-lib to trace how processes and routines are actually executed.
While reading through the parser and interpreter code, this is what I currently understand:
Process and routine are both block level constructs in the syntax tree
Execution is driven by the parser using a frame stack
Control flow overrides like skip, goup, repeat and rollback operate locally
Routines are traversed structurally like other blocks
There is no explicit call and return abstraction
I also noticed in execution scope documentation that it mentions recursive control jumping between process and routines and passing contexts along. That made me curious because in the current implementation I do not see a clear call stack mechanism that models routine invocation in a traditional sense.
Right now it feels like traversal based execution rather than call based execution.
So I wanted to understand the intended direction.
Is the long term goal for routines to behave like callable entities
Should recursive routine invocation be supported
Should control be allowed to jump between process roots
Is the current parser frame stack expected to evolve into a proper call stack
I am asking this before attempting any implementation because I do not want to introduce changes that go against the planned architecture of v4.
If recursive control jump is part of the intended roadmap, I would be happy to draft a minimal extension proposal that keeps the current traversal model intact while introducing a lightweight call frame abstraction.
I am still exploring the execution model so please correct me if my understanding above is incomplete.
Would love to hear thoughts on the intended control flow direction for v4.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone
I have been exploring the v4-lib interpreter and parser internals over the last few days to understand how execution is currently structured. I started from the main v4 repository, then moved into v4-lib to trace how processes and routines are actually executed.
While reading through the parser and interpreter code, this is what I currently understand:
Process and routine are both block level constructs in the syntax tree
Execution is driven by the parser using a frame stack
Control flow overrides like skip, goup, repeat and rollback operate locally
Routines are traversed structurally like other blocks
There is no explicit call and return abstraction
I also noticed in execution scope documentation that it mentions recursive control jumping between process and routines and passing contexts along. That made me curious because in the current implementation I do not see a clear call stack mechanism that models routine invocation in a traditional sense.
Right now it feels like traversal based execution rather than call based execution.
So I wanted to understand the intended direction.
Is the long term goal for routines to behave like callable entities
Should recursive routine invocation be supported
Should control be allowed to jump between process roots
Is the current parser frame stack expected to evolve into a proper call stack
I am asking this before attempting any implementation because I do not want to introduce changes that go against the planned architecture of v4.
If recursive control jump is part of the intended roadmap, I would be happy to draft a minimal extension proposal that keeps the current traversal model intact while introducing a lightweight call frame abstraction.
I am still exploring the execution model so please correct me if my understanding above is incomplete.
Would love to hear thoughts on the intended control flow direction for v4.
Thanks
All reactions