A Formal Foundation for Symbolic Evaluation with Merging

被引:6
|
作者
Porncharoenwase, Sorawee [1 ]
Nelson, Luke [1 ]
Wang, Xi [1 ]
Torlak, Emina [1 ]
机构
[1] Univ Washington, Paul G Allen Sch, Seattle, WA 98195 USA
基金
美国国家科学基金会;
关键词
symbolic evaluation; state merging;
D O I
10.1145/3498709
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Reusable symbolic evaluators are a key building block of solver-aided verification and synthesis tools. A reusable evaluator reduces the semantics of all paths in a program to logical constraints, and a client tool uses these constraints to formulate a satisfiability query that is discharged with SAT or SMT solvers. The correctness of the evaluator is critical to the soundness of the tool and the domain properties it aims to guarantee. Yet so far, the trust in these evaluators has been based on an ad-hoc foundation of testing and manual reasoning. This paper presents the first formal framework for reasoning about the behavior of reusable symbolic evaluators. We develop a newsymbolic semantics for these evaluators that incorporates state merging. Symbolic evaluators use state merging to avoid path explosion and generate compact encodings. To accommodate a wide range of implementations, our semantics is parameterized by a symbolic factory, which abstracts away the details of merging and creation of symbolic values. The semantics targets a rich language that extends Core Scheme with assumptions and assertions, and thus supports branching, loops, and (first-class) procedures. The semantics is designed to support reusability, by guaranteeing two key properties: legality of the generated symbolic states, and the reducibility of symbolic evaluation to concrete evaluation. Legality makes it simpler for client tools to formulate queries, and reducibility enables testing of client tools on concrete inputs. We use the Lean theorem prover to mechanize our symbolic semantics, prove that it is sound and complete with respect to the concrete semantics, and prove that it guarantees legality and reducibility. To demonstrate the generality of our semantics, we develop Leanette, a reference evaluator written in Lean, and Rosette 4, an optimized evaluator written in Racket. We prove Leanette correct with respect to the semantics, and validate Rosette 4 against Leanette via solver-aided differential testing. To demonstrate the practicality of our approach, we port 16 published verification and synthesis tools from Rosette 3 to Rosette 4. Rosette 3 is an existing reusable evaluator that implements the classic merging semantics, adopted from bounded model checking. Rosette 4 replaces the semantic core of Rosette 3 but keeps its optimized symbolic factory. Our results show that Rosette 4 matches the performance of Rosette 3 across a wide range of benchmarks, while providing a cleaner interface that simplifies the implementation of client tools.
引用
收藏
页数:28
相关论文
共 50 条
  • [1] FORMAL VERIFICATION BY SYMBOLIC EVALUATION OF PARTIALLY-ORDERED TRAJECTORIES
    SEGER, CJH
    BRYANT, RE
    [J]. FORMAL METHODS IN SYSTEM DESIGN, 1995, 6 (02) : 147 - 189
  • [2] Formal verification of memory arrays using symbolic trajectory evaluation
    Pandey, M
    Bryant, RE
    [J]. INTERNATIONAL WORKSHOP ON MEMORY TECHNOLOGY, DESIGN AND TESTING, PROCEEDINGS, 1997, : 42 - 49
  • [3] Formal verification of content addressable memories using symbolic trajectory evaluation
    Pandey, M
    Raimi, R
    Bryant, RE
    Abadir, MS
    [J]. DESIGN AUTOMATION CONFERENCE - PROCEEDINGS 1997, 1997, : 167 - 172
  • [4] Formal verification of PowerPC(TM) arrays using symbolic trajectory evaluation
    Pandey, M
    Raimi, R
    Beatty, DL
    Bryant, RE
    [J]. 33RD DESIGN AUTOMATION CONFERENCE, PROCEEDINGS 1996, 1996, : 649 - 654
  • [5] Efficient State Merging in Symbolic Execution
    Kuznetsov, Volodymyr
    Kinder, Johannes
    Bucur, Stefan
    Candea, George
    [J]. ACM SIGPLAN NOTICES, 2012, 47 (06) : 193 - 204
  • [6] State Merging with Quantifiers in Symbolic Execution
    Trabish, David
    Rinetzky, Noam
    Shoham, Sharon
    Sharma, Vaibhav
    [J]. PROCEEDINGS OF THE 31ST ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2023, 2023, : 1140 - 1152
  • [7] A formal foundation for ICNP®
    Hardiker, Nicholas
    Coenen, Amy
    [J]. Consumer-Centered Computer-Suppported Care for Healthy People, 2006, 122 : 705 - 709
  • [8] A Formal Foundation for Metamodeling
    Favre, Liliana
    [J]. RELIABLE SOFTWARE TECHNOLOGIES - ADA-EUROPE 2009, 2009, 5570 : 177 - 191
  • [9] A formal foundation for XrML
    Halpern, JY
    Weissman, V
    [J]. 17TH IEEE COMPUTER SECURITY FOUNDATIONS WORKSHOP, PROCEEDINGS, 2004, : 251 - 263
  • [10] A formal foundation for XrML
    Halpern, Joseph Y.
    Weissman, Vicky
    [J]. JOURNAL OF THE ACM, 2008, 55 (01)