Re: [eclipse-clp-users] saving the resolution list of a call

From: Christian Wirth <tyrion_at_...215...>
Date: Tue, 18 May 2010 17:16:42 +0200
I'm getting close now, but i have still some problems left:

The new system replaces all predicate heads and calls with an extended 
version for the resolution list.
It looks like this:

headPred(aArg,....,[Var|[headPred|Rest]]) and aCall(args,...,Rest)

what i expect it to do (an example, called with aPred(Var)):

aPred([Var|[a|Rest]]) :- bPred(Rest),cPred(Rest).
bPred([Var|[b|_]]).
cPred([Var|[c|_]]).

i assumed now Var->[Var,b,_]->[Var,c,b,_]->[Var,a,Var,c,b,_], but 
matching cPred fails. I assume that's because the tail is matched to _ 
only and not to b,_, but why ? Seems like a legit matching to me.

To wrap things up, i need to get a list of the called perdicates, and it 
must work without knowledge of the clause itself. It's very complicated 
to do something like

aPred(In,[aPred|Out]) :- bPred(In,Tmp), cPred(Tmp,Out), because it would 
requiere analysis of the clause internals .. but currently i see no way 
around.

cheers Christian
Received on Tue May 18 2010 - 15:15:58 CEST

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST