invariants-incremental-fse2004-slides

invariants-incremental-fse2004-slides - Efficient...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Efficient Incremental Dynamic Invariant Detection Jeff Perkins and Michael Ernst MIT CSAIL 27 Oct 2004 20:38 Page 1 Jeff Perkins Efficient Incremental Dynamic Invariant Detection Dynamic invariant detection Program analysis that generalizes over observed runtime values to hypothesize program properties The result is a set of likely invariants per program point Entry to function binary_search(int list, int val) list is sorted list null val list Exit from function square(int a) return = a a Class Stack this.top = this.stack [ this.top_stack-1] this.stack [ this.top_stack ..] = null 27 Oct 2004 20:38 Page 2 Jeff Perkins Efficient Incremental Dynamic Invariant Detection Uses of dynamic invariant detection Verifying safety properties [Vaziri 98] [Nimmer 02] Automatic theorem proving [Win 02] Identifying refactoring opportunities [Kataoka 01] Predicate abstraction [Dodoo 02] Generating test cases [Xie 03] [Gupta 03] Selecting and prioritizing test cases [Harder 03] Explaining test failures [Groce 03] Predicting incompatibilities in component upgrades [McCamant 03] Error detection [Raz 02] [Hangal 02] [Pytlik 03] [Mariani 04] [Brun 04] Error isolation [Xie 02] [Liblit 03] Choosing modalities [Lin 04] 27 Oct 2004 20:38 Page 3 Jeff Perkins Efficient Incremental Dynamic Invariant Detection Goals of this research Handle moderate to large programs Produce useful and expressive program properties Rich set of derived variables array references: a[i] , a[i..] , a[..i] pre-state variables: at exit, orig(x) stands for the value at entry Rich invariant grammar unary, binary, and ternary invariants invariants over pointers, integers, floats, strings and arrays 27 Oct 2004 20:38 Page 4 Jeff Perkins Efficient Incremental Dynamic Invariant Detection Outline Approaches to invariant detection Simple incremental algorithm Simple incremental algorithm scales poorly Many invariants are redundant Multiple pass approach Multi-pass scales poorly to large data sets Optimized incremental algorithm Complications Results 27 Oct 2004 20:38 Page 5 Jeff Perkins Efficient Incremental Dynamic Invariant Detection Simple incremental algorithm Hypothesize each invariant in the grammar Over each set of variables At each program point Check observed values for each variable (sample) at each invariant Discard invariants that are falsified The remaining invariants are true over the sample data Examples DIDUCE [Hangal 02] - checks 1 invariant over each variable Carrot [Pytlik 03] - checks 2 unary and 4 binary invariants Daikon version 1 27 Oct 2004 20:38 Page 6 Jeff Perkins Efficient Incremental Dynamic Invariant Detection Simple incremental algorithm scales poorly Ternary derived variables (eg, A[i..j]) V = the number of source program variables (at a program point) V D = O(V 3 ) Ternary invariants I = O(V D 3 ) = O(V 9 ) The number of possible invariants in modest test cases ranged from 460 million to 750 million 27 Oct 2004 20:38 Page 7 Jeff Perkins Efficient Incremental Dynamic Invariant Detection Many invariants are redundant...
View Full Document

Page1 / 27

invariants-incremental-fse2004-slides - Efficient...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online