CPS Translating Inductive and Coinductive Types [Extended Abstract]
نویسندگان
چکیده
We investigate CPS translatability of typed al uli with indu tive and oindu tive types. We show that tenable Plotkin-style all-by-name CPS translations exist for simply typed al uli with a natural number type and stream types and, more generally, with arbitrary positive indu tive and oindu tive types. These translations also work in the presen e of ontrol operators and generalize for dependently typed al uli where ase-like eliminations are only allowed in non-dependent forms. No translation is possible along the same lines for small -types and sum types with dependent ase.
منابع مشابه
Monad Translating Inductive and Coinductive Types
We show that the call-by-name monad translation of simply typed lambda calculus extended with sum and product types extends to special and general inductive and coinductive types so that its crucial property of preserving typings and βand commuting reductions is maintained. Specific similar-purpose translations such as CPS translations follow from the general monad translations by specializatio...
متن کاملCall-by-Value and Call-by-Name Dual Calculi with Inductive and Coinductive Types
This paper extends the dual calculus with inductive types and coinductive types. The paper first introduces a non-deterministic dual calculus with inductive and coinductive types. Besides the same duality of the original dual calculus, it has the duality of inductive and coinductive types, that is, the duality of terms and coterms for inductive and coinductive types, and the duality of their re...
متن کاملMonotone ( Co ) Inductive Types and Fixed - Point Types
We study ve extensions of the polymorphically typed lambda-calculus (system F) by type constructs intended to model xed-points of monotone operators. Building on work by H. Geuvers concerning the relation between term rewrite systems for least pre-xed-points and greatest post-xed-points of positive type schemes (i. e., non-nested positive inductive and coinductive types) and so-called retract t...
متن کاملMixed Inductive/Coinductive Types and Strong Normalization
We introduce the concept of guarded saturated sets, saturated sets of strongly normalizing terms closed under folding of corecursive functions. Using this tool, we can model equi-inductive and equicoinductive types with terminating recursion and corecursion principles. Two type systems are presented: Mendler (co)iteration and sized types. As an application we show that we can directly represent...
متن کاملAnonymous (co)inductive types: A way for structured recursion to cohabit with modular abstraction
We investigate the interaction between structured recursion combinators and modularization in the style of Standard ML. When built-in structured recursion combinators are straightforwardly added to a language like SML’97 or OCaml, they cannot operate over values of abstractly specified types. Consequently, when a program is modularized in an abstract and fine-grained way, the structured recursi...
متن کامل