![Page 1: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/1.jpg)
User-friendly ways to capture temporal properties
KTH – June 2015, Stockholm, Sweden
Patrizio Pelliccione – Docent in software engineering, Chalmers|GU
www.patriziopelliccione.com
![Page 2: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/2.jpg)
Properties Sequence Chart (PSC)
• Temporal Proper,es are typically specified as formulae in suitable temporal logics
• The inherent complexity of Temporal Logic formulae may induce to specify proper,es in a wrong way
Problem space
• Proper,es Sequence Chart (PSC) is a scenario-‐based visual language for specifying temporal proper,es which balances simplicity of use and expressive power
Solu,on space
Marco Au)li, Paola Inverardi, Patrizio Pelliccione (2007) Graphical scenarios for specifying temporal proper3es: an automated approach , Automated SoIware Engg. 14: 3. 293-‐340
hQp://www.di.univaq.it/psc/
![Page 3: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/3.jpg)
Properties Sequence Chart (PSC)
![Page 4: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/4.jpg)
Properties Sequence Chart (PSC)
c1:C1
Component Instance c1
r: a
Required message
e: a
Regular message
f: a
Fail message
loop(x,y) Loop operator
tiTime-line
b={Ci.l1.Cj,…,Ck.ln.Ct}
Unwanted Message Constraint
Alternative operator
alt
...
Strict operator
b
g=(Ci.l1.Cj,…,Ck.ln.Ct)=>
Wanted Chain Constraint
g
g=(Ci.l1.Cj,…,Ck.ln.Ct)
Unwanted Chain Constraint
g=>
Parallel operator
par
...
![Page 5: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/5.jpg)
Properties Sequence Chart (PSC)
c1:C1
Component Instance c1
r: a
Required message
e: a
Regular message
f: a
Fail message
loop(x,y) Loop operator
tiTime-line
b={Ci.l1.Cj,…,Ck.ln.Ct}
Unwanted Message Constraint
Alternative operator
alt
...Strict
operator
b
g=(Ci.l1.Cj,…,Ck.ln.Ct)=>
Wanted Chain Constraint
g
g=(Ci.l1.Cj,…,Ck.ln.Ct)
Unwanted Chain Constraint
g=>
Parallel operator
par
...
Alert&system&
Speed&controller&
Lane&dep.&controller&
Driver&controller&
e:&speed&>&65km/h&
e:&distance&decreases&
r:&alerted&speed&>=&60km/h&
speed&>=&60km/h&
![Page 6: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/6.jpg)
Translation to Büchi automata
required messages
![Page 7: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/7.jpg)
Translation to Büchi automata
regular messages
![Page 8: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/8.jpg)
Translation to Büchi automata
fail messages
![Page 9: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/9.jpg)
Translation to Büchi automata
required messages: chain constraint
![Page 10: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/10.jpg)
Translation to Büchi automata
regular messages: chain constraint
![Page 11: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/11.jpg)
Translation to Büchi automata
fail messages: chain constraint
![Page 12: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/12.jpg)
Translation to Büchi automata: composition
![Page 13: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/13.jpg)
Trace-based semantics: an excerpt
![Page 14: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/14.jpg)
Example
hQps://www.media.volvocars.com/global/en-‐gb/media/pressreleases/12130
![Page 15: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/15.jpg)
Properties Sequence Chart (PSC)
If the speed of the car was greater than 65km/h, the distance between the car and the road lane
markings decreased rapidly, and, in the meanwhile, the speed of the car was not
decreased under 60km/h, then the driver is alerted via an audible signal
![Page 16: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/16.jpg)
Properties Sequence Chart (PSC)
If the speed of the car was greater than 65km/h, the distance between the car and the road lane
markings decreased rapidly, and, in the meanwhile, the speed of the car was not
decreased under 60km/h, then the driver is alerted via an audible signal
Speed controller
Driver controller
e: speed > 65km/h
![Page 17: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/17.jpg)
Properties Sequence Chart (PSC)
If the speed of the car was greater than 65km/h, the distance between the car and the road lane
markings decreased rapidly, and, in the meanwhile, the speed of the car was not
decreased under 60km/h, then the driver is alerted via an audible signal
Speed controller
Lane dep. controller
Driver controller
e: speed > 65km/h
e: distance decreases
![Page 18: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/18.jpg)
Properties Sequence Chart (PSC)
If the speed of the car was greater than 65km/h, the distance between the car and the road lane
markings decreased rapidly, and, in the meanwhile, the speed of the car was not
decreased under 60km/h, then the driver is alerted via an audible signal
Speed controller
Lane dep. controller
Driver controller
e: speed > 65km/h
e: distance decreases
speed >= 60km/h
![Page 19: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/19.jpg)
Properties Sequence Chart (PSC)
If the speed of the car was greater than 65km/h, the distance between the car and the road lane
markings decreased rapidly, and, in the meanwhile, the speed of the car was not
decreased under 60km/h, then the driver is alerted via an audible signal
Alert system
Speed controller
Lane dep. controller
Driver controller
e: speed > 65km/h
e: distance decreases
r: alerted speed >= 60km/h
speed >= 60km/h
![Page 20: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/20.jpg)
PSC impact • Extensions and uses of PSC
– Timed Property Sequence Chart (TPSC) - http://dx.doi.org/10.1016/j.jss.2009.09.013
– Probabilistic Timed Property Sequence Chart (PTPSC) - http://dx.doi.org/10.1109/ASE.2009.56
– Monitoring of PSC and TPSC properties - http://dx.doi.org/10.1007/978-3-642-16612-9_39
– Monitoring of PTPSC - http://onlinelibrary.wiley.com/doi/10.1002/spe.1038/abstract
PSC is the nota,on used by SDL-‐RT V2.3 standard to express temporal proper,es
PSC is the nota,on used by MSC Tracer to express temporal proper,es
hQp://www.sdl-‐rt.org/
hQp://www.pragmadev.com/product/tracing.html
PSC is one of the nota,ons adopted within the Presto project (ARTEMIS-‐2010-‐1-‐269362)
hQp://www.presto-‐embedded.eu/
![Page 21: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/21.jpg)
Marco Au)li, Lars Grunske, Markus Lumpe, Patrizio Pelliccione, and Antony Tang (2015) Aligning Qualita3ve, Real-‐Time, and Probabilis3c Property Specifica3on PaBerns Using a Structured English Grammar, IEEE Transac,ons on SoIware Engineering (TSE), To appear.
![Page 22: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/22.jpg)
Property specification patterns Property paQerns
Occurrence Order
Absence
Universality Existence
Bounded Existence
Precedence
Response Chain Precedence
Chain Response
Ma>hew B. Dwyer, George S. Avrunin, and James C. Corbe>. 1999. PaBerns in property specifica3ons for finite-‐state verifica3on. In Proceedings of the 21st interna)onal conference on SoKware engineering (ICSE '99). ACM, New York, NY, USA, 411-‐420.
![Page 23: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/23.jpg)
Patterns scope
Global
Before R
AIer Q
Between Q and R
AIer Q un,l R
R R
Q Q
Q Q Q R R R
Q Q Q R R
Q
Q
![Page 24: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/24.jpg)
An example: Response pattern
• To describe cause-effect relationships between a pair of events/states. An occurrence of the first, the cause, must be followed by an occurrence of the second, the effect. Also known as Follows and Leads-to.
![Page 25: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/25.jpg)
Real-time specification patterns
Sascha Konrad and Be>y H. C. Cheng. 2005. Real-‐3me specifica3on paBerns. In Proceedings of the 27th interna)onal conference on SoKware engineering (ICSE '05). ACM, New York, NY, USA, 372-‐381.
![Page 26: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/26.jpg)
Real-time specification patterns
![Page 27: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/27.jpg)
Probabilistic Property patterns
Lars Grunske. 2008. Specifica3on paBerns for probabilis3c quality proper3es. In Proceedings of the 30th interna)onal conference on SoKware engineering (ICSE '08). ACM, New York, NY, USA, 31-‐40.
![Page 28: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/28.jpg)
Probabilistic Property patterns
![Page 29: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/29.jpg)
Property specification patterns
40 newly iden,fied or extended paQerns
![Page 30: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/30.jpg)
PSP Wizard
![Page 31: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/31.jpg)
![Page 32: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/32.jpg)
PSPWizard user interface
![Page 33: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/33.jpg)
Property Specification Patterns Structured English grammar
![Page 34: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/34.jpg)
Property Specification Patterns Structured English grammar
![Page 35: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/35.jpg)
![Page 36: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/36.jpg)
Example
hQps://www.media.volvocars.com/global/en-‐gb/media/pressreleases/12130
![Page 37: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/37.jpg)
Example
The driver is alerted via an audible signal if the speed of the car was greater than
65km/h, the distance between the car and the road lane markings decreased rapidly, and, in the meanwhile, the speed of the car
was not decreased under 60km/h.
![Page 38: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/38.jpg)
Example
If the driver is alerted via an audible signal then it must have been the case that the speed of the car
was greater than 65km/h and aGerwards the distance between the car and the road lane
markings decreased rapidly and aGerwards the speed of the car was not decre.9%.
The driver is alerted via an audible signal if the speed of the car was greater than
65km/h, the distance between the car and the road lane markings decreased rapidly, and, in the meanwhile, the speed of the car
was not decreased under 60km/h.
![Page 39: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/39.jpg)
Example
If the driver is alerted via an audible signal then it must have been the case that the speed of the car
was greater than 65km/h and aGerwards the distance between the car and the road lane
markings decreased rapidly without the speed of the car was decreased under 60km/h in between
The driver is alerted via an audible signal if the speed of the car was greater than
65km/h, the distance between the car and the road lane markings decreased rapidly, and, in the meanwhile, the speed of the car
was not decreased under 60km/h.
![Page 40: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/40.jpg)
Example
If the driver is alerted via an audible signal then it must have been the case that the speed of the car
was greater than 65km/h and aGerwards the distance between the car and the road lane
markings decreased rapidly without the speed of the car was decreased under 60km/h in between.
The driver is alerted via an audible signal if the speed of the car was greater than
65km/h, the distance between the car and the road lane markings decreased rapidly, and, in the meanwhile, the speed of the car
was not decreased under 60km/h.
![Page 41: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/41.jpg)
hQp://ps-‐paQerns.wikidot.com/
“A paQern system does not belong to an individual, but to the community of experts and prac,,oners who contribute to and use it.” (Dwyer et al.)
![Page 42: User-friendly ways to capture temporal properties - Seminar at KTH, June 2015](https://reader038.vdocuments.mx/reader038/viewer/2022110218/58ef0e901a28ab074b8b474d/html5/thumbnails/42.jpg)
Questions?
www.patriziopelliccione.com