33
Generalised Test Tables Discussion at AIS, TU M¨ unchen 20 July 2017 Dr. Mattias Ulbrich KIT – Die Forschungsuniversit¨ at in der Helmholtz-Gemeinschaft www.kit.edu

Generalised Test Tables

  • Upload
    others

  • View
    21

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Generalised Test Tables

Generalised Test Tables

Discussion at AIS, TU Munchen20 July 2017

Dr. Mattias Ulbrich

KIT – Die Forschungsuniversitat in der Helmholtz-Gemeinschaft www.kit.edu

Page 2: Generalised Test Tables

Project: IMPROVE APS

Institut fur Theoretische InformatikAnwendungsorientierte Formale VerifikationProf. Dr. B. Beckert

IMPROVEAPS

DFG SPP 1593

Mattias Ulbrich – Generalised Test Tables 2/11

Page 3: Generalised Test Tables

Purpose of this meeting

Scientists

propose a novel formal verification notation and engine.Design goal: comprehensibility and usability

meet

Engineers from automation industry

know industrial practice

know industrial requirements for validation processes

⇒ can value usability of the proposal

Mattias Ulbrich – Generalised Test Tables 3/11

Page 4: Generalised Test Tables

Questions we would like to ask . . .

If you use test tables today:

What feature do you miss in your table technique?Which presented generalisation feature do you like(and which not . . . )?

Would validation using generalised test tables be a valuableextension to your validation processes?

What are the requirements to use a formal verification toollike the presented?(e.g., tradeoff specification effort vs. more coverage)

Mattias Ulbrich – Generalised Test Tables 4/11

Page 5: Generalised Test Tables

Industrial Practice: Testing

Automated production systems must be validated

Practice today: Test tables describe individual test cases

Test coverage is not optimal:

Unexpected rare corner cases may be overlooked.Test tables describe behaviour examples, not concepts.Higher coverage means more tables

Goals of project:

Ô Increase test coverage!

Ô Keep Comprehensibility!

Ô Increase Expressiveness!

Mattias Ulbrich – Generalised Test Tables 5/11

Page 6: Generalised Test Tables

Industrial Practice: Testing

Automated production systems must be validated

Practice today: Test tables describe individual test cases

Sequence of signals in clock cyclesIn1 In2 Out1 Out2

1 1 0 false false2 3 1 false true3 3 5 false true4 2 1 true true5 9 4 true true6 3 4 true false7 3 5 true false8 9 4 true false

Test coverage is not optimal:

Unexpected rare corner cases may be overlooked.Test tables describe behaviour examples, not concepts.Higher coverage means more tables

Goals of project:

Ô Increase test coverage!

Ô Keep Comprehensibility!

Ô Increase Expressiveness!

Mattias Ulbrich – Generalised Test Tables 5/11

Page 7: Generalised Test Tables

Industrial Practice: Testing

Automated production systems must be validated

Practice today: Test tables describe individual test cases

Test coverage is not optimal:

Unexpected rare corner cases may be overlooked.Test tables describe behaviour examples, not concepts.Higher coverage means more tables

Goals of project:

Ô Increase test coverage!

Ô Keep Comprehensibility!

Ô Increase Expressiveness!

Mattias Ulbrich – Generalised Test Tables 5/11

Page 8: Generalised Test Tables

Industrial Practice: Testing

Automated production systems must be validated

Practice today: Test tables describe individual test cases

Test coverage is not optimal:

Unexpected rare corner cases may be overlooked.

Test tables describe behaviour examples, not concepts.Higher coverage means more tables

Goals of project:

Ô Increase test coverage!

Ô Keep Comprehensibility!

Ô Increase Expressiveness!

Mattias Ulbrich – Generalised Test Tables 5/11

Page 9: Generalised Test Tables

Industrial Practice: Testing

Automated production systems must be validated

Practice today: Test tables describe individual test cases

Test coverage is not optimal:

Unexpected rare corner cases may be overlooked.Test tables describe behaviour examples, not concepts.

Higher coverage means more tables

Goals of project:

Ô Increase test coverage!

Ô Keep Comprehensibility!

Ô Increase Expressiveness!

Mattias Ulbrich – Generalised Test Tables 5/11

Page 10: Generalised Test Tables

Industrial Practice: Testing

Automated production systems must be validated

Practice today: Test tables describe individual test cases

Test coverage is not optimal:

Unexpected rare corner cases may be overlooked.Test tables describe behaviour examples, not concepts.Higher coverage means more tables

Goals of project:

Ô Increase test coverage!

Ô Keep Comprehensibility!

Ô Increase Expressiveness!

Mattias Ulbrich – Generalised Test Tables 5/11

Page 11: Generalised Test Tables

Industrial Practice: Testing

Automated production systems must be validated

Practice today: Test tables describe individual test cases

Test coverage is not optimal:

Unexpected rare corner cases may be overlooked.Test tables describe behaviour examples, not concepts.Higher coverage means more tables

Goals of project:

Ô Increase test coverage!

Ô Keep Comprehensibility!

Ô Increase Expressiveness!

Mattias Ulbrich – Generalised Test Tables 5/11

Page 12: Generalised Test Tables

Industrial Practice: Testing

Automated production systems must be validated

Practice today: Test tables describe individual test cases

Test coverage is not optimal:

Unexpected rare corner cases may be overlooked.Test tables describe behaviour examples, not concepts.Higher coverage means more tables

Goals of project:

Ô Increase test coverage!

Ô Keep Comprehensibility!

Ô Increase Expressiveness!

Mattias Ulbrich – Generalised Test Tables 5/11

Page 13: Generalised Test Tables

Industrial Practice: Testing

Automated production systems must be validated

Practice today: Test tables describe individual test cases

Test coverage is not optimal:

Unexpected rare corner cases may be overlooked.Test tables describe behaviour examples, not concepts.Higher coverage means more tables

Goals of project:

Ô Increase test coverage!

Ô Keep Comprehensibility!

Ô Increase Expressiveness!

Mattias Ulbrich – Generalised Test Tables 5/11

Page 14: Generalised Test Tables

Industrial Practice: Testing

Automated production systems must be validated

Practice today: Test tables describe individual test cases

Test coverage is not optimal:

Unexpected rare corner cases may be overlooked.Test tables describe behaviour examples, not concepts.Higher coverage means more tables

Goals of project:

Ô Increase test coverage!

Ô Keep Comprehensibility!

Ô Increase Expressiveness!

Mattias Ulbrich – Generalised Test Tables 5/11

Page 15: Generalised Test Tables

Generalised Test Tables

Generalise known concept: Test tables (; Excel sheets)

Generalisation Concepts:

1 Abstraction: Not concrete values, but constraints–, [4,8], > 10 OR ≤ 2

2 References:“same value as value of X two cycles earlier”

3 Variable durations:“must hold for 5-10 cycles”, “... for at least 20 cycles”

Mattias Ulbrich – Generalised Test Tables 6/11

Page 16: Generalised Test Tables

Generalised Test Tables

Generalise known concept: Test tables (; Excel sheets)

Generalisation Concepts:

1 Abstraction: Not concrete values, but constraints–, [4,8], > 10 OR ≤ 2

2 References:“same value as value of X two cycles earlier”

3 Variable durations:“must hold for 5-10 cycles”, “... for at least 20 cycles”

Mattias Ulbrich – Generalised Test Tables 6/11

Page 17: Generalised Test Tables

Generalised Test Tables

Generalise known concept: Test tables (; Excel sheets)

Generalisation Concepts:

1 Abstraction: Not concrete values, but constraints–, [4,8], > 10 OR ≤ 2

2 References:“same value as value of X two cycles earlier”

3 Variable durations:“must hold for 5-10 cycles”, “... for at least 20 cycles”

Mattias Ulbrich – Generalised Test Tables 6/11

Page 18: Generalised Test Tables

Generalised Test Tables

Generalise known concept: Test tables (; Excel sheets)

Generalisation Concepts:

1 Abstraction: Not concrete values, but constraints–, [4,8], > 10 OR ≤ 2

2 References:“same value as value of X two cycles earlier”

3 Variable durations:“must hold for 5-10 cycles”, “... for at least 20 cycles”

Mattias Ulbrich – Generalised Test Tables 6/11

Page 19: Generalised Test Tables

Generalised Test Tables

Generalise known concept: Test tables (; Excel sheets)

Generalisation Concepts:

1 Abstraction: Not concrete values, but constraints–, [4,8], > 10 OR ≤ 2

2 References:“same value as value of X two cycles earlier”

3 Variable durations:“must hold for 5-10 cycles”, “... for at least 20 cycles”

Mattias Ulbrich – Generalised Test Tables 6/11

Page 20: Generalised Test Tables

Example

Hi

Lo

OK

Ready?

Mattias Ulbrich – Generalised Test Tables 7/11

Page 21: Generalised Test Tables

Example

Hi

Lo

OK

Ready?

Lo Hi Ready OK1 1 0 false false2 3 1 false true3 3 5 false true4 2 1 true true5 9 4 true true6 3 4 true false7 3 5 true false8 9 4 true false

Concrete table – difficult to recognize concept

Mattias Ulbrich – Generalised Test Tables 7/11

Page 22: Generalised Test Tables

Example

Hi

Lo

OK

Ready?

Lo Hi Ready OK Dur

1 – – false – [0, 10]2 – > Lo true true –3 – ≤ Lo true false 14 – – true false –

Generalised table:

better coverage (many test cases covered by this table)still comprehensibledocuments the idea of the block

Mattias Ulbrich – Generalised Test Tables 7/11

Page 23: Generalised Test Tables

Example

Hi

Lo

OK

Ready?

Lo Hi Ready OK Dur1 – – false – [0, 10]

2 – > Lo true true –3 – ≤ Lo true false 14 – – true false –

Generalised table:

better coverage (many test cases covered by this table)still comprehensibledocuments the idea of the block

Mattias Ulbrich – Generalised Test Tables 7/11

Page 24: Generalised Test Tables

Example

Hi

Lo

OK

Ready?

Lo Hi Ready OK Dur1 – – false – [0, 10]2 – > Lo true true –

3 – ≤ Lo true false 14 – – true false –

Generalised table:

better coverage (many test cases covered by this table)still comprehensibledocuments the idea of the block

Mattias Ulbrich – Generalised Test Tables 7/11

Page 25: Generalised Test Tables

Example

Hi

Lo

OK

Ready?

Lo Hi Ready OK Dur1 – – false – [0, 10]2 – > Lo true true –3 – ≤ Lo true false 1

4 – – true false –

Generalised table:

better coverage (many test cases covered by this table)still comprehensibledocuments the idea of the block

Mattias Ulbrich – Generalised Test Tables 7/11

Page 26: Generalised Test Tables

Example

Hi

Lo

OK

Ready?

Lo Hi Ready OK Dur1 – – false – [0, 10]2 – > Lo true true –3 – ≤ Lo true false 14 – – true false –

Generalised table:

better coverage (many test cases covered by this table)still comprehensibledocuments the idea of the block

Mattias Ulbrich – Generalised Test Tables 7/11

Page 27: Generalised Test Tables

Example

Hi

Lo

OK

Ready?

Lo Hi Ready OK Dur1 – – false – [0, 10]2 – > Lo true true –3 – ≤ Lo true false 14 – – true false –

Generalised table:

better coverage (many test cases covered by this table)still comprehensibledocuments the idea of the block

Mattias Ulbrich – Generalised Test Tables 7/11

Page 28: Generalised Test Tables

Tool

ST Verification Studio

http://formal.iti.kit.edu/stvs

Concepts for Interactive Table Exploration

“Table-driven debugging”

Prototypical implementation is there – extension on the way

Mattias Ulbrich – Generalised Test Tables 8/11

Page 29: Generalised Test Tables

Verification

.st

Verification Engine

Mattias Ulbrich – Generalised Test Tables 9/11

Page 30: Generalised Test Tables

Example Production System

kg LB1 LB2 LB3P1 P2

Mattias Ulbrich – Generalised Test Tables 10/11

Page 31: Generalised Test Tables

Exploring the Counterexample

Mattias Ulbrich – Generalised Test Tables 11/11

Page 32: Generalised Test Tables

Exploring the Counterexample

Mattias Ulbrich – Generalised Test Tables 11/11

Page 33: Generalised Test Tables

Exploring the Counterexample

Mattias Ulbrich – Generalised Test Tables 11/11