The easiest thing is that you move the definition of this predicates
to a separate module, say dummy_defs.pl and write in your main module
:- use_module(dummy_defs).

  
Ah, I had a hunch that would do it. This is fine for now but later we may need to specialise predicates that are in other modules, is there an easy way to do this?
 > 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?

Hmm, partial deduction should already eliminate dead-code. 

Where are your programs? Are they in CVS so that we can take a look?
  
I've checked the latest copy into /Projects/Deliverables/Case_Studies/Precision_Interpreter.
There are only two important source files, exec.pl contains the rough outline of the interpreter for a single operation. pic.pl contains the necessary PIC instructions to implement it. pic.pl is just a place-holder for now, the pic-interpreter will perform this task properly, and be an executable definition. I'm currently specialising exec.pl like this:

ciaopp ?- customize_and_exec( 'exec.pl' ).


            (Press h for help)

Select Menu Level:               [naive, expert] (expert) ?
Select Action Group:             [analyze, check_assertions, optimize]
                                  (optimize) ?
Select Optimize:                 [none, spec, parallelize] (spec) ?
Select Abs Specialization:       [off, mono, poly] (off) ?
Select Analysis Domain:          [none, pd, pdb, def, gr, share, shareson,
                                  shfr, shfrson, shfrnv, son, aeq, depth, path,
                                  difflsign, fr, frdef, lsign, eterms, ptypes,
                                  svterms, terms] (shfr) ?
Select Local Control:            [off, orig, inst, det, det_la, depth,
                                  first_sol, first_sol_d, all_sol, hom_emb,
                                  hom_emb_anc, hom_emb_as, df_hom_emb_as,
                                  df_tree_hom_emb, df_hom_emb]
                                  (df_hom_emb_as) ?
Select Computation Rule:         [leftmost, local_builtin, local_emb,
                                  jump_builtin] (jump_builtin) ?
Select Partial Concretization:   [off, mono, multi] (off) ?
Perform Argument Filtering:      [off, on] (off) ?
Select Global Control:           [off, id, inst, hom_emb] (off) ?
Abstract Spec Definitions:       [off, rem, exec, all] (off) ?
Remove Useless Clauses:          [off, pre, post, both] (off) ?
Note: Current Saved Menu Configurations: []
Menu Configuration Name:          (none) ?
{Loading current module from /home/staff/moss/common/asap/precision/exec.pl
{Reading /home/staff/moss/common/asap/precision/exec.pl
WARNING: (lns 28-31) [L,Len,Rep,Start,U] - singleton variables in addr/5
WARNING: (lns 39-44) predicate addr/6 is already defined with arity 5
WARNING: (lns 45-47) [VL] - singleton variables in addr/6
WARNING: (lns 62-66) [Len,U,VU] - singleton variables in partAddr/4
WARNING: (lns 84-96) [Au,Bu,Ol] - singleton variables in addvals/3
}
{loaded in 4210.0 msec.}
}
{Analyzing /home/staff/moss/common/asap/precision/exec.pl
{preprocessed for plai in 0.0 msec.}
{unfolded in 220.0 msec.}
{total transformation time 240.0 msec.}
{In /home/staff/moss/common/asap/precision/exec.pl
WARNING (fixpo_ops): (lns 78-83) Unknown predicate pic:movf/2
}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:addmodloop_1/5/3}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:addmodloop_1/5/4}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:addmodloop_1/5/5}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:addmodloop_1/5/6}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:addmodloop_1/5/7}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:addmodloop_1/5/8}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:addmodloop_1/5/9}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:addmodloop_1/5/10}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:addmodloop_1/5/11}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:addmodloop_1/5/12}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:addmodloop_1/5/13}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:addmodloop_1/5/14}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:addmodloop_1/5/15}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:addmodloop_1/5/16}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:addmodloop_1/5/17}
{unfolded in 30.0 msec.}
{total transformation time 40.0 msec.}
{In /home/staff/moss/common/asap/precision/exec.pl
WARNING (fixpo_ops): (lns 67-74) Unknown predicate pic:movf/2
}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:add8_1/5/2}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:add8_1/5/3}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:add8_1/5/4}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:add8_1/5/5}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:add8_1/5/6}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:add8_1/5/7}
{WARNING (fixpo_ops): Unknown predicate pic:movf/2 in clause exec:add8_1/5/8}
{unfolded in 0.0 msec.}
{total transformation time 0.0 msec.}
{unfolded in 0.0 msec.}
{total transformation time 0.0 msec.}
{unfolded in 10.0 msec.}
{total transformation time 10.0 msec.}
{unfolded in 0.0 msec.}
{total transformation time 10.0 msec.}
{unfolded in 0.0 msec.}
{total transformation time 0.0 msec.}
{unfolded in 0.0 msec.}
{total transformation time 0.0 msec.}
{unfolded in 0.0 msec.}
{total transformation time 10.0 msec.}
{unfolded in 0.0 msec.}
{total transformation time 0.0 msec.}
{unfolded in 0.0 msec.}
{total transformation time 0.0 msec.}
{unfolded in 0.0 msec.}
{total transformation time 0.0 msec.}
{unfolded in 10.0 msec.}
{total transformation time 10.0 msec.}
{unfolded in 0.0 msec.}
{total transformation time 0.0 msec.}
{unfolded in 20.0 msec.}
{total transformation time 20.0 msec.}
{In /home/staff/moss/common/asap/precision/exec.pl
WARNING (fixpo_ops): (lns 84-96) Unknown predicate pic:movf/2
}
{analyzed by di using shfr in 2320.0 msec.}
}
{Transforming /home/staff/moss/common/asap/precision/exec.pl
{transformed by codegen in 60.0 msec.}
}
{written file /home/staff/moss/common/asap/precision/exec_shfr_codegen_co.pl}

In the resulting file the body of addvals/3 is exactly what we wanted:

addvals(x,y,x) :-
        movf(10,0),
        addwf(13,0),
        m
ovwf(10),
        movf(11,0),
        addwf(14,0),
        movwf(11),
        movf(12,0),
        addwf(15,0),
        movwf(12).


But all of the code above it is dead-code that cannot be reached from the entry point. We could slice it away but this seems a bit of a heavy approach.

Amoss