About option types, the specification of Minizinc (sec. 6.6.3) says:
Overview. Option types defined using the opt type constructor, define types that may or may not be there. They are similar to Maybe types of Haskell implicity adding a new value
<>
to the type.[...]
Initialisation. An opt type variable does not need to be initialised at instance-time. An uninitialised opt type variable is automatically initialised to
<>
.
I would like to parse and process the following constraint with two opt
types:
predicate alternative(var opt int: s0, var int: d0,
array[int] of var opt int: s,
array[int] of var int: d);
However, I am not sure about what should I expect as values for arguments s0
and s
when parsing this constraint.
Can I simply ignore the presence of the opt
modifier and assume the constraint signature to be equal to the following one?
predicate alternative(var int: s0, var int: d0,
array[int] of var int: s,
array[int] of var int: d);
If not, how should I handle it?