[gecode-users] segfault with floating-point vars

Peter Nightingale pwn1 at st-andrews.ac.uk
Thu May 16 21:23:43 CEST 2013


Thanks a lot Guido,

I think maybe Gecode needs to output floats rather than ints, Minizinc 
seems to be complaining when parsing solution from Gecode. See output 
below.

pn at tamnavulin:~/chrischoi$ fzn-gecode wolf_goat_cabbage.fzn
F = 20;
I = -1;
L = -4.49423e+306;
N = -2;
R = -6.7039e+153;
k = -1;
----------
pn at tamnavulin:~/chrischoi$ mzn-gecode wolf_goat_cabbage.mzn
<standard input>:1:
   type-inst error: assignment value for `F' has invalid type-inst: 
expected
   `var float', actual `int'
<standard input>:2:
   type-inst error: assignment value for `I' has invalid type-inst: 
expected
   `var float', actual `int'
<standard input>:4:
   type-inst error: assignment value for `N' has invalid type-inst: 
expected
   `var float', actual `int'
<standard input>:6:
   type-inst error: assignment value for `k' has invalid type-inst: 
expected
   `var float', actual `int'



On 16/05/13 01:47, Guido Tack wrote:
> Thanks, that was a simple bug in the FlatZinc parser, I just fixed it in the svn.
>
> Cheers,
> Guido
>
> On 16/05/2013, at 8:32 AM, Peter Nightingale <pwn1 at st-andrews.ac.uk> wrote:
>
>> Hi,
>>
>> I get a segfault with the attached file, through mzn-gecode (with minizinc 1.6 and gecode 4.0.0 compiled from source, on Ubuntu 13.04 64-bit)
>>
>> I see you have fixed a segfault for Stefano Gualandi, perhaps this file will also work now?
>>
>> Don't worry if this is not an easy fix. The problem is not that important, and organizing CP takes higher priority!
>>
>> Peter
>>
>>
>> <wolf_goat_cabbage.mzn>_______________________________________________
>> Gecode users mailing list
>> users at gecode.org
>> https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list