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

Use DeepRecursiveFunction to prevent StackOverflowError #17

Closed
1 of 2 tasks
lars-reimann opened this issue Jan 18, 2022 · 1 comment
Closed
1 of 2 tasks

Use DeepRecursiveFunction to prevent StackOverflowError #17

lars-reimann opened this issue Jan 18, 2022 · 1 comment
Labels
bug 🪲 Something isn't working dsl 🗒️ Issues regarding the domain specific programming language wontfix This will not be worked on

Comments

@lars-reimann
Copy link
Member

lars-reimann commented Jan 18, 2022

Some computations like

  • ToConstantExpression
  • CodeGenerator (can also pass a string builder as aggregator)

are best described recursively. However, this can lead to a StackOverflowError, particularly for deeply nested expressions. Use tail recursion or DeepRecursiveFunction to prevent this.

@lars-reimann lars-reimann added the bug 🪲 Something isn't working label Jan 18, 2022
@lars-reimann lars-reimann self-assigned this Jan 31, 2022
@lars-reimann lars-reimann transferred this issue from another repository Jun 7, 2022
@lars-reimann lars-reimann removed their assignment Nov 9, 2022
@lars-reimann lars-reimann added the dsl 🗒️ Issues regarding the domain specific programming language label Feb 7, 2023
@lars-reimann lars-reimann added the wontfix This will not be worked on label Apr 6, 2023
@lars-reimann
Copy link
Member Author

This solution has a considerable runtime overhead for little benefit. Moreover, if we port to Langium (#433), DeepRecursiveFunction is not available anyway.

@lars-reimann lars-reimann closed this as not planned Won't fix, can't repro, duplicate, stale Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working dsl 🗒️ Issues regarding the domain specific programming language wontfix This will not be worked on
Projects
Archived in project
Development

No branches or pull requests

1 participant