Unable to create Fact in Jekejeke Prolog

I am using a seven-language tutorial in a seven-week prologue and trying to run some examples using the Android Jekejeke Runtime . For example, if I add

likes(wallace, grommit).

from the textbook, I get.

Error: Undefined, private or package local predicate likes/2

I tried using assert as described in How to create a fact in SWI-Prolog? but then he says that assertthere are undefined, instead pretty ones.

Presumably, I missed something in common about how the runtime works, or its dialect .log prolog .it.

+4
source share
2 answers

assert/1 , . Jekejeke Prolog. asserta/1 assertz/1. . , .

+3

. , , .

, , , undefined.

:

1) assertz/1 asserta/1:
. , . asserta/1 assertz/1:

:

?- assertz(likes(foo, bar)).

, , , , 2) 3), . dynamic/1.

assert/1 , ISO assertz/1.

2) :
. /1 .

baz.p:

likes(foo, bar).

:

?- consult('baz.p').

/1 security_loaded/1 use_module/1.

3) :
. .

:

?- [user].
likes(foo, bar).
^D

Bye

+1

All Articles