Dependency graph creation and print functions