A Model-Driven Approach for the Management and Enforcement of Coding Conventions
Main Author: | |
---|---|
Publication Date: | 2023 |
Other Authors: | , |
Format: | Article |
Language: | eng |
Source: | Repositórios Científicos de Acesso Aberto de Portugal (RCAAP) |
Download full: | https://hdl.handle.net/10316/114668 https://doi.org/10.1109/ACCESS.2023.3256886 |
Summary: | Coding conventions are a means to improve the reliability of software systems, and they are especially useful to avoid the introduction of known bugs or security flaws. However, coding rules typically come in the form of text written in natural language, which makes them hard to manage and to enforce. Following the model-driven engineering principles, in this paper we propose an approach for the management and enforcement of coding conventions using structured models. We define the Coding Conventions Specification Language (CCSL), a language to define coding rules as structured specifications, from which checkers are derived automatically by code generation. To evaluate our approach, we run a thorough experiment on 8 real open-source projects and 77 coding rules for the Java language, comparing the violations identified by our checkers with those reported by the PMD static analysis tool. The obtained results are promising and confirm the feasibility of the approach. The experiment also revealed that textual coding rules rarely document all the necessary information to write a reliable checker. |
id |
RCAP_8cefac9ff6a76bd8debebe50e71c3807 |
---|---|
oai_identifier_str |
oai:estudogeral.uc.pt:10316/114668 |
network_acronym_str |
RCAP |
network_name_str |
Repositórios Científicos de Acesso Aberto de Portugal (RCAAP) |
repository_id_str |
https://opendoar.ac.uk/repository/7160 |
spelling |
A Model-Driven Approach for the Management and Enforcement of Coding ConventionsCoding standardscoding conventionsmodel-driven engineeringdomain-specific languagesstatic analysisCoding conventions are a means to improve the reliability of software systems, and they are especially useful to avoid the introduction of known bugs or security flaws. However, coding rules typically come in the form of text written in natural language, which makes them hard to manage and to enforce. Following the model-driven engineering principles, in this paper we propose an approach for the management and enforcement of coding conventions using structured models. We define the Coding Conventions Specification Language (CCSL), a language to define coding rules as structured specifications, from which checkers are derived automatically by code generation. To evaluate our approach, we run a thorough experiment on 8 real open-source projects and 77 coding rules for the Java language, comparing the violations identified by our checkers with those reported by the PMD static analysis tool. The obtained results are promising and confirm the feasibility of the approach. The experiment also revealed that textual coding rules rarely document all the necessary information to write a reliable checker.IEEE2023info:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/articlehttps://hdl.handle.net/10316/114668https://hdl.handle.net/10316/114668https://doi.org/10.1109/ACCESS.2023.3256886eng2169-3536Rodrigues, ElderPereira, José D'AbruzzoMontecchi, Leonardoinfo:eu-repo/semantics/openAccessreponame:Repositórios Científicos de Acesso Aberto de Portugal (RCAAP)instname:FCCN, serviços digitais da FCT – Fundação para a Ciência e a Tecnologiainstacron:RCAAP2024-04-04T10:57:59Zoai:estudogeral.uc.pt:10316/114668Portal AgregadorONGhttps://www.rcaap.pt/oai/openaireinfo@rcaap.ptopendoar:https://opendoar.ac.uk/repository/71602025-05-29T06:07:51.249803Repositórios Científicos de Acesso Aberto de Portugal (RCAAP) - FCCN, serviços digitais da FCT – Fundação para a Ciência e a Tecnologiafalse |
dc.title.none.fl_str_mv |
A Model-Driven Approach for the Management and Enforcement of Coding Conventions |
title |
A Model-Driven Approach for the Management and Enforcement of Coding Conventions |
spellingShingle |
A Model-Driven Approach for the Management and Enforcement of Coding Conventions Rodrigues, Elder Coding standards coding conventions model-driven engineering domain-specific languages static analysis |
title_short |
A Model-Driven Approach for the Management and Enforcement of Coding Conventions |
title_full |
A Model-Driven Approach for the Management and Enforcement of Coding Conventions |
title_fullStr |
A Model-Driven Approach for the Management and Enforcement of Coding Conventions |
title_full_unstemmed |
A Model-Driven Approach for the Management and Enforcement of Coding Conventions |
title_sort |
A Model-Driven Approach for the Management and Enforcement of Coding Conventions |
author |
Rodrigues, Elder |
author_facet |
Rodrigues, Elder Pereira, José D'Abruzzo Montecchi, Leonardo |
author_role |
author |
author2 |
Pereira, José D'Abruzzo Montecchi, Leonardo |
author2_role |
author author |
dc.contributor.author.fl_str_mv |
Rodrigues, Elder Pereira, José D'Abruzzo Montecchi, Leonardo |
dc.subject.por.fl_str_mv |
Coding standards coding conventions model-driven engineering domain-specific languages static analysis |
topic |
Coding standards coding conventions model-driven engineering domain-specific languages static analysis |
description |
Coding conventions are a means to improve the reliability of software systems, and they are especially useful to avoid the introduction of known bugs or security flaws. However, coding rules typically come in the form of text written in natural language, which makes them hard to manage and to enforce. Following the model-driven engineering principles, in this paper we propose an approach for the management and enforcement of coding conventions using structured models. We define the Coding Conventions Specification Language (CCSL), a language to define coding rules as structured specifications, from which checkers are derived automatically by code generation. To evaluate our approach, we run a thorough experiment on 8 real open-source projects and 77 coding rules for the Java language, comparing the violations identified by our checkers with those reported by the PMD static analysis tool. The obtained results are promising and confirm the feasibility of the approach. The experiment also revealed that textual coding rules rarely document all the necessary information to write a reliable checker. |
publishDate |
2023 |
dc.date.none.fl_str_mv |
2023 |
dc.type.status.fl_str_mv |
info:eu-repo/semantics/publishedVersion |
dc.type.driver.fl_str_mv |
info:eu-repo/semantics/article |
format |
article |
status_str |
publishedVersion |
dc.identifier.uri.fl_str_mv |
https://hdl.handle.net/10316/114668 https://hdl.handle.net/10316/114668 https://doi.org/10.1109/ACCESS.2023.3256886 |
url |
https://hdl.handle.net/10316/114668 https://doi.org/10.1109/ACCESS.2023.3256886 |
dc.language.iso.fl_str_mv |
eng |
language |
eng |
dc.relation.none.fl_str_mv |
2169-3536 |
dc.rights.driver.fl_str_mv |
info:eu-repo/semantics/openAccess |
eu_rights_str_mv |
openAccess |
dc.publisher.none.fl_str_mv |
IEEE |
publisher.none.fl_str_mv |
IEEE |
dc.source.none.fl_str_mv |
reponame:Repositórios Científicos de Acesso Aberto de Portugal (RCAAP) instname:FCCN, serviços digitais da FCT – Fundação para a Ciência e a Tecnologia instacron:RCAAP |
instname_str |
FCCN, serviços digitais da FCT – Fundação para a Ciência e a Tecnologia |
instacron_str |
RCAAP |
institution |
RCAAP |
reponame_str |
Repositórios Científicos de Acesso Aberto de Portugal (RCAAP) |
collection |
Repositórios Científicos de Acesso Aberto de Portugal (RCAAP) |
repository.name.fl_str_mv |
Repositórios Científicos de Acesso Aberto de Portugal (RCAAP) - FCCN, serviços digitais da FCT – Fundação para a Ciência e a Tecnologia |
repository.mail.fl_str_mv |
info@rcaap.pt |
_version_ |
1833602586475757568 |