Skip to main content
Erschienen in: Programming and Computer Software 5/2020

01.09.2020

NOBRAINER: A Tool for Example-Based Transformation of C/C++ Code

verfasst von: V. V. Savchenko, K. S. Sorokin, I. E. Bronshtein, A. S. Volkov, V. V. Kachanov, G. A. Pankratenko, M. K. Ermakov, S. I. Markov, A. V. Spiridonov, I. V. Aleksandrov

Erschienen in: Programming and Computer Software | Ausgabe 5/2020

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

Refactoring is an integral part of the modern software development process. Often, the refactoring must be performed at the global level with modifications in a large number of files. Making these modifications is a long and painstaking work. However, users rarely employ automated tools for this purpose because they consider them unreliable and difficult to use. In this paper, a new tool for transforming the source code is described. It is based on the intuitively clear specification of transformation rules in the form of short code fragments in C or C++. These rules describe the code before and after the transformation. We believe that, due to the absence of additional abstractions (such as domain-specific languages), this approach can be easily used in practice. Even though the tool uses source code templates, it operates on the level of the abstract syntax tree. This enables the tool to better analyze the code and verify the validity of transformations.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Literatur
1.
Zurück zum Zitat Brown, N., Cai, Y. Guo, Y., Kazman, R. Kim, M., Kruchten, P. Lim, E., MacCormack, A., Nord, R., Ozkaya, I., Sangwan, R., Seaman, C., Sullivan, K., and Zazworka, N., Managing technical debt in software-reliant systems, Proc. of the FSE/SDP Workshop on Future of Software Engineering Research, FoSER’10, New York, 2010, pp. 47–52. Brown, N., Cai, Y. Guo, Y., Kazman, R. Kim, M., Kruchten, P. Lim, E., MacCormack, A., Nord, R., Ozkaya, I., Sangwan, R., Seaman, C., Sullivan, K., and Zazworka, N., Managing technical debt in software-reliant systems, Proc. of the FSE/SDP Workshop on Future of Software Engineering Research, FoSER’10, New York, 2010, pp. 47–52.
2.
Zurück zum Zitat Cunningham, W., The WyCash portfolio management system, SIGPLAN OOPS Mess.,1992, vol. 4, no. 2, pp. 29–30.CrossRef Cunningham, W., The WyCash portfolio management system, SIGPLAN OOPS Mess.,1992, vol. 4, no. 2, pp. 29–30.CrossRef
3.
Zurück zum Zitat Fowler, M., Beck, K., Brant, J., Opdyke, W., and Roberts, D., Refactoring: Improving the design of existing code, Addison-Wesley Professional, 1999. Fowler, M., Beck, K., Brant, J., Opdyke, W., and Roberts, D., Refactoring: Improving the design of existing code, Addison-Wesley Professional, 1999.
4.
Zurück zum Zitat Waddington, D. G. and Yao, B., High-fidelity C/C++ code transformation, Electron. Notes Theor. Comput. Sci., 2007, vol. 141, no. 1, pp. 35–56.CrossRef Waddington, D. G. and Yao, B., High-fidelity C/C++ code transformation, Electron. Notes Theor. Comput. Sci., 2007, vol. 141, no. 1, pp. 35–56.CrossRef
5.
Zurück zum Zitat Graf, E., Zgraggen, G., and Sommerlad, P., Refactoring support for the C++ development tooling, OOPSLA Companion, 2007.CrossRef Graf, E., Zgraggen, G., and Sommerlad, P., Refactoring support for the C++ development tooling, OOPSLA Companion, 2007.CrossRef
6.
Zurück zum Zitat Lahoda, J., Bečička, J., and Ruijs, R.B., Custom declarative refactoring in NetBeans: Tool demonstration, Proc. of the Fifth Workshop on Refactoring Tools, WRT’12, New York, 2012, pp. 63–64. Lahoda, J., Bečička, J., and Ruijs, R.B., Custom declarative refactoring in NetBeans: Tool demonstration, Proc. of the Fifth Workshop on Refactoring Tools, WRT’12, New York, 2012, pp. 63–64.
7.
Zurück zum Zitat Meyerovich, L.A. and Rabkin A.S., Empirical analysis of programming language adoption, SIGPLAN Notices, 2013, vol. 48, no. 10, pp. 1–18.CrossRef Meyerovich, L.A. and Rabkin A.S., Empirical analysis of programming language adoption, SIGPLAN Notices, 2013, vol. 48, no. 10, pp. 1–18.CrossRef
8.
Zurück zum Zitat Murphy-Hill, E., Parnin, C., and Black, A.P., How we refactor, and how we know it, ICSE, 2009, pp. 287–297.CrossRef Murphy-Hill, E., Parnin, C., and Black, A.P., How we refactor, and how we know it, ICSE, 2009, pp. 287–297.CrossRef
9.
Zurück zum Zitat Pinto, G. H. and Kamei, F., What programmers say about refactoring tools?: An empirical investigation of stack overflow, Proc. of the 2013 ACM Workshop on Refactoring Tools, WRT’13, New York, 2013, pp. 33–36. Pinto, G. H. and Kamei, F., What programmers say about refactoring tools?: An empirical investigation of stack overflow, Proc. of the 2013 ACM Workshop on Refactoring Tools, WRT’13, New York, 2013, pp. 33–36.
10.
Zurück zum Zitat Ray, B., Posnett, D., Devanbu, P., and Filkov, V., A Large-scale study of programming languages and code quality in GitHub, Commun. ACM, 2017, vol. 60, no. 10, pp. 91–100.CrossRef Ray, B., Posnett, D., Devanbu, P., and Filkov, V., A Large-scale study of programming languages and code quality in GitHub, Commun. ACM, 2017, vol. 60, no. 10, pp. 91–100.CrossRef
11.
Zurück zum Zitat The Clang Team. Clang documentation: Matching the Clang AST. https://clang.llvm.org/docs/LibASTMatchers.html The Clang Team. Clang documentation: Matching the Clang AST. https://​clang.​llvm.​org/​docs/​LibASTMatchers.​html
12.
Zurück zum Zitat Tracz, W., Refactoring for software design smells: Managing Technical Debt by Girish Suryanarayana, Ganesh Samarthyam, and Tushar Sharma, ACM SIGSOFT Software Eng.Notes, 2015, vol. 40, no. 6, p. 36. Tracz, W., Refactoring for software design smells: Managing Technical Debt by Girish Suryanarayana, Ganesh Samarthyam, and Tushar Sharma, ACM SIGSOFT Software Eng.Notes, 2015, vol. 40, no. 6, p. 36.
13.
Zurück zum Zitat Wasserman, L., Scalable, example-based refactorings with Refaster, Proc. of the 2013 ACM Workshop on Refactoring Tools, 2013, pp. 25–28. Wasserman, L., Scalable, example-based refactorings with Refaster, Proc. of the 2013 ACM Workshop on Refactoring Tools, 2013, pp. 25–28.
14.
Zurück zum Zitat Wright, H., Jasper, D., Klimek, M., Carruth, C., and Wan, Z., Large-scale automated refactoring using ClangMR, Proc. of the 29th International Conference on Software Maintenance, 2013. Wright, H., Jasper, D., Klimek, M., Carruth, C., and Wan, Z., Large-scale automated refactoring using ClangMR, Proc. of the 29th International Conference on Software Maintenance, 2013.
15.
Zurück zum Zitat Friedl, J.E.F., Mastering Regular Expressions, Cambridge: O’Reilly, 1997.MATH Friedl, J.E.F., Mastering Regular Expressions, Cambridge: O’Reilly, 1997.MATH
Metadaten
Titel
NOBRAINER: A Tool for Example-Based Transformation of C/C++ Code
verfasst von
V. V. Savchenko
K. S. Sorokin
I. E. Bronshtein
A. S. Volkov
V. V. Kachanov
G. A. Pankratenko
M. K. Ermakov
S. I. Markov
A. V. Spiridonov
I. V. Aleksandrov
Publikationsdatum
01.09.2020
Verlag
Pleiades Publishing
Erschienen in
Programming and Computer Software / Ausgabe 5/2020
Print ISSN: 0361-7688
Elektronische ISSN: 1608-3261
DOI
https://doi.org/10.1134/S0361768820040052

Weitere Artikel der Ausgabe 5/2020

Programming and Computer Software 5/2020 Zur Ausgabe

Premium Partner