specifying and executing behavioral requirements

27
Specifying and executing behavioral requirements The play-in/play-out approach David Harel, Rami Marelly Weizmann Institute of Science, Israel An interpretation by Eric Bodden

Upload: emmy

Post on 17-Jan-2016

38 views

Category:

Documents


0 download

DESCRIPTION

Specifying and executing behavioral requirements. The play-in/play-out approach David Harel, Rami Marelly Weizmann Institute of Science, Israel An interpretation by Eric Bodden. Outline. Problem statement: How to specify requirements? Easily and Consistently Background (LSCs) Play-in - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Specifying and executing behavioral requirements

Specifying and executing behavioral requirements

The play-in/play-out approachDavid Harel, Rami MarellyWeizmann Institute of Science, Israel

An interpretation byEric Bodden

Page 2: Specifying and executing behavioral requirements

Outline Problem statement:

How to specify requirements? Easily and Consistently

Background (LSCs) Play-in Play-out Prototype tool, challenges Conclusion

Page 3: Specifying and executing behavioral requirements

Requirements specification

Usually start from informal use case specification by domain experts

Then manual mapping to formal spec Error prone Tedious

No direct link between original spec and the actual implementation!

Can we do any better?

Page 4: Specifying and executing behavioral requirements

Play-in / play-out

Has similarities to machine learning and…

Actually also to the way one teaches people!

Philosophy:“I’ll show you how it works and then

you try yourself!

Play-in Play-out

Page 5: Specifying and executing behavioral requirements

Workflow

1. Prototype a GUI or object model of you app. – dummy only!

2. Play-in behavior into this prototype.“Play engine” connects and automatically

generates Live Sequence Charts

3. Replay (play-out) behavior, modify and generalize; verify

4. Give the debugged spec to developers

Page 6: Specifying and executing behavioral requirements

Live Sequence Charts (LSCs)

Similar to Message Sequence Charts and Sequence Diagrams but more powerful…

Universal charts: Specify behavior w.r.t. a given “prechart” (preamble).

Existential charts: Specify test cases that must hold in the universal LSCs.

Page 7: Specifying and executing behavioral requirements

An example – quick dialing

Page 8: Specifying and executing behavioral requirements

The play engine

Backend which communicates with the prototype via Microsoft’s Component Object Model (COM)

Generates LSCs in play-in mode Can then be generalized / modified Are verified in play-out mode. Also: Recording, modification and

replay of traces.

Page 9: Specifying and executing behavioral requirements
Page 10: Specifying and executing behavioral requirements

Play-in – an example

n1“+”n2“=”

(n1+n2)

Pre-chart

Body

Page 11: Specifying and executing behavioral requirements

Specifying the pre-chart

Page 12: Specifying and executing behavioral requirements

.. and the body

Page 13: Specifying and executing behavioral requirements

Final result

Page 14: Specifying and executing behavioral requirements

Another one – show number

Page 15: Specifying and executing behavioral requirements

A test case (existential LSC)

Page 16: Specifying and executing behavioral requirements

Play-out

“Now that I have shown you how it works, try on your own!”

(and I will watch you meanwhileand record what goes wrong)

Page 17: Specifying and executing behavioral requirements

Play-out by example

345+12

Page 18: Specifying and executing behavioral requirements

Situation after hit on plus

Page 19: Specifying and executing behavioral requirements

Situation at the end

Page 20: Specifying and executing behavioral requirements

… watch the test case!

Page 21: Specifying and executing behavioral requirements

Replaying recorded violations

Page 22: Specifying and executing behavioral requirements

Playing in internal objects

Page 23: Specifying and executing behavioral requirements

… and playing them out.

Page 24: Specifying and executing behavioral requirements

How does it work

“Execution manager” schedules “live copies” of universal LSCs -> behavior

At the same times evaluates existential LSCs -> testing

“Run manager” records/replays traces

Page 25: Specifying and executing behavioral requirements

Life cycle of a “live copy”

Page 26: Specifying and executing behavioral requirements

Challenges and problems

Need for symbolic evaluation Nondeterminism (?)

SELECT function Scalability (?) Performance (?) Deadlocks/livelocks (?) Support for multiple platforms (?)

Page 27: Specifying and executing behavioral requirements

Conclusion

Easy way to derive a “debugged” requirements specification.

Immediate link between use cases , specs and implementation.

Performance and scalability issues not discussed.