SlideShare a Scribd company logo
AUTOMATIC
            VERIFICATION OF
            LOOP INVARIANTS
            Olivier Ponsini, Hélène Collavizza, Carine Fédèle,
ICSM 2010
            Claude Michel, Michel Rueher
Outline
2/8


       Loop invariants are useful
       Automatic generation may produce spurious loop
        invariants

           We contribute a constraint-based approach for
           effectively filtering out spurious invariants
Why loop invariants?
3/8




                             Program testing and
                                 verification


      Program design and
        implementation
                           Program maintenance
                           • Program understanding and
                             documentation
                           • Error finding and correction
                           • Optimization and refactoring
How to obtain loop invariants?
4/8


                                  Correct
      Automatic generation                              Interproc
                                   Time demanding
      of correct invariants                              InvGen
                                   Weak invariants

                                  Fast
       Automatic generation                             Daikon
                                  Strong invariants
      of candidate invariants                           Gin-Pink
                                   Spurious


                                                       Fast
      Candidate                 Invariant              Strong
      invariants                checking               Correct
Verification of loop invariants
5/8

                                {I  Cond} Body {I}
          Hoare rule:
                        {I} while (Cond) Body {I  Cond}


  /*@ requires Pre
                         Base case:
    @ ensures Post
    @*/
  ... method(...) {            Pre  enc(Init)  I
    Init
    while (Cond) {       Inductive case:
      Body
    }                          I  Cond  enc(Body)  I
    Final
  }
CPBPV
6/8


       Constraint-based program verification
           JML (Java Modeling Language) pre and post conditions
           On-the-fly execution path exploration
           Refutation proof with
            counter-example                    JML annotated methods


       Bounded approach                              method2
                                                                    method3




           Integer domain size                                 method1




           Array size                 False assertions
                                      + test cases
                                                            CPLEX


                                                                      CP
                                                                               True
                                                      CPBPV                   assertions
Experimentations
7/8

  5 classical programs from    # checked invariants (32 bits)
   verification domain          160                                    Time out
                                140                               < 1min

                                120
  180 candidate invariants
                                100
   from different sources
                                 80
         Heuristics (125)                                       <1s
                                 60
         Daikon (48)
                                 40
         InvGen (3)             20
                                                      Time out
                                           < 1min
         Textbooks (7)           0
                                          <1s

                                              Valid               Spurious

  8, 16, and 32-bit integers
Conclusion and perspectives
8/8


       An effective checker for candidate loop invariants
           Refuting spurious invariants is fast
           No false positive
           Test cases are produced as counter-examples


       Perspectives
           Extend to programs with multiple and nested loops
           Integrate CPBPV

More Related Content

KEY
An introduction to mutation testing
PPTX
You Cannot Fix What You Cannot Find! --- An Investigation of Fault Localizati...
PPT
Verilog Lecture3 hust 2014
PDF
MUTANTS KILLER - PIT: state of the art of mutation testing system
PPTX
IEEE ACM Studying the Relationship between Exception Handling Practices and P...
PDF
Www javatpoint-com-corejava-interview-questions-2
PDF
HES2011 - Eloi Vanderbeken - Hackito Ergo Sum Crackme
PPTX
Social Networking
An introduction to mutation testing
You Cannot Fix What You Cannot Find! --- An Investigation of Fault Localizati...
Verilog Lecture3 hust 2014
MUTANTS KILLER - PIT: state of the art of mutation testing system
IEEE ACM Studying the Relationship between Exception Handling Practices and P...
Www javatpoint-com-corejava-interview-questions-2
HES2011 - Eloi Vanderbeken - Hackito Ergo Sum Crackme
Social Networking

Similar to Ponsini automatic slides (20)

PPTX
ACM Distinguished Program: Cooperative Testing and Analysis: Human-Tool, Tool...
PPTX
Hi-Lite erts2012
PPTX
Evolutionary Testing of Stateful Systems: a Holistic Approach
PPT
Cleansing test suites from coincidental correctness to enhance falut localiza...
PDF
Faults and Regression testing - Localizing Failure-Inducing Program Edits Bas...
ODP
Формальная верификация как средство тестирования (в Java)
PPT
Software testing ari force institute of tech.
PPTX
ByteCode 2012 Talk: Quantitative analysis of Java/.Net like programs to under...
PPTX
A Survey on Automatic Test Generation and Crash Reproduction
PPT
Effective flowgraph-based malware variant detection
DOC
White box-sol
PDF
Upgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVC
PDF
ICST11.ppt
PDF
DejaVOO: A Regression Testing Tool for Java Software
KEY
Pontificating quantification
PDF
State Space Exploration for NASA’s Safety Critical Systems
PDF
Integrating Proof and Testing in Verification Strategies for Safety Critical ...
PPT
testing(2).pptjjsieieo2i33kejjskskosowwiwk
PDF
Lecture01a correctness
PDF
Specification-based Verification of Incomplete Programs
ACM Distinguished Program: Cooperative Testing and Analysis: Human-Tool, Tool...
Hi-Lite erts2012
Evolutionary Testing of Stateful Systems: a Holistic Approach
Cleansing test suites from coincidental correctness to enhance falut localiza...
Faults and Regression testing - Localizing Failure-Inducing Program Edits Bas...
Формальная верификация как средство тестирования (в Java)
Software testing ari force institute of tech.
ByteCode 2012 Talk: Quantitative analysis of Java/.Net like programs to under...
A Survey on Automatic Test Generation and Crash Reproduction
Effective flowgraph-based malware variant detection
White box-sol
Upgrading to System Verilog for FPGA Designs, Srinivasan Venkataramanan, CVC
ICST11.ppt
DejaVOO: A Regression Testing Tool for Java Software
Pontificating quantification
State Space Exploration for NASA’s Safety Critical Systems
Integrating Proof and Testing in Verification Strategies for Safety Critical ...
testing(2).pptjjsieieo2i33kejjskskosowwiwk
Lecture01a correctness
Specification-based Verification of Incomplete Programs
Ad

More from ICSM 2010 (15)

PDF
A tree kernel based approach for clone detection
PPTX
Scalable Semantic Web-based Source Code Search Infrastructure
PDF
2D and 3D Visualizations In Wikidev2.0 M. Fokaefs, D. Serrano, B. Tansey and ...
PDF
Wiki dev nlp
PDF
iFL: An Interactive Environment for Understanding Feature Implementations
PDF
Using Clone Detection to Identify Bugs in Concurrent Software
PDF
Physical and Conceptual Identifier Dispersion: Measures and Relation to Fault...
PDF
Automatically Repairing Test Cases for Evolving Method Declarations
PDF
Automated Identification of Cross-browser Issues in Web Applications
PDF
Reverse Engineering Object-Oriented Distributed Systems
PPTX
Software asset management
PPTX
Successfulresearch 100915022614-phpapp01
PPTX
Enabling multi tenancy(An Industrial Experience Report)
PDF
Studying the impact of dependency network measures on software quality
PDF
Icsm2010 Announcement
A tree kernel based approach for clone detection
Scalable Semantic Web-based Source Code Search Infrastructure
2D and 3D Visualizations In Wikidev2.0 M. Fokaefs, D. Serrano, B. Tansey and ...
Wiki dev nlp
iFL: An Interactive Environment for Understanding Feature Implementations
Using Clone Detection to Identify Bugs in Concurrent Software
Physical and Conceptual Identifier Dispersion: Measures and Relation to Fault...
Automatically Repairing Test Cases for Evolving Method Declarations
Automated Identification of Cross-browser Issues in Web Applications
Reverse Engineering Object-Oriented Distributed Systems
Software asset management
Successfulresearch 100915022614-phpapp01
Enabling multi tenancy(An Industrial Experience Report)
Studying the impact of dependency network measures on software quality
Icsm2010 Announcement
Ad

Ponsini automatic slides

  • 1. AUTOMATIC VERIFICATION OF LOOP INVARIANTS Olivier Ponsini, Hélène Collavizza, Carine Fédèle, ICSM 2010 Claude Michel, Michel Rueher
  • 2. Outline 2/8  Loop invariants are useful  Automatic generation may produce spurious loop invariants We contribute a constraint-based approach for effectively filtering out spurious invariants
  • 3. Why loop invariants? 3/8 Program testing and verification Program design and implementation Program maintenance • Program understanding and documentation • Error finding and correction • Optimization and refactoring
  • 4. How to obtain loop invariants? 4/8 Correct Automatic generation Interproc Time demanding of correct invariants InvGen Weak invariants Fast Automatic generation Daikon Strong invariants of candidate invariants Gin-Pink Spurious Fast Candidate Invariant Strong invariants checking Correct
  • 5. Verification of loop invariants 5/8 {I  Cond} Body {I} Hoare rule: {I} while (Cond) Body {I  Cond} /*@ requires Pre  Base case: @ ensures Post @*/ ... method(...) { Pre  enc(Init)  I Init while (Cond) {  Inductive case: Body } I  Cond  enc(Body)  I Final }
  • 6. CPBPV 6/8  Constraint-based program verification  JML (Java Modeling Language) pre and post conditions  On-the-fly execution path exploration  Refutation proof with counter-example JML annotated methods  Bounded approach method2 method3  Integer domain size method1  Array size False assertions + test cases CPLEX CP  True CPBPV assertions
  • 7. Experimentations 7/8  5 classical programs from # checked invariants (32 bits) verification domain 160 Time out 140 < 1min 120  180 candidate invariants 100 from different sources 80  Heuristics (125) <1s 60  Daikon (48) 40  InvGen (3) 20 Time out < 1min  Textbooks (7) 0 <1s Valid Spurious  8, 16, and 32-bit integers
  • 8. Conclusion and perspectives 8/8  An effective checker for candidate loop invariants  Refuting spurious invariants is fast  No false positive  Test cases are produced as counter-examples  Perspectives  Extend to programs with multiple and nested loops  Integrate CPBPV