Embracing the C preprocessor during refactoring
- Autores
- Garrido, Alejandra; Johnson, Ralph
- Año de publicación
- 2013
- Idioma
- inglés
- Tipo de recurso
- artículo
- Estado
- versión publicada
- Descripción
- C preprocessor directives are heavily used in C programs because they provide useful and even necessary additions to the C language. However, they are usually executed and discarded before any analysis is applied on C programs. In refactoring, preprocessor directives must be preserved through the whole process of parsing, analysis and transformation to retain editable yet correct source code. We propose a new preprocessing approach and special program representations that allow a program to be analyzed and transformed without losing its preprocessor directives, but treating them as first-class program entities. These representations are essential for a correct refactoring tool. We also describe the challenges that preprocessor directives bring to refactoring and how the program representations that we propose solve those challenges. Finally, we give details of two refactorings and present some case studies with our successfully applied solution.
Fil: Garrido, Alejandra. Universidad Nacional de la Plata. Facultad de Informática. Laboratorio de Investigación y Formación en Informática Avanzada; Argentina. Consejo Nacional de Investigaciones Científicas y Técnicas; Argentina
Fil: Johnson, Ralph. University Of Illinois At Urbana; Estados Unidos - Materia
-
Refactoring
Preprocessor Directives
Code Analysis
Software Maintenance - Nivel de accesibilidad
- acceso abierto
- Condiciones de uso
- https://creativecommons.org/licenses/by-nc-sa/2.5/ar/
- Repositorio
- Institución
- Consejo Nacional de Investigaciones Científicas y Técnicas
- OAI Identificador
- oai:ri.conicet.gov.ar:11336/23403
Ver los metadatos del registro completo
id |
CONICETDig_b5a0adb53fb5a2363825ac36b7e806b0 |
---|---|
oai_identifier_str |
oai:ri.conicet.gov.ar:11336/23403 |
network_acronym_str |
CONICETDig |
repository_id_str |
3498 |
network_name_str |
CONICET Digital (CONICET) |
spelling |
Embracing the C preprocessor during refactoringGarrido, AlejandraJohnson, RalphRefactoringPreprocessor DirectivesCode AnalysisSoftware Maintenancehttps://purl.org/becyt/ford/1.2https://purl.org/becyt/ford/1C preprocessor directives are heavily used in C programs because they provide useful and even necessary additions to the C language. However, they are usually executed and discarded before any analysis is applied on C programs. In refactoring, preprocessor directives must be preserved through the whole process of parsing, analysis and transformation to retain editable yet correct source code. We propose a new preprocessing approach and special program representations that allow a program to be analyzed and transformed without losing its preprocessor directives, but treating them as first-class program entities. These representations are essential for a correct refactoring tool. We also describe the challenges that preprocessor directives bring to refactoring and how the program representations that we propose solve those challenges. Finally, we give details of two refactorings and present some case studies with our successfully applied solution.Fil: Garrido, Alejandra. Universidad Nacional de la Plata. Facultad de Informática. Laboratorio de Investigación y Formación en Informática Avanzada; Argentina. Consejo Nacional de Investigaciones Científicas y Técnicas; ArgentinaFil: Johnson, Ralph. University Of Illinois At Urbana; Estados UnidosWiley2013-06info:eu-repo/semantics/articleinfo:eu-repo/semantics/publishedVersionhttp://purl.org/coar/resource_type/c_6501info:ar-repo/semantics/articuloapplication/pdfapplication/pdfhttp://hdl.handle.net/11336/23403Garrido, Alejandra; Johnson, Ralph; Embracing the C preprocessor during refactoring ; Wiley; Journal of Software: Evolution and Process; 25; 12; 6-2013; 1285-13042047-7481CONICET DigitalCONICETenginfo:eu-repo/semantics/altIdentifier/url/http://onlinelibrary.wiley.com/doi/10.1002/smr.1603/abstractinfo:eu-repo/semantics/altIdentifier/doi/10.1002/smr.1603info:eu-repo/semantics/openAccesshttps://creativecommons.org/licenses/by-nc-sa/2.5/ar/reponame:CONICET Digital (CONICET)instname:Consejo Nacional de Investigaciones Científicas y Técnicas2025-10-15T15:36:52Zoai:ri.conicet.gov.ar:11336/23403instacron:CONICETInstitucionalhttp://ri.conicet.gov.ar/Organismo científico-tecnológicoNo correspondehttp://ri.conicet.gov.ar/oai/requestdasensio@conicet.gov.ar; lcarlino@conicet.gov.arArgentinaNo correspondeNo correspondeNo correspondeopendoar:34982025-10-15 15:36:52.848CONICET Digital (CONICET) - Consejo Nacional de Investigaciones Científicas y Técnicasfalse |
dc.title.none.fl_str_mv |
Embracing the C preprocessor during refactoring |
title |
Embracing the C preprocessor during refactoring |
spellingShingle |
Embracing the C preprocessor during refactoring Garrido, Alejandra Refactoring Preprocessor Directives Code Analysis Software Maintenance |
title_short |
Embracing the C preprocessor during refactoring |
title_full |
Embracing the C preprocessor during refactoring |
title_fullStr |
Embracing the C preprocessor during refactoring |
title_full_unstemmed |
Embracing the C preprocessor during refactoring |
title_sort |
Embracing the C preprocessor during refactoring |
dc.creator.none.fl_str_mv |
Garrido, Alejandra Johnson, Ralph |
author |
Garrido, Alejandra |
author_facet |
Garrido, Alejandra Johnson, Ralph |
author_role |
author |
author2 |
Johnson, Ralph |
author2_role |
author |
dc.subject.none.fl_str_mv |
Refactoring Preprocessor Directives Code Analysis Software Maintenance |
topic |
Refactoring Preprocessor Directives Code Analysis Software Maintenance |
purl_subject.fl_str_mv |
https://purl.org/becyt/ford/1.2 https://purl.org/becyt/ford/1 |
dc.description.none.fl_txt_mv |
C preprocessor directives are heavily used in C programs because they provide useful and even necessary additions to the C language. However, they are usually executed and discarded before any analysis is applied on C programs. In refactoring, preprocessor directives must be preserved through the whole process of parsing, analysis and transformation to retain editable yet correct source code. We propose a new preprocessing approach and special program representations that allow a program to be analyzed and transformed without losing its preprocessor directives, but treating them as first-class program entities. These representations are essential for a correct refactoring tool. We also describe the challenges that preprocessor directives bring to refactoring and how the program representations that we propose solve those challenges. Finally, we give details of two refactorings and present some case studies with our successfully applied solution. Fil: Garrido, Alejandra. Universidad Nacional de la Plata. Facultad de Informática. Laboratorio de Investigación y Formación en Informática Avanzada; Argentina. Consejo Nacional de Investigaciones Científicas y Técnicas; Argentina Fil: Johnson, Ralph. University Of Illinois At Urbana; Estados Unidos |
description |
C preprocessor directives are heavily used in C programs because they provide useful and even necessary additions to the C language. However, they are usually executed and discarded before any analysis is applied on C programs. In refactoring, preprocessor directives must be preserved through the whole process of parsing, analysis and transformation to retain editable yet correct source code. We propose a new preprocessing approach and special program representations that allow a program to be analyzed and transformed without losing its preprocessor directives, but treating them as first-class program entities. These representations are essential for a correct refactoring tool. We also describe the challenges that preprocessor directives bring to refactoring and how the program representations that we propose solve those challenges. Finally, we give details of two refactorings and present some case studies with our successfully applied solution. |
publishDate |
2013 |
dc.date.none.fl_str_mv |
2013-06 |
dc.type.none.fl_str_mv |
info:eu-repo/semantics/article info:eu-repo/semantics/publishedVersion http://purl.org/coar/resource_type/c_6501 info:ar-repo/semantics/articulo |
format |
article |
status_str |
publishedVersion |
dc.identifier.none.fl_str_mv |
http://hdl.handle.net/11336/23403 Garrido, Alejandra; Johnson, Ralph; Embracing the C preprocessor during refactoring ; Wiley; Journal of Software: Evolution and Process; 25; 12; 6-2013; 1285-1304 2047-7481 CONICET Digital CONICET |
url |
http://hdl.handle.net/11336/23403 |
identifier_str_mv |
Garrido, Alejandra; Johnson, Ralph; Embracing the C preprocessor during refactoring ; Wiley; Journal of Software: Evolution and Process; 25; 12; 6-2013; 1285-1304 2047-7481 CONICET Digital CONICET |
dc.language.none.fl_str_mv |
eng |
language |
eng |
dc.relation.none.fl_str_mv |
info:eu-repo/semantics/altIdentifier/url/http://onlinelibrary.wiley.com/doi/10.1002/smr.1603/abstract info:eu-repo/semantics/altIdentifier/doi/10.1002/smr.1603 |
dc.rights.none.fl_str_mv |
info:eu-repo/semantics/openAccess https://creativecommons.org/licenses/by-nc-sa/2.5/ar/ |
eu_rights_str_mv |
openAccess |
rights_invalid_str_mv |
https://creativecommons.org/licenses/by-nc-sa/2.5/ar/ |
dc.format.none.fl_str_mv |
application/pdf application/pdf |
dc.publisher.none.fl_str_mv |
Wiley |
publisher.none.fl_str_mv |
Wiley |
dc.source.none.fl_str_mv |
reponame:CONICET Digital (CONICET) instname:Consejo Nacional de Investigaciones Científicas y Técnicas |
reponame_str |
CONICET Digital (CONICET) |
collection |
CONICET Digital (CONICET) |
instname_str |
Consejo Nacional de Investigaciones Científicas y Técnicas |
repository.name.fl_str_mv |
CONICET Digital (CONICET) - Consejo Nacional de Investigaciones Científicas y Técnicas |
repository.mail.fl_str_mv |
dasensio@conicet.gov.ar; lcarlino@conicet.gov.ar |
_version_ |
1846083490846605312 |
score |
13.22299 |