Using aleph with SWI-prolog: source_sink `library(aleph)' does not exist

寵の児 提交于 2019-12-02 08:16:50

You should use the installer:

?- 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 <fabrizio.riguzzi@unife.it>
Activate pack "aleph" Y/n? 
true.

?- use_module(library(aleph)).
true.

Here is the example I tried, and I didn't get the inductive theory.

% Aleph initialization
    :- aleph.

% Mode declarations
% mode(RecallNumber,PredicateMode).
% - output
:- modeh(*,grandparent(+person,+person)).
:- modeb(*,father(-person,-person)).

:-begin_bg.
person(john).
person(johnJunior).
person(johnJuniorJunior).
person(jack).
person(jackJunior).
person(jackJuniorJunior).
father(johnJunior, john).
father(johnJuniorJunior, johnJunior).
father(jackJunior, jack).
father(jackJuniorJunior, jackJunior).

:-determination(grandparent/2,father/2).

:-end_bg.

:-begin_in_pos.
grandparent(john, johnJuniorJunior).
grandparent(jack, jackJuniorJunior).
:-end_in_pos.

:-begin_in_neg.
grandparent(jack, john).
:-end_in_neg.

:-aleph_read_all.

Here is my output:

[theory]

[Rule 1] [Pos cover = 1 Neg cover = 0]
grandparent(john,johnJuniorJunior).

[Rule 2] [Pos cover = 1 Neg cover = 0]
grandparent(jack,jackJuniorJunior).

[time taken] [0.015625]
[total clauses constructed] [2]
true.

I guess aleph systeme didn't work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!