Using%20query%20checking%20to%20generate%20test%20sequences - PowerPoint PPT Presentation

About This Presentation
Title:

Using%20query%20checking%20to%20generate%20test%20sequences

Description:

... table for controlled variable Throttle. 13. Modeling CCS with SMV ... Implementing controlled variable Throttle. Environmental assumptions. 47 next(CC) := case ... – PowerPoint PPT presentation

Number of Views:70
Avg rating:3.0/5.0
Slides: 22
Provided by: mary352
Category:

less

Transcript and Presenter's Notes

Title: Using%20query%20checking%20to%20generate%20test%20sequences


1
Using query checking to generate test sequences
  • Maryam Rashidian
  • January, 2004

2
Why use query checking to generate test sequences?
  • Testing is our tool to uncover errors
  • Test sets
  • Coverage criteria
  • Statement coverage
  • Branch coverage
  • Logical Expression coverage
  • Test requirements
  • Manual construction vs. automatic generation

3
Using model checking to generate test sequences
  • Counterexamples
  • Trap properties
  • Another alternative

4
Temporal logic queries
  • What is a query?
  • A query is an expression obtained by replacing a
    single atomic proposition in a temporal logic
    formula by the symbol ?x, which is referred to as
    the placeholder of the query.
  • Examples AG(?x), EF(?x ? p)
  • What is the solution to the query?
  • A propositional formula ? is a solution to a
    query ?, relative to state s of Kripke structure
    K, if K,s ? ??.
  • Restricting atomic propositions
  • Example AG(?xp,q)
  • Using queries with multiple placeholders
  • Example EF(?xcc ? EX?ycc)
  • What is a witness?
  • A path through the model that explains why the
    solution is as computed.

5
TLQSolver
6
SCR requirements model
  • Four Variable Model

7
SCR Constructs
  • Mode class
  • Mode
  • Term
  • Condition
  • Event
  • Input event _at_T or _at_F
  • Conditioned event _at_T(c) WHEN d

8
SCR tables
  • Condition table
  • Event table
  • Mode transition table

9
Case study Cruise Control System
  • SCR requirements model for CCS
  • Modeling CCS with SMV
  • Finding queries for Logical Expression coverage
    criteria

10
SCR requirements model for CCS
  • SCR constructs
  • Monitored variables
  • Ignition
  • Brake
  • Accel
  • Button
  • Speed
  • Mode class
  • CC
  • Off, Inactive, Cruise, Override
  • Controlled variable
  • Throttle

11
SCR requirements
  • SCR tables
  • Mode transition table for CC

12
SCR requirements
  • SCR tables
  • Event table for controlled variable Throttle

13
Modeling CCS with SMV
  • Variable definition
  • Implementing mode class
  • Implementing controlled variable Throttle
  • Environmental assumptions

47 next(CC) case 48 CCOff (!(Ignition)
(next(Ignition))) Inactive 49 CCInactive
((Ignition) !(next(Ignition))) Off 50
CCInactive Ignition Running !(Toofast)
!(Brake) !(Accel) (!(Button b_Cruise)
(next(Button) b_Cruise)) Cruise 51
CCCruise ((Ignition) !(next(Ignition)))
Off 52 CCCruise (!(Toofast)
(next(Toofast))) Inactive 53 CCCruise
((Running) !(next(Running))) Inactive 54
CCCruise (!(Brake) (next(Brake)))
Override 55 CCCruise (!(Accel)
(next(Accel))) Override 56 CCCruise
(!(Button b_Off) (next(Button) b_Off))
Override 57 CCOverride ((Ignition)
!(next(Ignition))) Off 58 CCOverride
Ignition ((Running) !(next(Running)))
Inactive 59 CCOverride Ignition Running
!(Brake) !(Accel) !(Toofast) (!(Button
b_Resume) (next(Button) b_Resume)) Cruise
60 CCOverride Ignition Running !(Brake)
!(Accel) !(Toofast) (!(Button b_Cruise)
(next(Button) b_Cruise)) Cruise 61 1
CC 62 esac
14
Finding queries for Logical Expression coverage
criteria
  • Logical Expression coverage building
  • Find predicates and clauses
  • Find test sequences for
  • Predicate Coverage (PC)
  • Clause Coverage (CC)
  • General Active Clause Coverage (GACC)
  • Correlated Active Clause Coverage (CACC)
  • Restricted Active Clause Coverage (RACC)

15
Find predicates and clauses
16
Predicate Coverage (PC)
  • Two requirements
  • Predicate should evaluate to TRUE
  • Predicate should evaluate to FALSE

17
Predicate Coverage (PC)
18
Predicate Coverage (PC)
19
Predicate Coverage (PC)
20
Query checker limitations
  • Do not accept Integer variables.
  • Do not accept more than 4 or 5 placeholders,
    based on the type of the variable.

21
Thank you
  • Questions and Answers
Write a Comment
User Comments (0)
About PowerShow.com