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

Properly tail recursive functions in VeLa #364

Open
dbenn opened this issue Jul 15, 2023 · 0 comments
Open

Properly tail recursive functions in VeLa #364

dbenn opened this issue Jul 15, 2023 · 0 comments
Assignees
Labels
VeLa VStar expression Language

Comments

@dbenn
Copy link
Collaborator

dbenn commented Jul 15, 2023

Detecting and handling properly tail recursive functions, e.g. to allow loops.

Detection

  • final AST in function is a recursive call, or
  • final SELECT AST consequent is a recursive call

Detecting tail recursion is easy enough and not pushing VeLa scopes is also easy, but eliminating recursive calls to eval() is harder. Possibilities:

  • compiling VeLa would do it;
  • continuation passing vs direct style combined with iteration;
  • loop that invokes Java code that handled this: do...while(tailCall && !finished); still doesn't help with recursive eval() calls.
@dbenn dbenn added the VeLa VStar expression Language label Jul 15, 2023
@dbenn dbenn self-assigned this Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
VeLa VStar expression Language
Projects
Development

No branches or pull requests

1 participant