Francisco Bueno Carrillo wrote:
The only thing that I'm still confused about is all of the different options for analysis / specialisation but I've found a few references to papers that I can check.
Amoss, maybe the current manual page on the subject is of some help: most options are now briefly documented. Please, find it enclosed.
Paco
I've found that section of the manual, some of the descriptions are helpful but there are some missing. For instance, the unfolding rules for local control don't have any descriptions or even full names to google for papers describing them. I've moved on to trying to specialise our target program now which is an interpreter and although ciaopp seems to unfold some of the predicates as I would expect it leaves others as residuals. Any arithmetic expression, or control flow dependant on arthimetic comparisons seems to stay in the residual. For example:
:- entry mem(X,[1,2,3]) : (ground(X)). mem(X,[X|_]). mem(X,[_|Y]) :- member(X,Y).
This code specialises to what I would expect, namely three clauses, one for each success case. If I try a similar code that uses some basic arithmetic then I don't get the same results :
:- entry loop(1,10). loop(X,L) :- X>=L. loop(X,L) :- X<L, write(dude), X2 is X+1, loop(X2,L).
This code specialises to:
:- entry loop(1,10). loop(1,10) :- user:write(dude), A is 1+1, user:loop(A,10).
This isn't actually correct as it will write 'dude' once and then fail, where-as the original will write 'dude' nine times and then succeed. But also, I would expect the loop to be unfolded to yield something (close to):
loop(1,10) :- write(dude), write(dude), write(dude), write(dude), write(dude), write(dude), write(dude), write(dude), write(dude).
How can I get ciaopp to unfold arithmetic expressions like this? Is it a different set of menu options to the one that I am using to select a different type of analysis, or is it a different local-control rule?
Amoss ============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciaopp-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciaopp-users-request(a)clip.dia.fi.upm.es Unsubscribe from list <whatever> ciaopp-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciaopp-users/ -----------------------------------------------------------------------------