-
Notifications
You must be signed in to change notification settings - Fork 139
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
Delay arithmetic syntax error #2458
base: master
Are you sure you want to change the base?
Conversation
30a2978
to
a2ddc6c
Compare
WAM compiler refuses to compile erroneous arithmetic expression, this causes a premature exception, and failing to add current predicate to the knwoledge base. For example: f :- false, _ is [_|_]. Which has invalid syntax, but has to be executed without exception.
Code is extremely bad, but at least it looks correct.
6de57a2
to
e92db0c
Compare
I'm not sure what a satisfactory solution for #2454 should look like but I am hesitant to detect it from |
Thanks a lot for suggestion. I also initially wanted to modify compiler code, but it explicitly produces an error if string is found that's why I made a conclusion that it is designed to throw an exception at compile time, and maybe it is even a good idea to show to the user that compilation wasn't successful... So I changed my general idea to do this rewrite (example): I don't have much time this weekend, I'll take a fresh look into the code next week probably and will see what it takes generate code that will issue an error. |
You may want to look at diag.pl and the
Then |
PR for fixing #2454 issue.
Please review unit test that I've added, does it correctly describe the problem at hand? And does it make sense to add such a long running test?