 Download Presentation Test II 精读

# Test II 精读 - PowerPoint PPT Presentation Download Presentation ## Test II 精读

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
##### Presentation Transcript

1. Paper

2. Background • Termination analysis • Determine whether a program will terminate • Correctness of an algorithm depends on termination • Test termination properties of programs • Can a test suite for a program be used profitably for constructing termination proofs?

3. Problem • Generate a novel termination prover based on information derived from tests. (Called TpT) • What kind of program is TpT’s input? • How to define termination?

4. Preliminaries • Define while programs • Input of TpT • Loop: L = while B do S over variables() • A program with loops

5. Preliminaries • Define termination • Loop bound • () -> () • Linear expression = • If each loop has a loop bound, then termination

6. Preliminaries • Generate log data from test inputs • Assume • Get two matrices • Machine learning Candidate loop bound Free invariant

7. Preliminaries • Check loop bound • Add free_invariant and assert into program • Free_invariant can be ignored

8. Algorithm • Input • While program • Test-Suite • Output • Loop bound

9. Algorithm • Inner phase • Generate matrices A and C • “Off-the-self” quadratic programming to learn loop bounds • Fail: does not have integral coeffcients

10. Algorithm • Validate phase • “Off-the-self checker” • Return counterexample(new tests) • Use new tests to next iteration

11. Algorithm • Optimize • Round ??? • If a value between N-0.1 and N+0.1, round to N • Celling for positive and floor for negative • Can only make the bound looser？？？ • Example • [1.9,1,-1,0.95,0.24] -> [2,1,-1,1,1] • 2a + b – c + d + e • Partition • Loop does not have single bound • Different behavior for different inputs

12. Evaluation • Micro-Benchmarks for termination • Oct: OCTANAL distribution • E.g. heapsort and bubblesort • Driver: Windows device drivers • Code fragments from them • Poly: POLYRANK distribution • http://www.eecs.qmul.ac.uk/~aziem/esop/polyrank/

13. Evaluation • Windows Device Drivers • SDV-RP toolkit • Claim that other may have fail to prove termination

14. Evaluation • They claim that • Prove 15% more benchmark • Inner phase of TpT is very efficient • Other technologies may have fail to prove termination

15. Summary • Process • Prove more termination • Effeciency Prove termination while program and test suites Generate input for forming model Machine learning

16. My opinion • All about algorithm • Many formulae • So many black box • Off-the-self, state-of-the-art????WTF

17. Thank you