### 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 $\mathrm{𝒢𝒫}$ denote this subset of graph parameters. For each graph parameter $\mathrm{𝑔𝑝}$ of $\mathrm{𝒢𝒫}$ we check if we have a graph property of the form $\mathrm{𝑔𝑝}=\mathrm{𝑣𝑎𝑟}$ where $\mathrm{𝑣𝑎𝑟}$ is a domain variable. If this is the case we record the pair $\left(\mathrm{𝑔𝑝},\mathrm{𝑣𝑎𝑟}\right)$; if not, we create a new domain variable $\mathrm{𝑣𝑎𝑟}$ and also record the pair $\left(\mathrm{𝑔𝑝},\mathrm{𝑣𝑎𝑟}\right)$.

• We then search for all groups of graph invariants involving a subset of the previous graph parameters $\mathrm{𝒢𝒫}$. 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 $\mathrm{𝚐𝚛𝚘𝚞𝚙}$ constraint and its first graph constraint. The steps for creating the implied constraints are: