Skip to content

Model inconsistency with empty set and set comprehension #493

@elKei24

Description

@elKei24

Doing a set comprehension with an empty set as generator leads to the detection of a model inconsistency.

Minimal example

set of int: S = { };
function var set of S: asVar() = { val | val in S };
var set of S: asVar = asVar();
output [show(asVar)];

Expected behavior

As S is empty, the set comprehension also evaluates to an empty set and MiniZinc outputs {}.

Actual behavior

MiniZinc detects a model inconsistency in call asVar and states that the problem is unsatisfiable.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions