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

Solving Einstein's Problem with Prolog causes a stack overflow in Dart 2.6 and later #95

Open
RaimundWege opened this issue Feb 15, 2021 · 2 comments
Labels

Comments

@RaimundWege
Copy link

How to solve the Einstein Problem with Prolog and Dart 2.6 or later? Should I use a file based approach for calculation e.g. SQLite?

@renggli
Copy link
Member

renggli commented Feb 15, 2021

I think the problem is the recursive use of asynchronous generators. While this yields elegant code, for some reason it also hits some rather strange limitations in the Dart VM. Not sure why it worked in earlier Dart versions? I never reported to the Dart authors, because I couldn't come up with a simple reproducible example. The problem would likely go away when rewriting the unification algorithm in a more manual way. I kept the Einstein example, because I hoped at some point the stack overflow would go away again. I didn't pursue either of the options, because the current code works well for smaller examples and the example is not meant to be a production ready Prolog implementation (that would likely require a lot more work).

@domesticmouse
Copy link

Please raise this on dart-lang/sdk and cc me on the bug and I'll hassle the PM about it. This feels like a bug worth chasing

@renggli renggli added the bug label Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants