| CPC G06F 16/2452 (2019.01) [G06F 16/2246 (2019.01); G06F 16/248 (2019.01)] | 30 Claims |

|
1. A non-transitory computer-readable medium comprising computer-readable instructions stored thereon that when executed by a processor cause the processor to:
receive a main graph and a query graph, wherein the query graph contains symmetry, and wherein the query graph comprises an additional query;
break symmetry in the query graph by:
converting the query graph into a transformed query graph by:
converting the additional query into a tree representation by:
responsive to determining that the additional query comprises a constant value, creating a first new node in a directed acyclic graph (DAG) for the constant value;
responsive to determining that the additional query comprises a node expression of an attribute, creating a second new node and a third new node in the DAG, the second new node representing the node associated with the node expression and the third new node representing the attribute of the node expression;
creating a first edge between the second new node and the third new node;
responsive to determining that the additional query comprises a left operand <operator> right operand form, creating a fourth new node in the DAG for the <operator>;
creating a string node attribute for the fourth new node representing the <operator>;
responsive to determining that the <operator> is commutative, adding a second edge from the fourth new node to the left operand and a third edge from the fourth new node to the right operand or responsive to determining that the <operator> is not commutative, adding the second edge from the fourth new node to the left operand and a fourth edge from the right operand to the fourth new node to create a tree form;
simplifying the tree form to obtain the tree representation; and
combining the tree representation with the query graph to obtain the transformed query graph;
generating a symmetry breaking expression from the transformed query graph; and
translating the symmetry breaking expression to refer to one or more nodes and one or more edges in the query graph to obtain a translated symmetry breaking expression of the query graph; and
find one or more subgraphs of the main graph that match the translated symmetry breaking expression of the query graph, wherein the one or more subgraphs do not contain symmetry.
|