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

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: de Vilhena, Paulo Emílio, Pottier, François
Natura: Preprint
Pubblicazione: 2021
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866911775774998528
author de Vilhena, Paulo Emílio
Pottier, François
author_facet de Vilhena, Paulo Emílio
Pottier, François
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2112_07292
institution arXiv
publishDate 2021
record_format arxiv
spellingShingle Verifying an Effect-Handler-Based Define-By-Run Reverse-Mode AD Library
de Vilhena, Paulo Emílio
Pottier, François
Logic in Computer Science
Programming Languages
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.
title Verifying an Effect-Handler-Based Define-By-Run Reverse-Mode AD Library
topic Logic in Computer Science
Programming Languages
url https://arxiv.org/abs/2112.07292