Skip to content

Wrong result with optimizing bool2int (Flattening is empty) #476

Closed

Description

@MaxOstrowski

Using minizinc 2.5.5
Given the following program

var 1..9: b;
var bool: c;
constraint b = c;
solve satisfy;

the call minizinc file -a

b = b;
c = true;
----------
==========

which is

  • weird (b=b) ?
  • the fzn file produced is empty
  • this happens only when at least -O1 is used
  • note that 'b' must be '1'

Activity

  1. added a commit that references this issue on May 17, 2021
    f8f0aed
  2. added
    resolvedIssue is resolved and the feature or fix will be part of next release
    on Oct 5, 2021
  3. added theissue type on Jan 22, 2026
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

    resolvedIssue is resolved and the feature or fix will be part of next release

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions