Re: [eclipse-users] Propia question

From: Joachim Schimpf (Independent Contractor) <jschimpf_at_cisco.com>
Date: Thu, 21 Jun 2007 19:40:24 +0200
Malcolm Ryan wrote:
> I'm having a problem with the interaction between lib(ic_sets) and lib 
> (propia):
> 
> :- lib(ic).
> :- lib(ic_sets).
> :- lib(propia).
> 
> adjacent(1,2).
> 
> :- integers([F,T]), adjacent(F, T) infers ac.
> 
> gives:
> 
> Ambiguous import of :: / 2 from [ic, ic_sets] in module eclipse
> calling an undefined procedure F :: 1 .. 1 in module eclipse
> 
> The code works fine if I remove lib(ic_sets). Any suggestions?

When using propia with the 'ac' approximation language, you need to
provide ::/2 and element/3, which you can do by loading e.g. lib(ic).

Unfortunately, lib(ic_sets) also exports a predicate called ::/2,
which causes the ambiguity.  You can disambiguate by adding a line:

:- import (::)/2 from ic.

You can then still call the ic_sets version via explicit module
qualification, e.g.  ic_sets:(X::[]..[1,2,3]).


-- Joachim
Received on Thu Jun 21 2007 - 18:43:16 CEST

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET