Lazy Security Controllers

Size: px
Start display at page:

Download "Lazy Security Controllers"

Transcription

1 Lzy Security Controllers Giulio Crvgn, Griele Cost, Giovnni Prdini Diprtimento di Informtic, Sistemistic e Comuniczione Università degli Studi di Milno-Bicocc, Itly Emil: giulio.crvgn@disco.unimi.it Diprtimento di Informtic, Sistemistic e Telemtic Università di Genov, Itly Emil: griele.cost@unige.it Diprtimento di Informtic Università degli Studi di Veron, Itly Emil: giovnni.prdini@univr.it Astrct A security controller follows the eecution of trget to identify nd prevent security violtions. Effective controllers proctively oserve the trget system nd, in cse of security violtion, ct y either interrupting or modifying the ehviour of the trget. Prgmticlly, the ssumption tht controller cn oserve nd ct on the entire eecution of trget is restrictive in severl prcticl cses. In this pper we define lzy controllers, novel ctegory of security controllers which schedule oservtion points over the eecution of trget, thus reducing the cost of monitoring. The ility of lzy controller to ctch security violtions depends on its scheduling of the oservtions. In generl, determining n optiml scheduling strtegy ounding the proility tht no criticl ction goes unnoticed is non-trivil. To this etent, we propose synthesis strtegies for (i) non-deterministic trgets with non-instntneous ctions, (ii) proilistic trgets modelled s Discrete Time Mrkov Chins nd (iii) stochstic trgets modelled s Continuous Time Mrkov Chins. In ech of these cses we show tht the proility of lzy controller to miss crucil oservtion cn e ounded y n ritrry risk threshold. Keywords-Security Monitoring; Distriuted Systems Security; Risk Mngement; I. INTRODUCTION Security controllers re common prctice for gurnteeing tht n untrusted ppliction complies with security specifiction. In words, the prolem of controlling the eecution of system cn e stted s follows: Given system S nd security policy ϕ, define n effective procedure to control tht the eecution of S does not violte ϕ. In the lst decdes, the reserch on softwre security hs seen prllel evolution of sttic verifiction methods nd security controllers. Despite severl importnt dvncements in sttic progrm verifiction, security controllers re still widely dopted in mny contets. This is minly due to This work hs een prtilly supported y EU-funded projects FP Connect, FP Aniketos, FP NESSoS nd FP SP- CIoS This work strted when the three uthors were employed t Istituto di Informtic e Telemtic, Consiglio Nzionle delle Ricerche, Itly. severl prcticl nd theoreticl resons which we riefly discuss. First of ll, techniques for progrm verifiction, such s model checking [] or strct interprettion [2], typiclly rely on sttic over-pproimtions of the rel code. As such, ccounting for superset of the ctul, possile ehviour, sttic nlysis might return flse positives. Furthermore, sttic pproimtions cn e prcticlly unusle when, for instnce, the ehviour of system depends on user inputs or cn e modified y n ttcker (e.g., see [3]). In ll these cses security controllers cn still gurd progrm eecutions nd run rection procedures. Consequently, severl recent proposls [4] [7] dvocte the use of integrted frmeworks for crrying out oth verifiction nd security monitoring. In generl, it cn e useful to distinguish etween two clsses of security controllers used for (i) monitoring nd (ii) enforcement. In oth cses the controller follows the eecution of trget s fr s the trce produced is complint with the given security policy. When the trget tries to etend the current trce with new ction, the controller checks whether the etended trce is still vlid. If it is not the cse, the monitor locks the eecution of the trget. Insted, the security enforcement pproch cn declre some rection procedure to e invoked efore nd/or fter the security violtion ttempt. Needless to sy, monitors re proper suset of the security enforcement mechnisms; for survey on these topics we refer the reder to [8]. An influentil pproch to the definition of security policies nd controllers ws originlly introduced y Schneider [9]. Briefly, he proposed ctegory of Finite Stte Automt (FSA), termed security utomt, for specifying security policies. Hving forml opertionl semntics, Schneider s utomt cn e directly used, s templte, to implement security monitors. Also, security utomt re known to e epressive enough to represent sfety properties. Such properties re those sying tht d thing will never hppen s, for instnce, the trget never reches certin fulty stte. A further crucil contriution in the theory of security controllers ws proposed y Buer et l. [0] which gve

2 chrcteriztion of lrger clss of policies, nmely edit policies. Edit properties re defined through the controllers which re in chrge of enforcing them, clled edit utomt. Roughly, n edit utomton reds the net ction of its trget nd decides whether to (i) llow it, (ii) suppress it or (iii) nticipte it with nother one. Note tht the enforcement cn e used to simulte the ehviour of security monitor, tht is, edit policies re proper superset of Schneider s policies. Indeed, we cn implement n enforcement strtegy which hlts the trget y, for instnce, ppending to the trce specil ction when violtion rises. All the controllers discussed so fr work y oserving ech step of the eecution of their trget. In this pper we present new clss of security controllers, nmely lzy controllers. Like stndrd controllers, lzy controllers wtch the eecution of the trget ut, in ddition, they cn utonomously decide to suspend the oservtions for certin time spn. Clerly, differently from the stndrd proctive controllers, lzy controller could miss the oservtion of security violtion while it is suspended. Such violtions re clled pssive, ginst those which re detected, nmely ctive. Controlling the trget discontinuously hs vrious dvntges. In terms of performnce nd costs, for instnce, the monitoring process cn e optimised y reducing the numer of vlidity checks on the trget ehviour. Another importnt dvntge is in terms of pplicility. Indeed, ssuming continuous, synchronous ccess to ll the trget ctions cn e quite restrictive for certin pplictions of security controllers. For instnce, it is common to use log uditing [], [2] to check the lst ctions performed y system without intercting with its eecution. A crucil spect of the pplicility of lzy controllers is the definition nd the clcultion of the risk deriving from suspending the controller. The ojective of scheduling oservtions is to prevent pssive security violtions up to given erle risk. Finding n optiml scheduling, i.e. one which ounds the proility of pssive violtions to the risk, is the crucil issue when using lzy controllers. In this pper we define controller synthesis strtegies for (i) non-deterministic trgets with non-instntneous ctions, (ii) proilistic trgets modelled s Discrete Time Mrkov Chins nd (iii) stochstic trgets modelled s Continuous Time Mrkov Chins. In ech cse we give n nlyticl mesure of the risk tht pssive violtion occurs. Also, we define wy to synthesize controllers such tht the risk fctor is ritrrily smll. Such results demonstrte tht lzy controllers cn e used to indefinitely pproimte the ehviour of the trditionl security controllers y reducing the risk fctor. Moreover, these utomt cn e pplied to the scenrios in which the monitoring process hs precise cost nd one is interested in finding compromise etween the security risk nd the security udget. The pper is structured s follows. In Section II we recll some ckground concepts useful to define, in Section III, lzy controllers. In Sections IV nd V we discuss the synthesis of lzy controllers for specific trgets nd, in Section VII, we discuss relted works nd conclude the pper. II. BACKGROUND A Lelled Trnsition System (LTS) is triple (S, Λ, ) where Λ is set of lels, S is set of sttes nd S Λ S is set of lelled trnsitions. LTSs re often used to descrie the ehviour of systems which llow for eternl oservtions. Oservle ctions re fired when the system performs visile stte chnge. Sometimes it cn e useful to model stte chnges tht produce no oservle ctions. In those cses, the set of lels is etended with the specil symol Λ, which is used to lel the corresponding trnsitions. As usul, we write s α s in plce of (s, α, s ). As regrds timed systems, we consider Timed LTSs, nmely LTSs with sttes of the form T S, where T denotes the underlying time-domin of the system. Time domin T cn e either discrete or continuous, nd we ssume totl order reltion mong its elements. A trnsition t, s α t, s descries stte chnge from s to s, occurring t time t, nd ehiiting lel α Λ. Time cnnot decrese, tht is t t for ech trnsition. Trnsitions occur instntneously, thus for ll time instnts such tht t < t the system is in stte s. Besides the ction lels in Λ, we ssume n eternl oserver to know the ctul trnsition times t, t T. Timed systems generlize non-timed systems, which cn e seen s discretetime systems with time domin T = N nd trnsitions of the form t, s α t +, s. We define security controllers oth in the cse of untimed systems nd of timed systems, where the ltter cse is trivil etension of the former. Definition II. (Security controller). Let S e the set of sttes of trget, C the set of sttes of controller nd Σ set of lels, Security Controller is the LTS (C S, Σ, = ) where = (C S) Σ (C S). Definition II.2 (Timed security controller). Let S e the set of sttes of trget, C the set of sttes of controller, Σ set of lels nd T time-domin, Timed Security Controller is the Timed LTS (T C S, Σ, = ) where = (T C S) Σ (T C S). In the following, when the sttes of the controller nd the system re cler from the contet, we completely chrcterize (timed) security controller with its trnsition reltion =. We introduce trunction controllers, prticulr kind of controllers tht we use in the following sections for the synthesis of lzy controllers, oth in the untimed nd timed settings. Following the pproch of [3], we define the trunction controllers y using inry opertor driving the eecution of trget S under the scope of controller C, denoted C S. Definition II.3. Let (S, Σ, sys ) e the LTS descriing the trget system, nd (C, Σ, ctr ) e the LTS descriing the ehviour llowed y the controller. A trunction controller is the security controller (C S, Σ, = ) where = is the lest

3 trnsition reltion defined y the following inference rule. (monitor) C ctr C S sys S C S. = C S Definition II.4. Let (T S, Σ, sys ) e Timed LTS descriing the possile ehviour of given trget system, nd (C, Σ, ctr ) e the LTS descriing the ehviour llowed y the controller. A timed trunction controller is the timed security controller (T C S, Σ, = ) where = is the lest trnsition reltion defined y the following rule. (T-monitor) C ctr C t, S t, C S sys t, S = t, C S Notice tht, even though the controller is untimed, we re le to define timed controller y using the timed trnsition system of the trget. III. A THEORY OF LAZY CONTROLLERS In this section we present theory of lzy controllers, long with their Structurl Opertionl Semntics (SOS) [4], [5] which retins the stndrd theory of proctive controllers. In the net sections we prove theorems stting this reltion. Intuitively, we provide frmework into which stndrd controllers cn e emedded, yielding lzy controllers. We ssume set of visile ctions Σ = {,, c,...} nd we uild from it the set of unseen ctions Σ = {ã Σ}. These two sets ccount for the fct tht, depending on the oservtions scheduled y the controller, ny ction performed y the trget cn e either oserved or not. We denote the set of the sttes of proctive controller y C, the set of the sttes of trget y S nd the time-domin (e.g., discrete or continuous) underlying the trget y T. We define lzy controller s follows. Definition III.. A lzy controller is tuple where: (C, S, Σ, (T, ), =, lctr, ζ) = (T C S) (Σ { }) (T C S) is the ctive monitoring reltion; lctr C Σ C is the updte reltion for unseen ctions; ζ : C T T is the scheduling function; As we discussed in Section II, the reltion = chrcterizes the input timed proctive controller t, C S. Such reltion is generlly uilt y using reltion for the controller descriing ll the possile llowed ehviors, such s reltion ctr used for trunction controllers in Definitions II.3 nd II.4. In lzy controllers, we lso hve n updte reltion lctr, which differs from ctr y eing defined over unseen ctions in Σ. Reltion lctr cptures the opertionl notion of ctivity logging: s fr s the controller is not oserving the system, i.e., it is idle, every ction is freely performed y the trget nd is logged. When the controller wkes up t ny scheduled oservtion point, it emines the log in order to detect ny pssive violtion, nd cts ccording to its strtegy, e.g., y truncting or editing the oserved ehviour. Finlly, it performs the scheduled oservtion, efore looping this process. Therefore, the reltion lctr is ctully stepy-step opertionl definition of oth the procedure of log checking nd the recovery strtegies. Finlly, function ζ provides the scheduling of the oservtions over the eecution of the trget. Notice tht ζ(c, t) = t is function from stte c of the controller nd the time t of the lst ction performed y the trget to oservtion time t. In the net sections, when deling with the synthesis of lzy controller, we show how to utomticlly crete function ζ strting from security policy nd suitle description of the trget system. We now define the SOS of lzy controller. In the following, we denote with α Σ { } ll the visile ctions plus the specil symol, used for trnsitions not ccounting for ny ction. Let us denote y D = T C T S T the set of ll the configurtions, nd with A = Σ Σ { } the set of lels. The semntics of controller is the LTS (D, A, lzy ) where lzy D A D is the lest trnsition reltion defined y the inference rules of Figure. In those rules we mke use of two oing opertors [ ] nd { }. If the time is t we write [ C ] n, where C C nd n T, to denote tht the controller hs scheduled the net oservtion t time t + n. Differently, we write { S } h, where S S nd h T, to denote tht the trget performed its lst trnsition t time t h in the pst. In oth cses n nd t denote reltive times, hence from configurtion t, [ C ] n { S } h we derive ll the possile ehviors of the trget nd the lzy controller in the time window [t h, t+n]. By ssuming the strting time to e t 0, ll the possile ehviors of lzy controller cn e derived from the initil configurtion t 0, [ C ] 0 { S } 0. Rule (Sleep) sttes tht, if t time t the controller is cting in the proctive mode [ C ] 0 nd the net oservtion is scheduled t time t + k, then the controller cn idle till tht time, hence ecoming [ C ] k. The lel of the trnsition mens tht this derivtion does not involve ny ction of the trget. Rule (Monitor) sttes tht if t time t proctive controller must not wit further to oserve the trget, nmely ζ(c, ) = 0, then ny ction of the trget strted t previous time t h nd completing t time t h + should e proctively monitored. When so, we mke use of the reltion chrcterizing such proctive controller, =. Moreover, notice tht y using the oing opertor for the trget we re le to derive timed-trnsitions from the pst time t h, mening tht the pssge of time is synchronous for S. We remrk tht, to hve good scheduling function, the net ction should relly e pssive violtion, correctly prevented y the controller. Rule (Log) sttes tht if the time is t nd the controller hs scheduled the net oservtion t time t + k, then ny ction It would e nlogous to considering the trget idle in the time window (t h, t h + ) nd performing n tomic ction t time t h +. This lst interprettion is the one dopted for Mrkov processes.

4 (Sleep) (Monitor) (Log) (WkeUp) t, [ C ] 0 { S } h ζ(c, h) = k k > 0 lzy t, [ C ] k { S } h ζ(c, h) 0 t h, C S t h, S t, [ C ] 0 { S } h α = t h +, C S h α lzy t h +, [ C ] 0 { S } 0 sys t h +, S C ã lctr C t, [ C ] k { S } h t, [ C ] k { S } h k > 0 h < h + k lzy t h +, [ C ] k ( h) { S } 0 lzy t + k, [ C ] 0 { S } h+k Fig.. The trnsition reltion lzy D T D. which S performs efore t + k is not controlled, ut simply logged y mens of the derivtions of lctr. In this timewindow pssive violtion my hppen, not eing detected up to time t+k. Finlly, rule (Wkeup) mkes the controller le to spend time utonomously nd synchronously with the trget S. Lzy controllers etend stndrd security controllers t the semntic level, s proved y the following theorem. Theorem III.. Let (T C S, Σ, = ) e timed security controller. Let (C, S, Σ, T, =, lctr, ζ) e lzy security controller with lctr ritrrily defined nd ζ such tht C C, t T. ζ(c, t) = 0. Then t, t T, C, C C, S, S S, Σ : t, C S = t, C S t, [ C ] 0 { S } 0 lzy t, [ C ] 0 { S } 0. Proof: This nd ll the other technicl proofs cn e found in the ppendi. Theorem III. sys tht, forcing lzy controller to e lwys ctive we otin the sme enforcement process produced y the corresponding security controller. IV. SYNTHESIS OF LAZY CONTROLLERS In this section we discuss the synthesis of lzy security controllers for non-proilistic, proilistic nd stochstic trgets. In prticulr, we tke into ccount (i) non-deterministic Finite Stte Mchines (FSMs) with non-instntneous trnsitions, (ii) Discrete Time Mrkov Chins (DTMCs) nd, finlly, (iii) Continuous Time Mrkov Chins (CTMCs). We consider FSMs ecuse they hve een trditionlly dopted for system modelling nd Mrkov chins ecuse they re receiving mjor ttention s forml descriptions of timed systems. We represent the trgets s FSMs enriched with lels, tken from countle domin, on the trnsitions etween sttes. The trgets differ only for such lels, i.e. in (i) lels represent durtions, in (ii) proilities nd in (iii) the prmeters of eponentilly-distriuted rndom vriles. In this pper, we consider only lzy trunction controllers. They etend proctive trunction controllers in the nturl wy, i.e., y interrupting violting eecution either proctively or s soon s they wke up, fter violtion occurred. We rgue tht enforcing controllers cn e similrly synthesized y dpting stndrd enforcement strtegies in the frmework of lzy controllers. An investigtion of these spects is left s future work. In this section we discuss the synthesis of the controller structure. This is done in the sme wy for ll the three types of FSMs considered since the sttes nd trnsitions of lzy controller cn e synthesized independently of the interprettion we give to the lels of the trget FSM, ut rther y considering only its structure. In the net section we conclude the synthesis strtegy y defining the scheduling functions, which insted depend on the type of FSM we re considering. Preliminries We recll some preliminry notions tht re necessry for the following disserttion. Definition IV.. A Finite Stte Mchine (FSM) is tuple M = (Σ, Q, ι, δ, F ) where: Σ is finite lphet of ctions, Q is finite set of sttes, ι Q is the initil stte, δ Q Σ Q is the set of (lelled) trnsitions, F Q is the set of finl sttes. Let us denote y Σ n, with n N ll words over the lphet Σ hving length n, nd let Σ = n N Σn denote ll the finite words over Σ. Moreover, we denote y Σ ω ll the infinite words (ω-words) over Σ, nd let Σ = Σ Σ ω. A (finite) pth π is sequence of sttes q 0, q,..., q k such tht i k. (q i, i, q i ) δ. The finite word W(π) = 2 k Σ k cn e ssocited with such sequence π. The set of ll finite pths from stte q to stte q is denoted P ths(q, q ). An infinite pth π is sequence of sttes q 0, q,..., q k,... such tht i. (q i, i, q i ) δ. Similrly to the finite cse, we cn ssocite n infinite word

5 ,c,,c S 0 S 2 T 0 T T 2 c,c Fig. 3. The FSM recognizing d prefies for the property ϕ = G ( X). S Fig. 2. The FSM of the trget. W(π ) Σ ω to such pth. The set of ll infinite pths from stte q is denoted P ths ω (q). When FSM is interpreted s n utomton on finite words its semntics is lnguge L Σ. Given FSM A, we denote its lnguge on finite words s L(A), where L(A) iff there is pth from the initil stte ι to ny finl stte. Formlly, L(A) = {W(π) q F, π P ths(ι, q)}. A FSM A is clled deterministic iff, for ech stte, there is ectly one trnsition for ech possile symol. Formlly, q Q, Σ.!q Q. (q,, q ) δ. We denote y det(a) deterministic FSM equivlent to A, i.e., such tht L(det(A)) = L(A). Given two FSMs A nd D = det(a), there lwys eists mpping function µ : Q A P(Q D ) which reltes ech stte of A with set of sttes from D. Note tht det(a) univoclly denotes one of the possile deterministic FSM which re equivlent to A. We ssume tht, if A is deterministic, then det(a) = A. We lso consider the stndrd definition of the prllel composition of FSMs. Let A = (Σ, Q A, ι A, δ A, F A ) nd B = (Σ, Q B, ι B, δ B, F B ) e two FSMs, using the sme lphet Σ. The prllel composition of A nd B is defined s A B = (Σ, Q A Q B, (ι A, ι B ), δ A B, F A B ), where δ A B = {((q, q 2 ),, (q, q 2)) (q,, q ) δ A, (q 2,, q 2) δ B }, nd F A B = {(q, q 2 ) q F A q 2 F B }. We ssume computtion of non-terminting system to e represented s n infinite ω-word over given lphet Σ. A FSM cn e interpreted s n utomton over ω-words, y using proper cceptnce condition. In this pper, s regrds utomt over ω-words, we only consider FSMs for which ny possile trnsition is lwys ccepted. Therefore, in this cse, the set of finl sttes F is not involved in the definition of the cceptnce condition. Definition IV.2. An ω-utomton is FSM A whose semntics is the ω-lnguge L ω (A) = {W(π) π P ths ω (ι)}. In order to formlly define sfety properties, we need some preliminry definitions. We first consider d prefies for given lnguge of infinite words L Σ ω, which intuitively identify ny finite word which cnnot e etended to n infinite word of the lnguge. A lnguge of infinite words L Σ ω such tht ech word not in L hs d prefi is clled sfety lnguge. Their forml definitions follow. Definition IV.3. A finite word Σ is d prefi for lnguge L Σ ω iff y Σ ω. y / L. The set of ll d prefies for given lnguge L is denoted s BdPrefies(L). Definition IV.4. A lnguge L Σ ω is sfety lnguge iff w Σ ω \ L. Σ, y Σ ω. w = y BdPrefies(L). Note tht the lnguge BdPrefies(L), for given sfety lnguge L, is closed under conctention with ritrry symols, s shown y the following theorem. Theorem IV.. Let L Σ ω e sfety lnguge. Then Σ, Σ. BdPrefies(L) = BdPrefies(L). Let us denote y A d(l) (non-deterministic) FSM recognizing the d prefies of given sfety lnguge L, tht is L(A d(l) ) = BdPrefies(L). By Theorem IV. we cn ssume tht A d(l) hs ectly one finl stte ψ such tht for ech symol there is trnsition ψ ψ, nd there is no other trnsition eiting from ψ. Let us consider sfety property ϕ, nmely property whose set L(ϕ) of infinite words stisfying it form sfety lnguge. Intuitively, sfety property is such tht every violtion occurs fter finite eecution of the system. We denote y A d(ϕ) = A d(l(ϕ)) (non-deterministic) FSM which recognizes the d prefies of the (lnguge descried y the) sfety property ϕ, tht is the ll nd only words which do not stisfy the property. A sfety property cn e epressed using vrious formlisms, such s LTL formule [6] or Büchi utomt [7]. We do not discuss the spect of the trnsltion of sfety property ϕ into FSM A d(ϕ) which recognizes its d prefies. Insted, in the following, we ssume such FSM to e given. We refer the reder to [8] for detils on the construction of FSMs recognizing d prefies of LTL formule nd Büchi utomt. Synthesis of the controller structure We consider non-deterministic FSM A = (Σ, Q A, q A 0, δ A, F A ) cpturing ll the possile ehviour for the trget. In synthesizing the controller structure we strct wy from the type of lels which pper on the trnsitions of the enriched version of A. According to Definition IV.2 A is to e interpreted s n utomton over ω-words, moreover we ssume F A = Q A since the set of finl sttes is not involved in the semntics of such FSM. Let ϕ e sfety property, in the proctive setting, trunction controller cn e defined from the deterministic FSM det(a d(ϕ) ), in which trnsition is llowed only if

6 ,,c S 0 T 0 S 2 T 0 S 0 T S T 2 S 0 T 0 S 2 T 0 S 0 T S T 2 c c c S T S 0 T 2 S 2 T 2 Fig. 4. The FSM C 0, otined s the prllel of the trget s FSM (Figure 2), nd the FSM recognizing d prefies (Figure 3). it does not end up in the finl stte. By eploiting Definitions II.3 nd II.4, we cn otin proctive controller = with such ehviour y using trnsition reltion ctr defined y the following inference rule. (good) δ C(c, ) = c c / F C. () c ctr c According to the semntics of from Definitions II.3 nd II.4, such definition of ctr is pplicle to oth untimed nd timed systems. Slightly using nottion, we denote the ensemle of the controller nd the trget s A d(ϕ) A. Recll from Section III tht lzy controller is completely specified y (i) n ctive monitoring reltion =, (ii) n updte reltion for unseen ctions lctr, nd (iii) scheduling function ζ. As regrds the kinds of trget tht we consider, the corresponding lzy trunction controllers ll shre the sme structure, nd just the definition of the scheduling function ζ is different from one to nother. Emple IV.. Throughout this section we consider, s running emple, trget whose ehviour is descried y the FSM shown in Figure 2, with lphet Σ = {,, c}. We construct controller for preventing the trget to perform two consecutive ctions. Such sfety property cn e formlly epressed s the LTL formul ϕ = G ( X). Figure 3 shows the deterministic FSM recognizing the d prefies of ϕ, nmely det(a d(ϕ) ). We detil our construction only in the cse of the untimed trunction controller, i.e., Definition II.3. The construction in the timed cse is nlogous, nd ll the theorems cn e esily restted in the timed cse y ssuming timed trunction controller s in Definition II.4. The lzy controller is constructed from the prllel composition of det(a d(ϕ) ) with deterministic FSM equivlent to A, i.e., it is the FSM C 0 = det(a d(ϕ) ) det(a). This llows the controller for trcking the ctions performed y the trget, which is necessry to determine n pproprite scheduling function ζ. In this cse, the ensemle of the controller nd the trget ecomes (det(a d(ϕ) ) det(a)) A, which is equivlent to det(a d(ϕ) ) A ccording to the S T Fig. 5. The FSM C of the controller, constructed from C 0 (Figure 4). semntics of trunction controllers. This is formlly proved y the following theorem. Theorem IV.2. Let B A e trunction controller, with A eing non-deterministic FSM descriing the ehviour of trget, nd B deterministic FSM descriing the trunction controller. Let D = det(a), nd C = B D. Then, Σ, Q B, d Q D, Q A : (ι B, ι D ) ι A = (, d ) ι B ι A = where (ι B, ι d ), (, d ) Q C. The ctul FSM descriing the controller is otined from C 0 y joining together ll the finl sttes in unique finl stte ψ C0 with self loop for ech symol in Σ. We cll FSM of this kind soring, nd we denote it s C = soring(c 0 ) where the function soring is defined s follows. Definition IV.5. Given deterministic FSM C = (Q C, Σ, δ C, ι C, F C ), we denote y soring(c) FSM E = (Q E, Σ, δ E, ι E, F E ) such tht: (i) Q E = Q C \ F C {ψ E }, with ψ E / Q C ; (ii) δ E = {(µ(c),, µ(c ) (c,, c ) δ C } {(ψ E,, ψ E ) Σ}; (iii) ι E = µ(ι C ); (iv) F E = {ψ E }; where µ : Q C Q E is mpping etween the sttes of C nd E such tht c Q C \F C. µ(c) = c nd c F C. µ(c) = ψ E. For the purposes of runtime monitoring, such FSM C must e equivlent to C 0, in spite of the fct tht the lnguges they recognize cn e different. Such n equivlence is formlly proved y the following theorem. Theorem IV.3. Let C A e trunction controller, with A eing the non-deterministic FSM of trget, nd C deterministic FSM such tht c F C. δ C (c, ) F C. Let E = soring(c). Then, Σ, c Q C, e Q E, Q A : ι C ι A = c ι E ι A = e Emple IV.2. Figure 4 shows the FSM C 0 = det(a d(ϕ) ) det(a) otined from the prllel composition of the FSM of the trget, in Figure 2, nd the FSM recognizing d prefies for ϕ, in Figure 3. The FSM C = soring(c 0 ), otined from C 0 y collpsing ll the finl sttes in one, nd for which there is self loop for ech possile symol in the lphet, is

7 shown in Figure 5. Notice tht C 0 hs three finl sttes F C0 = {S 0 T 2, S T 2, S 2 T 2 }, which re replced in C y the only finl stte S T 2. The ctive monitoring reltion = nd the updte reltion for unseen ctions lctr re oth constructed from the trget FSM A nd the LTL sfety property ϕ, since their definition does not depend on the type of FSM we consider. In prticulr, the ctive monitoring reltion = corresponds to the timed trunction controller from Definition II.4. The updte reltion for unseen ctions lctr, i.e., how the stte of the controller is updted when n unseen ction occurs, is defined s follows. Definition IV.6. The updte reltion for unseen ctions lctr for lzy trunction controller is the lest reltion defined y the following rules: (sleep) (nil) δ C (c, ) = c c / F C ; c ã lctr c Σ c c F C ã lctr c Rule (sleep) mirrors δ C s fr s non-finl stte re involved. As soon s the controller reches finl stte in F C, rule (nil) ensures tht it remins in such stte while ccepting ny unseen ctions, ccording to the fct tht sleeping controller does not lock unseen ctions. V. SYNTHESIS OF THE SCHEDULING FUNCTIONS Here we complete the synthesis of lzy controllers y defining scheduling functions for the trgets considered in the previous section. We split the presenttion ccording to the type of trget considered. A. Scheduling Functions for Non-Proilistic Systems We recll tht we re considering non-deterministic trget A = (Σ, Q A, ι A, δ A, F A ), where F A = Q A, herey enriched with function θ : Q A Σ Q A R + denoting the durtions ssocited with trnsitions. We ssume θ(t) = 0 for ll t / δ A. The semntics of trget (A, θ) is the Timed LTS (R + Q A, Σ, sys ) where sys is the lest trnsition reltion defined y the following iom: (q,, q ) δ t, q θ(q,, q ) = sys t +, q Notice tht this reltion lso includes trgets whose underlying time domin is discrete. Recll tht the controller is defined y the FSM C = soring(b D), where B = det(a d(ϕ) ) nd D = det(a). Given stte c Q C of the controller, we define function giving the shortest durtion of ny pth from the current stte c to the finl stte of C, denoted ψ C. Let µ C : Q B D Q C denote the mpping defining the soring function, nd let µ D : Q A P(Q D ) denote the mpping from the sttes of the FSM A to the sttes of the FSM det(a). Let ν(c) denote the set of sttes of A which.. re mpped to stte c Q C, i.e. ν(c) = {, d. c = µ C (, d) d µ D ()}. Function ν(c) is lso etented to pths s ν(c,..., c k ) = {,..., k i k. i ν(c i )}. A function durtion cn e formlly defined s follows: durtion(π) = min { k i= θ( i, i, i ) 0,,..., k ν(π), k Σ k}. (2) This function is used to define the scheduling function ζ, i.e. ζ(c, h) = min{durtion(π) π P ths(c, ψ C )} h. (3) Note tht ζ(c, h) tkes into ccount the fct tht the lst ction from the trget hs een seen t time t h. For this type of trgets strong theorem on the efficiency of lzy controllers cn e proved. Theorem V.. Let A e non-deterministic FSM descriing the ehviour of the trget, nd B = det(a d(ϕ) ) deterministic FSM recognizing d prefies for given property ϕ. Let D = det(a), nd C = soring(b D) e the FSM of the controller. Consider the lzy trunction controller (=, lctr, ζ), with = s in Definition II.4, lctr s in Definition IV.6, nd ζ s in Eqution 3. Then, if ι C ψ C, the controller never reches the finl stte, tht is t, k, h R +, c Q C, Q A : 0, [ ι C ] 0 { ι A } 0 lzy t, [ c ] k { } h = c ψ C Intuitively, this theorem proves tht no pssive violtion cn hppen if the scheduling function stisfies Eqution 3. B. Scheduling Functions for Discrete Time Mrkov Chins As first proilistic system we consider trget descried y homogenous Discrete Time Mrkov Chin (DTMC), i.e., trget moving proilisticlly over finite set of sttes, where t ny time the proility of jumping to stte is completely determined in the stte itself. Definition V.. A Discrete Time Mrkov Chin is tuple (S, s, P) where (i) S is finite set of sttes; (ii) s is the initil stte; (iii) P : S S [0, ] is trnsition proility mtri, such tht s S P(s, s ) = for ll sttes s S. Ech element P(s, s ) gives the proility of trnsition from s to s, i.e., P(s, s ) = P(X(k + ) = s X(k) = s) for ny k 0. A DTMC is fmily of rndom vriles {X(k) k = 0,, 2,...} where X(k), rnging over sttes, re oservtions mde t discrete time-steps. Among others, these proilistic processes stisfy the Mrkov property: the stte t time k depends only on the stte t time k, nd not on the sttes t previous times, i.e., the history. We enrich this definition of DTMC with lels denoting ctions on the trnsitions. We consider trget s the pir (A, θ), where A = (Σ, Q A, ι A, δ A, F A ), with F A = Q A, is deterministic FSM enriched with θ : Q A Σ Q A [0, ] giving the proility ssocited with ech trnsition. Recll tht the proilities of ll the trnsitions eiting from stte must sum up to. We lso ssume θ(t) = 0 for ll t /

8 δ A. According to Definition V. leled DTMC representing (A, θ) is tuple (Q A, e (ι A), P), where e (ι A) is unit vector with only in the position corresponding to the initil stte ι A, nd the mtri of trnsition proilities P = [p ij ] is such tht p ij = Σ θ(q i,, q j ) when Q A = {q,..., q n }. Our strtegy for synthesizing the controller structure yields FSM structurlly nlogous to some DTMCs hving rechility properties, which we now discuss. Some terminology hs to e introduced first: DTMC stte is trnsient (conversely recurrent) if ny eecution visits it only finitely mny times. Differently, stte s is soring if it cnnot e left, i.e., P(s, s) =. A terminting DTMC is Mrkov chin where ll sttes re trnsient, ecept one which is soring. Intuitively, the controller we synthesize is structurlly equivlent to terminting DTMC. For these types of DTMCs the time to sorption T s, i.e., the time it tkes to enter the soring stte, ssuming the DTMC strts in stte s, follows wellknown Discrete Phse-type distriution [9]. Definition V.2. Let (S, s, P) e terminting DTMC, through proper reordering of its sttes, we cn lwys write P s ] [ˆP ρ P = 0 where (i) ˆP [0, ] ( S ) ( S ) restricts P to the trnsient sttes, (ii) ρ is column vector which contins proilities from ech trnsient stte to the soring one, nd (iii) 0 is zero row vector. A Discrete Phse-type (DPH) distriution, denoted DP H(τ, ˆP), is row vector τ {0, } S specifying the initil proility distriution over trnsient sttes, nd the mtri ˆP. Its cumultive distriution function, i.e., the proility tht the time t to the soring stte is smller or equl to, reds s F () = τ ˆP for N. (4) Given the system in non-soring stte s t time t, this distriution chrcterizes the proility of jumping to the soring stte, in ny numer of steps, within time t > t. We now show why this distriution llows for nlyticlly determining the proility tht the lzy controller misses the detection of violtion. Given DTMC (A, θ), its set of possile timed trnsitions is descried y the trnsition reltion sys, defined in Figure 6, i.e., specil cse of the nonproilistic system where steps lst time-unit. As we sid, the controller is the FSM C = soring(det(a d(ϕ) ) A), since A is deterministic, nd is equipped with lelling function θ : Q C Σ Q C [0, ], uilt from θ, to otin lelled DTMC (C, θ). Let µ C denote the mpping defining the soring function. Then, the lelling function θ, giving the trnsition proilities, is such tht c ψ C, c 2 Q C. θ(c,, c 2 ) = θ(,, 2 ) where, for i =, 2, i is such tht µ C (c i ) = ( i, i ) for some i. Moreover, Σ. θ(ψ C,, ψ C ) = / Σ. Note tht the proilities ssocited with the loop trnsition on the finl stte re not importnt, s long s they sum up to, for correctness. As we mentioned, C hs unique soring stte ψ C in which the d prefi of the trget trce is recognized, i.e., the violtion is detected. This proposition holds. Proposition V.2. The DPH distriution of DTMC (C, θ) is the distriution of the time until the net violtion of the DTMC. Hence the proility of pssive violtions cn e ounded y using such distriution: given stte c Q C, the function ζ(c, h) gives the mimum llowed time t N for which the proility of reching the finl stte ψ C from the current stte c, within t time units, is less thn proility β. Formlly, if the current stte of the DTMC is c then the cumultive distriution function F of DP H(e (c), ˆP) gives the time for scheduling for the net oservtion y solving t = m{0, m{t F (t) β} h} (5) where β [0, ] is given proility of error. Notice tht this corresponds to using the rndom vrile Y = (X h) where X DP H(τ, ˆP) nd Y is the liner trnsformtion of X nd h. We remrk tht even though the eponentil jumps of DTMC re memoryless (i.e., the time pst h could e disregrded if we considered eponentil witing times individully), the DPH nd hence Y re not, requiring us to use h in eqution (5). Moreover, the outmost m opertion is required since X hs infinite support, i.e., the proility tht [0, h] 0. The following proposition sttes n importnt property for lzy controllers synthesized in this mnner. Proposition V.3. If ζ(c, h) = t with t solution of eqution (5) for some β [0, ], then the proility of pssive violtion is ounded y β. Emple V.. Consider the FSM of Figure 2 denoting DTMC ({S 0, S, S 2 }, S 0, P), nd let us uild the terminting DTMC ({S 0 T 0, S T, S 2 T 0, S 0 T, S T 2 }, S 0 T 0, P ) of Figure 5 where 0 /5 4/ /5 4/5 /3 0 2/3 0 0 P = /3 0 2/3 P = /5 0 / The ltter of these mtrices is otined from the former through the definition of prllel composition of FSMs. From P, y considering the top-left 4 4 su-mtri, we etrct ˆP. If we numericlly solve eqution (5) y vrying the stte-distriution τ to ccount for ech possile stte of the chin we otin the following vlues for the scheduling function ζ(s 0 T 0, 0) = 4, ζ(s T, 0) = 4, ζ(s 2 T 0, 0) =, ζ(s 0 T, 0) = 0, for the threshold β = 0.2. Thus, for instnce, from S 0 T 0 with proility higher thn 80% no pssive violtions will hppen in the net 4 steps. If one lowers the threshold to β = 0.05 the oservtions need to e scheduled more frequently, e.g., in tht cse ζ(s 0 T 0, 0) = 2.

9 t, q (q,, q ) δ sys t +, q (q,, q ) δ R >0 t, q sys t +, q. Fig. 6. Trnsition reltion for DTMCs. Fig. 7. Trnsition reltion for CTMCs. C. Scheduling Functions for Continuous Time Mrkov Chins A homogenous Continuous Time Mrkov Chin (CTMC) is proilistic model of trget with n underlying continuous time domin, i.e., n nlogous of DTMC where rel vlued clock underlies the system. Definition V.3. A Continuous Time Mrkov Chin (CTMC) is tuple (S, s, R) where S is finite set of sttes, s S is the initil stte, R : S S R 0 is the trnsition rte mtri. The trnsition rte etween ech pir of sttes is descried in the trnsition rte mtri R, nd represents the negtive prmeter of n eponentil distriution. The time spent in stte s S is eponentilly distriuted with rte E(s), defined s E(s) def = s S R(s, s ). The vlue E(s), for stte s, is clled the eit rte of s. From CTMC n emedded DTMC cn e retrieved y defining its trnsition proility mtri P(s, s ) = R(s, s )/E(s). Trgets whose ehviour is descried s CTMC generte eecutions where the sojourn time in stte is distriuted ccording to n eponentil distriution with prmeter corresponding to the eit rte of the stte, nd in which the proilistic jumps re resolved ccording to the emedded DTMC. The notions we introduced for DTMCs pply lso to CTMCs where n soring stte s is such tht E(s) = 0. Also, lelled etensions of CTMCs cn e otined long the line of the lelled etensions of DTMCs. Scheduling functions for CTMCs re defined similrly to the corresponding discrete cse. In prticulr, the time until sorption is descried y Continuous Phse-type (PH) distriution, s opposed to the DPH distriution of the previous cse. Techniclly, given set of sttes Q A = {q,..., q n }, lelled CTMC is descried s pir (A, θ), where A = (Σ, Q A, ι A, δ A, F A ), with F A = Q A, is deterministic FSM, nd θ : Q A Σ Q A R + gives the rte ssocited with ech trnsition. As in the previous cses, we ssume θ(t) = 0 for ll t / δ A. According to Definition V.3, lelled CTMC cn e represented s tuple (Q A, e (ιa), R), where e (ιa) is unit vector with only in the position corresponding to the initil stte ι A, nd R = [r ij ], nmely the trnsition rtes mtri, is such tht r ij = Σ θ(q i,, q j ). Definition V.4. Let (S, s, R) e terminting CTMC, define its infinitesiml genertor mtri R in with entries ri,j in where ri,j in = r i,j if i j nd r i,j R, nd ri,i in = j i r i,j. Then, (y possily renumering the sttes of the CTMC) define [ ] ˆR in ρ R in = 0 0 where (i) ˆR in [0, ] ( S ) ( S ) restricts R in to the trnsient sttes, (ii) ρ nd 0 re s in Definition V.2. A Continuous Phse-type (PH) distriution P H(τ, ˆR in ) is row vector τ {0, } S, i.e., the initil distriution over trnsient sttes nd the mtri ˆR in. Its cumultive distriution function is F () = τ e ˆR for R + where e ( ) denotes mtri eponentition. The set of possile timed trnsitions of given CTMC (A, θ) is descried y the trnsition reltion sys, defined in Figure 7. Notice tht, since the eponentil distriution tkes vlues in [0, + ) such reltion defines infinite trnsitions. As in the discrete cse the controller is C = soring(det(a d(ϕ) ) A) enriched with lelling function θ : Q C Σ Q C R +. The definition of θ is nlogous to tht of the DTMC, provided tht the loop trnsition on the finl stte is Σ. θ(ψ C,, ψ C ) = 0. A continuous-time nlogous of Proposition V.2 cn now e stted. Proposition V.4. The PH distriution of (C, θ) is the distriution of the time until the net violtion for such CTMC. As in the discrete cse such chin is terminting nd the soring stte is ψ C. Given stte c Q C, function ζ(c, h) gives the mimum llowed time t R for which the proility of reching the finl stte ψ C from the current stte c, within t time units, is less thn ritrry proility β, s it ws for DTMCs. The first time to rech the soring stte follows Continuous Phse-type distriution P H(e (c), ˆR in ) otined from the CTMC (C, θ) ccording to Definition V.4. Given its cumultive distriution function F the mimum time to sleep is gin given y t = m{0, m{t F (t) β} h}, which corresponds, when t > h, to solving τ e ˆR in( t+h) = β (6) since F is monotonic. As for DTMCs, h ppers since the PH is not memoryless. By synthesizing lzy controllers in this mnner the following proposition holds. Proposition V.5. If ζ(c, h) = t with t solution of eqution (6) for some β [0, ], then the proility of pssive violtion is ounded y β. Emple V.2. Consider the FSM of Figure 2 denoting CTMC ({S 0, S, S 2 }, S 0, R), nd let us uild the terminting CTMC ({S 0 T 0, S T, S 2 T 0, S 0 T, S T 2 }, S 0 T 0, R ) of Figure

10 5 where R = R = As for DTMCs, the ltter of these mtrices is otined from the former through the definition of prllel composition of FSMs. From R, considering the top-left 4 4 su-mtri of the corresponding infinitesiml genertor mtri R in, we etrct ˆR in. If we numericlly solve eqution (6), y vrying the stte-distriution τ to ccount for ech possile stte of the chin, we otin scheduling function ζ such tht ζ(s 0 T 0, 0) = , ζ(s T, 0) = , ζ(s 2 T 0, 0) = , ζ(s 0 T, 0) = , for the threshold β = 0.2. Agin, if one lowers the threshold to β = 0.05 the oservtions re scheduled more frequently, so for instnce ζ(s 0 T 0, 0) = VI. PROTOTYPE IMPLEMENTATION AND DISCUSSION In order to test our monitoring environment under relistic ssumptions, we defined nd implemented complete cse study. In prticulr, lzy controllers hve een pplied for wtching the eecution of we service running on OSGi pltform. In this section we present our prototype nd we discuss on its ehviour nd performnces. A. Cse study We imgine simple medicl prescription service infrstructure. The system consists of four ctors: (i) prescription service, (ii) its customers, i.e, doctors, (iii) phrmcies nd (iv) delivery service. Figure 8 depicts the whole system. Registered doctors cn use the prescription service to fill prescription forms for their ptients nd sumit them to phrmcy or to the delivery service. Briefly, the progrm works s follows: ) initilly, the system wits for users, i.e., doctors, to log in (ction login); 2) then the doctor cn dd one or more medicines (stndrd, i.e., dd med, or HIV-specific, i.e., dd hiv) to the prescription; 3) finlly, the doctor chooses etween two modlities, i.e., phrmcy nd deliver, for specifying how the ptient ccesses to the medicines. At ech step, the doctor cn cncel (cncel) the opertion nd, t the end, he must confirm (confirm) the prescription. Figure 9 shows the finite stte mchine (FSM) representing the prescription system. In order to void privcy violtions, HIV therpies must lwys e delivered t the customer s residence. The FSM of Figure 0 represents the privcy policy descried ove. Briefly, the policy reches the finl stte, i.e., detects violtion, if session in which dd hiv hs een invoked concludes with phrmcy. Fig. 8. B. Prototype structure The prescription service scenrio. The OSGi undle implementing the prescription service minly consists of simple RMI interfce. The interfce declres method for ech ction lelling the FSM of Figure 9, e.g., deliver() for deliver 2. Ech method ehves ccording to its specifiction, e.g., dd med() dds medicine to the current prescription, nd writes new entry in the log. Logging functionlities re provided y n implementtion of the org.pche.commons.logging.log interfce tht simply ppends the given lel nd timestmp to tet file. The lzy controller is n eternl ppliction, i.e., running on different pltform w.r.t. the trget service. At ech control cycle, the monitor wkes up nd requests the current log to the remote pltform 3. Then, the log trce is processed y the policy utomton, see Figure 0, to check whether violtion occurred. If it is the cse, the monitor sends security error signl to the eecution pltform (here cusing the trget to e reinitilised). Insted, if the oserved trce is legl, the lzy monitor schedules the net control cycle nd hierntes, i.e., goes idle. The scheduling function mps pir of sttes p, for the trget, nd q, for the policy, into hierntion time t p,q R +. We compute hierntion times efore strting the monitoring process. In this wy, we crry out the computtion only once nd we store the pirs (p, q), t p,q in two-columns tle. Hierntion times re computed, using the procedure detiled in Section V, strting from description of the trget system. Clerly, the system ehviour depends on the customers. We ssume tht stndrd ehviour is known, e.g., y nlysing the system eecution. In our model we considered two possile descriptions: Continuous Time nd Discrete Time Mrkov Chins (CTMC nd DTMC, respectively). In prticulr, the stndrd eecution of the service is descried y the mtrices shown in Figure. The mtrices descrie the epected ehviour of the FSM of Figure 9. Mtri R contins rtes of stte trnsitions, corresponding to the prmeters of eponentilly distriuted rndom vriles, while P contins the proilities of stte trnsitions. Intuitively, time rtes define the epected numer of stte trnsitions per second, e.g., R[, 2] = /30 mens tht 2 Note tht here we re not interested in method prmeters. 3 Actully it only needs to retrieve the frgment since the lst request.

11 2 dd_med, dd_hiv login 0 confirm, cncel cncel phrmcy, deliver login, dd_med, dd_hiv, phrmcy, deliver, confirm, cncel login, dd_med, phrmcy, deliver, confirm, cncel dd_hiv 0 login, deliver confirm, cncel 2 phrmcy dd_med, dd_hiv 0 /30 0 R = 2/5 / P = /20 7/20 /0 0 0 Fig. 9. The prescription system FSM. Fig. 0. The privcy policy. Fig.. The rte nd proility mtrices. trnsition from stte 0 to stte hppens, on the verge, every 30 seconds. Insted, the elements of P descrie the proility of moving from the current stte to the net one, e.g., P [2, 3] = /0 mens tht stte 3 hs /0 proility to e the successor of 2. Also, note tht R nd P cn collpse the vlues for more thn one trnsition in single vlue, e.g., P [2, 2] = 7/20 denotes oth dd med (P dd med = 4/5) nd dd hiv (P dd hiv = /20) trnsitions. 4 C. Performnce evlution The prescription service ws developed with Eclipse IDE (Helios Service Relese 2) nd eecuted the OSGi pltform Equino 3.3. Log lirries hve een developed implementing the Apche Commons Logging API version... We tested our system y utomticlly generting customer sessions of severl types. Customers ccess the system which is monitored using lzy controller. We synthesize the lzy controllers using the two mtrices R nd P introduced ove nd considering four different risk fctors, i.e., 0.0, 0.05, 0. nd 0.2. Also, we compred our monitors with lzy controller which uses scheduling function tht returns the durtion of the shortest pth leding to violtion from the current stte, computed y mens of the Dijkstr lgorithm. For this purpose, we considered the mtri R such tht R [i, j] = R[i, j] (nd R [i, j] = if R[i, j] = 0). For the overhed nlysis we considered customers tht sttisticlly ehve in complint wy with respect to the originl specifiction, i.e., the ehviourl mtrices. The eecution overhed is mesure of the computtionl effort due to the monitoring ctivity in comprison with the computtion of the trget. For the continuous time model we considered the ctivity time of the monitor ginst the overll eecution intervl. Insted, for the discrete time model we compred the numer of controller synchroniztions nd the totl numer of service invoctions. Figure 2 shows the simultion output. As epected, oth the pproches increse their performnce with the growth of the risk threshold. Moreover, in generl 4 The ctul process hs een crried out using supplementry, phntom sttes for removing self-loops nd for distinguishing multiple trnsitions hving the sme source nd destintion. they perform etter thn the Dijkstr lgorithm-sed solution (dshed line). Clerly, such version does not gin dvntge from the risk modifiction. In order to test delys in violtions detection, we eecuted our system with clients tht only emit illegl trces (in the sense of Figure 0). The violting trces re generted using the sme proilities nd rtes of stndrd clients. Figure 3 nd Figure 4 show the violtion detection delys produced y our testing ctivity. Note tht the delys for CTMC nd DTMC-sed monitors hve completely different mening nd must e interpreted. Indeed, CTMC controllers work under rel time settings, i.e., the monitor is creted in order to keep under control the time dely of violtion detection rther thn the numer of ctions. Conversely, DTMC controllers im t minimising the numer of ctions eecuted fter violtion. However, it is interesting to compre how the two models ehve in oth cses. Finlly, we lso introduced n error fctor for testing the stility of our solution. In prticulr, we considered users tht do not perfectly comply with the given specifictions, i.e. the mtrices R nd P. Interestingly, we found tht the performnce nd dely of our system re stle even with errors up to 30%. VII. CONCLUSION AND RELATED WORK In this work we hve proposed new pproch to the synthesis nd ppliction of novel clss of security controllers, nmely lzy controllers. The novelty of our technique stnds in the possiility of scheduling the security checks long with the trget eecution. Although this genertes risk fctor, it lso etends the pplicility of security monitors to mny rel-world scenrios. Moreover, we hve shown tht the risk of security violtion cn e nlysed nd kept under control through the eecution prmeters of the controllers. Lzy controllers re generted strting from the specifiction of proctive controllers, i.e., edit utomt. Then we dd time constrints to the ppliction rules. In this wy, we cn convert ny eisting security controller, enforcing n edit property, to lzy controller. This mount to sy tht we

1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automata 1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

More information

Designing finite automata II

Designing finite automata II Designing finite utomt II Prolem: Design DFA A such tht L(A) consists of ll strings of nd which re of length 3n, for n = 0, 1, 2, (1) Determine wht to rememer out the input string Assign stte to ech of

More information

Parse trees, ambiguity, and Chomsky normal form

Parse trees, ambiguity, and Chomsky normal form Prse trees, miguity, nd Chomsky norml form In this lecture we will discuss few importnt notions connected with contextfree grmmrs, including prse trees, miguity, nd specil form for context-free grmmrs

More information

Coalgebra, Lecture 15: Equations for Deterministic Automata

Coalgebra, Lecture 15: Equations for Deterministic Automata Colger, Lecture 15: Equtions for Deterministic Automt Julin Slmnc (nd Jurrin Rot) Decemer 19, 2016 In this lecture, we will study the concept of equtions for deterministic utomt. The notes re self contined

More information

Convert the NFA into DFA

Convert the NFA into DFA Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:

More information

Formal Languages and Automata

Formal Languages and Automata Moile Computing nd Softwre Engineering p. 1/5 Forml Lnguges nd Automt Chpter 2 Finite Automt Chun-Ming Liu cmliu@csie.ntut.edu.tw Deprtment of Computer Science nd Informtion Engineering Ntionl Tipei University

More information

Model Reduction of Finite State Machines by Contraction

Model Reduction of Finite State Machines by Contraction Model Reduction of Finite Stte Mchines y Contrction Alessndro Giu Dip. di Ingegneri Elettric ed Elettronic, Università di Cgliri, Pizz d Armi, 09123 Cgliri, Itly Phone: +39-070-675-5892 Fx: +39-070-675-5900

More information

p-adic Egyptian Fractions

p-adic Egyptian Fractions p-adic Egyptin Frctions Contents 1 Introduction 1 2 Trditionl Egyptin Frctions nd Greedy Algorithm 2 3 Set-up 3 4 p-greedy Algorithm 5 5 p-egyptin Trditionl 10 6 Conclusion 1 Introduction An Egyptin frction

More information

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1 Chpter Five: Nondeterministic Finite Automt Forml Lnguge, chpter 5, slide 1 1 A DFA hs exctly one trnsition from every stte on every symol in the lphet. By relxing this requirement we get relted ut more

More information

Continuous Random Variables Class 5, Jeremy Orloff and Jonathan Bloom

Continuous Random Variables Class 5, Jeremy Orloff and Jonathan Bloom Lerning Gols Continuous Rndom Vriles Clss 5, 8.05 Jeremy Orloff nd Jonthn Bloom. Know the definition of continuous rndom vrile. 2. Know the definition of the proility density function (pdf) nd cumultive

More information

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

DFA minimisation using the Myhill-Nerode theorem

DFA minimisation using the Myhill-Nerode theorem DFA minimistion using the Myhill-Nerode theorem Johnn Högerg Lrs Lrsson Astrct The Myhill-Nerode theorem is n importnt chrcteristion of regulr lnguges, nd it lso hs mny prcticl implictions. In this chpter,

More information

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9. Regulr Expressions, Pumping Lemm, Right Liner Grmmrs Ling 106 Mrch 25, 2002 1 Regulr Expressions A regulr expression descries or genertes lnguge: it is kind of shorthnd for listing the memers of lnguge.

More information

Lecture 9: LTL and Büchi Automata

Lecture 9: LTL and Büchi Automata Lecture 9: LTL nd Büchi Automt 1 LTL Property Ptterns Quite often the requirements of system follow some simple ptterns. Sometimes we wnt to specify tht property should only hold in certin context, clled

More information

Nondeterminism and Nodeterministic Automata

Nondeterminism and Nodeterministic Automata Nondeterminism nd Nodeterministic Automt 61 Nondeterminism nd Nondeterministic Automt The computtionl mchine models tht we lerned in the clss re deterministic in the sense tht the next move is uniquely

More information

Chapter 2 Finite Automata

Chapter 2 Finite Automata Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

More information

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages Deprtment of Computer Science, Austrlin Ntionl University COMP2600 Forml Methods for Softwre Engineering Semester 2, 206 Assignment Automt, Lnguges, nd Computility Smple Solutions Finite Stte Automt nd

More information

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz University of Southern Cliforni Computer Science Deprtment Compiler Design Fll Lexicl Anlysis Smple Exercises nd Solutions Prof. Pedro C. Diniz USC / Informtion Sciences Institute 4676 Admirlty Wy, Suite

More information

Exercises with (Some) Solutions

Exercises with (Some) Solutions Exercises with (Some) Solutions Techer: Luc Tesei Mster of Science in Computer Science - University of Cmerino Contents 1 Strong Bisimultion nd HML 2 2 Wek Bisimultion 31 3 Complete Lttices nd Fix Points

More information

Lecture 08: Feb. 08, 2019

Lecture 08: Feb. 08, 2019 4CS4-6:Theory of Computtion(Closure on Reg. Lngs., regex to NDFA, DFA to regex) Prof. K.R. Chowdhry Lecture 08: Fe. 08, 2019 : Professor of CS Disclimer: These notes hve not een sujected to the usul scrutiny

More information

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton 25. Finite Automt AUTOMATA AND LANGUAGES A system of computtion tht only hs finite numer of possile sttes cn e modeled using finite utomton A finite utomton is often illustrted s stte digrm d d d. d q

More information

Discrete Mathematics and Probability Theory Spring 2013 Anant Sahai Lecture 17

Discrete Mathematics and Probability Theory Spring 2013 Anant Sahai Lecture 17 EECS 70 Discrete Mthemtics nd Proility Theory Spring 2013 Annt Shi Lecture 17 I.I.D. Rndom Vriles Estimting the is of coin Question: We wnt to estimte the proportion p of Democrts in the US popultion,

More information

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4 Intermedite Mth Circles Wednesdy, Novemer 14, 2018 Finite Automt II Nickols Rollick nrollick@uwterloo.c Regulr Lnguges Lst time, we were introduced to the ide of DFA (deterministic finite utomton), one

More information

Tutorial Automata and formal Languages

Tutorial Automata and formal Languages Tutoril Automt nd forml Lnguges Notes for to the tutoril in the summer term 2017 Sestin Küpper, Christine Mik 8. August 2017 1 Introduction: Nottions nd sic Definitions At the eginning of the tutoril we

More information

1 From NFA to regular expression

1 From NFA to regular expression Note 1: How to convert DFA/NFA to regulr expression Version: 1.0 S/EE 374, Fll 2017 Septemer 11, 2017 In this note, we show tht ny DFA cn e converted into regulr expression. Our construction would work

More information

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations.

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations. Lecture 3 3 Solving liner equtions In this lecture we will discuss lgorithms for solving systems of liner equtions Multiplictive identity Let us restrict ourselves to considering squre mtrices since one

More information

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.) CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

More information

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan CS 267: Automted Verifiction Lecture 8: Automt Theoretic Model Checking Instructor: Tevfik Bultn LTL Properties Büchi utomt [Vrdi nd Wolper LICS 86] Büchi utomt: Finite stte utomt tht ccept infinite strings

More information

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016 CS125 Lecture 12 Fll 2016 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

Lecture Solution of a System of Linear Equation

Lecture Solution of a System of Linear Equation ChE Lecture Notes, Dept. of Chemicl Engineering, Univ. of TN, Knoville - D. Keffer, 5/9/98 (updted /) Lecture 8- - Solution of System of Liner Eqution 8. Why is it importnt to e le to solve system of liner

More information

Minimal DFA. minimal DFA for L starting from any other

Minimal DFA. minimal DFA for L starting from any other Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA

More information

Bases for Vector Spaces

Bases for Vector Spaces Bses for Vector Spces 2-26-25 A set is independent if, roughly speking, there is no redundncy in the set: You cn t uild ny vector in the set s liner comintion of the others A set spns if you cn uild everything

More information

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata CS103B ndout 18 Winter 2007 Ferury 28, 2007 Finite Automt Initil text y Mggie Johnson. Introduction Severl childrens gmes fit the following description: Pieces re set up on plying ord; dice re thrown or

More information

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014 CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA

More information

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University CS415 Compilers Lexicl Anlysis nd These slides re sed on slides copyrighted y Keith Cooper, Ken Kennedy & Lind Torczon t Rice University First Progrmming Project Instruction Scheduling Project hs een posted

More information

Review of Gaussian Quadrature method

Review of Gaussian Quadrature method Review of Gussin Qudrture method Nsser M. Asi Spring 006 compiled on Sundy Decemer 1, 017 t 09:1 PM 1 The prolem To find numericl vlue for the integrl of rel vlued function of rel vrile over specific rnge

More information

Duality # Second iteration for HW problem. Recall our LP example problem we have been working on, in equality form, is given below.

Duality # Second iteration for HW problem. Recall our LP example problem we have been working on, in equality form, is given below. Dulity #. Second itertion for HW problem Recll our LP emple problem we hve been working on, in equlity form, is given below.,,,, 8 m F which, when written in slightly different form, is 8 F Recll tht we

More information

Hybrid Control and Switched Systems. Lecture #2 How to describe a hybrid system? Formal models for hybrid system

Hybrid Control and Switched Systems. Lecture #2 How to describe a hybrid system? Formal models for hybrid system Hyrid Control nd Switched Systems Lecture #2 How to descrie hyrid system? Forml models for hyrid system João P. Hespnh University of Cliforni t Snt Brr Summry. Forml models for hyrid systems: Finite utomt

More information

Chapter 6 Techniques of Integration

Chapter 6 Techniques of Integration MA Techniques of Integrtion Asst.Prof.Dr.Suprnee Liswdi Chpter 6 Techniques of Integrtion Recll: Some importnt integrls tht we hve lernt so fr. Tle of Integrls n+ n d = + C n + e d = e + C ( n ) d = ln

More information

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 17

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 17 CS 70 Discrete Mthemtics nd Proility Theory Summer 2014 Jmes Cook Note 17 I.I.D. Rndom Vriles Estimting the is of coin Question: We wnt to estimte the proportion p of Democrts in the US popultion, y tking

More information

Formal languages, automata, and theory of computation

Formal languages, automata, and theory of computation Mälrdlen University TEN1 DVA337 2015 School of Innovtion, Design nd Engineering Forml lnguges, utomt, nd theory of computtion Thursdy, Novemer 5, 14:10-18:30 Techer: Dniel Hedin, phone 021-107052 The exm

More information

Genetic Programming. Outline. Evolutionary Strategies. Evolutionary strategies Genetic programming Summary

Genetic Programming. Outline. Evolutionary Strategies. Evolutionary strategies Genetic programming Summary Outline Genetic Progrmming Evolutionry strtegies Genetic progrmming Summry Bsed on the mteril provided y Professor Michel Negnevitsky Evolutionry Strtegies An pproch simulting nturl evolution ws proposed

More information

Lecture 09: Myhill-Nerode Theorem

Lecture 09: Myhill-Nerode Theorem CS 373: Theory of Computtion Mdhusudn Prthsrthy Lecture 09: Myhill-Nerode Theorem 16 Ferury 2010 In this lecture, we will see tht every lnguge hs unique miniml DFA We will see this fct from two perspectives

More information

dx dt dy = G(t, x, y), dt where the functions are defined on I Ω, and are locally Lipschitz w.r.t. variable (x, y) Ω.

dx dt dy = G(t, x, y), dt where the functions are defined on I Ω, and are locally Lipschitz w.r.t. variable (x, y) Ω. Chpter 8 Stility theory We discuss properties of solutions of first order two dimensionl system, nd stility theory for specil clss of liner systems. We denote the independent vrile y t in plce of x, nd

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2 CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

How to simulate Turing machines by invertible one-dimensional cellular automata

How to simulate Turing machines by invertible one-dimensional cellular automata How to simulte Turing mchines by invertible one-dimensionl cellulr utomt Jen-Christophe Dubcq Déprtement de Mthémtiques et d Informtique, École Normle Supérieure de Lyon, 46, llée d Itlie, 69364 Lyon Cedex

More information

Formal Methods in Software Engineering

Formal Methods in Software Engineering Forml Methods in Softwre Engineering Lecture 09 orgniztionl issues Prof. Dr. Joel Greenyer Decemer 9, 2014 Written Exm The written exm will tke plce on Mrch 4 th, 2015 The exm will tke 60 minutes nd strt

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 CMSC 330 1 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All exmples so fr Nondeterministic

More information

2.4 Linear Inequalities and Interval Notation

2.4 Linear Inequalities and Interval Notation .4 Liner Inequlities nd Intervl Nottion We wnt to solve equtions tht hve n inequlity symol insted of n equl sign. There re four inequlity symols tht we will look t: Less thn , Less thn or

More information

More on automata. Michael George. March 24 April 7, 2014

More on automata. Michael George. March 24 April 7, 2014 More on utomt Michel George Mrch 24 April 7, 2014 1 Automt constructions Now tht we hve forml model of mchine, it is useful to mke some generl constructions. 1.1 DFA Union / Product construction Suppose

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb. CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

The practical version

The practical version Roerto s Notes on Integrl Clculus Chpter 4: Definite integrls nd the FTC Section 7 The Fundmentl Theorem of Clculus: The prcticl version Wht you need to know lredy: The theoreticl version of the FTC. Wht

More information

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages 5//6 Grmmr Automt nd Lnguges Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn Regulr Lnguges Context Free Lnguges Context Sensitive

More information

Section 4: Integration ECO4112F 2011

Section 4: Integration ECO4112F 2011 Reding: Ching Chpter Section : Integrtion ECOF Note: These notes do not fully cover the mteril in Ching, ut re ment to supplement your reding in Ching. Thus fr the optimistion you hve covered hs een sttic

More information

Quadratic Forms. Quadratic Forms

Quadratic Forms. Quadratic Forms Qudrtic Forms Recll the Simon & Blume excerpt from n erlier lecture which sid tht the min tsk of clculus is to pproximte nonliner functions with liner functions. It s ctully more ccurte to sy tht we pproximte

More information

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3 2 The Prllel Circuit Electric Circuits: Figure 2- elow show ttery nd multiple resistors rrnged in prllel. Ech resistor receives portion of the current from the ttery sed on its resistnce. The split is

More information

CM10196 Topic 4: Functions and Relations

CM10196 Topic 4: Functions and Relations CM096 Topic 4: Functions nd Reltions Guy McCusker W. Functions nd reltions Perhps the most widely used notion in ll of mthemtics is tht of function. Informlly, function is n opertion which tkes n input

More information

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science CSCI 340: Computtionl Models Kleene s Theorem Chpter 7 Deprtment of Computer Science Unifiction In 1954, Kleene presented (nd proved) theorem which (in our version) sttes tht if lnguge cn e defined y ny

More information

CS12N: The Coming Revolution in Computer Architecture Laboratory 2 Preparation

CS12N: The Coming Revolution in Computer Architecture Laboratory 2 Preparation CS2N: The Coming Revolution in Computer Architecture Lortory 2 Preprtion Ojectives:. Understnd the principle of sttic CMOS gte circuits 2. Build simple logic gtes from MOS trnsistors 3. Evlute these gtes

More information

Interpreting Integrals and the Fundamental Theorem

Interpreting Integrals and the Fundamental Theorem Interpreting Integrls nd the Fundmentl Theorem Tody, we go further in interpreting the mening of the definite integrl. Using Units to Aid Interprettion We lredy know tht if f(t) is the rte of chnge of

More information

State Minimization for DFAs

State Minimization for DFAs Stte Minimiztion for DFAs Red K & S 2.7 Do Homework 10. Consider: Stte Minimiztion 4 5 Is this miniml mchine? Step (1): Get rid of unrechle sttes. Stte Minimiztion 6, Stte is unrechle. Step (2): Get rid

More information

5.7 Improper Integrals

5.7 Improper Integrals 458 pplictions of definite integrls 5.7 Improper Integrls In Section 5.4, we computed the work required to lift pylod of mss m from the surfce of moon of mss nd rdius R to height H bove the surfce of the

More information

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives Block #6: Properties of Integrls, Indefinite Integrls Gols: Definition of the Definite Integrl Integrl Clcultions using Antiderivtives Properties of Integrls The Indefinite Integrl 1 Riemnn Sums - 1 Riemnn

More information

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers 80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES 2.6 Finite Stte Automt With Output: Trnsducers So fr, we hve only considered utomt tht recognize lnguges, i.e., utomt tht do not produce ny output on ny input

More information

Regular expressions, Finite Automata, transition graphs are all the same!!

Regular expressions, Finite Automata, transition graphs are all the same!! CSI 3104 /Winter 2011: Introduction to Forml Lnguges Chpter 7: Kleene s Theorem Chpter 7: Kleene s Theorem Regulr expressions, Finite Automt, trnsition grphs re ll the sme!! Dr. Neji Zgui CSI3104-W11 1

More information

Centrum voor Wiskunde en Informatica REPORTRAPPORT. Supervisory control for nondeterministic systems

Centrum voor Wiskunde en Informatica REPORTRAPPORT. Supervisory control for nondeterministic systems Centrum voor Wiskunde en Informtic REPORTRAPPORT Supervisory control for nondeterministic systems A. Overkmp Deprtment of Opertions Reserch, Sttistics, nd System Theory BS-R9411 1994 Supervisory Control

More information

13 Learning with Queries

13 Learning with Queries 13 Lerning with Queries Among the more interesting remining theoreticl questions re: inference in the presence of noise, generl strtegies for interctive presenttion nd the inference of systems with semntics.

More information

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010 CS 311 Homework 3 due 16:30, Thursdy, 14 th Octoer 2010 Homework must e sumitted on pper, in clss. Question 1. [15 pts.; 5 pts. ech] Drw stte digrms for NFAs recognizing the following lnguges:. L = {w

More information

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh Lnguges nd Automt Finite Automt Informtics 2A: Lecture 3 John Longley School of Informtics University of Edinburgh jrl@inf.ed.c.uk 22 September 2017 1 / 30 Lnguges nd Automt 1 Lnguges nd Automt Wht is

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Softwre Engineering using Forml Methods Propositionl nd (Liner) Temporl Logic Wolfgng Ahrendt 13th Septemer 2016 SEFM: Liner Temporl Logic /GU 160913 1 / 60 Recpitultion: FormlistionFormlistion: Syntx,

More information

CHAPTER 1 PROGRAM OF MATRICES

CHAPTER 1 PROGRAM OF MATRICES CHPTER PROGRM OF MTRICES -- INTRODUCTION definition of engineering is the science y which the properties of mtter nd sources of energy in nture re mde useful to mn. Thus n engineer will hve to study the

More information

Quantum Nonlocality Pt. 2: No-Signaling and Local Hidden Variables May 1, / 16

Quantum Nonlocality Pt. 2: No-Signaling and Local Hidden Variables May 1, / 16 Quntum Nonloclity Pt. 2: No-Signling nd Locl Hidden Vriles My 1, 2018 Quntum Nonloclity Pt. 2: No-Signling nd Locl Hidden Vriles My 1, 2018 1 / 16 Non-Signling Boxes The primry lesson from lst lecture

More information

Lecture 3: Equivalence Relations

Lecture 3: Equivalence Relations Mthcmp Crsh Course Instructor: Pdric Brtlett Lecture 3: Equivlence Reltions Week 1 Mthcmp 2014 In our lst three tlks of this clss, we shift the focus of our tlks from proof techniques to proof concepts

More information

Section 6.1 INTRO to LAPLACE TRANSFORMS

Section 6.1 INTRO to LAPLACE TRANSFORMS Section 6. INTRO to LAPLACE TRANSFORMS Key terms: Improper Integrl; diverge, converge A A f(t)dt lim f(t)dt Piecewise Continuous Function; jump discontinuity Function of Exponentil Order Lplce Trnsform

More information

Homework 3 Solutions

Homework 3 Solutions CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.

More information

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck. Outline Automt Theory 101 Rlf Huuck Introduction Finite Automt Regulr Expressions ω-automt Session 1 2006 Rlf Huuck 1 Session 1 2006 Rlf Huuck 2 Acknowledgement Some slides re sed on Wolfgng Thoms excellent

More information

GNFA GNFA GNFA GNFA GNFA

GNFA GNFA GNFA GNFA GNFA DFA RE NFA DFA -NFA REX GNFA Definition GNFA A generlize noneterministic finite utomton (GNFA) is grph whose eges re lele y regulr expressions, with unique strt stte with in-egree, n unique finl stte with

More information

Math 8 Winter 2015 Applications of Integration

Math 8 Winter 2015 Applications of Integration Mth 8 Winter 205 Applictions of Integrtion Here re few importnt pplictions of integrtion. The pplictions you my see on n exm in this course include only the Net Chnge Theorem (which is relly just the Fundmentl

More information

CHAPTER 1 Regular Languages. Contents

CHAPTER 1 Regular Languages. Contents Finite Automt (FA or DFA) CHAPTE 1 egulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, euivlence of NFAs nd DFAs, closure under regulr

More information

Homework Solution - Set 5 Due: Friday 10/03/08

Homework Solution - Set 5 Due: Friday 10/03/08 CE 96 Introduction to the Theory of Computtion ll 2008 Homework olution - et 5 Due: ridy 10/0/08 1. Textook, Pge 86, Exercise 1.21. () 1 2 Add new strt stte nd finl stte. Mke originl finl stte non-finl.

More information

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows:

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows: Improper Integrls The First Fundmentl Theorem of Clculus, s we ve discussed in clss, goes s follows: If f is continuous on the intervl [, ] nd F is function for which F t = ft, then ftdt = F F. An integrl

More information

A likelihood-ratio test for identifying probabilistic deterministic real-time automata from positive data

A likelihood-ratio test for identifying probabilistic deterministic real-time automata from positive data A likelihood-rtio test for identifying proilistic deterministic rel-time utomt from positive dt Sicco Verwer 1, Mthijs de Weerdt 2, nd Cees Witteveen 2 1 Eindhoven University of Technology 2 Delft University

More information

Name Ima Sample ASU ID

Name Ima Sample ASU ID Nme Im Smple ASU ID 2468024680 CSE 355 Test 1, Fll 2016 30 Septemer 2016, 8:35-9:25.m., LSA 191 Regrding of Midterms If you elieve tht your grde hs not een dded up correctly, return the entire pper to

More information

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS The University of Nottinghm SCHOOL OF COMPUTER SCIENCE LEVEL 2 MODULE, SPRING SEMESTER 2016 2017 LNGUGES ND COMPUTTION NSWERS Time llowed TWO hours Cndidtes my complete the front cover of their nswer ook

More information

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation Strong Bisimultion Overview Actions Lbeled trnsition system Trnsition semntics Simultion Bisimultion References Robin Milner, Communiction nd Concurrency Robin Milner, Communicting nd Mobil Systems 32

More information

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont. NFA DFA Exmple 3 CMSC 330: Orgniztion of Progrmming Lnguges NFA {B,D,E {A,E {C,D {E Finite Automt, con't. R = { {A,E, {B,D,E, {C,D, {E 2 Equivlence of DFAs nd NFAs Any string from {A to either {D or {CD

More information

First Midterm Examination

First Midterm Examination Çnky University Deprtment of Computer Engineering 203-204 Fll Semester First Midterm Exmintion ) Design DFA for ll strings over the lphet Σ = {,, c} in which there is no, no nd no cc. 2) Wht lnguge does

More information

The First Fundamental Theorem of Calculus. If f(x) is continuous on [a, b] and F (x) is any antiderivative. f(x) dx = F (b) F (a).

The First Fundamental Theorem of Calculus. If f(x) is continuous on [a, b] and F (x) is any antiderivative. f(x) dx = F (b) F (a). The Fundmentl Theorems of Clculus Mth 4, Section 0, Spring 009 We now know enough bout definite integrls to give precise formultions of the Fundmentl Theorems of Clculus. We will lso look t some bsic emples

More information

The size of subsequence automaton

The size of subsequence automaton Theoreticl Computer Science 4 (005) 79 84 www.elsevier.com/locte/tcs Note The size of susequence utomton Zdeněk Troníček,, Ayumi Shinohr,c Deprtment of Computer Science nd Engineering, FEE CTU in Prgue,

More information

3 Regular expressions

3 Regular expressions 3 Regulr expressions Given n lphet Σ lnguge is set of words L Σ. So fr we were le to descrie lnguges either y using set theory (i.e. enumertion or comprehension) or y n utomton. In this section we shll

More information

CSE396 Prelim I Answer Key Spring 2017

CSE396 Prelim I Answer Key Spring 2017 Nme nd St.ID#: CSE96 Prelim I Answer Key Spring 2017 (1) (24 pts.) Define A to e the lnguge of strings x {, } such tht x either egins with or ends with, ut not oth. Design DFA M such tht L(M) = A. A node-rc

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 utomt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Prolem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) nton Setzer (Bsed on ook drft y J. V. Tucker nd K. Stephenson)

More information

MAA 4212 Improper Integrals

MAA 4212 Improper Integrals Notes by Dvid Groisser, Copyright c 1995; revised 2002, 2009, 2014 MAA 4212 Improper Integrls The Riemnn integrl, while perfectly well-defined, is too restrictive for mny purposes; there re functions which

More information

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014 CS125 Lecture 12 Fll 2014 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

Finite Automata-cont d

Finite Automata-cont d Automt Theory nd Forml Lnguges Professor Leslie Lnder Lecture # 6 Finite Automt-cont d The Pumping Lemm WEB SITE: http://ingwe.inghmton.edu/ ~lnder/cs573.html Septemer 18, 2000 Exmple 1 Consider L = {ww

More information

Refined interfaces for compositional verification

Refined interfaces for compositional verification Refined interfces for compositionl verifiction Frédéric Lng INRI Rhône-lpes http://www.inrilpes.fr/vsy Motivtion Enumertive verifiction of concurrent systems Prllel composition of synchronous processes

More information

Linear Inequalities. Work Sheet 1

Linear Inequalities. Work Sheet 1 Work Sheet 1 Liner Inequlities Rent--Hep, cr rentl compny,chrges $ 15 per week plus $ 0.0 per mile to rent one of their crs. Suppose you re limited y how much money you cn spend for the week : You cn spend

More information

A Symbolic Approach to Control via Approximate Bisimulations

A Symbolic Approach to Control via Approximate Bisimulations A Symolic Approch to Control vi Approximte Bisimultions Antoine Girrd Lortoire Jen Kuntzmnn, Université Joseph Fourier Grenole, Frnce Interntionl Symposium on Innovtive Mthemticl Modelling Tokyo, Jpn,

More information

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun: CMPU 240 Lnguge Theory nd Computtion Spring 2019 NFAs nd Regulr Expressions Lst clss: Introduced nondeterministic finite utomt with -trnsitions Tody: Prove n NFA- is no more powerful thn n NFA Introduce

More information