我厌倦了用 Aleph 来获得一个理论,但我只有一个头和一个身体,实际上我想要更多的身体。
我的输入文件是:
:- use_module(library(aleph)).
:- if(current_predicate(use_rendering/1)).
:- use_rendering(prolog).
:- endif.
:- aleph.
:- modeh(*,attr2col(+attribute)).
:- modeb(*,type(+attribute,-class)).
:- modeb(*,attrs(+class,+attribute)).
:-determination(attr2col/1, type/2).
:-determination(attr2col/1, attrs/2).
:-begin_bg.
class(clerk).
class(manager).
attribute(boss).
attribute(notype).
attribute(noattrs).
attrs(manager,boss).
attrs(manager,notype).
type(notype,manager).
type(boss,manager).
:-end_bg.
:-begin_in_pos.
attr2col(boss).
attr2col(notype).
:-end_in_pos.
:-begin_in_neg.
attr2col(clerk).
attr2col(manager).
:-end_in_neg.
:-aleph_read_all.
我的输出是:
attr2col(A) :-
type(A,B).
我想要的是:
attr2col(A) :- attribute(A), attrs(B,A), type(A,C).
现在只有一具尸体,但我想要三具。并且有'attribute(A)'作为一个主体,如何只用一个变量添加这样的东西?