Unfolding Iterators: Specification and Verification of Higher-Order Iterators, in OCaml

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Chirica, Ion, Pereira, Mário
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911021625507840
author Chirica, Ion
Pereira, Mário
author_facet Chirica, Ion
Pereira, Mário
contents Albeit being a central notion of every programming language, formally and modularly reasoning about iteration proves itself to be a non-trivial feat, specially in the context of higher-order iteration. In this paper, we present a generic approach to the specification and deductive verification of higher-order iterators, written in the OCaml language. Our methodology follows two key principles: first, the usage of the Gospel specification language to describe the general behaviour of any iteration schema; second, the usage of the Cameleer framework to deductively verify that every iteration client is correct with respect to its logical specification. To validate our approach we develop a set of verified case studies, ranging from classic list iterators to graph algorithms implemented in the widely used OCamlGraph library.
format Preprint
id arxiv_https___arxiv_org_abs_2506_20310
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Unfolding Iterators: Specification and Verification of Higher-Order Iterators, in OCaml
Chirica, Ion
Pereira, Mário
Programming Languages
Logic in Computer Science
Albeit being a central notion of every programming language, formally and modularly reasoning about iteration proves itself to be a non-trivial feat, specially in the context of higher-order iteration. In this paper, we present a generic approach to the specification and deductive verification of higher-order iterators, written in the OCaml language. Our methodology follows two key principles: first, the usage of the Gospel specification language to describe the general behaviour of any iteration schema; second, the usage of the Cameleer framework to deductively verify that every iteration client is correct with respect to its logical specification. To validate our approach we develop a set of verified case studies, ranging from classic list iterators to graph algorithms implemented in the widely used OCamlGraph library.
title Unfolding Iterators: Specification and Verification of Higher-Order Iterators, in OCaml
topic Programming Languages
Logic in Computer Science
url https://arxiv.org/abs/2506.20310