Formal Verification of Imperative First-Class Functions in Move

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Grieskamp, Wolfgang, Zhang, Teng, Kashyap, Vineeth, Silverman, Jake
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866914562405564416
author Grieskamp, Wolfgang
Zhang, Teng
Kashyap, Vineeth
Silverman, Jake
author_facet Grieskamp, Wolfgang
Zhang, Teng
Kashyap, Vineeth
Silverman, Jake
contents The Move Prover (MVP) is a formal verifier for smart contracts written in the Move programming language. Recently, Move on Aptos was extended with higher-order functions: imperative functions as first-class values that can be passed around, stored in data structs, and kept in persistent storage, enabling dynamic dispatch. This paper describes the representation of function values in the Move specification language and their implementation in MVP. We introduce behavioral predicates which characterize Move functions (aborts and pre/post conditions) by single-state or two-state predicates. We also introduce state labels for naming intermediate memory states in which expressions are evaluated and which allow to compose behavioral predicates to describe sequences of state transitions. On SMT level, function values are encoded by discriminating over the possible function values reaching a call site: when the concrete function is known, its effect is accounted for directly; when it is unknown (for example, a function parameter, or a closure loaded from storage), its behavioral predicates describe the effect. Our approach goes beyond, for example, Dafny, by supporting imperative first-class functions which can modify state via Rust-style references and global variables, and leads to more efficient SMT encodings than separation logic because of the static separation of memory enabled by Move. We further extend MVP's specification inference tool to work with function values: given arbitrary higher-order Move code, weakest-precondition analysis semi-automatically derives behavioral-predicate-based specifications, reducing the annotation burden and providing a validation pipeline for the new specification constructs.
format Preprint
id arxiv_https___arxiv_org_abs_2605_10007
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Formal Verification of Imperative First-Class Functions in Move
Grieskamp, Wolfgang
Zhang, Teng
Kashyap, Vineeth
Silverman, Jake
Programming Languages
Logic in Computer Science
Software Engineering
68Q60
D.2.4; F.3.1; D.3.3
The Move Prover (MVP) is a formal verifier for smart contracts written in the Move programming language. Recently, Move on Aptos was extended with higher-order functions: imperative functions as first-class values that can be passed around, stored in data structs, and kept in persistent storage, enabling dynamic dispatch. This paper describes the representation of function values in the Move specification language and their implementation in MVP. We introduce behavioral predicates which characterize Move functions (aborts and pre/post conditions) by single-state or two-state predicates. We also introduce state labels for naming intermediate memory states in which expressions are evaluated and which allow to compose behavioral predicates to describe sequences of state transitions. On SMT level, function values are encoded by discriminating over the possible function values reaching a call site: when the concrete function is known, its effect is accounted for directly; when it is unknown (for example, a function parameter, or a closure loaded from storage), its behavioral predicates describe the effect. Our approach goes beyond, for example, Dafny, by supporting imperative first-class functions which can modify state via Rust-style references and global variables, and leads to more efficient SMT encodings than separation logic because of the static separation of memory enabled by Move. We further extend MVP's specification inference tool to work with function values: given arbitrary higher-order Move code, weakest-precondition analysis semi-automatically derives behavioral-predicate-based specifications, reducing the annotation burden and providing a validation pipeline for the new specification constructs.
title Formal Verification of Imperative First-Class Functions in Move
topic Programming Languages
Logic in Computer Science
Software Engineering
68Q60
D.2.4; F.3.1; D.3.3
url https://arxiv.org/abs/2605.10007