Definition of disjunctions with restricted domain - Example 6

Example 6: Using the operator IN

Using the operator IN as follows can perform the same constraints domain limitation for the Example 3:

$ONECHO > "%lm.info%"
Disjunction D(i,j);
 D(i,j) with (ord(i) < ord(j)) IS
 IF Y(i,j) THEN
  CONSTR1(j);
  CONSTR2(i,j);
 ELSE
  CONSTR3(j);
  CONSTR4(j,k) with k IN ('1', '2');
 ENDIF;
$OFFECHO

The operator IN expands the domain just for the set items included between the parentheses after the operator. The set items must be enclosed by single quotation marks and separated by commas.
Another example of the IN operator is when you define the domain over a value range as follows:

$ONECHO > "%lm.info%"
Disjunction D(i,j);
 D(i,j) with (ord(i) < ord(j)) IS
 IF Y(i,j) THEN
  CONSTR1(j);
  CONSTR2(i,j);
 ELSE
  CONSTR3(j);
  CONSTR4(j,k) with k IN ('1'..'2');
 ENDIF;

$OFFECHO


The above examples are just a few samples of what you can do for limiting the disjunction’s domain. You can define more difficult sentences by using the operators mentioned and the logical operators and/or.
Some other examples could be:

with (ord(j) lt card(i) and ord(k) not 1)
with (ord(I) lt ord(K)) and ( (ord(I) eq 1 and ord(K) eq 3 and ord(j) eq 1) or
  (ord(I) eq 1 and ord(K) eq 4 and ord(j) eq 4))