Ответ 1
$ cat junk.pl
test(ok).
$ prolog
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 5.8.0)
Copyright (c) 1990-2009 University of Amsterdam.
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
?- [junk].
% junk compiled 0.00 sec, 24 bytes
true.
Кажется, все отлично работает для меня. Конечно, я использую атом для имени файла, а не переменной. (KB5 - это имя переменной, а не атом.) Сначала попробуйте ['KB5']
и посмотрите, поможет ли это. Затем попробуйте [kb5]
и посмотрите, поможет ли это. Наконец, попробуйте абсолютный минимальный пример, такой как тот, который я предоставил, и посмотрим, можете ли вы загрузить этот путь.
Отредактировано для добавления:
$ cp junk.pl JUNK.pl
$ prolog
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 5.8.0)
Copyright (c) 1990-2009 University of Amsterdam.
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
?- [JUNK].
ERROR: load_files/2: Arguments are not sufficiently instantiated
?- ['JUNK'].
% JUNK compiled 0.00 sec, 1,656 bytes
true.
Похоже, проблема с атомом. Используйте ['KB5']
, и ваша ошибка, вероятно, исчезнет.