Higher-Order Symbolic Execution via Contracts

被引:22
作者
Tobin-Hochstadt, Sam [1 ]
Van Horn, David [1 ]
机构
[1] Northeastern Univ, Boston, MA 02115 USA
关键词
Languages; Theory; Verification; Higher-order contracts; symbolic execution; reduction semantics; PREDICATE ABSTRACTION; CHECKING;
D O I
10.1145/2398857.2384655
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present a new approach to automated reasoning about higher-order programs by extending symbolic execution to use behavioral contracts as symbolic values, thus enabling symbolic approximation of higher-order behavior. Our approach is based on the idea of an abstract reduction semantics that gives an operational semantics to programs with both concrete and symbolic components. Symbolic components are approximated by their contract and our semantics gives an operational interpretation of contracts-as-values. The result is an executable semantics that soundly predicts program behavior, including contract failures, for all possible instantiations of symbolic components. We show that our approach scales to an expressive language of contracts including arbitrary programs embedded as predicates, dependent function contracts, and recursive contracts. Supporting this rich language of specifications leads to powerful symbolic reasoning using existing program constructs. We then apply our approach to produce a verifier for contract correctness of components, including a sound and computable approximation to our semantics that facilitates fully automated contract verification. Our implementation is capable of verifying contracts expressed in existing programs, and of justifying contract-elimination optimizations.
引用
收藏
页码:537 / 554
页数:18
相关论文
共 44 条
  • [1] [Anonymous], 2010, PLTTR20101 INC
  • [2] [Anonymous], 2012, P ACM SIGPLAN 2012 W
  • [3] [Anonymous], 2001, DESIGN PROGRAMS INTR
  • [4] A practical and flexible flow analysis for higher-order languages
    Ashley, JM
    Dybvig, RK
    [J]. ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1998, 20 (04): : 845 - 868
  • [5] Automatic predicate abstraction of C programs
    Ball, T
    Millstein, T
    Majumdar, R
    Rajamani, SK
    [J]. ACM SIGPLAN NOTICES, 2001, 36 (05) : 203 - 213
  • [6] A Decade of Software Model Checking with SLAM
    Ball, Thomas
    Levin, Vladimir
    Rajamani, Sriram K.
    [J]. COMMUNICATIONS OF THE ACM, 2011, 54 (07) : 68 - 76
  • [7] Banerjee A., 2003, Mathematical Structures in Computer Science, V13, P87, DOI 10.1017/S0960129502003845
  • [8] A modular, polyvariant, and type-based closure analysis
    Banerjee, A
    [J]. ACM SIGPLAN NOTICES, 1997, 32 (08) : 1 - 10
  • [9] Specification and Verification: The Spec# Experience
    Barnett, Mike
    Faehndrich, Manuel
    Leino, K. Rustan M.
    Mueller, Peter
    Schulte, Wolfram
    Venter, Herman
    [J]. COMMUNICATIONS OF THE ACM, 2011, 54 (06) : 81 - 91
  • [10] Sound and complete models of contracts
    Blume, Matthias
    McAllester, David
    [J]. JOURNAL OF FUNCTIONAL PROGRAMMING, 2006, 16 : 375 - 414