Lightweight, Semi-automated Enactment of Pragmatic-Reuse Plans

  • Reid Holmes
  • Robert J. Walker
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5030)


Reusing source code in a manner for which it has not been designed (which we term a pragmatic-reuse task) is traditionally regarded as poor practice. The unsystematic nature of these tasks increases the likelihood of a developer pursuing one that is infeasible or choosing not to pursue a feasible one. In previous work, we demonstrated that these risks can be mitigated by providing support to developers to help them systematically investigate and plan pragmatic-reuse tasks. But planning is only a small part of performing a pragmatic-reuse task; to enact a plan, the developer would have to manually extract the code they want to reuse and resolve any errors that arise from removing it from its originating system. This paper describes an approach that semi-automates the process of pragmatic-reuse plan enactment, automatically extracting the reused source code and resolving the majority of compilation errors for the developer through lightweight (i.e., computationally simple but analytically unsound) transformations. By reducing the number of low-level compilation issues (which are typically trivial but copious) that the developer must resolve, they are able to focus on the higher-level semantic and conceptual issues that are the main barrier to the successful completion of the reuse task. The efficacy of our approach to save developer effort is evaluated in a small-scale, controlled experiment on non-trivial pragmatic-reuse tasks. We find that our approach improves the likelihood of a pragmatic reuse task being successful, and decreases the time required to complete these tasks, as compared to a manual enactment approach.


Pragmatic software reuse lightweight source code transformations 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Sen, A.: The role of opportunism in the software design reuse process. IEEE Transactions on Software Engineering 23(7), 418–436 (1997)CrossRefGoogle Scholar
  2. 2.
    Garlan, D., Allen, R., Ockerbloom, J.: Architectural mismatch: Why reuse is so hard. IEEE Software 12(6), 17–26 (1995)CrossRefGoogle Scholar
  3. 3.
    Garnett, E.S., Mariani, J.A.: Software reclamation. Software Engineering Journal 5(3), 185–191 (1990)CrossRefGoogle Scholar
  4. 4.
    Krueger, C.W.: Software reuse. ACM Computing Surveys 24(2), 131–183 (1992)CrossRefMathSciNetGoogle Scholar
  5. 5.
    Holmes, R., Walker, R.J.: Supporting the investigation and planning of pragmatic reuse tasks. In: Proceedings of the International Conference on Software Engineering, pp. 447–457 (2007)Google Scholar
  6. 6.
    Neighbors, J.M.: Draco: A method for engineering reusable software systems. In: Biggerstaff, T.J., Perlis, A.J. (eds.) Software Reusability. Concepts and Models of ACM Press Frontier. ACM Press Frontier, vol. 1, pp. 295–319. Addison–Wesley, Boston, United States (1989)Google Scholar
  7. 7.
    Bassett, P.G.: The theory and practice of adaptive reuse. In: Proceedings of the Symposium on Software Reusability, pp. 2–9 (1997)Google Scholar
  8. 8.
    Mezini, M., Ostermann, K.: Integrating independent components with on-demand remodularization. In: Proceedings of the Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 52–67 (2002)Google Scholar
  9. 9.
    Estublier, J., Vega, G.: Reuse and variability in large software applications. In: Proceedings of the Foundations of Software Engineering, pp. 316–325 (2005)Google Scholar
  10. 10.
    Feather, M.S.: Reuse in the context of a transformation-based methodology. In: Biggerstaff, T.J., Perlis, A.J. (eds.) Software Reusability. Concepts and Models, vol. 1, pp. 337–359. Addison-Wesley, Reading (1989)Google Scholar
  11. 11.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. In: Adapter design pattern, Addison-Wesley, Reading (1994)Google Scholar
  12. 12.
    Gouda, M.G., Herman, T.: Adaptive programming. IEEE Transactions on Software Engineering 17(9), 911–921 (1991)CrossRefMathSciNetGoogle Scholar
  13. 13.
    Yellin, D.M., Strom, R.E.: Protocol specifications and component adaptors. ACM Transactions on Programming Languages and Systems 19(2), 292–333 (1997)CrossRefGoogle Scholar
  14. 14.
    Johnson, R.E., Foote, B.: Designing reuseable [sic] classes. Journal of Object-Oriented Programming 1(2), 22–35 (1988)Google Scholar
  15. 15.
    Jackson, D., Rinard, M.: Software analysis: a roadmap. In: Proceedings of the Conference on The Future of Software Engineering, pp. 133–145 (2000)Google Scholar
  16. 16.
    Lanubile, F., Visaggio, G.: Extracting reusable functions by flow graph-based program slicing. IEEE Transactions on Software Engineering 23(4), 246–259 (1997)CrossRefGoogle Scholar
  17. 17.
    Caldiera, G., Basili, V.R.: Identifying and qualifying reusable software components. Computer 24(2), 61–70 (1991)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Reid Holmes
    • 1
  • Robert J. Walker
    • 1
  1. 1.Laboratory for Software Modification Research Department of Computer ScienceUniversity of CalgaryCalgaryCanada

Personalised recommendations