Abstract

Course-of-value recursion is a scheme which allows us to define the value of a function in some argument of an inductive structure by using not only the immediate, but arbitrary previously computed values. In the categorical approach to typed (total) functional programming, where datatypes (codatatypes) are initial algebras (final coalgebras), one models this principle by a construction called histomorphism. On the other hand, it is known that other categorical principles such as catamorphisms and anamorphisms representing definitions by iteration and coiteration have been successfully used to implement safe type systems extending the second-order polymorphic lambda calculus, system F. Hence it is natural to pursuit the definition and implementation of fold operators corresponding to course-of-value recursion as well. This paper proposes some new such extensions and states some important remarks emerged while verifying the correctness and safety properties of their operational semantics, relying not only on the categorical, but also on the logical approach based on fixed-point operators. Our observations should be considered as a starting point for a deeper study of the interrelation between these two approaches.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call