Verifying an Effect-Handler-Based Define-By-Run Reverse-Mode AD Library - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Article Dans Une Revue Logical Methods in Computer Science Année : 2023

Verifying an Effect-Handler-Based Define-By-Run Reverse-Mode AD Library

Résumé

We apply program verification technology to the problem of specifying and verifying automatic differentiation (AD) algorithms. We focus on define-by-run, a style of AD where the program that must be differentiated is executed and monitored by the automatic differentiation algorithm. We begin by asking, "what is an implementation of AD?" and "what does it mean for an implementation of AD to be correct?" We answer these questions both at an informal level, in precise English prose, and at a formal level, using types and logical assertions. After answering these broad questions, we focus on a specific implementation of AD, which involves a number of subtle programming-language features, including dynamically allocated mutable state, first-class functions, and effect handlers. We present a machine-checked proof, expressed in a modern variant of Separation Logic, of its correctness. We view this result as an advanced exercise in program verification, with potential future applications to the verification of more realistic automatic differentiation systems and of other software components that exploit delimited-control effects.
Fichier principal
Vignette du fichier
de-vilhena-pottier-verifying-rmad.pdf (792.31 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Licence : CC BY - Paternité

Dates et versions

hal-04292453 , version 1 (17-11-2023)

Licence

Paternité

Identifiants

Citer

Paulo Emílio de Vilhena, François Pottier. Verifying an Effect-Handler-Based Define-By-Run Reverse-Mode AD Library. Logical Methods in Computer Science, 2023, 19 (4), pp.51. ⟨10.46298/lmcs-19(4:5)2023⟩. ⟨hal-04292453⟩
22 Consultations
9 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More