A On Subtyping-Relation Completeness, with an Application to Iso-Recursive Types

نویسندگان

  • Jay Ligatti
  • Jeremy Blackburn
  • Michael Nachtigal
چکیده

Well-known techniques exist for proving the soundness of subtyping relations with respect to type safety. However, completeness has not been treated with widely applicable techniques, as far as we’re aware. This paper develops techniques for stating and proving that a subtyping relation is complete with respect to type safety and applies the techniques to the study of iso-recursive subtyping. A new proof technique, induction on failing derivations, is provided that may be useful in other domains as well. The common subtyping rules for iso-recursive types—the “Amber rules”—are shown to be incomplete with respect to type safety. That is, there exist iso-recursive types τ1 and τ2 such that τ1 can safely be considered a subtype of τ2, but τ1≤τ2 is not derivable with the Amber rules. New, algorithmic rules are defined for subtyping iso-recursive types, and the rules are proved sound and complete with respect to type safety. The fully implemented subtyping algorithm is optimized to run in O(mn) time, where m is the number of μ-terms in the types being considered and n is the size of the types being considered.

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

ثبت نام

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

منابع مشابه

Subtyping Recursive Types in Kernel Fun

The problem of defining and checking a subtype relation between recursive types was studied in [3] for a first order type system, but for second order systems, which combine subtyping and parametric polymorphism, only negative results are known [17]. This paper studies the problem of subtype checking for recursive types in system kernel Fun, a typed -calculus with subtyping and bounded second o...

متن کامل

Subtyping Recursive Types in Kernel Fun, Preliminary Draft

The problem of deening and checking a subtype relation between recursive types was studied in AC93] for a rst order type system, but for second order systems, which combine subtyping and parametric polymorphism, only negative results are known Ghe93b]. This paper studies the problem of subtype checking for recursive types in system kernel Fun, a typed-calculus with subtyping and bounded second ...

متن کامل

Subtyping recursion and parametric polymorphism in kernel fun

We study subtype checking for recursive types in system kernel Fun, a typed λcalculus with subtyping and bounded second-order polymorphism. Along the lines of [AC93], we define a subtype relation over kernel Fun recursive types, and prove it to be transitive. We then show that the natural extension of the algorithm introduced in [AC93] to compare first-order recursive types yields a non complet...

متن کامل

Subtyping Recursive Types Modulo Associative Commutative Products

We study subtyping of recursive types in the presence of associative and commutative products—that is, subtyping modulo a restricted form of type isomorphisms. We show that this relation, which we claim is useful in practice, is a composition of the usual subtyping relation with the recently proposed notion of equality up to associativity and commutativity of products, and we propose an efficie...

متن کامل

Application of monadic substitution to recursive type containment

In this paper, we present a computer-checked, constructive soundness and completeness result for prototypic recursive type containment with respect to containment of nonwellfounded (finite or infinite) trees. The central role is played by formalisation of substitution of recursive types as a monad, with a traverse function implementing a strategy for potentially infinite recursive unfolding. In...

متن کامل

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


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

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

ثبت نام

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

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2016