Manifest Termination - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Conference Papers Year : 2023

Manifest Termination

Abstract

In formal systems combining dependent types and inductive types, such as the Coq proof assistant [8], non-terminating programs are frowned upon. They can indeed be made to return impossible results, thus endangering the consistency of the system [7], although the transient usage of a non-terminating Y combinator, typically for searching witnesses, is safe [4]. To avoid this issue, the definition of a recursive function is allowed only if one of its arguments is of an inductive type and any recursive call is performed on a syntactically smaller argument. If there is no such argument, the user has to artificially add one, e.g., an accessibility property. Free monads can still be used to address general recursion [6] and elegant methods make possible to extract partial functions from sophisticated recursive schemes [2, 5]. The latter yet rely on an inductive characterization of the domain of a function, and of its computational graph, which in turn might require a substantial effort of specification and proof. This leads to a rather frustrating situation when computations are involved. Indeed, the user first has to formally prove that the function will terminate, then the computation can be performed, and finally a result is obtained (assuming the user waited long enough). But since the computation did terminate, what was the point of proving that it would terminate? This abstract investigates how users of proof assistants based on variants of the Calculus of Inductive Constructions could benefit from manifestly terminating computations. A companion file showcasing the approach in the Coq proof assistant is available online [1].
Fichier principal
Vignette du fichier
article.pdf (242.31 Ko) Télécharger le fichier
Origin Files produced by the author(s)

Dates and versions

hal-04172297 , version 1 (27-07-2023)

Licence

Identifiers

  • HAL Id : hal-04172297 , version 1

Cite

Assia Mahboubi, Guillaume Melquiond. Manifest Termination. TYPES 2023 - 29th International Conference on Types for Proofs and Programs, Jun 2023, Valencia, Spain. pp.1-3. ⟨hal-04172297⟩
61 View
22 Download

Share

Gmail Mastodon Facebook X LinkedIn More