Generate dependency graph