[eclipse-clp-users] discontiguous predicates in multiple files in embedded eclipse

From: Federico Ferri <federico.ferri.it_at_gmail.com>
Date: Tue, 10 Dec 2013 20:32:30 +0100
hi all,

I'm embedding eclipse into a project, and need some discontiguous
predicates defined in several files.
basically, there is one file preliminary_setup.pl, which defines:
  :- discontiguous(mypred/1).
  mypred(X) :- ...

the rest of the code has to be defined in main.pl (including mypred/1).

now if

1) in the embedded eclipse I compile preliminary_setup.pl, and then I
compile main.pl, I get the warning:
 WARNING: mypred/1 replaces previous definition in file preliminary_setup.pl
moreover, nothing works (my guess is that mypred/1 really gets replaced)

2) if I declare in main.pl :-[preliminary_setup]. and in the embedded
eclipse I only compile main.pl, I still get warnings about replace previous
definition, but the code works.

clearly with 2) I worked around the problem, yet get those warnings.
what I'd like to do is to compile everything programmatically, from the
embedded eclipse api.
what's wrong with my approach?

also, I tried asserting or compiling the :-discontiguous(...). declarations
before (via the embedded eclipse api) but it doesn't work.

any help appreciated.

thanks
Federico Ferri
Received on Tue Dec 10 2013 - 19:32:42 CET

This archive was generated by hypermail 2.2.0 : Wed Dec 11 2013 - 06:13:49 CET