  We work with a generalization of knot theory, in which one diagram is
reachable from another via a finite sequence of moves if a fixed condition,
regarding the existence of certain morphisms in an associated category, is
satisfied for every move of the sequence. This conditional setting leads to a
possibility of irreversible moves, terminal states, and to using functors more
general than the ones used as knot invariants. Our main focus is the category
of diagrams with binary relations on the set of arcs, indicating which arc can
move over another arc. We define homology of binary relations, and merge it
with quandle homology, to obtain the homology for partial quandles with binary
relations. This last homology can be used to analyze link diagrams with binary
relations on the set of components.
