Avoid duplicate solutions when several nodes are equivalent in patterns
When searching for a pattern like pattern { S -> N1; S -> N2; }
each "occurrence" is given twice with N1/N2 exchanged.
A trick to avoid this is to add N1 << N2
but this can be used only for ordered nodes.
A more general mechanism is needed in general:
- option 1: add a syntax
N1 <<< N2
to order node wrt theirgid
(👎 implementation dependant) - option 2: add a syntax like
groups {N1; N2}
(idem from previous but a little more abstract) - option 3: detect the subgroups of nodes that are equivalent (
👎 difficult to implement)