Skip to content

Commit

Permalink
wip _imp constraints in fz
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Perron committed Jul 28, 2019
1 parent f75654c commit 2020337
Showing 1 changed file with 51 additions and 1 deletion.
52 changes: 51 additions & 1 deletion ortools/flatzinc/mznlib_sat/redefinitions-2.0.mzn
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ predicate int_pow( var int: x, var int: y, var int: r ) =
% Non shifted elements
predicate array_var_bool_element_nonshifted(var int: idx,
array [int] of var bool: x,
var bool: c);
var bool: c);

predicate array_var_int_element_nonshifted(var int: idx,
array [int] of var int: x,
Expand All @@ -42,3 +42,53 @@ include "nosets.mzn";

% Include strings redefinitions
include "nostrings.mzn"

% Half-Reified constraints
%predicate array_bool_and_imp(array [int] of var bool: as, var bool: r);
%predicate array_bool_or_imp(array [int] of var bool: as, var bool: r);
%predicate array_bool_xor_imp(array [int] of var bool: as, var bool: r);

%predicate bool_and_imp(var bool: a, var bool: b, var bool: r);
%predicate bool_clause_imp(array [int] of var bool: as,
% array [int] of var bool: bs, var bool: r);
%predicate bool_ge_imp(var bool: a, var bool: b, var bool: r);
%predicate bool_gt_imp(var bool: a, var bool: b, var bool: r);
%predicate bool_le_imp(var bool: a, var bool: b, var bool: r);
%predicate bool_lt_imp(var bool: a, var bool: b, var bool: r);
%predicate bool_ne_imp(var bool: a, var bool: b, var bool: r);
%predicate bool_ne_imp(var bool: a, var bool: b, var bool: r);
%predicate bool_or_imp(var bool: a, var bool: b, var bool: r);
%predicate bool_xor_imp(var bool: a, var bool: b, var bool: r);

%predicate bool_lin_eq_imp(array [int] of int: as, array [int] of var bool: bs,
% var int: c, var bool: r);
%predicate bool_lin_ge_imp(array [int] of int: as, array [int] of var bool: bs,
% var int: c, var bool: r);
%predicate bool_lin_gt_imp(array [int] of int: as, array [int] of var bool: bs,
% var int: c, var bool: r);
%predicate bool_lin_le_imp(array [int] of int: as, array [int] of var bool: bs,
% var int: c, var bool: r);
%predicate bool_lin_lt_imp(array [int] of int: as, array [int] of var bool: bs,
% var int: c, var bool: r);
%predicate bool_lin_ne_imp(array [int] of int: as, array [int] of var bool: bs,
% var int: c, var bool: r);

%predicate int_eq_imp(var int: a, var int: b, var bool: r);
%predicate int_ge_imp(var int: a, var int: b, var bool: r);
%predicate int_gt_imp(var int: a, var int: b, var bool: r);
%predicate int_le_imp(var int: a, var int: b, var bool: r);
%predicate int_lt_imp(var int: a, var int: b, var bool: r);
%predicate int_ne_imp(var int: a, var int: b, var bool: r);

%predicate int_lin_eq_imp(array [int] of int: as, array [int] of var int: bs,
% int: c, var bool: r);
%predicate int_lin_ge_imp(array [int] of int: as, array [int] of var int: bs,
% int: c, var bool: r);
%predicate int_lin_gt_imp(array [int] of int: as, array [int] of var int: bs,
% int: c, var bool: r);
%predicate int_lin_le_imp(array [int] of int: as, array [int] of var int: bs,
% int: c, var bool: r);
%predicate int_lin_lt_imp(array [int] of int: as, array [int] of var int: bs,
% int: c, var bool: r);
%predicate int_lin_ne_imp(array [int] of int: as, array [int] of var int: bs,
% int: c, var bool: r);

0 comments on commit 2020337

Please sign in to comment.