Reference. Is sized typing for Coq practical?

Contemporary proof assistants such as Coq require that recursive functions be terminating and corecursive functions be productive to maintain logical consistency of their type theories, and some ensure these properties using syntactic checks. However, being syntactic, they are inherently delicate and restrictive, preventing users from easily writing obviously terminating or productive functions at their whim. Meanwhile, there exist many sized type theories that perform type-based termination and productivity checking, including theories based on the Calculus of (Co)Inductive Constructions (CIC), the core calculus underlying Coq. These theories are more robust and compositional in comparison. So why haven’t they been adapted to Coq? In this paper, we venture to answer this question with CIC ∗ˆ , a sized type theory based on CIC. It extends past work on sized types in CIC with additional Coq features such as global and local definitions. We also present a corresponding size inference algorithm and implement it within Coq’s kernel; for maximal backward compatibility with existing Coq developments, it requires no additional annotations from the user. In our evaluation of the implementation, we find a severe performance degradation when compiling parts of the Coq standard library, inherent to the algorithm itself. We conclude that if we wish to maintain backward compatibility, using size inference as a replacement for syntactic checking is impractical in terms of performance.

Cite

Cite as @chan-2023-is (helia, typst) · \cite{chan-2023-is} (LaTeX)
BibTeX
bibtex · 1 line
@article{chan-2023-is, title={Is sized typing for Coq practical?}, volume={33}, ISSN={1469-7653}, url={http://dx.doi.org/10.1017/s0956796822000120}, DOI={10.1017/s0956796822000120}, journal={Journal of Functional Programming}, publisher={Cambridge University Press (CUP)}, author={CHAN, JONATHAN and LI, YUFENG and BOWMAN, WILLIAM J.}, year={2023} }
hayagriva YAML (typst)
yaml · 17 lines
chan-2023-is:
  type: article
  title: Is sized typing for Coq practical?
  author:
  - CHAN, JONATHAN
  - LI, YUFENG
  - BOWMAN, WILLIAM J.
  date: 2023
  url: http://dx.doi.org/10.1017/s0956796822000120
  serial-number:
    doi: 10.1017/s0956796822000120
    issn: 1469-7653
  parent:
    type: periodical
    title: Journal of Functional Programming
    publisher: Cambridge University Press (CUP)
    volume: 33
Cites 39 works (0 here)
External (39)
chan-2023-is reference entries/refs/chan-2023-is/chan-2023-is.hel