4.2.2.12. Extensional constraints (table, regular etc.)
In this section: cost_mdd, cost_regular, mdd, mdd_nondet, regular, regular_nfa, table.
cost_mdd
predicate cost_mdd(array [int] of var int: xs,
int: N,
array [int] of int: level,
int: E,
array [int] of int: from,
array [int] of set of int: label,
array [int] of int: cost,
array [int] of int: to,
var int: total_cost)
|
Requires that xs defines a path in the cost MDD with total edge weight total_cost. Parameters:
|
cost_regular
predicate cost_regular(array [int] of var int: xs,
int: Q,
int: S,
array [int,int] of int: d,
int: q0,
set of int: F,
array [int,int] of int: cost,
var int: total_cost)
|
The sequence of values in array xs (which must all be in the range 1..S) is accepted by the DFA of Q states with input 1..S and transition function d (which maps (1..Q, 1..S) -> 0..Q)) and initial state q0 (which must be in 1..Q) and accepting states F (which all must be in 1..Q). We reserve state 0 to be an always failing state. Each edge has an associated cost cost, and total_cost is the sum of cost taken on the accepting path for xs. |
mdd
predicate mdd(array [int] of var int: xs,
int: N,
array [int] of int: level,
int: E,
array [int] of int: from,
array [int] of set of int: label,
array [int] of int: to)
|
Requires that xs defines a path from root to true node T through the (deterministic) Multivalued Decision Diagram (MDD) defined by the parameters. The MDD must be deterministic, i.e., there cannot be two edges with the same label leaving the same node. Parameters:
|
mdd_nondet
predicate mdd_nondet(array [int] of var int: xs,
int: N,
array [int] of int: level,
int: E,
array [int] of int: from,
array [int] of set of int: label,
array [int] of int: to)
|
Requires that xs defines a path from root to true node T through the (nondeterministic) Multivalued Decision Diagram (MDD) defined by the parameters. The MDD can be nondeterministic, i.e., there can be two edges with the same label leaving the same node. Parameters:
|
regular
1. predicate regular(array [$$X] of var $$Val: xs,
array [$$State,$$Val] of opt $$State: d,
$$State: q0,
set of $$State: F)
2. predicate regular(array [int] of var int: xs,
int: Q,
int: S,
array [int,int] of int: d,
int: q0,
set of int: F)
3. predicate regular(array [int] of var int: xs,
int: Q,
set of int: S,
array [int,int] of int: d,
int: q0,
set of int: F)
4. predicate regular(array [int] of var $$E: xs, string: regexp)
|
|
regular_nfa
1. predicate regular_nfa(array [$$X] of var $$Val: xs,
array [$$State,$$Val] of set of $$State: d,
$$State: q0,
set of $$State: F)
2. predicate regular_nfa(array [int] of var int: xs,
int: Q,
int: S,
array [int,int] of set of int: d,
int: q0,
set of int: F)
3. predicate regular_nfa(array [int] of var int: xs,
int: Q,
set of int: S,
array [int,int] of set of int: d,
int: q0,
set of int: F)
|
|
table
1. predicate table(array [$$E] of var bool: xs,
array [$$X,$$E] of bool: tuples)
2. predicate table(array [$$E] of var int: xs,
array [$$X,$$E] of int: tuples)
3. predicate table(array [$$E] of var opt int: xs,
array [$$X,$$E] of opt int: tuples)
|
|