Currently, a match statement is transformed to a singular imperative Gremlin traversal. This uses a greedy algorithm which determins in which order nodes are matched, via which association, when where comditions are checked etc. While this algorithm works reasonably well for simple models, a better algorithm is likely needed for more complex cases. I would recommend having a look at the literature (as there are already countless algorithms and implementations for matching patterns in graphs, in particular for this kind of model transformation). Note that we use a Gremlin traversal, so some performance characteristics might differ between these and our implementation (not everything optimal there will be optimal for this implementation).
Currently, a match statement is transformed to a singular imperative Gremlin traversal. This uses a greedy algorithm which determins in which order nodes are matched, via which association, when where comditions are checked etc. While this algorithm works reasonably well for simple models, a better algorithm is likely needed for more complex cases. I would recommend having a look at the literature (as there are already countless algorithms and implementations for matching patterns in graphs, in particular for this kind of model transformation). Note that we use a Gremlin traversal, so some performance characteristics might differ between these and our implementation (not everything optimal there will be optimal for this implementation).