Model-Based Testing Real-Time and Interactive Music Systems Thesis defended on 11/10/16 Poncelet Sanchez Clement, Florent Jacquemard SYNCHRON 2016 Team: RepMus
Score-Based Interactive Music Systems Mixed Score e input output a evt act IMS discrete inputs/outputs a e synchronous hard time
Mixed Score 3
Interpretation Specified inputs Mixed Score 4
Interpretation Mixed Score 5
Interpretation ∞ infinite possibilities of performances ? Mixed Score 6
Timed Conformance Testing Timed conformance ? == ? ? Set of corresponding Computation of expected Set of relevant inputs implementation outputs outputs 7
Manual Testing IMS Manual Methods Rehearsals evt environment IMS • Test for one performance act • Time costly • Not precise 8
Model-Based Testing IMS Implementation evt • ‘Exhaustive’ Environment Under Test generation • Fast forward execution (virtual == ? clocks) act • Precise: • Automated comparison m e • Formal 𝓕 𝑻 o conformance d criteria e • informative a l feedbacks 9
Model-Based Testing IMS Implementation evt Environment Under Test == ? act m e 𝓕 𝑻 o Bound Automatic d performances construction e a l 10
Outline 𝓕 𝑻 1.Objectives 2.Testing Framework 3.Interactive Real-Time Model 11
Testing Framework Overview Offline Approach Mixed Score Models .tref Verdict .tin msg 11 ! d 11 d 12 .tout msg 21 ! e 1 ? d 21 . . . e 2 ? . . . e 𝓕 𝑻 e a d 11 msg 11 ! d 12 msg 21 ! e 1 ? d 21 . . . e 2 ? . . . Construction: Model-Based Testing: a from high level to model from model to verdict Online Approach 12
Testing Approaches .tref .tin .out 1 .tin d 11 msg 11 ! d 12 e 1 ? d 21 msg 21 ! . . . e 2 ? Inputs Generation . . . msg 11 ! d 11 d 12 Model e 1 ? msg 21 ! d 21 . . . + e 2 ? Mixed Score . . . 3 2 == . tref .tout ? 4 (Simulation) (Execution) Timed Compute Expected Compute Real conformance Outputs Outputs 13
Outline 𝓕 𝑻 1.Objectives 2.Testing Framework 3.Interactive Real-Time Model 14
Input / Output formalisation ? ? 15
Timed Traces Timed Input Trace Definition: e A timed trace is a tuple <s, t, p>: tempo: s: symbol 120bpm t: timestamp in time unit p: pace in time unit per minute Specified inputs < e 1 , 0, 120 > 16
Timed Traces Timed Input Trace Definition: e A timed trace is a tuple <s, t, p>: tempo: s: symbol 120bpm t: timestamp in time unit p: pace in time unit per minute Specified inputs < e 2 , 2, 120 > < e 1 , 0, 120 > 17
Timed Traces Timed Input Trace Definition: e A timed trace is a tuple <s, t, p>: tempo: s: symbol 120bpm t: timestamp in time unit p: pace in time unit per minute Specified inputs < e 3 , 2.33, 120 > < e 1 , 0, 120 >< e 2 , 2, 120 > 18
Timed Traces Timed Input Trace Timed Input Trace Definition: e A timed trace is a tuple <s, t, p>: tempo: s: symbol 120bpm t: timestamp in time unit p: pace in time unit per minute Specified inputs < e 1 , 0, 120 >< e 2 , 2, 120 >< e 3 , 2.33, 120 >< e 4 , 2.66, 120 >< e 5 , 3, 120 >< e 6 , 6, 120 > < e 1 , 0, 120 >< e 2 , 2, 120 > < e 4 , 2.66, 120 >< e 5 , 3, 120 >< e 6 , 6, 120 > Interpretation ! < e 1 , 0, 120 >< e 2 , 1.9, 120 > < e 4 , 2.76, 120 >< e 5 , 3.2, 120 >< e 6 , 5.9, 120 > .tin errors variations < e 1 , 0, 119 >< e 2 , 1.9, 80.9 > < e 4 , 2.76, 114 >< e 5 , 3.2, 115.3 >< e 6 , 5.9, 119 > 19
Timed Traces Timed Input Trace Timed Output Trace a e tempo: 120bpm Specified Expected .tref inputs trace < e 1 , 0, 120 >< e 2 , 2, 120 >< e 3 , 2.33, 120 >< e 4 , 2.66, 120 >< e 5 , 3, 120 >< e 6 , 6, 120 > < a 1 , 0, 60 >< a 2 , 2.66, 60 >< a 3 , 3, 60 > < e 1 , 0, 120 >< e 2 , 2, 120 > < e 4 , 2.66, 120 >< e 5 , 3, 120 >< e 6 , 6, 120 > ! < e 1 , 0, 120 >< e 2 , 1.9, 120 > < e 4 , 2.76, 120 >< e 5 , 3.2, 120 >< e 6 , 5.9, 120 > .tin < e 1 , 0, 119 >< e 2 , 1.9, 80.9 > < e 4 , 2.76, 114 >< e 5 , 3.2, 115.3 >< e 6 , 5.9, 119 > ? 20
Timed Conformance Testing Timed conformance ? == .tin .tref .tout Set of corresponding Computation of expected Set of relevant inputs implementation outputs outputs 21
Models msg 11 ! d 11 d 12 msg 21 ! e 1 ? d 21 . . . e 2 ? . . . 𝓕 𝑻 e Environment Model System Model a Model = E + S Bound performances Compute expected output Interactive Real- Timed Automata Time Model with Input-Output TA aspects IRTM TAIO Synchronous model-checking / aspects decidability 22
Labelled Transition System System Specification Input/Output e a e 1 ? a 1 ! a 2 ! Jan Tretmans. M. Timmer, E. Brinsksma and M. Stoelinga. Model Based Testing with Labelled Transition Systems. Model Based Testing. So<ware and Systems Safety - SpecificaBon and VerificaBon. Formal Methods and Testing, an outcome of the FORTEST. 23
Labelled Transition System Simulation e 1 ? a 1 ! a 2 ! .tin .tref Jan Tretmans. M. Timmer, E. Brinsksma and M. Stoelinga. Model Based Testing with Labelled Transition Systems. Model Based Testing. So<ware and Systems Safety - SpecificaBon and VerificaBon. Formal Methods and Testing, an outcome of the FORTEST. 24
Labelled Transition System Simulation e 1 Receive e 1 ? a 1 ! a 2 ! e 1 .tin .tref Jan Tretmans. M. Timmer, E. Brinsksma and M. Stoelinga. Model Based Testing with Labelled Transition Systems. Model Based Testing. So<ware and Systems Safety - SpecificaBon and VerificaBon. Formal Methods and Testing, an outcome of the FORTEST. 25
Labelled Transition System Simulation a 1 Send e 1 ? a 1 ! a 2 ! a 1 .tref Jan Tretmans. M. Timmer, E. Brinsksma and M. Stoelinga. Model Based Testing with Labelled Transition Systems. Model Based Testing. So<ware and Systems Safety - SpecificaBon and VerificaBon. Formal Methods and Testing, an outcome of the FORTEST. 26
Labelled Transition System Simulation a 2 Send e 1 ? a 1 ! a 2 ! a 1 a 2 .tref Jan Tretmans. M. Timmer, E. Brinsksma and M. Stoelinga. Model Based Testing with Labelled Transition Systems. Model Based Testing. So<ware and Systems Safety - SpecificaBon and VerificaBon. Formal Methods and Testing, an outcome of the FORTEST. 27
Timed Automata with Input-Output System Specification Time clock value: c i = ℝ + . Finite set of clocks Urgent locations c 1 := 0.0 c 1 == 0.5 valued on reels e 1 ? a 1 ! a 2 ! Restricted with Abstract Time guards and invariants c 1 <= 0.5 Reset with affectations Same rate R. Alur and D. Dill. A. David, K.G. Larsen, S. Li, M. Mikucionis, B. Nielsen. A theory of timed automata. Testing real-time systems under uncertainty. FMCO’10. TheoreBcal Computer Science. 28
Interactive Real-Time Model (IRTM) System Specification 𝑻 m.u: musical time unit e 1 ? a 1 ! a 2 ! 0 . 125 mu m.s: mini seconds e 2 ? a 3 ! a 4 ! a 5 ! 93 ms 93 ms Extended TA aspects aspects Multiple time units Clock constraints Alternation Transition Discrete/Temporal 29
IRTM: System Model Synchronous aspects 𝑻 e 1 ? a 1 ! a 2 ! 0 . 125 mu e 2 ? a 3 ! a 4 ! a 5 ! 93 ms 93 ms State: < t, n > [ controls ] { symbols } control: C i = ℝ + Dense time Poncelet, Jacquemard. Poncelet, Jacquemard. Model Based Testing of an Interactive Music System. 30th ACM/ Model-Based Testing for Building Reliable Realtime Interactive SIGAPP Symposium Computing (ACM SAC, 2015). Music Systems. Science of Computer Programming (SCP, 2016). 30
IRTM: System Model Simulation 𝑻 e 1 ? a 1 ! a 2 ! 0 . 125 mu e 2 ? a 3 ! a 4 ! a 5 ! 93 ms 93 ms lead State: < 0, 0 > [ C1 : 0 ] { } 31
IRTM: System Model Simulation 𝑻 Alternation e 1 ? a 1 ! a 2 ! 0 . 125 mu e 2 ? a 3 ! a 4 ! a 5 ! 93 ms 93 ms lead State: < 0, 1 > [ C 1 = 0 :: C 2 = 0 ] { } wait 32
IRTM: System Model Simulation 𝑻 Cooperative Scheduling e 1 ? a 1 ! a 2 ! 0 . 125 mu e 2 ? a 3 ! a 4 ! a 5 ! 93 ms 93 ms lead State: < 0, 1 > [ C 1 = 0 :: C 2 = 0 ] { } wait suspended 33
IRTM: System Model Simulation 𝑻 End of logical instant e 1 ? a 1 ! a 2 ! 0 . 125 mu e 2 ? a 3 ! a 4 ! a 5 ! 93 ms 93 ms Synchronous aspect State: < 0, 1 > [ C 1 = 0 :: C 2 = 0 ] { } Transition TA aspects Discrete/Temporal 34
IRTM: System Model Simulation 𝑻 e 1 ? a 1 ! a 2 ! 0 . 125 mu e 2 ? a 3 ! a 4 ! a 5 ! 93 ms 93 ms < e 1 , 0, 184 > State: < 0, 1 > [ C 1 = 0 :: C 2 = 0 ] { e 1 } .tin 35
IRTM: System Model Simulation 𝑻 e 1 Receive e 1 ? a 1 ! a 2 ! 0 . 125 mu e 2 ? a 3 ! a 4 ! a 5 ! 93 ms 93 ms State: < 0, 2 > [ C 1 = 0 :: C 2 = 0 ] { e 1 } 36
IRTM: System Model Simulation 𝑻 e 1 ? a 1 ! a 2 ! 0 . 125 mu e 2 ? a 3 ! a 4 ! a 5 ! 93 ms 93 ms extended aspects State: < 0, 2 > [ C 1 = 0 :: C 2 = 0 ] { e 1 } Priorities 37
IRTM: System Model Simulation 𝑻 e 1 ? a 1 ! a 2 ! 0 . 125 mu e 2 ? a 3 ! a 4 ! a 5 ! 93 ms 93 ms extended aspects State: < 0, 2 > [ C 1 = 0 :: C 2 = 0 ] { e 1 } Priorities 38
Recommend
More recommend