Using formal speci cations to represent software components facilitates the determination of reusability because they more precisely characterize the functionality of the software, and the well-de ned syntax makes processing amenable to automation. This paper presents an approach, based on formal methods, to the search, retrieval, and modi cation of reusable software components. From a two-tiered hierarchy of reusable software components, the existing components that are analogous to the query speci cation are retrieved from the hierarchy. The speci cation for an analogous retrieved component is compared to the query speci cation to determine what changes need to be applied to the corresponding program component in order to make it satisfy the query speci cation. This paper also describes an approach for assisting the modi cation of analogous components and gives an example to demonstrate its use.