Author:
BOVE ANA,CAPRETTA VENANZIO
Abstract
Constructive type theory is an expressive programming language in which both algorithms and proofs can be represented. A limitation of constructive type theory as a programming language is that only terminating programs can be defined in it. Hence, general recursive algorithms have no direct formalisation in type theory since they contain recursive calls that satisfy no syntactic condition guaranteeing termination. In this work, we present a method to formalise general recursive algorithms in type theory. Given a general recursive algorithm, our method is to define an inductive special-purpose accessibility predicate that characterises the inputs on which the algorithm terminates. The type-theoretic version of the algorithm is then defined by structural recursion on the proof that the input values satisfy this predicate. The method separates the computational and logical parts of the definitions and thus the resulting type-theoretic algorithms are clear, compact and easy to understand. They are as simple as their equivalents in a functional programming language, where there is no restriction on recursive calls. Here, we give a formal definition of the method and discuss its power and its limitations.
Publisher
Cambridge University Press (CUP)
Subject
Computer Science Applications,Mathematics (miscellaneous)
Cited by
42 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Primitive Recursive Dependent Type Theory;Proceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science;2024-07-08
2. Martin-Löf à la Coq;Proceedings of the 13th ACM SIGPLAN International Conference on Certified Programs and Proofs;2024-01-09
3. Dependently-Typed Programming with Logical Equality Reflection;Proceedings of the ACM on Programming Languages;2023-08-30
4. A Type-Based Approach to Divide-and-Conquer Recursion in Coq;Proceedings of the ACM on Programming Languages;2023-01-09
5. Curiously Empty Intersection of Proof Engineering and Computational Sciences;Computational Methods in Applied Sciences;2023