Implementing logical variables and disjunctions in graph rewrite systems