complementary criteria for testing temporal logic
play

Complementary Criteria for Testing Temporal Logic Properties - PowerPoint PPT Presentation

Complementary Criteria for Testing Temporal Logic Properties Gordon Fraser and Franz Wotawa Graz University of Technology, Austria Model-Based Development Process Informal ideas Specification Design Code Realization Model-Based


  1. Complementary Criteria for Testing Temporal Logic Properties Gordon Fraser and Franz Wotawa Graz University of Technology, Austria

  2. Model-Based Development Process Informal ideas Specification Design Code Realization

  3. Model-Based Development Process Informal ideas Informal world World of models Specification Design Code Real world Realization

  4. Model-Based Development Process Informal ideas Informal world World of models Specification Validation Design Code Real world Realization

  5. Model-Based Development Process Informal ideas Informal world World of models Specification Validation Design Formal verification Code Real world Realization

  6. Model-Based Development Process Informal ideas Informal world World of models Specification Model−based testing Validation Design Formal verification Code Real world Realization

  7. Specification Based Testing Informal ideas Informal world World of models Specification Specification based testing Validation Design Formal verification Code Real world Realization

  8. Specification Based Testing Informal ideas Informal world World of models Requirement Executable Specification Properties Formal verification Design Code Real world Realization

  9. Specification Based Testing Informal ideas Informal world World of models Specification Requirement Executable Specification Properties based testing Formal verification Design Code Real world Realization

  10. ✎ ✎ Test cases derived from executable spec ✎ When is a property covered? ✎ How is it covered? ✎ How to generate tests for properties? ✎ Which tests to generate?

  11. ✎ Test cases derived from executable spec ✎ When is a property covered? ✎ How is it covered? ✎ How to generate tests for properties? ✎ Which tests to generate? ✎ Contribution: 2 new criteria to measure and generate tests

  12. Test cases derived from executable spec ✎ When is a property covered? ✎ How is it covered? ✎ How to generate tests for properties? ✎ Which tests to generate? ✎ Contribution: 2 new criteria to measure and generate tests ✎ Assumption: Properties specified in temporal logic

  13. Model Checking Model Property ? satisfies G (x −> F y)

  14. Model Checking Model Property satisfies G (x −> F y)

  15. Model Checking Model Counterexample Property violates G (x −> F y)

  16. Specification Based Testing Informal ideas Informal world World of models Specification Executable Requirement Properties Specification based testing Formal verification Design Code Real world Realization

  17. Specification Based Testing

  18. Specification Based Testing Model Checker LTL Properties Counterexamples

  19. Test Case Generation with Model Checkers Test suite Test + coverage info Test Test Suite predicates generator Coverage Counter Criteria Trap example property never(tp) Cex = SPECIFICATION sequence of states that cover Model tp checker = test

  20. Example Specification: NuSMV ▼❖❉❯▲❊ ♠❛✐♥ ❱❆❘ ❛❝❝❡❧❡r❛t❡✿ ❜♦♦❧❡❛♥❀ ❜r❛❦❡✿ ❜♦♦❧❡❛♥❀ ✈❡❧♦❝✐t②✿ ④ st♦♣✱ s❧♦✇✱ ❢❛st ⑥❀ ❆❙❙■●◆ ✐♥✐t✭✈❡❧♦❝✐t②✮ ✿❂ st♦♣❀ ♥❡①t✭✈❡❧♦❝✐t②✮ ✿❂ ❝❛s❡ ❛❝❝❡❧❡r❛t❡ ✫ ✦❜r❛❦❡ ✫ ✈❡❧♦❝✐t② ❂ st♦♣ ✿ s❧♦✇❀ ❛❝❝❡❧❡r❛t❡ ✫ ✦❜r❛❦❡ ✫ ✈❡❧♦❝✐t② ❂ s❧♦✇ ✿ ❢❛st❀ ✦❛❝❝❡❧❡r❛t❡ ✫ ✦❜r❛❦❡ ✫ ✈❡❧♦❝✐t② ❂ ❢❛st ✿ s❧♦✇❀ ✦❛❝❝❡❧❡r❛t❡ ✫ ✦❜r❛❦❡ ✫ ✈❡❧♦❝✐t② ❂ s❧♦✇ ✿ st♦♣❀ ❜r❛❦❡✿ st♦♣❀ ❚❘❯❊ ✿ ✈❡❧♦❝✐t②❀ ❡s❛❝❀

  21. Example Specification: NuSMV

  22. Temporal Logics

  23. Temporal Logics Example Property G ✿ ✭ velocity ❂ fast ✮

  24. Temporal Logics Example Property X velocity ❂ slow

  25. Temporal Logics Example Property F ✿ accelerate

  26. Temporal Logics Example Property accelerate U brake

  27. Example: NuSMV ▼❖❉❯▲❊ ♠❛✐♥ ❱❆❘ ❛❝❝❡❧❡r❛t❡✿ ❜♦♦❧❡❛♥❀ ❜r❛❦❡✿ ❜♦♦❧❡❛♥❀ ✈❡❧♦❝✐t②✿ ④ st♦♣✱ s❧♦✇✱ ❢❛st ⑥❀ ❆❙❙■●◆ ✐♥✐t✭✈❡❧♦❝✐t②✮ ✿❂ st♦♣❀ ♥❡①t✭✈❡❧♦❝✐t②✮ ✿❂ ❝❛s❡ ❛❝❝❡❧❡r❛t❡ ✫ ✦❜r❛❦❡ ✫ ✈❡❧♦❝✐t② ❂ st♦♣ ✿ s❧♦✇❀ ❛❝❝❡❧❡r❛t❡ ✫ ✦❜r❛❦❡ ✫ ✈❡❧♦❝✐t② ❂ s❧♦✇ ✿ ❢❛st❀ ✦❛❝❝❡❧❡r❛t❡ ✫ ✦❜r❛❦❡ ✫ ✈❡❧♦❝✐t② ❂ ❢❛st ✿ s❧♦✇❀ ✦❛❝❝❡❧❡r❛t❡ ✫ ✦❜r❛❦❡ ✫ ✈❡❧♦❝✐t② ❂ s❧♦✇ ✿ st♦♣❀ ❜r❛❦❡✿ st♦♣❀ ❚❘❯❊ ✿ ✈❡❧♦❝✐t②❀ ❡s❛❝❀

  28. Example: NuSMV ▼❖❉❯▲❊ ♠❛✐♥ ❱❆❘ ❛❝❝❡❧❡r❛t❡✿ ❜♦♦❧❡❛♥❀ ❜r❛❦❡✿ ❜♦♦❧❡❛♥❀ ✈❡❧♦❝✐t②✿ ④ st♦♣✱ s❧♦✇✱ ❢❛st ⑥❀ ❆❙❙■●◆ ✐♥✐t✭✈❡❧♦❝✐t②✮ ✿❂ st♦♣❀ ♥❡①t✭✈❡❧♦❝✐t②✮ ✿❂ ❝❛s❡ ❛❝❝❡❧❡r❛t❡ ✫ ✦❜r❛❦❡ ✫ ✈❡❧♦❝✐t② ❂ st♦♣ ✿ s❧♦✇❀ ❛❝❝❡❧❡r❛t❡ ✫ ✦❜r❛❦❡ ✫ ✈❡❧♦❝✐t② ❂ s❧♦✇ ✿ ❢❛st❀ ✦❛❝❝❡❧❡r❛t❡ ✫ ✦❜r❛❦❡ ✫ ✈❡❧♦❝✐t② ❂ ❢❛st ✿ s❧♦✇❀ ✦❛❝❝❡❧❡r❛t❡ ✫ ✦❜r❛❦❡ ✫ ✈❡❧♦❝✐t② ❂ s❧♦✇ ✿ st♦♣❀ ❜r❛❦❡✿ st♦♣❀ ❚❘❯❊ ✿ ✈❡❧♦❝✐t②❀ ❡s❛❝❀

  29. ✎ ✭ ❫ ✿ ❫ ❂ ✦ ✿ ✭ ❂ ✮✮ ✎ ✭ ✿ ✭ ❫ ✿ ❫ ❂ ✮ ✦ ✭ ❂ ✮✮ Coverage Criteria ❛❝❝❡❧❡r❛t❡ ✫ ✦❜r❛❦❡ ✫ ✈❡❧♦❝✐t② ❂ st♦♣ ✿ s❧♦✇❀ Predicate Coverage

  30. ✎ ✭ ✿ ✭ ❫ ✿ ❫ ❂ ✮ ✦ ✭ ❂ ✮✮ Coverage Criteria ❛❝❝❡❧❡r❛t❡ ✫ ✦❜r❛❦❡ ✫ ✈❡❧♦❝✐t② ❂ st♦♣ ✿ s❧♦✇❀ Predicate Coverage ✎ G ✭ accelerate ❫ ✿ brake ❫ velocity ❂ stop ✦ X ✿ ✭ velocity ❂ slow ✮✮

  31. Coverage Criteria ❛❝❝❡❧❡r❛t❡ ✫ ✦❜r❛❦❡ ✫ ✈❡❧♦❝✐t② ❂ st♦♣ ✿ s❧♦✇❀ Predicate Coverage ✎ G ✭ accelerate ❫ ✿ brake ❫ velocity ❂ stop ✦ X ✿ ✭ velocity ❂ slow ✮✮ ✎ G ✭ ✿ ✭ accelerate ❫ ✿ brake ❫ velocity ❂ stop ✮ ✦ X ✭ velocity ❂ slow ✮✮

  32. Coverage Criteria ❛❝❝❡❧❡r❛t❡ ✫ ✦❜r❛❦❡ ✫ ✈❡❧♦❝✐t② ❂ st♦♣ ✿ s❧♦✇❀ Predicate Coverage ✎ G ✭ accelerate ❫ ✿ brake ❫ velocity ❂ stop ✦ X ✿ ✭ velocity ❂ slow ✮✮ ✎ G ✭ ✿ ✭ accelerate ❫ ✿ brake ❫ velocity ❂ stop ✮ ✦ X ✭ velocity ❂ slow ✮✮ ✎ 15 specification based test criteria ✎ 2 property based criteria 1 Based on vacuity 2 Based on MCDC

  33. ✎ Unique First Cause Coverage ✎ MCDC: Test cases where clauses affect predicates

  34. Unique First Cause Coverage ✎ MCDC: Test cases where clauses affect predicates ✎ UFC [Whalen et al., 2006]: Clause c is the unique first cause of a formula A , if in the first state along a path where A is satisfied, it is satisfied because of c

  35. ✭ ❴ ✮ Unique First Cause Coverage

  36. Unique First Cause Coverage F ✭ a ❴ b ✮

  37. Unique First Cause Coverage ✎ Defined as set of rules ✎ Apply rules to property ✦ set of test predicates ✎ Rules applied to all properties ✎ Test predicates: Measure coverage and generate tests

  38. ✎ ✎ ✎ ❫ ✎ ✎ ✿ ❫ ✿ ✎ ✎ ✦ Unique First Cause Coverage is not enough G ✭✭ c 1 ❫ c 2 ✮ ✩ X d ✮

  39. ✎ ✿ ❫ ✿ ✎ ✎ ✦ Unique First Cause Coverage is not enough G ✭✭ c 1 ❫ c 2 ✮ ✩ X d ✮ ✎ UFC covers: ✎ Where c 1 causes d to be false. ✎ Where c 2 causes d to be false. ✎ Where c 1 ❫ c 2 causes d to be true.

  40. ✿ ❫ ✿ ✎ ✎ ✦ Unique First Cause Coverage is not enough G ✭✭ c 1 ❫ c 2 ✮ ✩ X d ✮ ✎ UFC covers: ✎ Where c 1 causes d to be false. ✎ Where c 2 causes d to be false. ✎ Where c 1 ❫ c 2 causes d to be true. ✎ What if d represents a safety critical value?

  41. ✎ ✦ Unique First Cause Coverage is not enough G ✭✭ c 1 ❫ c 2 ✮ ✩ X d ✮ ✎ UFC covers: ✎ Where c 1 causes d to be false. ✎ Where c 2 causes d to be false. ✎ Where c 1 ❫ c 2 causes d to be true. ✎ What if d represents a safety critical value? ✎ Is ✿ c 1 ❫ ✿ c 2 covered?

  42. Unique First Cause Coverage is not enough G ✭✭ c 1 ❫ c 2 ✮ ✩ X d ✮ ✎ UFC covers: ✎ Where c 1 causes d to be false. ✎ Where c 2 causes d to be false. ✎ Where c 1 ❫ c 2 causes d to be true. ✎ What if d represents a safety critical value? ✎ Is ✿ c 1 ❫ ✿ c 2 covered? ✎ ✦ Property Inactive Clause Coverage

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