predicate abstraction for relaxed memory models
play

Predicate Abstraction for Relaxed Memory Models Andrei Dan Yuri - PowerPoint PPT Presentation

Predicate Abstraction for Relaxed Memory Models Andrei Dan Yuri Meshman Martin Vechev Eran Yahav ETH Zurich Technion ETH Zurich Technion Motivation Modern processors' memory operations are not executed in the order specified by the


  1. Predicate Abstraction for Relaxed Memory Models Andrei Dan Yuri Meshman Martin Vechev Eran Yahav ETH Zurich Technion ETH Zurich Technion

  2. Motivation Modern processors' memory operations are not executed in the order specified by the program code Example: Initial state: X = 0, Y = 0 Thread 1: Thread 2: Y = 1; X = 1; r1 = X; r2 = Y; The final state r1 = 0, r2 = 0 can occur on Intel x86 memory model and cannot occur under SC. Objective: Automatically verify concurrent programs on relaxed memory models, both finite and infinite state.

  3. Classic predicate abstraction Set of predicates V SC Program P SC (f1 = 0) ... (Flag1 = 0) load f1 = Flag1; ... ... Predicate Abstraction SMT Solver Cube Size = N Boolean Program B SC ... store B1 = choose(B2, ¬B2); ... verified Specification Model Checker counter (Ball et al., PLDI '01) example

  4. Predicate abstraction for RMM Program P SC Set of predicates V SC (f1 = 0) ... (Flag1 = 0) load f1 = Flag1; ... ... Predicate Abstraction SMT Solver Cube Size = N Boolean Program B SC ... store B1 = choose(B2, ¬B2); ... verified Specification Model Checker counter example

  5. Predicate abstraction for RMM Set of predicates V SC Program P SC (f1 = 0) ... (Flag1 = 0) load f1 = Flag1; ... ... SC to RMM Program P RMM ... Predicate Abstraction SMT Solver Cube Size = N Boolean Program B SC ... store B1 = choose(B2, ¬B2); ... verified Specification Model Checker counter example

  6. Predicate abstraction for RMM Set of predicates V SC Program P SC (f1 = 0) ... (Flag1 = 0) load f1 = Flag1; ... ... Predicate SC to RMM Adjustment Set of predicates V RMM Program P RMM ... ... Predicate Abstraction SMT Solver Cube Size = N Boolean Program B RMM ... verified Specification Model Checker counter example

  7. Predicate abstraction for RMM Set of predicates V SC Program P SC (f1 = 0) ... (Flag1 = 0) load f1 = Flag1; SC → RMM ... ... adaptation Predicate RMM: PSO & TSO SC to RMM Adjustment Set of predicates V RMM Program P RMM ... ... Predicate Abstraction SMT Solver Cube Size = N Classic predicate Boolean Program B RMM abstraction on ... RMM input verified Specification Model Checker counter example

  8. Problem: too many calls to the SMT solver Set of predicates V SC Program P SC (f1 = 0) ... (Flag1 = 0) load f1 = Flag1; SC → RMM ... ... adaptation Predicate SC to RMM Adjustment Set of predicates V RMM Program P RMM The problem ... ... O((#preds) ^N ) Predicate Abstraction SMT Solver Cube Size = N Classic predicate Boolean Program B RMM abstraction on ... RMM input verified Model Checker counter example

  9. Experimental data for PSO model Algorithm Memory model # predicates # calls to SMT ABP SC 8 4,000 PSO 15 44,000 Dekker SC 7 1,500 PSO 20 102,000 Peterson SC 7 1,400 PSO 20 102,000 Bakery SC 15 1,600,000 PSO (1 var) 23 91,000,000 For Bakery, the Cube Size has to be 4 to prove SC correctness. Building the boolean program for 35 predicates times out.

  10. Problem: too many calls to the SMT solver Build RMM proof: Set of predicates V SC Program P SC Predicate SC to RMM Adjustment Set of predicates V RMM Program P RMM The problem O((#preds) ^N ) Predicate Abstraction SMT Solver Cube Size = N Boolean Program B RMM verified Model Checker counter example

  11. Idea: Leverage the SC proof Build SC proof: Build RMM proof: Set of predicates V SC Program P SC Set of predicates V SC Program P SC Predicate Abstraction SMT Solver Predicate SC to RMM Cube Size = N Adjustment Extract SC Boolean Program B SC Set of predicates V RMM Program P RMM cubes Model Checker verified Specification Predicate Abstraction SMT Solver Cube Size = 1 Boolean Program B RMM verified Reuse predicate updating information Specification Model Checker counter from SC boolean program example

  12. Idea: Leverage the SC proof Build SC proof: Build RMM proof: Set of predicates V SC Program P SC Set of predicates V SC Program P SC Predicate Abstraction SMT Solver Predicate SC to RMM Cube Size = N Adjustment Extract SC Boolean Program B SC Set of predicates V RMM Program P RMM Linear cubes complexity Model Checker verified Specification O(#preds + #cubes) Predicate Abstraction SMT Solver Cube Size = 1 Boolean Program B RMM verified Reuse predicate updating information Specification Model Checker counter from SC boolean program example

  13. Results for Bakery 1 variable PSO Classic Predicate Our method: Leverage SC proof Abstraction Build SC proof Build PSO proof adapted for PSO # calls to SMT 91,000,000 1,600,000 2,000,000 Time (min) 492 7 10 Total calls to SMT 91,000,000 3,600,000 Total time (min) 492 17 25x less calls to the SMT solver (Yices) by reusing the SC boolean program

  14. Thank you! Questions?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend