File Download
  Links for fulltext
     (May Require Subscription)
Supplementary

Article: Greedy Implicit Bounded Quantification

TitleGreedy Implicit Bounded Quantification
Authors
KeywordsBounded Quantification
Mechanical Formalization
Type Inference
Issue Date16-Oct-2023
PublisherACM
Citation
Proceedings of the ACM on Programming Languages, 2023, v. 7, n. OOPSLA How to Cite?
Abstract

Mainstream object-oriented programming languages such as Java, Scala, C#, or TypeScript have polymorphic type systems with subtyping and bounded quantification. Bounded quantification, despite being a pervasive and widely used feature, has attracted little research work on type-inference algorithms to support it. A notable exception is local type inference, which is the basis of most current implementations of type inference for mainstream languages. However, support for bounded quantification in local type inference has important restrictions, and its non-algorithmic specification is complex. 

In this paper, we present a variant of kernel F≤, which is the canonical calculus with bounded quantification, with implicit polymorphism. Our variant, called Fb, comes with a declarative and an algorithmic formulation of the type system. The declarative type system is based on previous work on bidirectional typing for predicative higher-rank polymorphism and a greedy approach to implicit instantiation. This allows for a clear declarative specification where programs require few type annotations and enables implicit polymorphism where applications omit type parameters. Just as local type inference, explicit type applications are also available in Fb if desired. This is useful to deal with impredicative instantiations, which would not be allowed otherwise in Fb. Due to the support for impredicative instantiations, we can obtain a completeness result with respect to kernel F≤, showing that all the well-typed kernel F≤programs can type-check in Fb. The corresponding algorithmic version of the type system is shown to be sound, complete, and decidable. All the results have been mechanically formalized in the Abella theorem prover.


Persistent Identifierhttp://hdl.handle.net/10722/339347
ISI Accession Number ID

 

DC FieldValueLanguage
dc.contributor.authorCui, Chen-
dc.contributor.authorJiang, Shengyi-
dc.contributor.authorDos Santos Oliveira, Bruno C-
dc.date.accessioned2024-03-11T10:35:53Z-
dc.date.available2024-03-11T10:35:53Z-
dc.date.issued2023-10-16-
dc.identifier.citationProceedings of the ACM on Programming Languages, 2023, v. 7, n. OOPSLA-
dc.identifier.urihttp://hdl.handle.net/10722/339347-
dc.description.abstract<p>Mainstream object-oriented programming languages such as Java, Scala, C#, or TypeScript have polymorphic type systems with subtyping and bounded quantification. Bounded quantification, despite being a pervasive and widely used feature, has attracted little research work on type-inference algorithms to support it. A notable exception is local type inference, which is the basis of most current implementations of type inference for mainstream languages. However, support for bounded quantification in local type inference has important restrictions, and its non-algorithmic specification is complex. </p><p>In this paper, we present a variant of kernel <em>F</em>≤, which is the canonical calculus with bounded quantification, with implicit polymorphism. Our variant, called <em>F</em>≤<em>b</em>, comes with a declarative and an algorithmic formulation of the type system. The declarative type system is based on previous work on bidirectional typing for predicative higher-rank polymorphism and a greedy approach to implicit instantiation. This allows for a clear declarative specification where programs require few type annotations and enables implicit polymorphism where applications omit type parameters. Just as local type inference, explicit type applications are also available in <em>F</em>≤<em>b</em> if desired. This is useful to deal with impredicative instantiations, which would not be allowed otherwise in <em>F</em>≤<em>b</em>. Due to the support for impredicative instantiations, we can obtain a completeness result with respect to kernel <em>F</em>≤, showing that all the well-typed kernel <em>F</em>≤programs can type-check in <em>F</em>≤<em>b</em>. The corresponding algorithmic version of the type system is shown to be sound, complete, and decidable. All the results have been mechanically formalized in the Abella theorem prover.</p>-
dc.languageeng-
dc.publisherACM-
dc.relation.ispartofProceedings of the ACM on Programming Languages-
dc.rightsThis work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.-
dc.subjectBounded Quantification-
dc.subjectMechanical Formalization-
dc.subjectType Inference-
dc.titleGreedy Implicit Bounded Quantification-
dc.typeArticle-
dc.description.naturepublished_or_final_version-
dc.identifier.doi10.1145/3622871-
dc.identifier.scopuseid_2-s2.0-85175069254-
dc.identifier.volume7-
dc.identifier.issueOOPSLA-
dc.identifier.eissn2475-1421-
dc.identifier.isiWOS:001087279100075-
dc.identifier.issnl2475-1421-

Export via OAI-PMH Interface in XML Formats


OR


Export to Other Non-XML Formats