| V. Vene and T. Uustalu. Functional programming with apomorphisms (corecursion). Proceedings of the Estonian Academy of Sciences: Physics, Mathematics, 47(3):147--161, 1998. 9th Nordic Workshop on Programming Theory. |
....; s 2 ) hd 1 (s 1 ; s 2 ) hd(s 1 ) and tl merge(s 1 ; s 2 ) merge h 2 ; tl 1 i(s 1 ; s 2 ) merge(s 2 ; tl(s 1 ) as desired. 2 Primitive (Co)Recursion The idea behind the categorical formulation of primitive (Co)recursion is (to my knowledge) due to [2] and has been treated in [5, 4] and, in a much more abstract setting, in [1] Theorem 2.1 (Primitive Recursion) For all f : T ( X:TX) A) A there exists a unique g : X:TX A such that T X:TX in ## T hid;gi ## T ( X:TX A) f ## X:TX g ## A (1) commutes. Proof. Consider the diagram X:TX in ## Th ## T ....
V. Vene and T. Uustalu. Functional Programming with Apomorphisms. In 9th Nordic Workshop on Programming Theory, 1997. 14
.... # # # # # # # # # # # # # ho; si IR hhead;taili IR (X IR ) Id IR [insert;Id IR ] # # # # # # # # # IR IR This example ts into the known schema that arises as the dual of primitive recursion and is thus called primitive corecursion e.g. by Vene and Uustalu [VU97, UV99]. They give the following answer: Theorem 3.1 (primitive corecursion) Assume that the category C has binary coproducts and the functor F : C C has the nal coalgebra h F ; F i. Then for every object X and operation : X F(X F ) there is a unique arrow f : X F making the diagram ....
....principles embodying this type of reasoning. 8 Related Work Two known generalisations of the basic coiteration schema that we are aware of are the schemata that arise as the duals of primitive recursion and course of value iteration, as derived on a categorical level e.g. by Vene and Uustalu [VU97, UV99]. We have already treated these schemata in Sections 3.2 and 6. In both cases the universal characterisation Vene and Uustalu give can be derived from the one the corresponding instance of our theory yields. Furthermore, Vene and Uustalu prove some laws to calculate with the arrows obtained. All ....
Varmo Vene and Tarmo Uustalu. Functional programming with apomorphisms (Corecursion) . In 9th Nordic Workshop on Programming Theory, NWPT'97, Oct 1997. 45
.... complete results for when an arbitrary arrow can be written directly as a fold or unfold, for the special case of the category SET.In future work we will investigate whether the results can be generalised to other categories, and to other patterns of recursion, such as primitive (co )recursion [19,22] and course of value (co )iteration [23] As well as being interesting from a theoretical point of view, we also expect the results to have practical applications in program optimisation. A well structured program is typically factored into several phases, each phase generating a data structure ....
V. Vene and T. Uustalu. Functional programming with apomorphisms (corecursion). Proceedings of the Estonian Academy of Sciences: Physics, Mathematics, 47(3):147--161, 1998.
....view of datatypes, which underlies this research area, dates back to the ADJ group [5] and more recently, to the contributions of T. Hagino [7] and G. Malcolm [12] The relevance of universal properties to program derivation was first recognized by Backhouse in [3] References [14,13] and [16] introduce the recursion functionals discussed here. Reference [4] provides a tutorial introduction. 2 Data Modeling in Camila Camila has been designed as a language for rapid prototyping of modeloriented specifications. and resembles a centenary notation of naive set the ory, something we are ....
....is provided by immediately returning the second argument as soon as the first list gets exhausted. This is expressed by a slightly more general functional, which is the formal dual to the paramorphism pattern discussed above. The new functional is called an apomorphism (first introduced in [16]) and allows for the final result to be either generated in successive steps or all at once without recursion. Therefore, the codomain of f becomes C T , instead of simply C. 6 The expressive power of anamorphisms can only be clearly appreciated in categories, such as Set, in which type ....
V. Vene and T. Uustalu. Functional programming with apomorphisms (corecursion). In Proc. 9th Nordic Workshop on Programming Theory, 1997.
....or coinduction. On the other hand, using fusion requires that corecursive programs are defined using unfold , which for more complicated examples can be unnatural or impossible. However, the unfold operator and its associated proof methods can be generalised to cover all corecursive functions [Vene and Uustalu 1998]. 7. SUMMARY To conclude, we briefly compare the four proof methods discussed above. We believe that the universal property and the fusion laws that are its corollaries are the most convenient of the proof methods. They allow one to avoid lengthy (co )inductive proofs in favour of concise ....
Vene, V. and Uustalu, U. 1998. Functional programming with apomorphisms (corecursion) . Proceedings of the Estonian Academy of Sciences: Physics, Mathematics 47, 3, 147--161.
.... form of induction (as with fixpoint induction and the approximation lemma) For simplicity we have focussed on the unfold operator for lists, but our approach naturally generalises to operators that encapsulate more general patterns of corecursive definition (for example, primitive corecursion [25]) and to any datatype that can be defined as the greatest fixpoint of a functor [17] ACKNOWLEDGEMENTS The second author is supported by EPSRC grant Structured Recursive Programming, and ESPRIT Working Group Applied Semantics. ....
Varmo Vene and Tarmo Uustalu. Functional programming with apomorphisms (corecursion) . In 9th Nordic Workshop on Programming Theory, Oct 1997.
....for a summary of the details. Everything we have said about unfolds for lists holds also for unfolds for other types. Of course, not all corecursive functions are unfolds; the pattern is a little restrictive. But neither are unfolds the only useful encapsulation of corecursion. Uustalu and Vene [32] dualise Meertens paramorphisms [22] to obtain what they call apomorphisms. Informally, an apomorphism is like an unfold, but with the possibility of escape clauses in which the remainder of the result is constructed immediately, without further recursion. Apomorphisms are a generalisation of ....
Varmo Vene and Tarmo Uustalu. Functional programming with apomorphisms (corecursion). In 9th Nordic Workshop on Programming Theory, Oct 1997.
....as catamorphisms and anamorphisms. Primitive recursion, which universally recognized as an important generalization of iteration, is nicely captured by Meertens (1992) paramorphisms. With this paper, we aim to draw attention to the dual construction of apomorphisms, described in (Vos, 95) and (Vene and Uustalu, 1998), which models an undeservedly little appreciated scheme that we like to call primitive corecursion. We also put forward and study two novel constructions, viz. histomorphisms and futumorphisms, that capture course ofvalue iteration and its dual, respectively, and argue that even these schemes ....
....iteration and a demonstration that this readily dualizes into an analysis of primitive corecursion versus coiteration. In general, however, it appears that primitive corecursion has largely been overlooked in the theoretical literature, e.g. Fokkinga, 1992) ignores it. Apart from (Vos, 95) and (Vene and Uustalu, 1998), the sole discussion on primitive corecursion in a programming context that we know about is the laconic report in (Vesely, 1997) on a recent not very clean extension to the categorical functional language Charity in which it is possible to define functions by primitive recursion and primitive ....
[Article contains additional citation context not shown here]
Vene, V., and T. Uustalu. (1998). Functional programming with apomorphisms (corecursion). Proceedings of the Estonian Academy of Sciences: Physics, Mathematics, 47(3), 147--161.
No context found.
V. Vene and T. Uustalu. Functional programming with apomorphisms (corecursion). Proceedings of the Estonian Academy of Sciences: Physics, Mathematics, 47(3):147--161, 1998. 9th Nordic Workshop on Programming Theory.
No context found.
Varmo Vene and Tarmo Uustalu. Functional programming with apomorphisms (corecursion). Proceedings of the Estonian Academy of Sciences: Physics, Mathematics, 47(3):147--161, 1998. 9th Nordic Workshop on Programming Theory.
No context found.
V. Vene, T. Uustalu, Functional programming with apomorphisms (corecursion), Proc. of the Estonian Academy of Sciences: Physics, Mathematics 47 (3) (1998) 147--161, 9th Nordic Workshop on Programming Theory.
No context found.
Varmo Vene and Tarmo Uustalu. Functional programming with apomorphisms (Corecursion) . In 9th Nordic Workshop on Programming Theory, NWPT'97, Oct 1997.
No context found.
Varmo Vene and Tarmo Uustalu. Functional programming with apomorphisms (corecursion). Proceedings of the Estonian Academy of Sciences: Physics, Mathematics, 47(3):147--161, 1998. 9th Nordic Workshop on Programming Theory.
No context found.
Varmo Vene and Tarmo Uustalu. Functional programming with apomorphisms (corecursion). Proceedings of the Estonian Academy of Sciences: Physics, Mathematics, 47(3):147--161, 1998. 9th Nordic Workshop on Programming Theory.
No context found.
Varmo Vene and Tarmo Uustalu. Functional programming with apomorphisms (corecursion). Proceedings of the Estonian Academy of Sciences: Physics, Mathematics, 47(3):147--161, 1998.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC