Compute dep_paths and dep_parents