[eclipse-users] Bug: ic_symbolic:get_domain_as_list

From: Malcolm Ryan <malcolmr_at_...25...>
Date: Mon, 12 Mar 2007 17:33:28 +1100
ic_get_domain_as_list/2 is broken. It doesn't handle the case when a  
variable's domain only contains a single element:

[eclipse 1]: lib(ic_symbolic).
[eclipse 2]: local domain(abc(a,b,c)).
[eclipse 3]: V &:: [a], get_domain_as_list(V, L).

No (0.00s cpu)

The problem is in ic_symbolic.ecl, line 414:

get_domain_as_list(_{ic_symbolic with [ic_var:X_ic,dom: 
(Module:Name)]}, Values)
?-
         ic_kernel:get_domain_as_list(X_ic, IcDomain),
         current_domain(Name, _DefModule, DomainArray)@Module,
         (
             foreach(Index,IcDomain),
             foreach(Value,Values),
             param(DomainArray)
         do
             arg(Index, DomainArray, Value)
         ).

The first variable in the head will not unify with a ground element,  
so the clause fails.

Malcolm

--
      "The act of defending any of the cardinal virtues has today all
       the exhilaration of a vice."
                                     - G.K.Chesterton A Defense of  
Humility
Received on Mon Mar 12 2007 - 06:33:43 CET

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST