Question about the CPI interface

Luis Quesada luque at info.ucl.ac.be
Wed May 4 16:33:02 CEST 2005


Stefano Gualandi wrote:

>Hi all,
>I am trying to implement a FS propagator using the CPI interface, but I 
>have some doubts about the method "getGlbMinElem()" (http://www.mozart-
>oz.org/documentation/cpiref/node8.html#r_fsc).
>
>It is supposed to return -1 if the Glb is empty, but it does return 0 in 
>some cases. Is it a bug in the documentation or is something deeper?
>
>Unfortunately, I am not yet able to reproduce the behavior on a small 
>example, but in the method propagate I have something like:
> 
>OZ_Return FSWeight::propagate(void)
>{
>	OZ_FSetVar set(_set);
>
>	for (int i = set->getGlbMinElem(); i != -1; i = set-
>  
>
>>getGlbNextLargerElem(i)) {
>>    
>>
>		printf("i : %d  - glb : %d\n",i,set->getGlbMinElem());
>		// ....
>		// ....
>}	}
>
>
>Does anyone have any clue?
>
>  
>
Raph just told me that the problem that I am observing might be related 
to this issue.

I have a tuple of set variables that are bound to sets that cannot have 
0 as an element:

      BE={FS.var.tuple.upperBound be NumNodes 1#(NumNodes*NumNodes)}

The problem is that FS.monitorIn does tell me that 0 is an element of 
the set:

        % E is an element of BE
        for E in  {FS.monitorIn Edges} do
           if E==0 then {System.show '#'(id:Id bridges:Edges)} end ...

'#'(bridges:_{{45 106 159 217 267 323 368 426 474 528 577 636 689 747 
797 853 898 956 1004 1058 1107 1166 1219 1277 1327 1383 1428 1486 1534 
1588 1637 1696 1749 1807 1857 1913 1958 2016 2064 2118 2167 2226 2279 
2337 2387 2443 2488 2546 2594 2648}..{45 106 159 217 267 323 368 426 474 
528 577 636 689 747 797 853 898 956 1004 1058 1107 1166 1219 1277 1327 
1383 1428 1486 1534 1588 1637 1696 1749 1807 1857 1913 1958 2016 2064 
2118 2167 2226 2279 2337 2387 2443 2488 2546 2594 2639#2704}}#{50#115} id:2)

Luis


Luis




More information about the mozart-hackers mailing list