4.3.3. Using the database of invariants
The purpose of this section is to provide a set of graph invariants, each invariant relating a given set of graph parameters. Once we have these graph invariants we can use them systematically by applying the following steps:
For a given graph constraint we extract all the graph parameters occurring in its description. This can be done automatically by scanning the corresponding graph properties. Let denote this subset of graph parameters. For each graph parameter of we check if we have a graph property of the form where is a domain variable. If this is the case we record the pair ; if not, we create a new domain variable and also record the pair .
We then search for all groups of graph invariants involving a subset of the previous graph parameters . For each selected group we filter out those graph invariants for which the preconditions are not compatible with the graph class of the graph constraint under consideration. In each group we finally keep those invariants that have the maximum number of preconditions (i.e., the most specialised graph invariants).
Finally we state all the previous collected graph invariants as implied constraints. This is achieved by using the variables associated with each graph parameter.
EXAMPLE: We continue with the example of the constraint and its first graph constraint. The steps for creating the implied constraints are:
We first extract the graph parameters , , and from the first graph constraint of the constraint. Since all the graph properties attached to the previous graph parameters have the form we extract the corresponding domain variables and get the following pairs , , and .
We search for all groups of graph invariants involving the graph parameters , , and and filter out the irrelevant graph invariants that cannot be applied on the graph class associated with the constraint.
We state all the previous invariants by substituting each graph parameter by its corresponding variable, which leads to a set of implied constraints.