-
Notifications
You must be signed in to change notification settings - Fork 32
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
Possible issue regarding :-
.
#229
Comments
Thank you very much for reporting this! I think this is because of a bug in the parser. This implementation does special treatment to But none of them distinguish between I'm working hard on the parser/lexer/writer right now and the next release, hopefully this weekend, will fix the most of syntax related bugs. |
@enoperm Could you try the latest release |
Defining a predicate In SWI this kind of works, but note that it can be abused for code injection. Just try |
Seems to work, now.
GNU prolog simply yields EDIT: I just realized I forgot to prepend |
Though I might add, I only included a definition for |
Maybe I was a bit too terse concerning SWI, so this I meant:
|
I have been playing around with prolog recently, and I got a meta-interpreter running (mostly by going along with https://www.metalevel.at/acomip) that provides a reasoning as to how a goal was fulfilled, as well as allow for using a list provided as a parameter in place of the global database.
This works fine in SWI Prolog:
In a
1pl
repl, however, I get an error.Which is odd, because I do not see
:-/1
anywhere in the code, at most I'd expect to see an error about:-/2
.I have tried defining
:-/1
as a dynamic predicate in the source file where the meta-interpreter lies, as below:This line was accepted by both implementations, and the behaviour of SWIPL did not change.
With that addition, I do not receive an error message from
1pl
anymore, but it still did not behave as I expected.Curiously, if I replace my use of
:-(Head, Body)
with a custom predicate, such asrule(Head, Body)
, it behaves the same in both implementations:I'm not quite sure what is going wrong, but I suspect
:-
may be receiving special treatment somewhere in Ichiban Prolog?The text was updated successfully, but these errors were encountered: