License: Creative Commons Attribution 4.0 International license (CC BY 4.0)
When quoting this document, please refer to the following
DOI: 10.4230/LIPIcs.FSCD.2023.7
URN: urn:nbn:de:0030-drops-179915
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2023/17991/
Go to the corresponding LIPIcs Volume Portal


Losekoot, Théo ; Genet, Thomas ; Jensen, Thomas

Automata-Based Verification of Relational Properties of Functions over Algebraic Data Structures

pdf-format:
LIPIcs-FSCD-2023-7.pdf (0.9 MB)


Abstract

This paper is concerned with automatically proving properties about the input-output relation of functional programs operating over algebraic data types. Recent results show how to approximate the image of a functional program using a regular tree language. Though expressive, those techniques cannot prove properties relating the input and the output of a function, e.g., proving that the output of a function reversing a list has the same length as the input list. In this paper, we built upon those results and define a procedure to compute or over-approximate such a relation. Instead of representing the image of a function by a regular set of terms, we represent (an approximation of) the input-output relation by a regular set of tuples of terms. Regular languages of tuples of terms are recognized using a tree automaton recognizing convolutions of terms, where a convolution transforms a tuple of terms into a term built on tuples of symbols. Both the program and the properties are transformed into predicates and Constrained Horn clauses (CHCs). Then, using an Implication Counter Example procedure (ICE), we infer a model of the clauses, associating to each predicate a regular relation. In this ICE procedure, checking if a given model satisfies the clauses is undecidable in general. We overcome undecidability by proposing an incomplete but sound inference procedure for such relational regular properties. Though the procedure is incomplete, its implementation performs well on 120 examples. It efficiently proves non-trivial relational properties or finds counter-examples.

BibTeX - Entry

@InProceedings{losekoot_et_al:LIPIcs.FSCD.2023.7,
  author =	{Losekoot, Th\'{e}o and Genet, Thomas and Jensen, Thomas},
  title =	{{Automata-Based Verification of Relational Properties of Functions over Algebraic Data Structures}},
  booktitle =	{8th International Conference on Formal Structures for Computation and Deduction (FSCD 2023)},
  pages =	{7:1--7:22},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-277-8},
  ISSN =	{1868-8969},
  year =	{2023},
  volume =	{260},
  editor =	{Gaboardi, Marco and van Raamsdonk, Femke},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/opus/volltexte/2023/17991},
  URN =		{urn:nbn:de:0030-drops-179915},
  doi =		{10.4230/LIPIcs.FSCD.2023.7},
  annote =	{Keywords: Formal verification, Tree automata, Constrained Horn Clauses, Model inference, Relational properties, Algebraic datatypes}
}

Keywords: Formal verification, Tree automata, Constrained Horn Clauses, Model inference, Relational properties, Algebraic datatypes
Collection: 8th International Conference on Formal Structures for Computation and Deduction (FSCD 2023)
Issue Date: 2023
Date of publication: 28.06.2023
Supplementary Material: Software: https://gitlab.inria.fr/tlosekoo/auto-forestation archived at: https://archive.softwareheritage.org/swh:1:dir:e25762023e1b0ed4326ca177d1084f71244c5b8d
Dataset: http://people.irisa.fr/Thomas.Genet/AutoForestation/


DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI