Skip to content

Differing outputs when FlatZinc code is passed via stdin vs. file #655

Description

@chillja

When running the following FlatZinc file minimal.fzn:

var 1..2:X_INTRODUCED_0_:: output_var;
var 1..2:X_INTRODUCED_1_:: output_var;
array[1..2] of var int:foobar:: output_array([1..2]) = [X_INTRODUCED_0_, X_INTRODUCED_1_];
constraint int_ne(X_INTRODUCED_0_, X_INTRODUCED_1_);
solve  satisfy;

with cat minimal.fzn | minizinc --input-from-stdin --solver Chuffed (or gecode) the output only prints the int vars:

X_INTRODUCED_0_ = 1;
X_INTRODUCED_1_ = 2;
----------

but when running minizinc --solver Chuffed minimal.fzn (or gecode) the output also correctly outputs the variable array:

X_INTRODUCED_0_ = 1;
X_INTRODUCED_1_ = 2;
foobar = array1d(1..2,[1, 2]);
----------

I am not (yet) familiar enough with the libminizinc code base to make any educated guess, where this might come from, or whether this is user error, but I think both should output the array.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions