Resolution as Intersection Subtyping via Modus Ponens

10/13/2020
∙
by   Koar Marntirosian, et al.
∙
0
∙

Resolution and subtyping are two common mechanisms in programming languages. Resolution is used by features such as type classes or Scala-style implicits to synthesize values automatically from contextual type information. Subtyping is commonly used to automatically convert the type of a value into another compatible type. So far the two mechanisms have been considered independently of each other. This paper shows that, with a small extension, subtyping with intersection types can subsume resolution. This has three main consequences. Firstly, resolution does not need to be implemented as a separate mechanism. Secondly, the interaction between resolution and subtyping becomes apparent. Finally, the integration of resolution into subtyping enables first-class (implicit) environments. The extension that recovers the power of resolution via subtyping is the modus ponens rule of propositional logic. While it is easily added to declarative subtyping, significant care needs to be taken to retain desirable properties, such as transitivity and decidability of algorithmic subtyping, and coherence. To materialize these ideas we develop λ_i^𝖬𝖯, a calculus that extends a iprevious calculus with disjoint intersection types, and develop its metatheory in the Coq theorem prover.

READ FULL TEXT
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

∙ 07/12/2019

Intersection Types for the Computational lambda-Calculus

We study polymorphic type assignment systems for untyped lambda-calculi ...
∙ 03/26/2018

The Delta-calculus: syntax and types

We present the Delta-calculus, an explicitly typed lambda-calculus with ...
∙ 02/15/2019

Types by Need (Extended Version)

A cornerstone of the theory of lambda-calculus is that intersection type...
∙ 09/21/2000

A Tableau Calculus for Pronoun Resolution

We present a tableau calculus for reasoning in fragments of natural lang...
∙ 04/23/2019

Intersection Types for Unboundedness Problems

Intersection types have been originally developed as an extension of sim...
∙ 12/04/2019

A Quantitative Understanding of Pattern Matching

This paper shows that the recent approach to quantitative typing systems...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.