qtil
advanced-security/qtil-swift 0.0.3
Search

Predicate GraphPathSearch::hasPath

A performant path search within a custom directed graph from a set of start nodes to a set of end nodes.

This predicate is the main entry point for the forward-reverse pruning pattern. The design of the config predicates has a great effect in how well this performance pattern will ultimately perform.

Example:

from Person p1, Person p2
where GraphPathSearch<Person, Config>::hasPath(p1, p2)
select p1, p2

Note: this is fast to compute because limits the search space to nodes found by the fast unary searches done to find ForwardNode and ReverseNode.

Import path

import qtil.graph.GraphPathSearch
predicate hasPath(ReverseNode n1, ReverseNode n2)