New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mzn2fzn duplicates non-empty array and loses type of empty array #3

Closed
kfranc opened this Issue Jan 28, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@kfranc

kfranc commented Jan 28, 2015

Hi,
When I compile the following minizinc model, the flatzinc has an extra copy of the non-empty array and type array [1..0] of bot for the empty one.

MiniZinc:

predicate fakepred(array[int] of int: a1, array[int] of int: a2, var int: result);
var 1..5: x;
array[int] of int: a1 = [2, 3];
array[int] of int: a2 = [];
constraint fakepred(a1, a2, x);
solve minimize x;

Flatzinc produced by mzn2fzn 2.0.1:

predicate fakepred(array [int] of int: a1,array [int] of int: a2,var int: result);
array [1..0] of bot: a2 = [];
array [1..2] of int: a1 = [2,3];
array [1..2] of int: X_INTRODUCED_0 = [2,3];
var 1..5: x:: output_var;
constraint fakepred(a1,a2,x);
solve  minimize x;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment