An input-output relational domain for algebraic data types and functional arrays

被引:0
作者
Bautista, Santiago [1 ,2 ]
Jensen, Thomas [1 ,2 ]
Montagu, Benoit [1 ,2 ]
机构
[1] Univ Rennes, Rennes, France
[2] INRIA, Rennes, France
关键词
Static analysis; Abstract interpretation; Relational abstract domains; Algebraic data types; Input-output relations; Function summaries; Arrays; ABSTRACTION;
D O I
10.1007/s10703-024-00456-z
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
We define an abstract interpreter for programs manipulating scalars, immutable non-recursive algebraic data types (ADTs), functional arrays and non-recursive functions. We define a first domain that expresses relations between values of ADTs. Our domain extends numeric domains in a generic way, by a disjunctive completion over a reduced product of domains for numeric relations, equalities, and variant constructors. We further extend the segmentation approach for array analysis, in order to allow for values of ADTs inside arrays, and also to capture relations between the content of arrays and the other variables in the program. Our analysis is inter-procedural and modular: it proceeds by computing summaries of the input-output relations of functions, which are then instantiated at call sites. The analysis of ADTs has been implemented in OCaml and tested on a sample of small-to-medium examples, some of which are simplified versions of functions from the formal specification of the seL4 microkernel.
引用
收藏
页码:231 / 304
页数:74
相关论文
共 2 条
  • [1] Lifting Numeric Relational Domains to Algebraic Data Types
    Bautista, Santiago
    Jensen, Thomas
    Montagu, Benoit
    STATIC ANALYSIS, SAS 2022, 2022, 13790 : 104 - 134
  • [2] Shapeliness analysis of functional programs with algebraic data types
    Nitsche, T
    SCIENCE OF COMPUTER PROGRAMMING, 2000, 37 (1-3) : 225 - 252