*** empty log message ***
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2087 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
1ac399f57b
commit
5b2cc724f3
@ -280,7 +280,8 @@ choose_clauses(C,[],C).
|
||||
|
||||
choose_clauses(CIn,[D|T],COut):-
|
||||
member((N,R,S),D),
|
||||
choose_a_head(N,R,S,CIn,C1),!,
|
||||
already_present_with_a_different_head(N,R,S,CIn),!,
|
||||
choose_a_head(N,R,S,CIn,C1),
|
||||
choose_clauses(C1,T,COut).
|
||||
|
||||
|
||||
@ -352,6 +353,13 @@ new_head(N,R,S,N1):-
|
||||
nth0(N, Numbers, _Elem, Rest),
|
||||
member(N1,Rest).
|
||||
|
||||
already_present_with_a_different_head(N,R,S,[(NH,R,SH)|_T]):-
|
||||
\+ \+ S=SH,NH \= N.
|
||||
|
||||
already_present_with_a_different_head(N,R,S,[_H|T]):-
|
||||
already_present_with_a_different_head(N,R,S,T).
|
||||
|
||||
|
||||
/* checks that a rule R with head N and selection S is already
|
||||
present in C (or a generalization of it is in C) */
|
||||
already_present(N,R,S,[(N,R,SH)|_T]):-
|
||||
|
Reference in New Issue
Block a user