I am afraid the problem is not in the arithmetic predicates but rather on the predicate write/1. Since it has side effects, it cannot be executed at specialization time. Then the only solution is to perform non-leftmost unfolding. For this you have to select
Select Computation Rule: [leftmost, local_builtin, local_emb, jump_builtin] (leftmost) ? jump_builtin
all the other flags you can leave with the default value.
This is perfect, the interpreter now unfolds exactly as we unexpected and we end up with a residual that is isomorphic to our target language. Now I need to control what is left in the residual, currently I just have some dummy predicates for the PIC instructions like:
movf(F) :- write(movf),nl,write(F),nl.
These are are unfolded in the body of the interpreter, in logen we marked these as rescall so that the calls would stay in the residual program. How do I apply a similar assertion / property in ciaopp?
In the residual program that is generated there is a lot of dead code that is not reachable from the entry points. Is there an option to remove this code automatically or should I perform slicing on the generated code afterwards?
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/ -----------------------------------------------------------------------------