From Specification to Testing: Semantics Engineering for Lua 5.2

Autores
Soldevila Raffa, Mallku Ernesto; Ziliani, Luis Francisco; Silvestre, Bruno
Año de publicación
2022
Idioma
inglés
Tipo de recurso
artículo
Estado
versión publicada
Descripción
We provide a formal semantics for a large subset of the Lua programming language, in its version 5.2. The semantics is a major part of an ongoing effort to construct reliable tools to analyze Lua code. In this work, we present the details of several key aspects of the language, like the semantics of its only structured data-type (tables), its meta-programming mechanism (metatables), error handling, and how these mechanisms are used to define a complex dynamic semantics that must deal with several possible erroneous situations during run time, given the nature of the language. The semantics is mechanized in Redex, a DSL specially designed to specify and debug operational semantics. We validated the mechanization in two ways: first, by executing within Redex the test suite of the reference interpreter of Lua, and second, by specifying and performing random testing of its fundamental properties using the redex-check tool. Together, they evidence that our model soundly captures the semantics of the selected fragment of the language. Additionally, we address some of the performance problems that typically arise when testing a mechanization in Redex, by using a simple implementation of a reachability-based garbage collector that captures key aspects of Lua’s. By collecting syntactic garbage, we reduce the size of configurations during run time. Finally, we briefly discuss this avenue of development of our semantics, together with the implementation of a prototype tool to perform static analysis of Lua programs.
Fil: Soldevila Raffa, Mallku Ernesto. Universidad Nacional de Córdoba. Facultad de Matemática, Astronomía y Física. Sección Ciencias de la Computación; Argentina. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Córdoba; Argentina
Fil: Ziliani, Luis Francisco. Universidad Nacional de Córdoba. Facultad de Matemática, Astronomía y Física. Sección Ciencias de la Computación; Argentina. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Córdoba; Argentina
Fil: Silvestre, Bruno. Universidade Federal de Goiás; Brasil
Materia
DOMAIN SPECIFIC LANGUAGES
IMPERATIVE LANGUAGES
LUA
OPERATIONAL SEMANTICS
RANDOMIZED TESTING
REDUCTION SEMANTICS
SEMANTICS
Nivel de accesibilidad
acceso abierto
Condiciones de uso
https://creativecommons.org/licenses/by-nc-sa/2.5/ar/
Repositorio
CONICET Digital (CONICET)
Institución
Consejo Nacional de Investigaciones Científicas y Técnicas
OAI Identificador
oai:ri.conicet.gov.ar:11336/222479

id CONICETDig_644ef0bd3fae6517e77289d1fba57075
oai_identifier_str oai:ri.conicet.gov.ar:11336/222479
network_acronym_str CONICETDig
repository_id_str 3498
network_name_str CONICET Digital (CONICET)
spelling From Specification to Testing: Semantics Engineering for Lua 5.2Soldevila Raffa, Mallku ErnestoZiliani, Luis FranciscoSilvestre, BrunoDOMAIN SPECIFIC LANGUAGESIMPERATIVE LANGUAGESLUAOPERATIONAL SEMANTICSRANDOMIZED TESTINGREDUCTION SEMANTICSSEMANTICShttps://purl.org/becyt/ford/1.2https://purl.org/becyt/ford/1We provide a formal semantics for a large subset of the Lua programming language, in its version 5.2. The semantics is a major part of an ongoing effort to construct reliable tools to analyze Lua code. In this work, we present the details of several key aspects of the language, like the semantics of its only structured data-type (tables), its meta-programming mechanism (metatables), error handling, and how these mechanisms are used to define a complex dynamic semantics that must deal with several possible erroneous situations during run time, given the nature of the language. The semantics is mechanized in Redex, a DSL specially designed to specify and debug operational semantics. We validated the mechanization in two ways: first, by executing within Redex the test suite of the reference interpreter of Lua, and second, by specifying and performing random testing of its fundamental properties using the redex-check tool. Together, they evidence that our model soundly captures the semantics of the selected fragment of the language. Additionally, we address some of the performance problems that typically arise when testing a mechanization in Redex, by using a simple implementation of a reachability-based garbage collector that captures key aspects of Lua’s. By collecting syntactic garbage, we reduce the size of configurations during run time. Finally, we briefly discuss this avenue of development of our semantics, together with the implementation of a prototype tool to perform static analysis of Lua programs.Fil: Soldevila Raffa, Mallku Ernesto. Universidad Nacional de Córdoba. Facultad de Matemática, Astronomía y Física. Sección Ciencias de la Computación; Argentina. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Córdoba; ArgentinaFil: Ziliani, Luis Francisco. Universidad Nacional de Córdoba. Facultad de Matemática, Astronomía y Física. Sección Ciencias de la Computación; Argentina. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Córdoba; ArgentinaFil: Silvestre, Bruno. Universidade Federal de Goiás; BrasilSpringer2022-08info:eu-repo/semantics/articleinfo:eu-repo/semantics/publishedVersionhttp://purl.org/coar/resource_type/c_6501info:ar-repo/semantics/articuloapplication/pdfapplication/pdfapplication/pdfhttp://hdl.handle.net/11336/222479Soldevila Raffa, Mallku Ernesto; Ziliani, Luis Francisco; Silvestre, Bruno; From Specification to Testing: Semantics Engineering for Lua 5.2; Springer; Journal Of Automated Reasoning; 66; 4; 8-2022; 905-9520168-7433CONICET DigitalCONICETenginfo:eu-repo/semantics/altIdentifier/url/https://link.springer.com/article/10.1007/s10817-022-09638-yinfo:eu-repo/semantics/altIdentifier/doi/10.1007/s10817-022-09638-yinfo: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-09-29T10:21:31Zoai:ri.conicet.gov.ar:11336/222479instacron: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-09-29 10:21:31.654CONICET Digital (CONICET) - Consejo Nacional de Investigaciones Científicas y Técnicasfalse
dc.title.none.fl_str_mv From Specification to Testing: Semantics Engineering for Lua 5.2
title From Specification to Testing: Semantics Engineering for Lua 5.2
spellingShingle From Specification to Testing: Semantics Engineering for Lua 5.2
Soldevila Raffa, Mallku Ernesto
DOMAIN SPECIFIC LANGUAGES
IMPERATIVE LANGUAGES
LUA
OPERATIONAL SEMANTICS
RANDOMIZED TESTING
REDUCTION SEMANTICS
SEMANTICS
title_short From Specification to Testing: Semantics Engineering for Lua 5.2
title_full From Specification to Testing: Semantics Engineering for Lua 5.2
title_fullStr From Specification to Testing: Semantics Engineering for Lua 5.2
title_full_unstemmed From Specification to Testing: Semantics Engineering for Lua 5.2
title_sort From Specification to Testing: Semantics Engineering for Lua 5.2
dc.creator.none.fl_str_mv Soldevila Raffa, Mallku Ernesto
Ziliani, Luis Francisco
Silvestre, Bruno
author Soldevila Raffa, Mallku Ernesto
author_facet Soldevila Raffa, Mallku Ernesto
Ziliani, Luis Francisco
Silvestre, Bruno
author_role author
author2 Ziliani, Luis Francisco
Silvestre, Bruno
author2_role author
author
dc.subject.none.fl_str_mv DOMAIN SPECIFIC LANGUAGES
IMPERATIVE LANGUAGES
LUA
OPERATIONAL SEMANTICS
RANDOMIZED TESTING
REDUCTION SEMANTICS
SEMANTICS
topic DOMAIN SPECIFIC LANGUAGES
IMPERATIVE LANGUAGES
LUA
OPERATIONAL SEMANTICS
RANDOMIZED TESTING
REDUCTION SEMANTICS
SEMANTICS
purl_subject.fl_str_mv https://purl.org/becyt/ford/1.2
https://purl.org/becyt/ford/1
dc.description.none.fl_txt_mv We provide a formal semantics for a large subset of the Lua programming language, in its version 5.2. The semantics is a major part of an ongoing effort to construct reliable tools to analyze Lua code. In this work, we present the details of several key aspects of the language, like the semantics of its only structured data-type (tables), its meta-programming mechanism (metatables), error handling, and how these mechanisms are used to define a complex dynamic semantics that must deal with several possible erroneous situations during run time, given the nature of the language. The semantics is mechanized in Redex, a DSL specially designed to specify and debug operational semantics. We validated the mechanization in two ways: first, by executing within Redex the test suite of the reference interpreter of Lua, and second, by specifying and performing random testing of its fundamental properties using the redex-check tool. Together, they evidence that our model soundly captures the semantics of the selected fragment of the language. Additionally, we address some of the performance problems that typically arise when testing a mechanization in Redex, by using a simple implementation of a reachability-based garbage collector that captures key aspects of Lua’s. By collecting syntactic garbage, we reduce the size of configurations during run time. Finally, we briefly discuss this avenue of development of our semantics, together with the implementation of a prototype tool to perform static analysis of Lua programs.
Fil: Soldevila Raffa, Mallku Ernesto. Universidad Nacional de Córdoba. Facultad de Matemática, Astronomía y Física. Sección Ciencias de la Computación; Argentina. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Córdoba; Argentina
Fil: Ziliani, Luis Francisco. Universidad Nacional de Córdoba. Facultad de Matemática, Astronomía y Física. Sección Ciencias de la Computación; Argentina. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Córdoba; Argentina
Fil: Silvestre, Bruno. Universidade Federal de Goiás; Brasil
description We provide a formal semantics for a large subset of the Lua programming language, in its version 5.2. The semantics is a major part of an ongoing effort to construct reliable tools to analyze Lua code. In this work, we present the details of several key aspects of the language, like the semantics of its only structured data-type (tables), its meta-programming mechanism (metatables), error handling, and how these mechanisms are used to define a complex dynamic semantics that must deal with several possible erroneous situations during run time, given the nature of the language. The semantics is mechanized in Redex, a DSL specially designed to specify and debug operational semantics. We validated the mechanization in two ways: first, by executing within Redex the test suite of the reference interpreter of Lua, and second, by specifying and performing random testing of its fundamental properties using the redex-check tool. Together, they evidence that our model soundly captures the semantics of the selected fragment of the language. Additionally, we address some of the performance problems that typically arise when testing a mechanization in Redex, by using a simple implementation of a reachability-based garbage collector that captures key aspects of Lua’s. By collecting syntactic garbage, we reduce the size of configurations during run time. Finally, we briefly discuss this avenue of development of our semantics, together with the implementation of a prototype tool to perform static analysis of Lua programs.
publishDate 2022
dc.date.none.fl_str_mv 2022-08
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/222479
Soldevila Raffa, Mallku Ernesto; Ziliani, Luis Francisco; Silvestre, Bruno; From Specification to Testing: Semantics Engineering for Lua 5.2; Springer; Journal Of Automated Reasoning; 66; 4; 8-2022; 905-952
0168-7433
CONICET Digital
CONICET
url http://hdl.handle.net/11336/222479
identifier_str_mv Soldevila Raffa, Mallku Ernesto; Ziliani, Luis Francisco; Silvestre, Bruno; From Specification to Testing: Semantics Engineering for Lua 5.2; Springer; Journal Of Automated Reasoning; 66; 4; 8-2022; 905-952
0168-7433
CONICET Digital
CONICET
dc.language.none.fl_str_mv eng
language eng
dc.relation.none.fl_str_mv info:eu-repo/semantics/altIdentifier/url/https://link.springer.com/article/10.1007/s10817-022-09638-y
info:eu-repo/semantics/altIdentifier/doi/10.1007/s10817-022-09638-y
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
application/pdf
dc.publisher.none.fl_str_mv Springer
publisher.none.fl_str_mv Springer
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_ 1844614203950759936
score 13.070432