A DSL for Integer Range Reasoning: Partition, Interval and Mapping Diagrams

Johannes Eriksson, Masoumeh Parsa

    Forskningsoutput: Kapitel i bok/konferenshandlingKonferensbidragVetenskapligPeer review


    Expressing linear integer constraints and assertions over integer ranges—as becomes necessary when reasoning about arrays—in a legible and succinct form poses a challenge for deductive program verification. Even simple assertions, such as integer predicates quantified over finite ranges, become quite verbose when given in basic first-order logic syntax. In this paper, we propose a domain-specific language (DSL) for assertions over integer ranges based on Reynolds’s interval and partition diagrams, two diagrammatic notations designed to integrate well into linear textual content such as specifications, program annotations, and proofs. We extend intervalf diagrams to the more general concept of mapping diagrams, representing partial functions from disjoint integer intervals. A subset of mapping diagrams, colorings, provide a compact notation for selecting integer intervals that we intend to constrain, and an intuitive new construct, the legend, allows connecting colorings to first-order integer predicates. Reynolds’s diagrams have not been supported widely by verification tools. We implement the syntax and semantics of partition and mapping diagrams as a DSL and theory extension to the Why3 program verifier. We illustrate the approach with examples of verified programs specified with colorings and legends. This work aims to extend the verification toolbox with a lightweight, intuitive DSL for array and integer range specifications.
    Titel på gästpublikationPractical Aspects of Declarative Languages
    ISBN (tryckt)978-3-030-39196-6
    StatusPublicerad - 2020
    MoE-publikationstypA4 Artikel i en konferenspublikation


    NamnLecture Notes in Computer Science

    Fingeravtryck Fördjupa i forskningsämnen för ”A DSL for Integer Range Reasoning: Partition, Interval and Mapping Diagrams”. Tillsammans bildar de ett unikt fingeravtryck.

    Citera det här