/usr/share/gecode/mznlib/gecode.mzn is in flatzinc 3.7.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | %
% Main authors:
% Guido Tack <tack@gecode.org>
%
% Copyright:
% Guido Tack, 2007
%
% Last modified:
% $Date: 2011-08-23 11:55:02 +0200 (Tue, 23 Aug 2011) $ by $Author: tack $
% $Revision: 12337 $
%
% This file is part of Gecode, the generic constraint
% development environment:
% http://www.gecode.org
%
% Permission is hereby granted, free of charge, to any person obtaining
% a copy of this software and associated documentation files (the
% "Software"), to deal in the Software without restriction, including
% without limitation the rights to use, copy, modify, merge, publish,
% distribute, sublicense, and/or sell copies of the Software, and to
% permit persons to whom the Software is furnished to do so, subject to
% the following conditions:
%
% The above copyright notice and this permission notice shall be
% included in all copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
% MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
% LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
% OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
% WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
%
%
% This file contains predicate definitions for additional constraints available
% in the Gecode FlatZinc interpreter.
% Additional search annotations
annotation afc_min;
annotation size_afc_min;
annotation afc_max;
annotation size_afc_max;
annotation int_assign(array[int] of var int: x, ann:a);
% i in z <-> exists (j in x) (i in y[j])
predicate array_set_element_union(var set of int: x,
array[int] of var set of int: y, var set of int: z);
% i in z <-> forall (j in x) (i in y[j])
predicate array_set_element_intersect(var set of int: x,
array[int] of var set of int: y, var set of int: z);
% (i in z <-> exists (j in x) (i in y[j])) /\ (i in x /\ j in x /\ i!=j -> disjoint(y[i],y[j]))
predicate array_set_element_partition(var set of int: x,
array[int] of var set of int: y, var set of int: z);
% z subset u /\ ( i in z <-> forall (j in x) (i in y[j]) )
predicate array_set_element_intersect_in(var set of int: x,
array[int] of var set of int: y,
var set of int: z, set of int: u);
% y = sum of the weights of the elements of x
predicate set_weights_gecode(array[int] of int: elements,
array[int] of int: weights, var set of int: x, var int: y);
% Every subsequence of x of length l has at least m and at most occurrences
% of the values in S
predicate among_seq_int(array[int] of var int: x, set of int: S,
int: l, int: m, int: n);
% Every subsequence of x of length l has at least m and at most occurrences
% of the value b
predicate among_seq_bool(array[int] of var bool: x, bool: b,
int: l, int: m, int: n);
% Overloading for among_seq
predicate among_seq(array[int] of var int: x, set of int: S,
int: l, int: m, int: n) = among_seq_int(x,S,l,m,n);
predicate among_seq(array[int] of var bool: x, bool: b,
int: l, int: m, int: n) = among_seq_bool(x,b,l,m,n);
% Circuit constraints
predicate gecode_circuit(array[int] of var int: x);
predicate gecode_circuit_cost_array(array[int] of int: c,
array[int] of var int: x, array[int] of var int: y, var int: z);
predicate gecode_circuit_cost(array[int] of int: c, array[int] of var int: x,
var int: z);
predicate circuit(array[int] of var int: x) =
gecode_circuit([x[i]-min(index_set(x)) | i in index_set(x)]);
predicate circuit_cost_array(array[int] of int: c,
array[int] of var int: x, array[int] of var int: y, var int: z) =
gecode_circuit_cost_array(c,[x[i]-min(index_set(x)) | i in index_set(x)],
y,z);
predicate circuit_cost(array[int] of int: c, array[int] of var int: x,
var int: z) =
gecode_circuit_cost(c, [x[i]-min(index_set(x)) | i in index_set(x)], z);
% Scheduling constraints
predicate schedule_unary(array[int] of var int: x, array[int] of int: p);
predicate schedule_unary_optional(array[int] of var int: x,
array[int] of int: p, array[int] of var bool: m);
|