1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 % Author
: Bart Demoen
, Tom Schrijvers
3 % Email
: Bart
.Demoen
@cs.kuleuven
.ac
.be
, Tom
.Schrijvers
@cs.kuleuven
.ac
.be
4 % Copyright
: K
.U
.Leuven
2004
5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9 find_with_var_identity
/4,
14 :- use_module
(library
(lists
)).
15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16 find_with_var_identity
(Template
, IdVars
, Goal
, Answers
) :-
18 findall
(Key
- Template
, Goal
, As
),
19 smash
(As
,Key
,Answers
).
22 smash
([Key
-T
|R
],Key
,[T
|NR
]) :- smash
(R
,Key
,NR
).
24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26 \
+ (member
(X
,L
), \
+ call
(G
)).
28 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%