REFACTORING OF C/C++ PREPROCESSOR CONSTRUCTS AT THE MODEL LEVEL

László Vidács

Abstract

Preprocessor directives are usually omitted from the analysis of C/C++ software, yet they play an important role especially in program transformations. Here a method is presented for refactoring preprocessor constructs at the model level. Refactorings are carried out on program models derived from a reverse engineering process of real-life software. We present a metamodel of preprocessing on which a graph transformation approach is used to elaborate refactorings. The method is presented through the elaboration of the add parameter refactoring both at schematic and concrete level. Safe transformations are assured by visual control and validated by the evaluation of OCL expressions. The usability of the idea is validated by successful experiments.

References

  1. Bottoni, P., Parisi-Presicce, F., and Taentzer, G. (2004). Specifying integrated refactoring with distributed graph transformations. LNCS, 3062:220-235.
  2. Fanta, R. and Rajlich, V. (1998). Reengineering objectoriented code. In Proceedings of ICSM 2008, page 238, Washington, DC, USA. IEEE Computer Society.
  3. Ferenc, R., Beszédes, Í ., Tarkiainen, M., and Gyimóthy, T. (2002). Columbus - reverse engineering tool and schema for C++. In ICSM 2002, pages 172-181, Montreal, Canada. IEEE Computer Society.
  4. Fowler, M. (2002). Refactoring Improving the Design of Existing Code. Addison-Wesley.
  5. Garrido, A. and Johnson, R. (2002). Challenges of refactoring C programs. In Proceedings of IWPSE 2002, pages 6-14. ACM.
  6. Gogolla, M. (2000). Graph Transformations on the UML Metamodel. In GVMT'2000, pages 359-371. Carleton Scientific, Waterloo, Ontario, Canada.
  7. Gogolla, M., Büttner, F., and Richters, M. (2007). USE: A UML-based specification environment for validating UML and OCL. Sci. Comp. Program., 69(1-3):27-34.
  8. jFactor (2009). Homepage of jFactor. http://old.instantiations.com/jfactor/.
  9. Mens, T. and Tourwé, T. (2004). A survey of software refactoring. IEEE Transactions on Software Engineering, 30(2):126-139.
  10. Mens, T., Van Eetvelde, N., Demeyer, S., and Janssens, D. (2005). Formalizing refactorings with graph transformations. JSME: Research and Practice, 17:247-276.
  11. Opdyke, W. F. (1992). Refactoring Object-Oriented Frameworks. PhD thesis, Urbana-Champaign, IL, USA.
  12. Refactoring Catalog (2009). Refactoring catalog. http://www.refactoring.com/catalog/.
  13. Roberts, D., Brant, J., and Johnson, R. (1997). A refactoring tool for Smalltalk. Theor. Pract. Object Syst., 3(4):253-263.
  14. Slickedit Homepage (2009). http://www.slickedit.com/.
  15. Taentzer, G., Müller, D., and Mens, T. (2007). Specifying domain-specific refactorings for AndroMDA based on graph transformation. In AGTIVE, pages 104-119.
  16. Understand for C++ Homepage (2008). Understand for C++ Homepage. http://www.scitools.com.
  17. Vidács, L., Beszédes, A., and Ferenc, R. (2004). Columbus Schema for C/C++ Preprocessing. In Proceedings of CSMR 2004, pages 75-84. IEEE Computer Society.
  18. Vidács, L., Gogolla, M., and Ferenc, R. (2006). From C++ Refactorings to Graph Transformations. In Proc. ICGT'2006 Workshop SETRA'2006, pages 127-141.
  19. Vittek, M. (2003). Refactoring browser with preprocessor. In Proceedings of CSMR 2003, pages 101-110, Benevento, Italy.
Download


Paper Citation


in Harvard Style

Vidács L. (2009). REFACTORING OF C/C++ PREPROCESSOR CONSTRUCTS AT THE MODEL LEVEL . In Proceedings of the 4th International Conference on Software and Data Technologies - Volume 1: ICSOFT, ISBN 978-989-674-009-2, pages 232-237. DOI: 10.5220/0002258302320237


in Bibtex Style

@conference{icsoft09,
author={László Vidács},
title={REFACTORING OF C/C++ PREPROCESSOR CONSTRUCTS AT THE MODEL LEVEL},
booktitle={Proceedings of the 4th International Conference on Software and Data Technologies - Volume 1: ICSOFT,},
year={2009},
pages={232-237},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0002258302320237},
isbn={978-989-674-009-2},
}


in EndNote Style

TY - CONF
JO - Proceedings of the 4th International Conference on Software and Data Technologies - Volume 1: ICSOFT,
TI - REFACTORING OF C/C++ PREPROCESSOR CONSTRUCTS AT THE MODEL LEVEL
SN - 978-989-674-009-2
AU - Vidács L.
PY - 2009
SP - 232
EP - 237
DO - 10.5220/0002258302320237