Model-checking with the TimeLine formalism Andrea Zaccara - - PowerPoint PPT Presentation

model checking with the timeline formalism
SMART_READER_LITE
LIVE PREVIEW

Model-checking with the TimeLine formalism Andrea Zaccara - - PowerPoint PPT Presentation

Model-checking with the TimeLine formalism Andrea Zaccara Andrea.Zaccara@student.uantwerpen.be University of Antwerp 1 Overview The Timeline formalism


slide-1
SLIDE 1

Model-­‑checking ¡with ¡the ¡ TimeLine ¡formalism ¡

Andrea ¡Zaccara ¡

Andrea.Zaccara@student.uantwerpen.be ¡ ¡ University ¡of ¡Antwerp ¡ ¡ ¡

¡

1 ¡

slide-2
SLIDE 2

Overview ¡

  • The ¡Timeline ¡formalism ¡in ¡AToMPM ¡
  • Requirements ¡for ¡the ¡chat ¡protocol ¡soFware ¡
  • Model ¡transformaGon ¡to ¡FSA ¡
  • Code ¡generaGon ¡of ¡a ¡trace ¡checker ¡using ¡EGL ¡

and ¡Python ¡

2 ¡

slide-3
SLIDE 3

Abstract ¡syntax ¡in ¡AToMPM ¡

3 ¡

slide-4
SLIDE 4

A ¡simple ¡requirement ¡

  • Regular ¡event: ¡ ¡AFer ¡a ¡file ¡is ¡opened, ¡ ¡
  • Fail ¡event: ¡it ¡must ¡not ¡be ¡disposed ¡
  • Fail ¡event: ¡or ¡deleted, ¡if ¡it ¡was ¡not ¡closed ¡before ¡
  • Required ¡event: ¡and ¡it ¡must ¡be ¡closed ¡before ¡the ¡

end ¡of ¡the ¡program. ¡

4 ¡

slide-5
SLIDE 5

Mapping ¡to ¡FSA ¡

  • Model ¡transformaGons ¡generate ¡an ¡augmented ¡

finite ¡state ¡automaton ¡from ¡TimeLine ¡specificaGon ¡

5 ¡

  • pened ¡

closed ¡ disposed ¡ deleted ¡

slide-6
SLIDE 6

Chat ¡protocol ¡requirements ¡(1) ¡

  • Requirement ¡2: ¡On ¡receiving ¡a ¡connecGon ¡request, ¡

the ¡chat ¡room ¡immediately ¡makes ¡a ¡decision ¡ whether ¡to ¡accept ¡the ¡client ¡or ¡reject ¡it. ¡

6 ¡

connReq(X,Y) ¡-­‑> ¡connecGon ¡request ¡from ¡client ¡Y ¡to ¡chat ¡room ¡X ¡ connReq(*,*) ¡-­‑> ¡any ¡connecGon ¡request ¡ connResp(X,Y) ¡-­‑> ¡connecGon ¡response ¡from ¡chat ¡room ¡X ¡to ¡client ¡Y ¡

slide-7
SLIDE 7

Chat ¡protocol ¡requirements ¡(2) ¡

  • Requirement ¡7: ¡The ¡sender ¡cannot ¡receive ¡its ¡own ¡

message ¡aFer ¡it ¡sends ¡it. ¡

7 ¡

fwdMsg(X,Y,T) ¡-­‑> ¡message ¡T ¡from ¡client ¡Y ¡received ¡by ¡chat ¡room ¡X ¡ recMsg(Y,Y,T) ¡-­‑> ¡message ¡T ¡from ¡client ¡Y ¡received ¡by ¡client ¡Y ¡

slide-8
SLIDE 8

Model ¡transformaGon ¡to ¡FSA ¡(1) ¡

8 ¡

slide-9
SLIDE 9

Model ¡transformaGon ¡to ¡FSA ¡(2) ¡

9 ¡

Add ¡transi5ons ¡

slide-10
SLIDE 10

Model ¡transformaGon ¡to ¡FSA ¡(3) ¡

10 ¡

slide-11
SLIDE 11

Model ¡transformaGon ¡to ¡FSA ¡(4) ¡

11 ¡

slide-12
SLIDE 12

Result ¡of ¡the ¡transformaGon ¡(req ¡2) ¡

12 ¡

slide-13
SLIDE 13

Result ¡of ¡the ¡transformaGon ¡(req ¡7) ¡

13 ¡

slide-14
SLIDE 14

Rule ¡definiGon ¡

  • The ¡rules ¡for ¡matching ¡an ¡event ¡use ¡a ¡basic ¡

grammar ¡for ¡simple ¡regular ¡expression ¡

– '! ¡' ¡for ¡negaGon ¡ – ‘%..%’ ¡stores ¡values ¡(e.g., ¡%X% ¡-­‑> ¡save ¡value ¡in ¡X) ¡ – ‘?..?’ ¡checks ¡stored ¡value ¡(e.g., ¡?X?) ¡ – ‘?*?’ ¡matches ¡any ¡string ¡sequence ¡ – ‘[str1|str2]’ ¡matches ¡for ¡both ¡string ¡str1 ¡and ¡str2 ¡

14 ¡

slide-15
SLIDE 15

Code ¡generaGon ¡and ¡checking ¡

  • Done ¡in ¡two ¡phases: ¡
  • 1. GeneraGon ¡of ¡a ¡data ¡structure ¡in ¡Python ¡for ¡the ¡

automaton, ¡using ¡the ¡metaDepth ¡exported ¡model ¡ and ¡a ¡script ¡in ¡EGL ¡ ¡

  • 2. GeneraGon ¡of ¡a ¡pre-­‑processed ¡parser ¡using ¡a ¡

custom ¡Python ¡script ¡

15 ¡

slide-16
SLIDE 16

Conclusions ¡and ¡Future ¡works ¡

  • The ¡TimeLine ¡meta-­‑model ¡in ¡AToMPM ¡

enables ¡faster ¡and ¡easier ¡definiGon ¡of ¡ requirements ¡

  • Can ¡already ¡give ¡useful ¡informaGon ¡on ¡

soFware ¡validaGon ¡

  • Regular ¡expression ¡support ¡can ¡be ¡expanded ¡

with ¡more ¡funcGonality ¡

  • Rules ¡definiGon ¡can ¡be ¡made ¡more ¡modular ¡

and ¡easier ¡to ¡define ¡

16 ¡

slide-17
SLIDE 17

QuesGons? ¡

17 ¡