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.
half-reif-benchmarks/tests/spec/unit/globals/regular/globals_regular_regex_6.mzn
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

16 lines
314 B
MiniZinc

/***
!Test
expected: !Result
solution: !Solution
x: [A, B, A, C, A, D, A]
***/
include "regular_regexp.mzn";
int: n = 7;
enum Letter = {A, B, C, D};
array [1..n] of var Letter: x :: add_to_output;
constraint regular(x, "A ((B|C|D) A)*");
constraint forall (i in 1..n-2 where i mod 2 = 0) (x[i] < x[i+2]);