Query format
We have chosen to implement a graph topology search engine in regex form.
Graph sequence separation
We decide to decompose a graph to series to applies classic regex to all the series. this decomposition of a graph into multiple sub serial graph use the concept of common node noted node#{n}
where n is use to distinguished common node with the same node type .These type of node are use to store were the original graph was cut.
for ex :
graph TD;
classDef ref fill:#f96
A0 --> B0 & C0
B0 --> D0
C0 --> D0
After decomposition :
graph TD;
classDef ref fill:#f96
A1[A#]:::ref --> B --> D1[D#]:::ref
A2[A#]:::ref --> C --> D2[D#]:::ref