A shortcut fusion rule for circular program calculation

Circular programs are a powerful technique to express multiple traversal algorithms as a single traversal function in a lazy setting. In this paper, we present a shortcut deforestation technique to calculate circular programs. The technique we propose takes as input the composition of two functions,...

ver descrição completa

Detalhes bibliográficos
Autor principal: Fernandes, João Paulo (author)
Outros Autores: Pardo, Alberto (author), Saraiva, João Alexandre (author)
Formato: conferencePaper
Idioma:eng
Publicado em: 2007
Assuntos:
Texto completo:http://hdl.handle.net/1822/36104
País:Portugal
Oai:oai:repositorium.sdum.uminho.pt:1822/36104
Descrição
Resumo:Circular programs are a powerful technique to express multiple traversal algorithms as a single traversal function in a lazy setting. In this paper, we present a shortcut deforestation technique to calculate circular programs. The technique we propose takes as input the composition of two functions, such that the first builds an intermediate structure and some additional context information which are then processed by the second one, to produce the final result. Our transformation into circular programs achieves intermediate structure deforestation and multiple traversal elimination. Furthermore, the calculated programs preserve the termination properties of the original ones.