1
0
This repository has been archived on 2025-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
Jip J. Dekker 9b7e65e00b Squashed 'software/minizinc/' content from commit 5a577826
git-subtree-dir: software/minizinc
git-subtree-split: 5a577826da4d7cf6195f28b5604d8d20a01fbc6e
2021-06-18 09:34:50 +10:00

58 lines
1.6 KiB
MiniZinc

/***
!Test
expected: !Result
solution: !Solution:
y:
- '{}'
- '7..infinity'
- '{3,5}'
- '{3,5} union 7..infinity'
- '-1..1'
- '{-1,0,1} union 7..infinity'
- '{-1,0,1,3,5}'
- '{-1,0,1,3,5} union 7..infinity'
- '{-5,-3}'
- '{-5,-3} union 7..infinity'
- '{-5,-3,3,5}'
- '{-5,-3,3,5} union 7..infinity'
- '{-5,-3,-1,0,1}'
- '{-5,-3,-1,0,1} union 7..infinity'
- '{-5,-3,-1,0,1,3,5}'
- '{-5,-3,-1,0,1,3,5} union 7..infinity'
- '-infinity..-7'
- '-infinity..-7 union {} union 7..infinity'
- '-infinity..-7 union {3,5}'
- '-infinity..-7 union {3,5} union 7..infinity'
- '-infinity..-7 union {-1,0,1}'
- '-infinity..-7 union {-1,0,1} union 7..infinity'
- '-infinity..-7 union {-1,0,1,3,5}'
- '-infinity..-7 union {-1,0,1,3,5} union 7..infinity'
- '-infinity..-7 union {-5,-3}'
- '-infinity..-7 union {-5,-3} union 7..infinity'
- '-infinity..-7 union {-5,-3,3,5}'
- '-infinity..-7 union {-5,-3,3,5} union 7..infinity'
- '-infinity..-7 union {-5,-3,-1,0,1}'
- '-infinity..-7 union {-5,-3,-1,0,1} union 7..infinity'
- '-infinity..-7 union {-5,-3,-1,0,1,3,5}'
- '-infinity..-7 union {-5,-3,-1,0,1,3,5} union 7..infinity'
***/
array [1..5] of set of int: x = [
-infinity..-7,
{-5, -3},
-1..1,
{3, 5},
7..infinity
];
function set of int: s(bool: b, set of int: x) = if b then x else {} endif;
array [1..32] of string: y :: add_to_output = [
show(
s(a, x[1]) union
s(b, x[2]) union
s(c, x[3]) union
s(d, x[4]) union
s(e, x[5])
) | a, b, c, d, e in [false, true]
];