## Soundness and Principal Contexts for a Shallow Polymorphic Type System based on Classical Logic

Citations: | 1 - 0 self |

### BibTeX

@MISC{Summers_soundnessand,

author = {Alexander J. Summers},

title = {Soundness and Principal Contexts for a Shallow Polymorphic Type System based on Classical Logic},

year = {}

}

### OpenURL

### Abstract

In this paper we investigate how to adapt the well-known notion of ML-style polymorphism (shallow polymorphism) to a term calculus based on a Curry-Howard correspondence with classical sequent calculus, namely, theX i-calculus. We show that the intuitive approach is unsound, and pinpoint the precise nature of the problem. We define a suitably refined type system, and prove its soundness. We then define a notion of principal contexts for the type system, and provide an algorithm to compute these, which is proved to be sound and complete with respect to the type system. In the process, we formalise and prove correctness of generic unification, which generalises Robinson’s unification to shallow-polymorphic types. Key words: Curry-Howard, classical logic, generic unification, principal types, cut elimination 1.

### Citations

936 | A theory of type polymorphism in progra.mming
- Milner
- 1978
(Show Context)
Citation Context ...l, Curry types are those built from atomic types and the binary→operator. 42.2. The Hindley-Milner Type System for ML The archetypal example of a shallow-polymorphic type system is the HindleyMilner =-=[17, 18]-=- type system, which underlies the type system for the ML programming language. The main advantages of this approach over that of System F [19, 20], for example, are practical: type checking and type a... |

560 |
Untersuchungen über das logische Schliessen
- Gentzen
- 1935
(Show Context)
Citation Context ...alculus based on a Curry-Howard Correspondence with classical sequent calculus. As such, the reduction rules of theX i -calculus correspond (in the typeable cases) with the process of cut elimination =-=[24]-=-. The calculus is essentially an untyped variant of one of the term representations for sequent calculus proofs used in Urban’s PhD thesis [8], and the reduction behaviour is that described by Urban’s... |

358 |
Principal type-schemes for functional programs
- Damas, Milner
- 1982
(Show Context)
Citation Context ...[19, 20], for example, are practical: type checking and type assignment (within certain constraints, as we will explain) are decidable, and can be implemented by relatively straightforward algorithms =-=[21]-=-. In contrast, it has been shown that the corresponding problems are undecidable for System F [22]. We briefly recall here the basic definitions, and refer the reader to Damas and Milner’s work [21] f... |

292 |
Abstract types have existential types
- Mitchell, Plotkin
- 1985
(Show Context)
Citation Context ...-hand subterm, and then using the (potentially existentially-quantified) type obtained to help type the left. Existential polymorphism is traditionally understood in the context of information hiding =-=[31]-=-, i.e., providing a facility to lose typing information from a term, rather than providing extra power in terms of typeability. However, this is a question of paradigm: in a traditional functional set... |

234 | A formulae-as-types notion of control
- Griffin
- 1990
(Show Context)
Citation Context ...if a function’s behaviour is independent of the type of its argument, it must be redefined for each such type. In recent years, there has been a wealth of work sparked by the seminal paper of Griffin =-=[1]-=-, concerning the extension of the Curry-Howard Correspondence [2, 3, 4] to various classical logics (e.g., [5, 6, 7, 8]). In particular, the reduction Email addresses: alexander.summers@inf.ethz.ch (A... |

229 |
Une extension de l’interprétation de Gödel à l’analyse et son application à l’élimination de coupures dans l’analyse et la théorie des types
- Girard
- 1971
(Show Context)
Citation Context ... shallow-polymorphic type system is the HindleyMilner [17, 18] type system, which underlies the type system for the ML programming language. The main advantages of this approach over that of System F =-=[19, 20]-=-, for example, are practical: type checking and type assignment (within certain constraints, as we will explain) are decidable, and can be implemented by relatively straightforward algorithms [21]. In... |

207 |
Modal Logics
- Feys
- 1965
(Show Context)
Citation Context ...ent, it must be redefined for each such type. In recent years, there has been a wealth of work sparked by the seminal paper of Griffin [1], concerning the extension of the Curry-Howard Correspondence =-=[2, 3, 4]-=- to various classical logics (e.g., [5, 6, 7, 8]). In particular, the reduction Email addresses: alexander.summers@inf.ethz.ch (Alexander J. Summers) URL:http://people.inf.ethz.ch/summersa (Alexander ... |

161 | The duality of computation
- Curien, Herbelin
(Show Context)
Citation Context ... In recent years, there has been a wealth of work sparked by the seminal paper of Griffin [1], concerning the extension of the Curry-Howard Correspondence [2, 3, 4] to various classical logics (e.g., =-=[5, 6, 7, 8]-=-). In particular, the reduction Email addresses: alexander.summers@inf.ethz.ch (Alexander J. Summers) URL:http://people.inf.ethz.ch/summersa (Alexander J. Summers) Preprint submitted to Journal of Alg... |

110 |
Type inference for polymorphic references
- Tofte
- 1990
(Show Context)
Citation Context ...ned with is avoided. There are three main approaches described in the literature for dealing with this unsoundness in the context of ML: 1. Introducing a separate class of (‘imperative’) atomic types =-=[28]-=-, which must be used whenever an ‘imperative’ feature such as call/cc is to be typed, and may not be generalised using the (∀R) rule. In our setting it is less obvious how to understand this solution,... |

108 | The principal type scheme of an object in combinatory logic - Hindley - 1969 |

86 | The essence of principal typings - Wells - 2002 |

76 | A curry-howard foundation for functional computation with control
- Ong, Stewart
- 1997
(Show Context)
Citation Context ...on, Informatics and LogicJanuary 12, 2010behaviour of calculi based on classical logic has been shown to have strong and natural correspondences with control operators in functional languages (e.g., =-=[9, 10, 11, 12, 13]-=-). In this way, proof reductions can be given a strong computational interpretation, and it seems feasible in principle that a calculus based on a CurryHoward correspondence with a classical logic cou... |

58 | Classical Logic and Computation
- Urban
- 2000
(Show Context)
Citation Context ... In recent years, there has been a wealth of work sparked by the seminal paper of Griffin [1], concerning the extension of the Curry-Howard Correspondence [2, 3, 4] to various classical logics (e.g., =-=[5, 6, 7, 8]-=-). In particular, the reduction Email addresses: alexander.summers@inf.ethz.ch (Alexander J. Summers) URL:http://people.inf.ethz.ch/summersa (Alexander J. Summers) Preprint submitted to Journal of Alg... |

58 | Typability and Type Checking in System F are Equivalent and Undecidable
- Wells
- 1999
(Show Context)
Citation Context ...ding extra (redundant) information to the contextΓ(weakening)”. On the other hand, ML, equipped with the shallow polymorphic type assignment described above, does not have a principal typing property =-=[23]-=-. Informally, this essentially is because, given a term M with free variables, it is not possible to determine the most general ‘amount’ of polymorphism to assume for the types of the free variables. ... |

51 | Classical logic, continuation semantics and abstract machines
- Streicher, Reus
- 1998
(Show Context)
Citation Context ...on, Informatics and LogicJanuary 12, 2010behaviour of calculi based on classical logic has been shown to have strong and natural correspondences with control operators in functional languages (e.g., =-=[9, 10, 11, 12, 13]-=-). In this way, proof reductions can be given a strong computational interpretation, and it seems feasible in principle that a calculus based on a CurryHoward correspondence with a classical logic cou... |

34 |
Proofs of Strong Normalisation for Second Order Classical Natural Deduction
- Parigot
- 1997
(Show Context)
Citation Context ... In recent years, there has been a wealth of work sparked by the seminal paper of Griffin [1], concerning the extension of the Curry-Howard Correspondence [2, 3, 4] to various classical logics (e.g., =-=[5, 6, 7, 8]-=-). In particular, the reduction Email addresses: alexander.summers@inf.ethz.ch (Alexander J. Summers) URL:http://people.inf.ethz.ch/summersa (Alexander J. Summers) Preprint submitted to Journal of Alg... |

30 | Minimal classical logic and control operators
- Ariola, Herbelin
- 2003
(Show Context)
Citation Context ...on, Informatics and LogicJanuary 12, 2010behaviour of calculi based on classical logic has been shown to have strong and natural correspondences with control operators in functional languages (e.g., =-=[9, 10, 11, 12, 13]-=-). In this way, proof reductions can be given a strong computational interpretation, and it seems feasible in principle that a calculus based on a CurryHoward correspondence with a classical logic cou... |

29 | The language X : circuits, computations and Classical Logic
- Bakel, Lengrand, et al.
- 2005
(Show Context)
Citation Context ...ns for sequent calculus proofs used in Urban’s PhD thesis [8], and the reduction behaviour is that described by Urban’s cut elimination. The calculus is named after theX-calculus of van Bakel et. al. =-=[25]-=-, but is presented with propagation of cuts as an ‘implicit’ operation (similar to the treatment of substitution in theλ-calculus). The notation we use is not based on Urban’s prefix notation, but rat... |

29 | Polymorphism for imperative languages without imperative types
- Wright
- 1993
(Show Context)
Citation Context ... Therefore, by the time a cut is left-propagated, we may depend essentially on the subject reduction property of the simple type system. 3. Restricting the form of let-bound terms to bind only values =-=[30]-=- (i.e., only allow terms of the form let x=V in M. Again, the soundness of this approach can be seen clearly in our setting; restricting to values here amounts to restricting the left-hand subterm of ... |

24 |
A type-theoretic foundation of continuations and prompts
- Ariola, Herbelin, et al.
- 2004
(Show Context)
Citation Context |

18 |
On the Relation between the Lambda-Mu-Calculus and the Syntactic Theory
- Groote
- 1994
(Show Context)
Citation Context |

16 |
Combinatory Logic: Vol I
- Curry, Feys
- 1958
(Show Context)
Citation Context ...ent, it must be redefined for each such type. In recent years, there has been a wealth of work sparked by the seminal paper of Griffin [1], concerning the extension of the Curry-Howard Correspondence =-=[2, 3, 4]-=- to various classical logics (e.g., [5, 6, 7, 8]). In particular, the reduction Email addresses: alexander.summers@inf.ethz.ch (Alexander J. Summers) URL:http://people.inf.ethz.ch/summersa (Alexander ... |

8 | Approaches to Polymorphism in Classical Sequent Calculus
- Summers, Bakel
- 2006
(Show Context)
Citation Context ...e approach fails for the general system; witness reduction is violated by the more-general reductions possible in theX i -calculus. This problem was not identified in the published work by the author =-=[15]-=-, in which a witness reduction result for this type system is erroneously claimed. We examine here this problem, and identify three sufficient conditions for such a polymorphic type system to fail to ... |

6 |
The formulas-as-types notion of construction, in Curry Festschrift, Hindley and Seldin eds, 479-490
- Howard
- 1980
(Show Context)
Citation Context ...ent, it must be redefined for each such type. In recent years, there has been a wealth of work sparked by the seminal paper of Griffin [1], concerning the extension of the Curry-Howard Correspondence =-=[2, 3, 4]-=- to various classical logics (e.g., [5, 6, 7, 8]). In particular, the reduction Email addresses: alexander.summers@inf.ethz.ch (Alexander J. Summers) URL:http://people.inf.ethz.ch/summersa (Alexander ... |

5 | Curry-Howard Term Calculi for Gentzen-Style Classical Logic
- Summers
- 2008
(Show Context)
Citation Context ...per we investigate how to adapt the well-known notion of ML-style polymorphism (which we call shallow polymorphism in this paper) to a term calculus based on classical logic, namely, theX i -calculus =-=[14]-=-. The problems here are two-fold: firstly what difference does the extension to a classical logic setting make, and secondly, how should polymorphism be implemented in the unusual setting of the seque... |

2 |
Towards a Theory of Type Structures, in: B. Robinet (Ed
- Reynolds
- 1974
(Show Context)
Citation Context ... shallow-polymorphic type system is the HindleyMilner [17, 18] type system, which underlies the type system for the ML programming language. The main advantages of this approach over that of System F =-=[19, 20]-=-, for example, are practical: type checking and type assignment (within certain constraints, as we will explain) are decidable, and can be implemented by relatively straightforward algorithms [21]. In... |

1 |
Ml with callcc is unsound, message sent to the “types” mailing list. Archived at: http://www.seas.upenn.edu/ ~sweirich/types/archive/1991/msg00034.html
- Harper, Lillibridge
- 1991
(Show Context)
Citation Context ...ing. It is wellknown that the original ML approach to polymorphism is unsound in the presence 18of various extensions to the language, such as references, exceptions and the control operator call/cc =-=[26]-=-. Calculi based on classical logic can also be closely related to functional calculi extended with control operators, and we believe that (for example), the version of ML with call/cc included could a... |

1 |
Polymorphism by name for references and continuations, in: POPL ’93
- Leroy
- 1993
(Show Context)
Citation Context ...rties (we conjecture that these properties amount to the subterm representing a proof valid in minimal logic, but this idea is not explored here). 2. Restricting reductions to a call-by-name strategy =-=[29]-=-. It turns out that the problematic cases cannot be reached by call-by-name reductions. The reason for this can be fairly clearly seen in the context of theX i -calculus and the counter-example presen... |