Using aspect orientation in legacy environments for reverse engineering using dynamic analysis - An industrial experience report

Preprint of article published in: Journal of Systems and Software (Elsevier), 82 (4), 2009; doi:10.1016/j.jss.2008.09.031 This paper reports on the challenges of using aspect-oriented programming (AOP) to aid in re-engineering a legacy C application. More specifically, we describe how AOP helps in the important reverse engineering step which typically precedes a re-engineering effort. We first present a comparison of the available AOP tools for legacy C code bases, and then argue on our choice of Aspicere, our own AOP implementation for C. Then, we report on Aspicere’s application in reverse engineering a legacy industrial software system and we show how we apply a dynamic analysis to regain insight into the system. AOP is used for instrumenting the system and for gathering the data. This approach works and is conceptually very clean, but comes with a major quid pro quo: integration of AOP tools with the build system proves an important issue. This leads to the question of how to reconcile the notion of modular reasoning within traditional build systems with a programming paradigm which breaks this notion.

[1]  Jerome A. Feldman,et al.  On the Synthesis of Finite-State Machines from Samples of Their Behavior , 1972, IEEE Transactions on Computers.

[2]  Kris Gybels,et al.  Arranging language features for more robust pattern-based crosscuts , 2003, AOSD '03.

[3]  Claudio Riva,et al.  Reverse architecting: an industrial experience report , 2000, Proceedings Seventh Working Conference on Reverse Engineering.

[4]  Harry M. Sneed Encapsulating legacy software for use in client/server systems , 1996, Proceedings of WCRE '96: 4rd Working Conference on Reverse Engineering.

[5]  Arie van Deursen,et al.  Discovering faults in idiom-based exception handling , 2006, ICSE '06.

[6]  Kenny Wong,et al.  An industrial experience in reverse engineering , 2003, 10th Working Conference on Reverse Engineering, 2003. WCRE 2003. Proceedings..

[7]  Remco van Engelen,et al.  An overview of Mirjam and WeaveC , 2007 .

[8]  Stanley M. Sutton,et al.  N degrees of separation: multi-dimensional separation of concerns , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[9]  Andy Zaidman,et al.  Journal of Software Maintenance and Evolution: Research and Practice Automatic Identification of Key Classes in a Software System Using Webmining Techniques , 2022 .

[10]  Orla Greevy,et al.  Enriching Reverse Engineering with Feature Analysis , 2007 .

[11]  Stuart I. Feldman,et al.  Make — a program for maintaining computer programs , 1979, Softw. Pract. Exp..

[12]  Michael Stonebraker,et al.  Migrating Legacy Systems: Gateways, Interfaces, and the Incremental Approach , 1995 .

[13]  Panagiotis K. Linos,et al.  A tool for understanding multi-language program dependencies , 2003, 11th IEEE International Workshop on Program Comprehension, 2003..

[14]  Stéphane Ducasse,et al.  Correlating features and code using a compact two-sided trace analysis approach , 2005, Ninth European Conference on Software Maintenance and Reengineering.

[15]  Glenn Ammons Grexmk: speeding up scripted builds , 2006, WODA '06.

[16]  Adrian Kuhn,et al.  Exploiting the Analogy Between Traces and Signal Processing , 2006, 2006 22nd IEEE International Conference on Software Maintenance.

[17]  Hausi A. Müller,et al.  Understanding software systems using reverse engineering technology perspectives from the Rigi project , 1993, CASCON.

[18]  Bryan Cantrill,et al.  Dynamic Instrumentation of Production Systems , 2004, USENIX Annual Technical Conference, General Track.

[19]  M. de Jonge,et al.  To reuse or to be reused. Techniques for component composition and construction , 2003 .

[20]  Thomas Fritz,et al.  A Reflexive Extension to Arachne's Aspect Language , 2006 .

[21]  Wolfgang Schröder-Preikschat,et al.  AspectC++: an aspect-oriented extension to the C++ programming language , 2002 .

[22]  Abdelwahab Hamou-Lhadj,et al.  Summarizing the Content of Large Traces to Facilitate the Understanding of the Behaviour of a Software System , 2006, 14th IEEE International Conference on Program Comprehension (ICPC'06).

[23]  Martin E. Nordberg Aspect-Oriented Dependency Inversion , 2001 .

[24]  Andy Zaidman,et al.  Regaining lost knowledge through dynamic analysis and aspect orientation $an industrial experience report , 2006, Conference on Software Maintenance and Reengineering (CSMR'06).

[25]  Harry M. Sneed,et al.  Program comprehension for the purpose of testing , 2004, Proceedings. 12th IEEE International Workshop on Program Comprehension, 2004..

[26]  Mario Südholt,et al.  An expressive aspect language for system applications with Arachne , 2005, AOSD '05.

[27]  Olaf Spinczyk,et al.  Generic Advice: On the Combination of AOP with Generative Programming in AspectC++ , 2004, GPCE.

[28]  Oscar Nierstrasz,et al.  Object-oriented reengineering patterns , 2004, Proceedings. 26th International Conference on Software Engineering.

[29]  Mike Bauer,et al.  Proceedings of the 2001 conference of the Centre for Advanced Studies on Collaborative Research, November 5-7, 2001, Toronto, Ontario, Canada , 2001, CASCON.

[30]  Keith H. Bennett,et al.  Legacy Systems: Coping with Success , 1995, IEEE Softw..

[31]  Daniel Amyot,et al.  Recovering behavioral design models from execution traces , 2005, Ninth European Conference on Software Maintenance and Reengineering.

[32]  Michael W. Godfrey,et al.  Secrets from the Monster: Extracting Mozilla’s Software Architecture , 2000 .

[33]  Meir M. Lehman,et al.  Software's future: managing evolution , 1998, IEEE Software.

[34]  Thomas A. Corbi,et al.  Program Understanding: Challenge for the 1990s , 1989, IBM Syst. J..

[35]  Theo D'Hondt,et al.  Aspect-Orientated Logic Meta Programming , 1999, Reflection.

[36]  Kim Mens,et al.  Building Composable Aspect-Specific Languages with Logic Metaprogramming , 2002, GPCE.

[37]  Ralf Lämmel,et al.  What does aspect-oriented programming mean to Cobol? , 2005, AOSD '05.

[38]  Kenny Wong,et al.  Extracting Facts from Perl Code , 2006, 2006 13th Working Conference on Reverse Engineering.

[39]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[40]  Andrew Clement,et al.  Large-scale AOSD for middleware , 2004, AOSD '04.

[41]  Doris L. Carver,et al.  Identification of data cohesive subsystems using data mining techniques , 1998, Proceedings. International Conference on Software Maintenance (Cat. No. 98CB36272).

[42]  Ladan Tahvildari,et al.  Quality-driven object-oriented re-engineering framework , 2004, 20th IEEE International Conference on Software Maintenance, 2004. Proceedings..

[43]  Richard C. Holt,et al.  Linux as a case study: its extracted software architecture , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[44]  Michael Stonebraker,et al.  Legacy Information Systems Migration: Gateways, Interfaces, and the Incremental Approach , 1995 .

[45]  Meir M. Lehman,et al.  Laws of Software Evolution Revisited , 1996, EWSPT.

[46]  Gustavo Alonso,et al.  Dynamic weaving for aspect-oriented programming , 2002, AOSD '02.

[47]  Stéphane Ducasse,et al.  Object-oriented legacy system trace-based logic testing , 2006, Conference on Software Maintenance and Reengineering (CSMR'06).

[48]  V. Cechticky,et al.  Implementing Adaptability in Embedded Software through Aspect Oriented Programming , 2004 .

[49]  Bjørn N. Freeman-Benson,et al.  Visualizing dynamic software system information through high-level models , 1998, OOPSLA '98.

[50]  Tamar Richner,et al.  Recovering Behavioral Design Views: a Query-Based Approach , 2002 .

[51]  Arie van Deursen,et al.  Visualizing Testsuites to Aid in Software Understanding , 2006, 11th European Conference on Software Maintenance and Reengineering (CSMR'07).

[52]  Arie van Deursen,et al.  An evaluation of clone detection techniques for crosscutting concerns , 2004, 20th IEEE International Conference on Software Maintenance, 2004. Proceedings..

[53]  Gregor Kiczales,et al.  Using aspectC to improve the modularity of path-specific customization in operating system code , 2001, ESEC/FSE-9.

[54]  Jim Hugunin,et al.  Advice weaving in AspectJ , 2004, AOSD '04.

[55]  Bengt Hultqvist,et al.  Proceedings of the International Conference on the Ionosphere: A.C. Stickland (Ed.) : Institute of Physics and the Physical Society. Chapman and Hall, 1963. ix + 528 pp. £5 5s. , 1963 .

[56]  Martin P. Robillard,et al.  Automatic generation of suggestions for program investigation , 2005, ESEC/FSE-13.

[57]  Pierre America,et al.  Analyzing the Actual Execution of a Large Software-Intensive System for Determining Dependencies , 2008, 2008 15th Working Conference on Reverse Engineering.

[58]  Tom Mens,et al.  Evolution Issues in Aspect-Oriented Programming , 2008, Software Evolution.

[59]  Brian W. Kernighan,et al.  The C Programming Language , 1978 .

[60]  Harry M. Sneed,et al.  An incremental approach to system replacement and integration , 2005, Ninth European Conference on Software Maintenance and Reengineering.

[61]  Michael W. Godfrey,et al.  The build-time software architecture view , 2001, Proceedings IEEE International Conference on Software Maintenance. ICSM 2001.

[62]  Toon Calders,et al.  Applying Webmining techniques to execution traces to support the program comprehension process , 2005, Ninth European Conference on Software Maintenance and Reengineering.

[63]  Andy Zaidman,et al.  Scalability solutions for program comprehension through dynamic analysis , 2006, Conference on Software Maintenance and Reengineering (CSMR'06).

[64]  Arie van Deursen,et al.  Simple crosscutting concerns are not so simple: analysing variability in large-scale idioms-based implementations , 2007, AOSD.

[65]  Theo D'Hondt,et al.  An Approach to High-Level Behavioral Program Documentation Allowing Lightweight Verification , 2006, 14th IEEE International Conference on Program Comprehension (ICPC'06).

[66]  Olaf Spinczyk,et al.  The design and implementation of AspectC++ , 2007, Knowl. Based Syst..

[67]  Yuanyuan Song,et al.  Modular software design with crosscutting interfaces , 2006, IEEE Software.

[68]  Mehmet Aksit,et al.  Applying AOP in an Industrial Context: An Experience Paper , 2006 .

[69]  Arie van Deursen,et al.  Isolating idiomatic crosscutting concerns , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

[70]  James H. Cross,et al.  Reverse engineering and design recovery: a taxonomy , 1990, IEEE Software.

[71]  Meir M. Lehman,et al.  Program evolution: processes of software change , 1985 .

[72]  Bram Adams,et al.  Aspect-orientation For Revitalising Legacy Business Software , 2006, EVOL.

[73]  Gregor Kiczales,et al.  Aspect-oriented programming , 1996, CSUR.

[74]  Wolfgang De Meuter,et al.  Design recovery and maintenance of build systems , 2007, 2007 IEEE International Conference on Software Maintenance.

[75]  Theo D'Hondt,et al.  Experiences in modularizing business rules into aspects , 2008, 2008 IEEE International Conference on Software Maintenance.

[76]  Yijun Yu,et al.  Improving the Build Architecture of Legacy C/C++ Software Systems , 2005, FASE.

[77]  Hausi A. Müller,et al.  Structural Redocumentation: A Case Study , 1995, IEEE Softw..

[78]  Andy Zaidman,et al.  Managing trace data volume through a heuristical clustering process based on event execution frequency , 2004, Eighth European Conference on Software Maintenance and Reengineering, 2004. CSMR 2004. Proceedings..

[79]  Bernd Freisleben,et al.  Supporting autonomic computing functionality via dynamic operating system kernel aspects , 2005, AOSD '05.

[80]  Serge Demeyer,et al.  Software Evolution , 2010 .

[81]  Mira Mezini,et al.  Aspect-oriented programming and modular reasoning , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[82]  Rainer Koschke,et al.  Locating Features in Source Code , 2003, IEEE Trans. Software Eng..

[83]  Rainer Koschke,et al.  Incremental location of combined features for large-scale programs , 2002, International Conference on Software Maintenance, 2002. Proceedings..

[84]  Mira Mezini,et al.  Expressive Pointcuts for Increased Modularity , 2005, ECOOP.

[85]  Tarja Systä,et al.  Static and Dynamic Reverse Engineering Techniques for Java Software Systems , 2000 .

[86]  David Notkin,et al.  Reengineering with Reflection Models: A Case Study , 1997, Computer.

[87]  Gregor Kiczales,et al.  Back to the future: a retroactive study of aspect evolution in operating system code , 2003, AOSD '03.

[88]  Arie van Deursen,et al.  An initial experiment in reverse engineering aspects , 2004, 11th Working Conference on Reverse Engineering.

[89]  Bram Adams,et al.  An aspect for idiom-based exception handling: (using local continuation join points, join point properties, annotations and type parameters) , 2007, SPLAT.

[90]  Hausi A. Müller,et al.  The software bookshelf , 2002 .