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

Lost annotation after simplification #69

Closed
jnmonette opened this Issue Dec 3, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@jnmonette

jnmonette commented Dec 3, 2015

Yet another one :-)

Compiling the following model results in a FlatZinc model where the "domain" annotation is lost (see below).

var int: x;
var int: y;
var int: z;
constraint (x + y + 2 = z)::domain;
constraint z = 4;
solve satisfy;

Note also that in the resulting FlatZinc, shown below, "z" is annotated with "is_defined_var" while it does not appear any more in the constraint:

var int: x:: output_var;
var int: y:: output_var;
var 4..4: z:: output_var:: is_defined_var;
constraint int_lin_eq([1,1],[y,x],2);
solve  satisfy;

When removing the constraint fixing "z", everything is fine: the "domain" annotation is back and "z" appears in the constraint defining it:

array [1..3] of int: X_INTRODUCED_2 = [1,1,-1];
var int: x:: output_var;
var int: y:: output_var;
var int: z:: output_var:: is_defined_var;
constraint int_lin_eq(X_INTRODUCED_2,[y,x,z],-2):: domain:: defines_var(z);
solve  satisfy;
@guidotack

This comment has been minimized.

Member

guidotack commented Dec 3, 2015

Thanks! This is now fixed.
Annotation handling, especially the defines_var stuff, is still a bit shaky. I'll have to look into this in detail at some point.

@guidotack guidotack closed this in a1aaee1 Dec 6, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment