- -

Automatic transformation of iterative loops into recursive methods

RiuNet: Repositorio Institucional de la Universidad Politécnica de Valencia

Compartir/Enviar a

Citas

Estadísticas

  • Estadisticas de Uso

Automatic transformation of iterative loops into recursive methods

Mostrar el registro sencillo del ítem

Ficheros en el ítem

dc.contributor.author Insa Cabrera, David es_ES
dc.contributor.author Silva, Josep es_ES
dc.date.accessioned 2016-06-14T13:48:15Z
dc.date.available 2016-06-14T13:48:15Z
dc.date.issued 2015-02
dc.identifier.issn 0950-5849
dc.identifier.uri http://hdl.handle.net/10251/65890
dc.description NOTICE: this is the author’s version of a work that was accepted for publication in Information and Software Technology. Changes resulting from the publishing process, such as peer review, editing, corrections, structural formatting, and other quality control mechanisms may not be reflected in this document. Changes may have been made to this work since it was submitted for publication. A definitive version was subsequently published in Information and Software Technology, [Volume 58, February 2015, Pages 95–109] DOI 10.1016/j.infsof.2014.10.001 es_ES
dc.description.abstract [EN] Context In software engineering, taking a good election between recursion and iteration is essential because their efficiency and maintenance are different. In fact, developers often need to transform iteration into recursion (e.g., in debugging, to decompose the call graph into iterations); thus, it is quite surprising that there does not exist a public transformation from loops to recursion that can be used in industrial projects (i.e., it is automatic, it handles all kinds of loops, it considers exceptions, etc.). Objective This article describes an industrial algorithm implemented as a Java library able to automatically transform iterative loops into equivalent recursive methods. The transformation is described for the programming language Java, but it is general enough as to be adapted to many other languages that allow iteration and recursion. Method We describe the changes needed to transform loops of types while/do/for/foreach into recursion. We provide a transformation schema for each kind of loop. Results Our algorithm is the first public transformation that can be used in industrial projects and faces the whole Java language (i.e., it is fully automatic, it handles all kinds of loops, it considers exceptions, it treats the control statements break and continue, it handles loop labels, it is able to transform any number of nested loops, etc.). This is particularly interesting because some of these features are missing in all previous work, probably, due to the complexity that their mixture introduce in the transformation. Conclusion Developers should use a methodology when transforming code, specifically when transforming loops into recursion. This article provides guidelines and algorithms that allow them to face different problems such as exception handling. The implementation has been made publicly available as open source. es_ES
dc.description.sponsorship This work has been partially supported by the EU (FEDER) and the Spanish Ministerio de Economia y Competitividad (Secretaria de Estado de Investigacion, Desarrollo e Innovacion) under Grant TIN2013-44742-C4-1-R and by the Generalitat Valenciana under Grant PROMETEO/2011/052. David Insa was partially supported by the Spanish Ministerio de Educacion under FPU Grant AP2010-4415. en_EN
dc.language Inglés es_ES
dc.publisher Elsevier es_ES
dc.relation.ispartof Information and Software Technology es_ES
dc.rights Reserva de todos los derechos es_ES
dc.subject Program transformation es_ES
dc.subject Iteration es_ES
dc.subject Recursion es_ES
dc.subject.classification LENGUAJES Y SISTEMAS INFORMATICOS es_ES
dc.title Automatic transformation of iterative loops into recursive methods es_ES
dc.type Artículo es_ES
dc.identifier.doi 10.1016/j.infsof.2014.10.001
dc.relation.projectID info:eu-repo/grantAgreement/MINECO//TIN2013-44742-C4-1-R/ES/VALIDACION ASISTIDA DE PROGRAMAS MEDIANTE METODOS PRECISOS Y RIGUROSOS PARA UNA INGENIERIA DEL SOFTWARE ROBUSTA/ es_ES
dc.relation.projectID info:eu-repo/grantAgreement/GVA//PROMETEO%2F2011%2F052/ES/LOGICEXTREME: TECNOLOGIA LOGICA Y SOFTWARE SEGURO/ es_ES
dc.relation.projectID info:eu-repo/grantAgreement/ME//AP2010-4415/ES/AP2010-4415/ es_ES
dc.rights.accessRights Abierto es_ES
dc.contributor.affiliation Universitat Politècnica de València. Departamento de Sistemas Informáticos y Computación - Departament de Sistemes Informàtics i Computació es_ES
dc.description.bibliographicCitation Insa Cabrera, D.; Silva, J. (2015). Automatic transformation of iterative loops into recursive methods. Information and Software Technology. 58:95-109. https://doi.org/10.1016/j.infsof.2014.10.001 es_ES
dc.description.accrualMethod S es_ES
dc.relation.publisherversion http://dx.doi.org/10.1016/j.infsof.2014.10.001 es_ES
dc.description.upvformatpinicio 95 es_ES
dc.description.upvformatpfin 109 es_ES
dc.type.version info:eu-repo/semantics/publishedVersion es_ES
dc.description.volume 58 es_ES
dc.relation.senia 281903 es_ES
dc.contributor.funder Ministerio de Economía y Competitividad es_ES
dc.contributor.funder Ministerio de Educación es_ES
dc.contributor.funder Generalitat Valenciana es_ES


Este ítem aparece en la(s) siguiente(s) colección(ones)

Mostrar el registro sencillo del ítem