1 / 9

Formalisms for Behaviors Specification

Formalisms for Behaviors Specification. System Behaviors. System - (2 E )  -- E system signature (finite set of events) Trace ( behavior) - =  0  1  2 … where  i 2 E Assertion – A  (2 E )  ( subset of system behaviors).

zeheb
Download Presentation

Formalisms for Behaviors Specification

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Formalisms for Behaviors Specification  Dr. Vered Gafni

  2. System Behaviors • System - (2E)-- E system signature (finite set of events) • Trace (behavior) - = 0 1 2… where i2E • Assertion – A(2E)(subset of system behaviors) Specification formalism - means to specify assertions (subsets of system behaviors). • Two types of assertions: - state constraints (safety) • e.g., The gate is closed a.l.a. a train is within the crossing • - temporal constraints (liveness). • e.g., Every train that entersthe crossing shall exit eventually  Dr. VeredGafni

  3. Specification Formalisms  Dr. Vered Gafni

  4. Regular expressions •  a set of symbols, • * is the set of finite words over (including - empty word) • L*– a language over  • the regular expressions over  are: • , , p for p • For r,s regular expressions: rs (concatenation), r+s (selection), r*(0 or more finite repetition ) Notation: r+=rr*, rk=r…r– k times • Semantics: L()=, L()={}, L(p)={p}, L(rs)=L(r)L(s), L(r+s)=L(r)L(s), L(r*)=L(r)* Regular languages (RL) – those represented by regular expressions RL are closed under union, concatenation, Kleene star, intersection, complementation.  Dr. VeredGafni

  5. Regular expressions properties • RL are closed under union, concatenation, Kleene star, intersection, complementation. • Notations:  =2E; pE, [p]= +( | p), [~p]=+( | p) • Examples: E={send, ack} • [send][~{ack,send}]*[ack] • ([send][~{ack,send}]*[ack])* • [~send]* + ([~send]*[send][~{ack,send}]*[ack])* • ([~send]* + ([send][~{ack,send}]*[ack]))* • ([~send]*([send][~{ack,send}]*[ack])*)*  A RL may have several representations by different RE  Dr. Vered Gafni

  6. -regular expressions - Basic Representation Formalism Noteis not an extension of * To ensure enumerable word • - the set of infinite sequences (words) over  • L– an -language over  • For R*, , • R = { r| rR,  } • R= { r1r2…| iN, riR/{} } •  regular expressions - terms of the form: i=1..nRiSi where Ri, Si are regular expression • Semantics: L(i=1..nRiSi)= i=1..nL(Ri)L(Si) S is  regular (={}S). • Example: ([~send]* + ([send][~{ack,send}]*[ack]))  Dr. Vered Gafni

  7. -regular expressions/languages -regular expressionsG1, G2are equivalent ifL(G1)=L(G2)   regular languages are closed under: • Union • Intersection • Complementation  Dr. Vered Gafni

  8. Examples of -regular expressions any  that contains p ({p}+{p,q}) Given system signature E=p,q E, = 2E, • p occurs at every time instant [p] • p occurs infinitely often (*[p]) • Every time p occurs q occurs as well ([~p]*[p,q])*[~p] ([~p]*[p,q]) • Every p is (strict) followed by q with no p ([~p]*[p][~q]*[q/p]) ([~p]*[p][~q]*[q/p])*[~p] any word over  any  that does not contain p any  that contain q but not p  Dr. Vered Gafni

  9. Railroad crossing assertions Min. delay of 40 seconds between successive trains. ([~Tin]*[Tin][~Tin]40)*[~Tin]  ([~Tin]*[Tin][~Tin]40) No more than one train in XR at a time ([~Tin]*[Tin][~{Tin,Tout}]*[Tout])*[~Tin]  ([~Tin]*[Tin][~{Tin,Tout}]*[Tout])  ([~Tin]*[Tin] [~{Tin,Tout}] Gate closed as long as a train is in XR. ([~Tin]*[{Tin,Closed}][Closed/Tout}]*[{Closed,Tout}])*[~Tin]  ([~Tin]*[{Tin,Closed}][Closed/Tout}]*[{Closed,Tout}])  ([~Tin]*[{Tin,Closed}] [Closed/{Tin,Tout}] No exit

More Related