Nonuniform Coercions via Unification Hints

نویسندگان

  • Claudio Sacerdoti Coen
  • Enrico Tassi
چکیده

We introduce the notion of nonuniform coercion, which is the promotion of a value of one type to an enriched value of a different type via a nonuniform procedure. Nonuniform coercions are a generalization of the (uniform) coercions known in the literature and they arise naturally when formalizing mathematics in an higher order interactive theorem prover using convenient devices like canonical structures, type classes or unification hints. We also show how nonuniform coercions can be naturally implemented at the user level in an interactive theorem prover that allows unification hints.

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

ثبت نام

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

منابع مشابه

A New Technique for Strictness Analysis

Results from Unification Theory and type inference with coercions are combined to produce a new method for performing strictness analysis of functional programs. A formal deduction system is developed in which extended types are derivable for terms of the A-calculus. These extended types contain Boolean rings describing the reduction behaviour of terms. Algorithms implementing the method are de...

متن کامل

Hints in Unification

Several mechanisms such as Canonical Structures [14], Type Classes [16, 13], or Pullbacks [10] have been recently introduced with the aim to improve the power and flexibility of the type inference algorithm for interactive theorem provers. We claim that all these mechanisms are particular instances of a simpler and more general technique, just consisting in providing suitable hints to the unifi...

متن کامل

The Good, the Bad, and the Ugly: An Empirical Study of Implicit Type Conversions in JavaScript

Most popular programming languages support situations where a value of one type is converted into a value of another type without any explicit cast. Such implicit type conversions, or type coercions, are a highly controversial language feature. Proponents argue that type coercions enable writing concise code. Opponents argue that type coercions are error-prone and that they reduce the understan...

متن کامل

Extending System Fη with Abstraction over Erasable Coercions

Erasable coercions in System Fη, also known as retyping functions, are well-typed η-expansions of the identity. They may change the type of terms without changing their behavior and can thus be erased before reduction. Coercions in Fη can model subtyping of known types and some displacement of quanti ers, but not subtyping assumptions nor certain form of delayed type instantiation. We generaliz...

متن کامل

Extending System Fη with Abstraction over Erasable Coercions

Erasable coercions in System Fη , also known as retyping functions, are well-typed η-expansions of the identity. They may change the type of terms without changing their behavior and can thus be erased before reduction. Coercions in Fη can model subtyping of known types and some displacement of quantifiers, but not subtyping assumptions nor certain form of delayed type instantiation. We general...

متن کامل

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


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

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

دوره   شماره 

صفحات  -

تاریخ انتشار 2009