prereq: make dependency check use graph structure