Build a set of logical schemes in memory. This is accomplished either using the scheme object or "by hand" with single-step reactions.
Reactions are linked explicitly or implicitly.
Other metrics to link individual reactions (eg. high structural similarity of two molecules used to form an implicit link).
Use 'is-left-of' and 'is-right-of' queries on exact molecules, substructures.