Specifying and Verifying a Transformation of Recursive Functions into Tail-Recursive Functions



Título del documento: Specifying and Verifying a Transformation of Recursive Functions into Tail-Recursive Functions
Revista: Computación y sistemas
Base de datos:
Número de sistema: 000560763
ISSN: 1405-5546
Autors: 1
1
1
Institucions: 1Benemérita Universidad Autónoma de Puebla, Puebla, México
Any:
Període: Ene-Mar
Volum: 27
Número: 1
Paginació: 333-340
País: México
Idioma: Inglés
Resumen en inglés 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.
Keyword: Dependent types,
Formal specification and verification,
Tail recursion,
Accumulation,
Program transformation
Text complet: Texto completo (Ver HTML) Texto completo (Ver PDF)