-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove is_defined_var annotation if no constraint is left defining a …
…variable. Fixes #863.
- Loading branch information
Showing
6 changed files
with
50 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
var float: x:: output_var; | ||
var bool: X_INTRODUCED_1_ ::var_is_introduced :: is_defined_var; | ||
var bool: X_INTRODUCED_2_ ::var_is_introduced :: is_defined_var; | ||
var bool: X_INTRODUCED_3_ ::var_is_introduced :: is_defined_var; | ||
var bool: X_INTRODUCED_5_ ::var_is_introduced :: is_defined_var; | ||
var bool: X_INTRODUCED_4_ ::var_is_introduced :: is_defined_var; | ||
var bool: X_INTRODUCED_6_ ::var_is_introduced :: is_defined_var; | ||
constraint float_le(1.0,x); | ||
constraint bool_clause([X_INTRODUCED_3_,X_INTRODUCED_5_],[]); | ||
constraint float_le_reif(1.0,x,X_INTRODUCED_1_):: defines_var(X_INTRODUCED_1_); | ||
constraint float_le_reif(x,2.0,X_INTRODUCED_2_):: defines_var(X_INTRODUCED_2_); | ||
constraint array_bool_and([X_INTRODUCED_1_,X_INTRODUCED_2_],X_INTRODUCED_3_):: defines_var(X_INTRODUCED_3_); | ||
constraint float_le_reif(3.0,x,X_INTRODUCED_5_):: defines_var(X_INTRODUCED_5_); | ||
constraint bool_clause([X_INTRODUCED_4_,X_INTRODUCED_6_],[]); | ||
constraint float_le_reif(1.0,x,X_INTRODUCED_2_):: defines_var(X_INTRODUCED_2_); | ||
constraint float_le_reif(x,2.0,X_INTRODUCED_3_):: defines_var(X_INTRODUCED_3_); | ||
constraint array_bool_and([X_INTRODUCED_2_,X_INTRODUCED_3_],X_INTRODUCED_4_):: defines_var(X_INTRODUCED_4_); | ||
constraint float_le_reif(3.0,x,X_INTRODUCED_6_):: defines_var(X_INTRODUCED_6_); | ||
solve satisfy; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
var 1..2: X_INTRODUCED_0_; | ||
var 1..2: X_INTRODUCED_1_; | ||
array [1..2] of var int: arr:: output_array([1..2]) = [X_INTRODUCED_0_,X_INTRODUCED_1_]; | ||
solve satisfy; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/*** | ||
!Test | ||
type: compile | ||
solvers: [chuffed] | ||
expected: !FlatZinc test_bug_863b.fzn | ||
***/ | ||
|
||
array[1..2] of var 1..2: arr; | ||
var 1..2: index; | ||
constraint arr[index] = arr[2]; | ||
constraint index == 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters