Specification of a Legacy Tool by Means of a Dependency Graph to Improve its Reusability