core.logic graph code