cyclic/acyclic judgement support for both directed and undirected graphs