SLING: Using Dynamic Analysis to Infer Program Invariants in Separation Logic

被引:12
|
作者
Le, Ton Chanh [1 ]
Zheng, Guolong [2 ]
Nguyen, ThanhVu [2 ]
机构
[1] Stevens Inst Technol, Hoboken, NJ 07030 USA
[2] Univ Nebraska, Lincoln, NE USA
关键词
dynamic invariant analysis; separation logic;
D O I
10.1145/3314221.3314634
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We introduce a new dynamic analysis technique to discover invariants in separation logic for heap-manipulating programs. First, we use a debugger to obtain rich program execution traces at locations of interest on sample inputs. These traces consist of heap and stack information of variables that point to dynamically allocated data structures. Next, we iteratively analyze separate memory regions related to each pointer variable and search for a formula over predefined heap predicates in separation logic to model these regions. Finally, we combine the computed formulae into an invariant that describes the shape of explored memory regions. We present SLING, a tool that implements these ideas to automatically generate invariants in separation logic at arbitrary locations in C programs, e.g., program pre and postconditions and loop invariants. Preliminary results on existing benchmarks show that SLING can efficiently generate correct and useful invariants for programs that manipulate a wide variety of complex data structures.
引用
收藏
页码:788 / 801
页数:14
相关论文
共 50 条
  • [1] Separation logic and program analysis
    O'Hearn, Peter W.
    [J]. STATIC ANALYSIS, PROCEEDINGS, 2006, 4134 : 181 - 181
  • [2] Bridging Static and Dynamic Program Analysis using Fuzzy Logic
    Lidman, Jacob
    Svenningsson, Josef
    [J]. ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2017, (250): : 111 - 126
  • [3] Dynamic Synthesis of Program Invariants using Genetic Programming
    Cardamone, Luigi
    Mocci, Andrea
    Ghezzi, Carlo
    [J]. 2011 IEEE CONGRESS ON EVOLUTIONARY COMPUTATION (CEC), 2011, : 624 - 631
  • [4] Using Symbolic States to Infer Numerical Invariants
    ThanhVu Nguyen
    KimHao Nguyen
    Dwyer, Matthew B.
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2022, 48 (10) : 3877 - 3899
  • [5] IODINE: A tool to automatically infer dynamic invariants for hardware designs
    Hangal, S
    Chandra, N
    Narayanan, S
    Chakravorty, S
    [J]. 42ND DESIGN AUTOMATION CONFERENCE, PROCEEDINGS 2005, 2005, : 775 - 778
  • [6] Using Dynamic Analysis to Generate Disjunctive Invariants
    Thanh Vu Nguyen
    Kapur, Deepak
    Weimer, Westley
    Forrest, Stephanie
    [J]. 36TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2014), 2014, : 608 - 619
  • [7] Program Verification with Separation Logic
    Iosif, Radu
    [J]. MODEL CHECKING SOFTWARE, SPIN 2018, 2018, 10869 : 48 - 62
  • [8] LOGIC PROGRAMMING ENVIRONMENTS - DYNAMIC PROGRAM ANALYSIS AND DEBUGGING
    DUCASSE, M
    NOYE, J
    [J]. JOURNAL OF LOGIC PROGRAMMING, 1994, 20 : 351 - 384
  • [9] Using Dynamic Analysis to Discover Polynomial and Array Invariants
    ThanhVu Nguyen
    Kapur, Deepak
    Weimer, Westley
    Forrest, Stephanie
    [J]. 2012 34TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2012, : 683 - 693
  • [10] Cost analysis of games, using program logic
    Morgan, C
    McIver, A
    [J]. APSEC 2001: EIGHTH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE, PROCEEDINGS, 2001, : 351 - 351