• Home
  • Search
  • A Bi-Directional Refinement Algorithm for the Calculus of (Co)Inductive Constructions
  • Cite Icon34
  • https://doi.org/10.2168/lmcs-8(1:18)2012Copy DOI Icon

A Bi-Directional Refinement Algorithm for the Calculus of (Co)Inductive Constructions

Show More
  • Abstract
  • Highlights & Summary
  • PDF
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

The paper describes the refinement algorithm for the Calculus of (Co)Inductive Constructions (CIC) implemented in the interactive theorem prover Matita. The refinement algorithm is in charge of giving a meaning to the terms, types and proof terms directly written by the user or generated by using tactics, decision procedures or general automation. The terms are written in an "external syntax" meant to be user friendly that allows omission of information, untyped binders and a certain liberal use of user defined sub-typing. The refiner modifies the terms to obtain related well typed terms in the internal syntax understood by the kernel of the ITP. In particular, it acts as a type inference algorithm when all the binders are untyped. The proposed algorithm is bi-directional: given a term in external syntax and a type expected for the term, it propagates as much typing information as possible towards the leaves of the term. Traditional mono-directional algorithms, instead, proceed in a bottom-up way by inferring the type of a sub-term and comparing (unifying) it with the type expected by its context only at the end. We propose some novel bi-directional rules for CIC that are particularly effective. Among the benefits of bi-directionality we have better error message reporting and better inference of dependent types. Moreover, thanks to bi-directionality, the coercion system for sub-typing is more effective and type inference generates simpler unification problems that are more likely to be solved by the inherently incomplete higher order unification algorithms implemented. Finally we introduce in the external syntax the notion of vector of placeholders that enables to omit at once an arbitrary number of arguments. Vectors of placeholders allow a trivial implementation of implicit arguments and greatly simplify the implementation of primitive and simple tactics.

Loading PDF

Similar Papers
  • Book Chapter

Type Inference in Java: Characteristics and Limitations

  • Jan 01, 2021
  • Neha Kumari +1
  • Conference Article
  • Citations21

Type inference for datalog and its application to query optimisation

  • Jun 09, 2008
  • Oege De Moor +3
  • Book Chapter
  • Citations26

On the Unification of Substitutions in Type Inference

  • Jan 01, 1999
  • Bruce J Mcadam
  • PDF
  • Research Article

Вывод типов для языка Python

  • Jan 01, 2013
  • Proceedings of the Institute for System Programming of RAS
  • I.E Bronshteyn
  • Conference Article
  • Citations30

Polymorphic type inference for machine code

  • Jun 02, 2016
  • Matt Noonan +2
  • Research Article
  • Citations10

Polymorphic type inference for machine code

  • Jun 02, 2016
  • ACM SIGPLAN Notices
  • Matt Noonan +2
  • Research Article
  • Citations24

LHD 2.0: A text mining approach to typing entities in knowledge graphs

  • Jun 02, 2016
  • Journal of Web Semantics
  • Tomáš Kliegr +1
  • Conference Article
  • Citations14

Polymorphic type inference for scripting languages with object extensions

  • Oct 24, 2011
  • Tian Zhao
  • Conference Article

On Synergies between Type Inference, Generation and Normalization of SK-Combinator Trees

  • Sep 01, 2015
  • Paul Tarau
  • Research Article
  • Citations9

A decision procedure for common Lisp'sSUBTYPEP predicate

  • Sep 01, 1992
  • Lisp and Symbolic Computation
  • Henry G Baker
  • Research Article

Type inference, principal typings, and let-polymorphism for first-class mixin modules

  • Sep 12, 2005
  • ACM SIGPLAN Notices
  • Henning Makholm +1
  • Research Article
  • Citations93

Type Inference for Recursively Constrained Types and its Application to OOP

  • Jan 01, 1995
  • Electronic Notes in Theoretical Computer Science
  • Jonathan Eifrig +2
  • Conference Article
  • Citations143

NL2Type: Inferring JavaScript Function Types from Natural Language Information

  • May 01, 2019
  • Rabee Sohail Malik +2
  • Book Chapter
  • Citations227

Towards Type Inference for JavaScript

  • Jan 01, 2005
  • Christopher Anderson +2
  • Conference Article
  • Citations10

Parallel algorithms for unification and other complete problems in p

  • Jan 01, 1984
  • Jeffrey Scott Vitter +1
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.