General recursion via coinductive types

نویسنده

  • Venanzio Capretta
چکیده

A fertile field of research in theoretical computer science investigates the representation of general recursive functions in intensional type theories. Among the most successful approaches are: the use of wellfounded relations, implementation of operational semantics, formalization of domain theory, and inductive definition of domain predicates. Here, a different solution is proposed: exploiting coinductive types to model infinite computations. To every type A we associate a type of partial elements A , coinductively generated by two constructors: the first, paq just returns an element a : A; the second, ⊲ x, adds a computation step to a recursive element x : A . We show how this simple device is sufficient to formalize all recursive functions between two given types. It allows the definition of fixed points of finitary, that is, continuous, operators. We will compare this approach to different ones from the literature. Finally, we mention that the formalization, with appropriate structural maps, defines a strong monad.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A model of guarded recursion via generalised equilogical spaces

We present a new model, called GuardedEqu, of guarded dependent type theory using generalised equilogical spaces. GuardedEqu models guarded recursive types, which can be used to program with coinductive types and we prove that GuardedEqu ensures that all definable functions on coinductive types, e.g., streams, are continuous with respect to the natural topology. We present a direct, elementary,...

متن کامل

The Clocks Are Ticking: No More Delays! Reduction Semantics for Type Theory with Guarded Recursion

Guarded recursion in the sense of Nakano allows general recursive types and terms to be added to type theory without breaking consistency. Recent work has demonstrated applications of guarded recursion such as programming with codata, reasoning about coinductive types, as well as constructing and reasoning about denotational models of general recursive types. Guarded recursion can also be used ...

متن کامل

Distributive laws for the coinductive solution of recursive equations

This paper illustrates the relevance of distributive laws for the solution of recursive equations, and shows that one approach for obtaining coinductive solutions of equations via infinite terms is in fact a special case of a more general approach using an extended form of coinduction via distributive laws.

متن کامل

Coinductive Session Types in Higher-Order Communication Centric Programs

We develop a theory of coinductive session types based on prior work on computational interpretations of linear logic propositions as session types. Unlike other more ad-hoc approaches to recursive session types, our typing discipline supports the compositional definition of potentially infinite interactive behaviour, as required to model realistic distributed systems, while remarkably forbiddi...

متن کامل

Inductive and Coinductive Session Types in Higher-Order Concurrent Programs

We develop a theory of inductive and coinductive session types in a computational interpretation of linear logic, enabling the representation of potentially infinite interactions in a compositionally sound way that preserves logical soundness, a major stepping stone towards a full dependent type theory for expressing and reasoning about session-based concurrent higher order distributed programs...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Logical Methods in Computer Science

دوره 1  شماره 

صفحات  -

تاریخ انتشار 2005