我正在尝试使用 SWI-Prolog 导入 Aleph。当我运行我的程序时,出现以下错误。我需要做什么才能导入library(aleph)
?顺便说一下,我已经为我的程序下载了aleph.pl
。
这是我的测试程序,我知道aleph库一定有问题。
:- use_module(library(aleph)).
:- aleph.
我收到错误:
ERROR: c:/users/mac/desktop/swi-prolog/aleph draft/1.pl:1:
source_sink `library(aleph)' does not exist
Warning: c:/users/mac/desktop/swi-prolog/aleph draft/1.pl:1:
Goal (directive) failed: user:use_module(library(aleph))
ERROR: c:/users/mac/desktop/swi-prolog/aleph draft/1.pl:2:
catch/3: Undefined procedure: aleph/0
Warning: c:/users/mac/desktop/swi-prolog/aleph draft/1.pl:2:
Goal (directive) failed: user:aleph
Welcome to SWI-Prolog (threaded, 32 bits, version 7.6.4)
最佳答案
您应该使用安装程序:
?- pack_install(aleph).
% Contacting server at http://www.swi-prolog.org/pack/query ... ok
Install aleph@5 from GIT at https://github.com/friguzzi/aleph.git Y/n?
% Cloning into '/home/carlo/lib/swipl/pack/aleph'...
% Contacting server at http://www.swi-prolog.org/pack/query ... ok
% "aleph.git" was downloaded 6 times
Package: aleph
Title: Aleph Inductive Logic Prorgramming system
Installed version: 5
Author: Fabrizio Riguzzi <<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3157505343584b585e1f435856444b4b5871445f5857541f5845" rel="noreferrer noopener nofollow">[email protected]</a>>
Activate pack "aleph" Y/n?
true.
?- use_module(library(aleph)).
true.
关于prolog - 将 aleph 与 SWI-prolog : source_sink `library(aleph)' does not exist 一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50900052/