1 / 10

Lazy- CSeq : A Lazy Sequentialization Tool for C

Lazy- CSeq : A Lazy Sequentialization Tool for C. Sequentialization. Basic Idea - code - to -code translation concurrent program P ↝ non-det. sequential program P ' P ' simulates all computations (within certain bounds) of P concurrency in P ↝ non-determinism in P '

addison
Download Presentation

Lazy- CSeq : A Lazy Sequentialization Tool for C

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lazy-CSeq: A Lazy Sequentialization Tool for C

  2. Sequentialization Basic Idea - code-to-code translation • concurrentprogram P↝ non-det. sequentialprogram P' • P' simulates all computations (within certain bounds) of P • concurrency in P↝ non-determinism in P' • P' analysed using sequential verification tools

  3. Sequentialization Basic Idea - code-to-code translation • concurrentprogram P↝ non-det. sequentialprogram P' • P' simulates all computations (within certain bounds) of P • concurrency in P↝ non-determinism in P' • P' analysed using sequential verification tools Lazy-CSeq schema • P'simulates all computations (up to K rounds) of P • lazy: avoid exploring unfeasible runs T₁ ∥ T₂ ∥ … ∥ Tn↝ (T'1 ; T'2 ; … ; T'n)K

  4. Lazy-CSeqSequentialization Translation P↝ P': • unwinding, inlining • thread T↝ function T' • main driver: • for round in [1..K] • for thread in [1..N] • T'thread ();

  5. Lazy-CSeqSequentialization Translation P↝ P': • unwinding, inlining • thread T↝ function T' • main driver: • for round in [1..K] • for thread in [1..N] • T'thread (); T' guard; stmt; Thread T↝ function T' • var x;↝ staticvar x; • stmt;↝guard; stmt;

  6. Lazy-CSeqSequentialization Translation P↝ P': • unwinding, inlining • thread T↝ function T' • main driver: • for round in [1..K] • for thread in [1..N] • T'thread (); T' exec context-switchp1 skip Thread T↝ function T' • var x;↝ staticvar x; • stmt;↝ guard; stmt; ... ... Threadsimulation: round 1 • guesscontext-switchpointp1 • executestmtsbeforep1 • jump in mult.hops to the end simulation round 1

  7. Lazy-CSeqSequentialization Translation P↝ P': • unwinding, inlining • thread T↝ function T' • main driver: • for round in [1..K] • for thread in [1..N] • T'thread (); T' skip resume exec context-switchpi Thread T↝ function T' • var x;↝ staticvar x; • stmt;↝ guard; stmt; skip ... ... Threadsimulation: round i • guesscontext-switchpointpi • executestmts from pi-1to pi • jump in mult. hops to the end simulation round i >1

  8. Lazy-CSeq rounds unwind backend sequential non-deterministic C program concurrent C program true/false sequential BMC CBMC, ESBMC, LLBMC CSeq P P'

  9. Conclusions Lightweight translation • small BMC formulae for small number of rounds • reduced memory footprint and verification times Backend integration • we support: BLITZ, CBMC, ESBMC, LLBMC as backends • extends any sequential verification tool for C programs • inherits all non-concurrency checks from the backend (e.g. dynamic memory allocation, array bounds checks, …) Effective for bug-hunting • many concurrency errors show up within few context-switches

  10. Thank You users.ecs.soton.ac.uk/gp4/cseq/cseq.html

More Related