Servicios Personalizados
Revista
Articulo
Indicadores
- Citado por SciELO
- Accesos
Links relacionados
- Similares en SciELO
Compartir
Computación y Sistemas
versión On-line ISSN 2007-9737versión impresa ISSN 1405-5546
Resumen
SUAREZ POLO, Axel; LAVALLE MARTINEZ, José de Jesús y MOLINA REBOLLEDO, Iván. Specifying and Verifying a Transformation of Recursive Functions into Tail-Recursive Functions. Comp. y Sist. [online]. 2023, vol.27, n.1, pp.333-340. Epub 16-Jun-2023. ISSN 2007-9737. https://doi.org/10.13053/cys-27-1-4529.
It is well known that some recursive functions admit a tail recursive counterpart which have a more efficient time-complexity behavior. This paper presents a formal specification and verification of such process. A monoid is used to generate a recursive function and its tail-recursive counterpart. Also, the monoid properties are used to prove extensional equality of both functions. In order to achieve this goal, the Agda programming language and proof assistant is used to generate a parametrized module with a monoid, via dependent types. This technique is exemplified with the length, reverse, and indices functions over lists.
Palabras llave : Dependent types; formal specification and verification; tail recursion; accumulation; program transformation.