Transactional Events

Size: px
Start display at page:

Download "Transactional Events"

Transcription

1 Transactional Events... and how we implemented them Matthew Fluet 1 Kevin Donnelly 2 1 Toyota Technological Institute at Chicago 2 Boston University PL-Lunch February 9, 2007 Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

2 Outline 1 Overview 2 TxEvents 3 Semantics Synchronous Evaluation Concurrent Evaluation 4 Expressiveness Guarded Receive N-way Rendezvous Boolean Satisfiability 5 Implementation Implementation Overview Refined Semantics (I) Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

3 What are Transactional Events? A new high-level concurrency abstraction: Transactional Events = Atomic Transactions + First-class Synchronous- Message-Passing Events Insight: atomicity can enhance the expressive power of first-class synchronous-message-passing events. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

4 What are Transactional Events? TxEvents enable simple, compositional implementations where (complex, non-compositional) protocols are otherwise needed. e.g., guarded synchronous receive TxEvents enable more powerful abstractions. e.g., triple-swap channels TxEvents enable easier reasoning about sequential composition and non-deterministic choice. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

5 TxEvent Events are an abstract type data Evt a denotes an abstract synchronous operation that yields a result of type a when synchronized upon. Events may be synchronized: sync :: Evt a -> IO a not a pure function, but rather depends upon the state of concurrently synchronizing threads. yields an IO action, although it does not itself perform any observable I/O. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

6 TxEvent Synchronous channels are an abstract type data SChan a ing and receiving are events sendevt :: SChan a -> a -> Evt () recvevt :: SChan a -> Evt a blocks until there is a matching communication Channel creation is an event newschan :: Evt (SChan a) may create local channels inside of transactional event synchronizations. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

7 TxEvent main = do ch <- sync newschan forkio (sync (sendevt ch A )) c <- sync (recvevt ch) putchar c Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

8 TxEvent Events form a monad alwaysevt :: a -> Evt a alwaysevt e =... immediately yields e when synchronized upon. thenevt :: Evt a -> (a -> Evt b) -> Evt b evt thenevt f =... tentatively synchronizes on the event evt, yielding the result r, and then synchronizes on the event f r. if these synchronizations cannot successfully complete in sequence, then the composed event cannot successfully complete. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

9 TxEvent evt1 = do sendevt ch 0 sendevt ch 1 alwaysevt () evt2 = do a <- recvevt ch b <- recvevt ch alwaysevt (a, b) Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

10 TxEvent Events form a monad-with-plus neverevt :: Evt a neverevt =... never yields a value when synchronized upon. chooseevt :: Evt a -> Evt a -> Evt a evt1 chooseevt evt2 =... synchronizes as either evt1 or evt2, but only commits to a choice that can successfully complete. until such a choice can be determined, the composed event cannot successfully complete. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

11 TxEvent evt1 = (do sendevt ch 0 sendevt ch 1 alwaysevt ()) chooseevt (do a <- recvevt ch alwaysevt ()) evt2 = do a <- recvevt ch b <- recvevt ch alwaysevt (a, b) evt3 = sendevt ch 2 Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

12 TxEvent Events for exceptions... Events for thread identity... Events for time delays... Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

13 Dynamic Semantics Three levels of evaluation: Sequential Evaluation of pure terms e e Synchronous Evaluation of synchronizing events (Evt monad) S S Concurrent Evaluation of concurrent threads (IO monad) T a T Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

14 Synchronous Evaluation (S S ) Synchronizing Event S ::= θ, e Synchronization Group S ::= {S,...} Synchronous Evaluation Context M Evt ::= [] thenevt M Evt 1 e 2 Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

15 Synchronous Evaluation (S S ) EVTEVAL e e S { θ, M Evt [e] } S { θ, M Evt [e ] } EVTTHENALWAYS S { θ, M Evt [thenevt (alwaysevt e 1 ) e 2 ] } S { θ, M Evt [e 2 e 1 ] } EVTCHOOSELEFT S { θ, M Evt [chooseevt e 1 e 2 ] } S { θ, M Evt [e 1 ] } EVTCHOOSERIGHT S { θ, M Evt [chooseevt e 1 e 2 ] } S { θ, M Evt [e 2 ] } Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

16 Synchronous Evaluation (S S ) EVTNEWSCHAN κ fresh S { θ, M Evt [newschan] } S { θ, M Evt [alwaysevt κ ] } EVTSENDRECV S { θ s, Ms Evt S { θ s, M Evt s [sendevt κ e], θ r, M Evt r [alwaysevt ()], θ r, M Evt r [recvevt κ] } [alwaysevt e] } Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

17 Synchronous Evaluation (S S ) What are the terminal configurations for? { θ 1, e 1,..., θ n, e n }??? good terminal configurations : { θ 1, alwaysevt e 1,..., θ n, alwaysevt e n } bad terminal configurations : {..., θ, M Evt [neverevt],...} {..., θ, M Evt [recvevt κ],...} (unmatched) {..., θ, M Evt [sendevt κ e],...} (unmatched) Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

18 Synchronous Evaluation (S S ) What are the terminal configurations for? { θ 1, e 1,..., θ n, e n }??? good terminal configurations : { θ 1, alwaysevt e 1,..., θ n, alwaysevt e n } bad terminal configurations : {..., θ, M Evt [neverevt],...} {..., θ, M Evt [recvevt κ],...} (unmatched) {..., θ, M Evt [sendevt κ e],...} (unmatched) Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

19 Concurrent Evaluation (T a T ) Concurrent Thread T ::= θ, e Thread Soup T ::= {T,...} Actions a ::=?c!c ɛ Concurrent Evaluation Context M IO ::= [] bindio M IO 1 e 2 Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

20 Concurrent Evaluation (T a T ) IOEVAL e e T { θ, M IO [e] } ɛ T { θ, M IO [e ] } IOBINDUNIT T { θ, M IO [bindio (unitio e 1 ) e 2 ] } ɛ T { θ, M IO [e 2 e 1 ] } IOGETCHAR T { θ, M IO [getchar] }?c T { θ, M IO [unitio c] } IOPUTCHAR T { θ, M IO [putchar c] }!c T { θ, M IO [unitio ()] } Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

21 Concurrent Evaluation (T a T ) IOFORK θ fresh T { θ, M IO [forkio e] } ɛ T { θ, M IO [unitio θ ], θ, e } Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

22 Concurrent Evaluation (T a T ) IOSYNC T { θ 1, M1 IO [sync e 1],..., θ k, Mk IO [sync e k] } Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

23 Concurrent Evaluation (T a T ) IOSYNC { θ 1, e 1,..., θ k, e k } T { θ 1, M1 IO [sync e 1],..., θ k, Mk IO [sync e k] } Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

24 Concurrent Evaluation (T a T ) IOSYNC { θ 1, e 1,..., θ k, e k } { θ 1, alwaysevt e 1,..., θ k, alwaysevt e k } T { θ 1, M1 IO [sync e 1],..., θ k, Mk IO [sync e k] } Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

25 Concurrent Evaluation (T a T ) IOSYNC { θ 1, e 1,..., θ k, e k } { θ 1, alwaysevt e 1,..., θ k, alwaysevt e k } T { θ 1, M1 IO [sync e 1],..., θ k, Mk IO [sync e k] } T { θ 1, M1 IO [unitio e 1],..., θ k, Mk IO [unitio e k] } Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

26 Concurrent Evaluation (T a T ) IOSYNC { θ 1, e 1,..., θ k, e k } { θ 1, alwaysevt e 1,..., θ k, alwaysevt e k } T { θ 1, M1 IO [sync e 1],..., θ k, Mk IO [sync e k] } ɛ T { θ 1, M1 IO [unitio e 1],..., θ k, Mk IO [unitio e k] } Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

27 Guarded Receive Receive a mesage on a channel only if the message satisfies a boolean guard. grecvevt :: (a -> Bool) -> SChan a -> Evt a grecvevt g ch = do { x <- recvevt ch ; if g x then return x else neverevt } This synchronous operation uses existing synchronous channel type (SChan a); can be freely composed, either sequentially (with thenevt) or alternatively (with chooseevt), with other synchronous operations. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

28 Guarded Receive Receive a mesage on a channel only if the message satisfies a boolean guard. grecvevt :: (a -> Bool) -> SChan a -> Evt a grecvevt g ch = do { x <- recvevt ch ; if g x then return x else neverevt } This synchronous operation uses existing synchronous channel type (SChan a); can be freely composed, either sequentially (with thenevt) or alternatively (with chooseevt), with other synchronous operations. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

29 N-way Rendezvous (with CML) Theorem (CML Expressivity) Given the standard CML event combinators and an n-way rendezvous base-event constructor, one cannot implement an (n + 1)-way rendezvous operation abstractly (i.e., as an event value). Corollary Given two-way rendezvous primitives (sendevt and recvevt), one cannot implement a 3-way redezvous operation as an event value. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

30 N-way Rendezvous (with CML) Theorem (CML Expressivity) Given the standard CML event combinators and an n-way rendezvous base-event constructor, one cannot implement an (n + 1)-way rendezvous operation abstractly (i.e., as an event value). Corollary Given two-way rendezvous primitives (sendevt and recvevt), one cannot implement a 3-way redezvous operation as an event value. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

31 N-way Rendezvous (with TxEvents) Theorem (TxEvents Expressivity) Given the standard transactional event combinators and an n-way rendezvous base-event constructor, one can implement an (n + 1)-way rendezvous operation abstractly. Proof. By construction of 3-way rendezvous using two-way rendezvous primitives (sendevt and recvevt). Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

32 N-way Rendezvous (with TxEvents) Theorem (TxEvents Expressivity) Given the standard transactional event combinators and an n-way rendezvous base-event constructor, one can implement an (n + 1)-way rendezvous operation abstractly. Proof. By construction of 3-way rendezvous using two-way rendezvous primitives (sendevt and recvevt). Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

33 Triple-swap channel type TriSChan a newtrischan :: Evt (TriSChan a) swapevt :: TriSChan a -> a -> Evt (a, a) Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

34 Triple-swap channel type TriSChan a = SChan (a, SChan (a, a)) newtrischan :: Evt (TriSChan a) newtrischan = newschan swapevt :: TriSChan a -> a -> Evt (a, a) swapevt ch x1 = client chooseevt leader where client = do { replych <- newschan ; sendevt ch (x1, replych) ; recvevt replych } leader = do { (x2, replych2) <- recvevt ch ; (x3, replych3) <- recvevt ch ; sendevt replych2 (x3, x1) ; sendevt replych3 (x1, x2) ; alwaysevt (x2, x3) } Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

35 Boolean Satisfiability Boolean satisfiability (SAT) is the problem of determining whether there exists a satisfying assignment to a classical propositional formula in n variables. (NP-complete) Three encodings of SAT into Tx Events: n + 1 threads, using chooseevt and communication; one thread, using chooseevt (and no communication); three threads, using communication (and no chooseevt) Assume a SAT-checker: evalformula :: [Bool] -> Formula -> Bool Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

36 Boolean Satisfiability (n + 1 threads) sat n formula = do ch <- sync newschan mapm_ (\_ -> forkio (sync ((sendevt ch True) chooseevt (sendevt ch False)))) [1..n] sync (do input <- mapm (_ -> recvevt ch) [1..n] let b = evalformula input formula if b then alwaysevt () else neverevt) putstrln "Satisfiable" Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

37 Implementation Overview delivered as a Haskell library written using STM extensions of GHC required no changes to runtime or compiler runs on shared-memory multiprocessors does not require a global lock synchronization of a group of thread will not (unduly) impact the progress of non-synchronizing threads; synchronization of one group of threads impact the progress towards synchronization of another independent group of threads. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

38 Implementation Considerations Written semantics have no direct implementation: IOSYNC { θ 1, e 1,..., θ k, e k } { θ 1, alwaysevt e 1,..., θ k, alwaysevt e k } T { θ 1, M1 IO [sync e 1],..., θ k, Mk IO [sync e k] } ɛ T { θ 1, M1 IO [unitio e 1 ],..., θ k, Mk IO [unitio e k ] } Optimistic assumption used in software transactional memory doesn t apply to transactional events. randomly select an alternative at uses of chooseevt eagerly match senders with receivers Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

39 Refined Semantics (I) Concurrent Thread T ::= θ, e Suspended and Search Threads S ::= θ, M IO, e θ, e, ρ Thread Soup P ::= {T,..., S,...} Path Element ρ ::= Left Right ( θ r, ρ r ) ( θ s, ρ s ) Path ρ ::= ρ:ρ Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

40 Refined Semantics (I) Definition (Extends) The path ρ a extends the path ρ b, written ρ a ρ b, if ρ a is an extension of ρ b (alternatively, if ρ b is a suffix of ρ a ). Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

41 Refined Semantics (I) Definition (Dependencies) The dependencies of a trail θ, ρ, written Dep( θ, ρ ), is the set of trails implied by the trail. Formally, Dep( θ, ρ ) = { θ, ρ } DepAux( θ, ρ ) DepAux( θ, ) = {} DepAux( θ, Left:ρ ) = DepAux( θ, ρ ) DepAux( θ, Right:ρ ) = DepAux( θ, ρ ) DepAux( θ, ( θ r, ρ r ):ρ ) = { θ r, ( θ, ρ):ρ r } DepAux( θ, ρ ) DepAux( θ r, ρ r ) DepAux( θ, ( θ s, ρ s ):ρ ) = { θ s, ( θ, ρ):ρ s } DepAux( θ, ρ ) DepAux( θ s, ρ s ) Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

42 Refined Semantics (I) Definition (Consistent (I)) The trail θ, ρ is consistent if no thread identifier in the dependencies of θ, ρ is paired with incomparable paths. Formally, Consistent( θ, ρ ) θ 1, ρ 1 Dep( θ, ρ ). θ 2, ρ 2 Dep( θ, ρ ). θ 1 = θ 2 (ρ 1 ρ 2 ρ 2 ρ 1 ). Remark The dependencies of a consistent trail may be efficiently represented by a finite map from thread identifiers to maximal paths. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

43 Refined Semantics (I) Definition (Consistent (I)) The trail θ, ρ is consistent if no thread identifier in the dependencies of θ, ρ is paired with incomparable paths. Formally, Consistent( θ, ρ ) θ 1, ρ 1 Dep( θ, ρ ). θ 2, ρ 2 Dep( θ, ρ ). θ 1 = θ 2 (ρ 1 ρ 2 ρ 2 ρ 1 ). Remark The dependencies of a consistent trail may be efficiently represented by a finite map from thread identifiers to maximal paths. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

44 Refined Semantics (I) Definition (Committable (I)) A set of trails { θ 1, ρ 1,... θ n, ρ n } is committable if each θ i is unique and all dependencies of each trail are satisfied by the set. Formally, Committable({ θ 1, ρ 1,... θ n, ρ n }) i {1,..., n}. j {1,..., n}. i j θ i θ j i {1,..., n}. θ, ρ Dep( θ i, ρ i ). j {1,..., n}. θ j = θ ρ j ρ. Lemma If a set of trails { θ 1, ρ 1,... θ n, ρ n } is committable, then each trail θ i, ρ i is consistent. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

45 Refined Semantics (I) Definition (Committable (I)) A set of trails { θ 1, ρ 1,... θ n, ρ n } is committable if each θ i is unique and all dependencies of each trail are satisfied by the set. Formally, Committable({ θ 1, ρ 1,... θ n, ρ n }) i {1,..., n}. j {1,..., n}. i j θ i θ j i {1,..., n}. θ, ρ Dep( θ i, ρ i ). j {1,..., n}. θ j = θ ρ j ρ. Lemma If a set of trails { θ 1, ρ 1,... θ n, ρ n } is committable, then each trail θ i, ρ i is consistent. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

46 Refined Semantics (I) SYNCINIT P { θ, M IO [sync e] } ɛ P { θ, M IO, e, θ, e, } SYNCCOMMIT Committable({ θ 1, ρ 1,..., θ k, ρ k }) P { θ 1, M1 IO, _, θ 1, alwaysevt e 1, ρ 1,..., θ k, Mk IO, _, θ k, alwaysevt e k, ρ k } ɛ P \ {θ1,...,θ k } { θ 1, M1 IO [unitio e 1],..., θ k, Mk IO [unitio e k] } Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

47 Refined Semantics (I) EVTEVAL e e P { θ, M Evt [e], ρ } ɛ P { θ, M Evt [e ], ρ } EVTTHENALWAYS P { θ, M Evt [thenevt (alwaysevt e 1 ) e 2 ], ρ } ɛ P { θ, M Evt [e 2 e 1 ], ρ } EVTNEVER P { θ, M Evt [neverevt], ρ } ɛ P EVTCHOOSE P { θ, M Evt [chooseevt e 1 e 2 ], ρ } ɛ P { θ, M Evt [e 1 ], Left:ρ, θ, M Evt [e 2 ], Right:ρ } Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

48 Refined Semantics (I) EVTSENDRECV P { θ s, Ms Evt [sendevt κ e], ρ s, θ r, Mr Evt [recvevt κ], ρ r } ɛ P { θ s, Ms Evt [sendevt κ e], ρ s, θ r, Mr Evt [recvevt κ], ρ r, θ s, Ms Evt [alwaysevt ()], ( θ r, ρ r ):ρ s, θ r, Mr Evt [alwaysevt e], ( θ s, ρ s ) :ρ r } Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

49 Refined Semantics (I) EVTSENDRECV Coherent( θ s, ρ s, θ r, ρ r ) P { θ s, Ms Evt [sendevt κ e], ρ s, θ r, Mr Evt [recvevt κ], ρ r } ɛ P { θ s, Ms Evt [sendevt κ e], ρ s, θ r, Mr Evt [recvevt κ], ρ r, θ s, Ms Evt [alwaysevt ()], ( θ r, ρ r ):ρ s, θ r, Mr Evt [alwaysevt e], ( θ s, ρ s ) :ρ r } Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

50 Refined Semantics (I) Definition (Coherent (I)) The trails θ s, ρ s and θ r, ρ r are coherent if the trails are an acceptable sender/receiver pair. Formally, Coherent( θ s, ρ s, θ r, ρ r ) θ s θ r θ, ρ Dep( θ r, ρ r ). θ s = θ ρ s ρ θ, ρ Dep( θ s, ρ s ). θ r = θ ρ r ρ θ 1, ρ 1 Dep( θ s, ρ s ). θ 2, ρ 2 Dep( θ r, ρ r ). θ 1 = θ 2 (ρ s ρ r ρ r ρ s ) Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

51 Refined Semantics (I) Lemma If the trails θ s, ρ s and θ r, ρ r are consistent and coherent, then the trails θ s, ( θ r, ρ r ):ρ s and θ r, ( θ s, ρ s ):ρ r are consistent. Lemma Suppose P a P according to the refined semantics. If, for each search thread θ, e, ρ P, the trail θ, ρ is consistent, then, for each search thread θ, e, ρ P, the trail θ, ρ is consistent. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

52 Search threads for a committable triple-swap Thread 2 Thread 1 Thread 3 swapevt ch x2 swapevt ch x1 swapevt ch x3 Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

53 Search threads for a committable triple-swap Thread 2 Thread 1 Thread 3 recvevt rch2 do { (x3,rch3) < recvevt ch sendevt rch2 (x3,x1) sendevt rch3 (x1,x2) ; alwaysevt (x2,x3) swapevt ch x3 Left Right Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

54 Search threads for a committable triple-swap Thread 2 Thread 1 Thread 3 do { sendevt rch3 (x1,x2) alwaysevt (x3,x1) ; alwaysevt (x2,x3) recvevt rch3 Left Right Left Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

55 Search threads for a committable triple-swap Thread 2 Thread 1 Thread 3 alwaysevt (x3,x1) alwaysevt (x2,x3) alwaysevt (x1,x2) Left Right Left Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

56 Remaining Implementation Considerations EVTSENDRECV requires matching two search threads in the thread soup that are attempting to communicate on the same channel. search threads corresponding to the sender and the receiver remain in the thread soup; evaluation may repeatedly spawn redundant search threads. Solution: represent a channel as a list of senders and receivers A sender must atomically add itself to the list of senders and take the list of receivers. A receiver must atomically add itself to the list of receivers and take the list of senders. Space considerations require periodically cleaning the lists of expired senders and receivers. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

57 Remaining Implementation Considerations SYNCCOMMIT requires removing from the thread soup all other search threads that were searching on behalf of the now synchronized concurrent threads. Solution: give every synchronization a unique boolean reference. Initialize the boolean reference to False. Every search thread terminates itself if it sees the boolean reference go to True. A synchronization committment must check that all committable search threads have boolean references set to False and must atomically set all boolean references to True. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

58 Remaining Implementation Considerations SYNCCOMMIT requires finding a committable set of search threads in the thread soup. Solution: give every communication path element pointers to completed search threads. See picture. Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

59 Search threads for a committable triple-swap Thread 2 Thread 1 Thread 3 alwaysevt (x3,x1) alwaysevt (x2,x3) alwaysevt (x1,x2) Left Right Left Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

60 Search threads for a committable triple-swap Thread 2 Thread 1 Thread 3 swapevt ch x2 swapevt ch x1 swapevt ch x3 Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

61 Search threads for a committable triple-swap Thread 2 Thread 1 Thread 3 recvevt rch2 do { (x3,rch3) < recvevt ch sendevt rch2 (x3,x1) sendevt rch3 (x1,x2) ; alwaysevt (x2,x3) swapevt ch x3 {} {} Left Right Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

62 Search threads for a committable triple-swap Thread 2 Thread 1 Thread 3 do { sendevt rch3 (x1,x2) ; alwaysevt (x2,x3) recvevt rch3 alwaysevt (x3,x1) b2 r2 { } {} {} {} {...,,...} {...,,...} Left Right Left Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

63 Search threads for a committable triple-swap Thread 2 Thread 1 Thread 3 do { sendevt rch3 (x1,x2) ; alwaysevt (x2,x3) recvevt rch3 alwaysevt (x3,x1) b2 r2 { } {} {} {} {...,,...} {...,,...} Left Right Left Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

64 Search threads for a committable triple-swap Thread 2 Thread 1 Thread 3 alwaysevt (x2,x3) b1 r1 alwaysevt (x1,x3) alwaysevt (x3,x1) b2 r2 { } {} { } {...,,...} {...,,...} {...,,...} {...,,...} {...,,...} Left Right Left Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

65 Search threads for a committable triple-swap Thread 2 Thread 1 Thread 3 alwaysevt (x2,x3) b1 r1 alwaysevt (x1,x3) alwaysevt (x3,x1) b2 r2 { } {} { } {...,,...} {...,,...} {...,,...} {...,,...} {...,,...} Left Right Left Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

66 Search threads for a committable triple-swap Thread 2 Thread 1 Thread 3 alwaysevt (x2,x3) b1 r1 alwaysevt (x1,x2) b3 r3 alwaysevt (x3,x1) b2 r2 { } { } { } {...,,...} {...,,...} {...,,...} {...,,...} {...,,...} Left Right Left Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

67 Search threads for a committable triple-swap Thread 2 Thread 1 Thread 3 alwaysevt (x2,x3) b1 r1 alwaysevt (x1,x2) b3 r3 alwaysevt (x3,x1) b2 r2 { } { } { } {...,,...} {...,,...} {...,,...} {...,,...} {...,,...} Left Right Left Fluet, Donnelly (TTI-C, BU) Transactional Events PL-Lunch February 9, / 59

On Adaptively Secure Multiparty Computation with a Short CRS [SCN 16] Ran Cohen (Tel Aviv University) Chris Peikert (University of Michigan)

On Adaptively Secure Multiparty Computation with a Short CRS [SCN 16] Ran Cohen (Tel Aviv University) Chris Peikert (University of Michigan) On Adaptively Secure Multiparty Computation with a Short CRS [SCN 16] Ran Cohen (Tel Aviv University) Chris Peikert (University of Michigan) Secure Multiparty Computation (MPC) Ideal World/ Functionality

More information

Lecture 4 Event Systems

Lecture 4 Event Systems Lecture 4 Event Systems This lecture is based on work done with Mark Bickford. Marktoberdorf Summer School, 2003 Formal Methods One of the major research challenges faced by computer science is providing

More information

Binary Decision Diagrams and Symbolic Model Checking

Binary Decision Diagrams and Symbolic Model Checking Binary Decision Diagrams and Symbolic Model Checking Randy Bryant Ed Clarke Ken McMillan Allen Emerson CMU CMU Cadence U Texas http://www.cs.cmu.edu/~bryant Binary Decision Diagrams Restricted Form of

More information

The Join calculus A calculus of mobile agents

The Join calculus A calculus of mobile agents The Join calculus p. 1/32 The Join calculus A calculus of mobile agents Martin Mosegaard Jensen Mobile Computing seminar 2004, DAIMI The Join calculus p. 2/32 Plan Motivation The reflexive CHAM Distribution:

More information

Abstractions and Decision Procedures for Effective Software Model Checking

Abstractions and Decision Procedures for Effective Software Model Checking Abstractions and Decision Procedures for Effective Software Model Checking Prof. Natasha Sharygina The University of Lugano, Carnegie Mellon University Microsoft Summer School, Moscow, July 2011 Lecture

More information

A Brief Introduction to Model Checking

A Brief Introduction to Model Checking A Brief Introduction to Model Checking Jan. 18, LIX Page 1 Model Checking A technique for verifying finite state concurrent systems; a benefit on this restriction: largely automatic; a problem to fight:

More information

Software Verification

Software Verification Software Verification Grégoire Sutre LaBRI, University of Bordeaux, CNRS, France Summer School on Verification Technology, Systems & Applications September 2008 Grégoire Sutre Software Verification VTSA

More information

Groupe de travail. Analysis of Mobile Systems by Abstract Interpretation

Groupe de travail. Analysis of Mobile Systems by Abstract Interpretation Groupe de travail Analysis of Mobile Systems by Abstract Interpretation Jérôme Feret École Normale Supérieure http://www.di.ens.fr/ feret 31/03/2005 Introduction I We propose a unifying framework to design

More information

A Reversible Semantics for Erlang

A Reversible Semantics for Erlang A Reversible Semantics for Erlang Adrián Palacios (joint work with Ivan Lanese, Naoki Nishida and Germán Vidal) Technical University of Valencia STSMs in Nagoya (Japan) and Bologna (Italy) March 30, 2017

More information

CIS (More Propositional Calculus - 6 points)

CIS (More Propositional Calculus - 6 points) 1 CIS6333 Homework 1 (due Friday, February 1) 1. (Propositional Calculus - 10 points) --------------------------------------- Let P, Q, R range over state predicates of some program. Prove or disprove

More information

Simply Typed Lambda Calculus

Simply Typed Lambda Calculus Simply Typed Lambda Calculus Language (ver1) Lambda calculus with boolean values t ::= x variable x : T.t abstraction tt application true false boolean values if ttt conditional expression Values v ::=

More information

Automatic Synthesis of Distributed Protocols

Automatic Synthesis of Distributed Protocols Automatic Synthesis of Distributed Protocols Rajeev Alur Stavros Tripakis 1 Introduction Protocols for coordination among concurrent processes are an essential component of modern multiprocessor and distributed

More information

A Discrete Event Systems Approach for Protocol Conversion

A Discrete Event Systems Approach for Protocol Conversion A Discrete Event Systems Approach for Protocol Conversion Ratnesh Kumar Sudhir Nelvagal Department of Electrical Engineering University of Kentucky Lexington, KY 40506-0046 Steven I. Marcus Department

More information

Trace Refinement of π-calculus Processes

Trace Refinement of π-calculus Processes Trace Refinement of pi-calculus Processes Trace Refinement of π-calculus Processes Manuel Gieseking manuel.gieseking@informatik.uni-oldenburg.de) Correct System Design, Carl von Ossietzky University of

More information

Synchronous Reactive Systems

Synchronous Reactive Systems Synchronous Reactive Systems Stephen Edwards sedwards@synopsys.com Synopsys, Inc. Outline Synchronous Reactive Systems Heterogeneity and Ptolemy Semantics of the SR Domain Scheduling the SR Domain 2 Reactive

More information

Topics in Concurrency

Topics in Concurrency Topics in Concurrency Lecture 3 Jonathan Hayman 18 February 2015 Recap: Syntax of CCS Expressions: Arithmetic a and Boolean b Processes: p ::= nil nil process (τ p) silent/internal action (α!a p) output

More information

Q520: Answers to the Homework on Hopfield Networks. 1. For each of the following, answer true or false with an explanation:

Q520: Answers to the Homework on Hopfield Networks. 1. For each of the following, answer true or false with an explanation: Q50: Answers to the Homework on Hopfield Networks 1. For each of the following, answer true or false with an explanation: a. Fix a Hopfield net. If o and o are neighboring observation patterns then Φ(

More information

Expressing Dynamics of Mobile Programs by Typing

Expressing Dynamics of Mobile Programs by Typing 5 th Slovakian-Hungarian Joint Symposium on Applied Machine Intelligence and Informatics January 25-26, 2007 Poprad, Slovakia Expressing Dynamics of Mobile Programs by Typing Martin Tomášek Department

More information

Self-Adaptation and Information Flow in Multiparty Communications

Self-Adaptation and Information Flow in Multiparty Communications Self-Adaptation and Information Flow in Multiparty Communications Joint work with Ilaria Castellani (INRIA, FR) Jorge A. Pérez (University of Groningen, NL) ABCD meeting London, 20th April, 2015 1 / 36

More information

Meta-reasoning in the concurrent logical framework CLF

Meta-reasoning in the concurrent logical framework CLF Meta-reasoning in the concurrent logical framework CLF Jorge Luis Sacchini (joint work with Iliano Cervesato) Carnegie Mellon University Qatar campus Nagoya University, 27 June 2014 Jorge Luis Sacchini

More information

Real Time Operating Systems

Real Time Operating Systems Real Time Operating ystems Luca Abeni luca.abeni@unitn.it Interacting Tasks Until now, only independent tasks... A job never blocks or suspends A task only blocks on job termination In real world, jobs

More information

Multicore Semantics and Programming

Multicore Semantics and Programming Multicore Semantics and Programming Peter Sewell Tim Harris University of Cambridge Oracle October November, 2015 p. 1 These Lectures Part 1: Multicore Semantics: the concurrency of multiprocessors and

More information

Implementing Uniform Reliable Broadcast with Binary Consensus in Systems with Fair-Lossy Links

Implementing Uniform Reliable Broadcast with Binary Consensus in Systems with Fair-Lossy Links Implementing Uniform Reliable Broadcast with Binary Consensus in Systems with Fair-Lossy Links Jialin Zhang Tsinghua University zhanggl02@mails.tsinghua.edu.cn Wei Chen Microsoft Research Asia weic@microsoft.com

More information

An Automotive Case Study ERTSS 2016

An Automotive Case Study ERTSS 2016 Institut Mines-Telecom Virtual Yet Precise Prototyping: An Automotive Case Study Paris Sorbonne University Daniela Genius, Ludovic Apvrille daniela.genius@lip6.fr ludovic.apvrille@telecom-paristech.fr

More information

Compile-Time Analysis and Specialization of Clocks in Concurrent Programs

Compile-Time Analysis and Specialization of Clocks in Concurrent Programs Complile-Time Analysis and Specialization of Clocks in Concurrent Programs p. 1/23 Compile-Time Analysis and Specialization of Clocks in Concurrent Programs Nalini Vasudevan (Columbia University) Olivier

More information

Models for Efficient Timed Verification

Models for Efficient Timed Verification Models for Efficient Timed Verification François Laroussinie LSV / ENS de Cachan CNRS UMR 8643 Monterey Workshop - Composition of embedded systems Model checking System Properties Formalizing step? ϕ Model

More information

Clojure Concurrency Constructs, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014

Clojure Concurrency Constructs, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014 Clojure Concurrency Constructs, Part Two CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014 1 Goals Cover the material presented in Chapter 4, of our concurrency textbook In particular,

More information

IMITATOR: A Tool for Synthesizing Constraints on Timing Bounds of Timed Automata

IMITATOR: A Tool for Synthesizing Constraints on Timing Bounds of Timed Automata ICTAC 09 IMITATOR: A Tool for Synthesizing Constraints on Timing Bounds of Timed Automata Étienne ANDRÉ Laboratoire Spécification et Vérification LSV, ENS de Cachan & CNRS Étienne ANDRÉ (LSV) ICTAC 09

More information

Outline. The Leader Election Protocol (IEEE 1394) IEEE 1394 High Performance Serial Bus (FireWire) Motivation. Background. Protocol Descriptions

Outline. The Leader Election Protocol (IEEE 1394) IEEE 1394 High Performance Serial Bus (FireWire) Motivation. Background. Protocol Descriptions Outline The Leader Election Protocol (IEEE 1394) Thai Son Hoang (inspired by the slides of Jean-Raymond Abrial) Department of Computer Science Swiss Federal Institute of Technology Zürich (ETH Zürich)

More information

A Thread Algebra with Multi-level Strategic Interleaving

A Thread Algebra with Multi-level Strategic Interleaving Theory of Computing Systems manuscript No. (will be inserted by the editor) A Thread Algebra with Multi-level Strategic Interleaving J.A. Bergstra 1,2, C.A. Middelburg 3,1 1 Programming Research Group,

More information

Computer Science Introductory Course MSc - Introduction to Java

Computer Science Introductory Course MSc - Introduction to Java Computer Science Introductory Course MSc - Introduction to Java Lecture 1: Diving into java Pablo Oliveira ENST Outline 1 Introduction 2 Primitive types 3 Operators 4 5 Control Flow

More information

ONE of the key ideas in system engineering

ONE of the key ideas in system engineering EDIC RESEARCH PROPOSAL 1 Expressiveness and Composability of Glue Operators in BIP Eduard Baranov RISD, I&C, EPFL Abstract We study communication in componentbased design, where basic components are glued

More information

Distributed Consensus

Distributed Consensus Distributed Consensus Reaching agreement is a fundamental problem in distributed computing. Some examples are Leader election / Mutual Exclusion Commit or Abort in distributed transactions Reaching agreement

More information

Meta-Reasoning in a Concurrent Logical Framework

Meta-Reasoning in a Concurrent Logical Framework Meta-Reasoning in a Concurrent Logical Framework Iliano Cervesato and Jorge Luis Sacchini Carnegie Mellon University Chalmers University, 16 Oct 2013 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning

More information

Sparse analysis Lecture II: Hardness results for sparse approximation problems

Sparse analysis Lecture II: Hardness results for sparse approximation problems Sparse analysis Lecture II: Hardness results for sparse approximation problems Anna C. Gilbert Department of Mathematics University of Michigan Sparse Problems Exact. Given a vector x R d and a complete

More information

Principles of AI Planning

Principles of AI Planning Principles of 7. Planning as search: relaxed Malte Helmert and Bernhard Nebel Albert-Ludwigs-Universität Freiburg June 8th, 2010 How to obtain a heuristic STRIPS heuristic Relaxation and abstraction A

More information

Parameterised! Linearisability Andrea Cerone

Parameterised! Linearisability Andrea Cerone ised! Linearisability Andrea Cerone Joint work with Alexey Gotsman and Hongseok Yang ICALP - Copenhagen, July 8th, 2014 A Simple Example Converting a sequential data structure into a concurrent one Trivial

More information

Integer Linear Programming Based Property Checking for Asynchronous Reactive Systems

Integer Linear Programming Based Property Checking for Asynchronous Reactive Systems IEEE TRANSACTIONS ON SOFTWARE ENGINEERING 1 Integer Linear Programming Based Property Checking for Asynchronous Reactive Systems Stefan Leue Department of Computer and Information Science University of

More information

MONOTONIC ABSTRACTION (ON EFFICIENT VERIFICATION OF PARAMETERIZED SYSTEMS)

MONOTONIC ABSTRACTION (ON EFFICIENT VERIFICATION OF PARAMETERIZED SYSTEMS) International Journal of Foundations of Computer Science Vol. 20, No. 5 (2009) 779 801 c World Scientific Publishing Company MONOTONIC ABSTRACTION (ON EFFICIENT VERIFICATION OF PARAMETERIZED SYSTEMS) PAROSH

More information

Mechanizing Optimization and Statistics

Mechanizing Optimization and Statistics Mechanizing Optimization and Statistics Ashish Agarwal Yale University IBM Programming Languages Day Watson Research Center July 29, 2010 Ashish Agarwal () 1 / 34 Acknowledgments Optimization: Ignacio

More information

TECHNICAL REPORT YL DISSECTING ZAB

TECHNICAL REPORT YL DISSECTING ZAB TECHNICAL REPORT YL-2010-0007 DISSECTING ZAB Flavio Junqueira, Benjamin Reed, and Marco Serafini Yahoo! Labs 701 First Ave Sunnyvale, CA 94089 {fpj,breed,serafini@yahoo-inc.com} Bangalore Barcelona Haifa

More information

Dynamic Noninterference Analysis Using Context Sensitive Static Analyses. Gurvan Le Guernic July 14, 2007

Dynamic Noninterference Analysis Using Context Sensitive Static Analyses. Gurvan Le Guernic July 14, 2007 Dynamic Noninterference Analysis Using Context Sensitive Static Analyses Gurvan Le Guernic July 14, 2007 1 Abstract This report proposes a dynamic noninterference analysis for sequential programs. This

More information

Maximal Noise in Interactive Communication over Erasure Channels and Channels with Feedback

Maximal Noise in Interactive Communication over Erasure Channels and Channels with Feedback Maximal Noise in Interactive Communication over Erasure Channels and Channels with Feedback Klim Efremenko UC Berkeley klimefrem@gmail.com Ran Gelles Princeton University rgelles@cs.princeton.edu Bernhard

More information

Principles of AI Planning

Principles of AI Planning Principles of 7. State-space search: relaxed Malte Helmert Albert-Ludwigs-Universität Freiburg November 18th, 2008 A simple heuristic for deterministic planning STRIPS (Fikes & Nilsson, 1971) used the

More information

Using Timed Input/Output Automata for Implementing Distributed Systems

Using Timed Input/Output Automata for Implementing Distributed Systems Using Timed Input/Output Automata for Implementing Distributed Systems Peter M. Musial CSAIL, MIT, MA, USA pmmusial@csail.mit.edu Abstract The objective of this work is the derivation of software that

More information

The Weakest Failure Detector for Wait-Free Dining under Eventual Weak Exclusion

The Weakest Failure Detector for Wait-Free Dining under Eventual Weak Exclusion The Weakest Failure Detector for Wait-Free Dining under Eventual Weak Exclusion Srikanth Sastry Computer Science and Engr Texas A&M University College Station, TX, USA sastry@cse.tamu.edu Scott M. Pike

More information

CS505: Distributed Systems

CS505: Distributed Systems Department of Computer Science CS505: Distributed Systems Lecture 10: Consensus Outline Consensus impossibility result Consensus with S Consensus with Ω Consensus Most famous problem in distributed computing

More information

Distributed Deadlock-Avoidance. IMDEA Software Institute, Spain

Distributed Deadlock-Avoidance. IMDEA Software Institute, Spain Distributed Deadlock-voidance César Sánchez IMDE Software Institute, Spain DRV Workshop, ertinoro 19-May, 216 Distributed Deadlock-voidance little story about how static knowledge can help solve unsolvable

More information

Communicating Parallel Processes. Stephen Brookes

Communicating Parallel Processes. Stephen Brookes Communicating Parallel Processes Stephen Brookes Carnegie Mellon University Deconstructing CSP 1 CSP sequential processes input and output as primitives named parallel composition synchronized communication

More information

The Complexity of Somewhat Approximation Resistant Predicates

The Complexity of Somewhat Approximation Resistant Predicates The Complexity of Somewhat Approximation Resistant Predicates C 1. C m x 1. x n Madhur Tulsiani TTI Chicago Joint work with Subhash Khot and Pratik Worah Max-k-CSP Max-k-CSP - n Boolean variables, m constraints

More information

Automata-Theoretic Model Checking of Reactive Systems

Automata-Theoretic Model Checking of Reactive Systems Automata-Theoretic Model Checking of Reactive Systems Radu Iosif Verimag/CNRS (Grenoble, France) Thanks to Tom Henzinger (IST, Austria), Barbara Jobstmann (CNRS, Grenoble) and Doron Peled (Bar-Ilan University,

More information

Trace semantics: towards a unification of parallel paradigms Stephen Brookes. Department of Computer Science Carnegie Mellon University

Trace semantics: towards a unification of parallel paradigms Stephen Brookes. Department of Computer Science Carnegie Mellon University Trace semantics: towards a unification of parallel paradigms Stephen Brookes Department of Computer Science Carnegie Mellon University MFCSIT 2002 1 PARALLEL PARADIGMS State-based Shared-memory global

More information

The AADL behavior annex - experiments and roadmap

The AADL behavior annex - experiments and roadmap The AADL behavior annex - experiments and roadmap R. B. França 1 J-P. Bodeveix 1 M. Filali 1 J-F. Rolland 1 D. Chemouil 2 D. Thomas 3 1 Institut de Recherche en Informatique de Toulouse Université Paul

More information

Failure detectors Introduction CHAPTER

Failure detectors Introduction CHAPTER CHAPTER 15 Failure detectors 15.1 Introduction This chapter deals with the design of fault-tolerant distributed systems. It is widely known that the design and verification of fault-tolerent distributed

More information

Randomized Complexity Classes; RP

Randomized Complexity Classes; RP Randomized Complexity Classes; RP Let N be a polynomial-time precise NTM that runs in time p(n) and has 2 nondeterministic choices at each step. N is a polynomial Monte Carlo Turing machine for a language

More information

Anti-unification algorithms and their applications

Anti-unification algorithms and their applications Anti-unification algorithms and their applications in program analysis Faculty of Computational Mathematics and Cybernetics, Moscow State University, Moscow, RU-119899, Russia Perspectives of System Informatics,

More information

Adjoint Logic and Its Concurrent Semantics

Adjoint Logic and Its Concurrent Semantics Adjoint Logic and Its Concurrent Semantics Frank Pfenning ABCD Meeting, Edinburgh, December 18-19, 2017 Joint work with Klaas Pruiksma and William Chargin Outline Proofs as programs Linear sequent proofs

More information

Monitoring Distributed Controllers

Monitoring Distributed Controllers Monitoring Distributed Controllers When an Efficient LTL Algorithm on Sequences is Needed to Model-Check Traces A. Genon T. Massart C. Meuter Université Libre de Bruxelles Département d Informatique August

More information

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford Probabilistic Model Checking Michaelmas Term 20 Dr. Dave Parker Department of Computer Science University of Oxford Overview PCTL for MDPs syntax, semantics, examples PCTL model checking next, bounded

More information

Abstract Specification of Crypto- Protocols and their Attack Models in MSR

Abstract Specification of Crypto- Protocols and their Attack Models in MSR Abstract Specification of Crypto- Protocols and their Attack Models in MSR Iliano Cervesato iliano@itd.nrl.navy.mil ITT Industries, Inc @ NRL Washington DC http://www.cs.stanford.edu/~iliano/ Software

More information

The Expressivity of Universal Timed CCP: Undecidability of Monadic FLTL and Closure Operators for Security

The Expressivity of Universal Timed CCP: Undecidability of Monadic FLTL and Closure Operators for Security The Expressivity of Universal Timed CCP: Undecidability of Monadic FLTL and Closure Operators for Security Carlos Olarte and Frank D. Valencia INRIA /CNRS and LIX, Ecole Polytechnique Motivation Concurrent

More information

Push-pull functional reactive programming

Push-pull functional reactive programming 3 September, 2009 Haskell Symposium 1 Semantics Building blocks Refactoring 2 Class instances Future times 3 Description and problems Improving 4 Semantics Building blocks Refactoring What is Functional

More information

CS 6112 (Fall 2011) Foundations of Concurrency

CS 6112 (Fall 2011) Foundations of Concurrency CS 6112 (Fall 2011) Foundations of Concurrency 29 November 2011 Scribe: Jean-Baptiste Jeannin 1 Readings The readings for today were: Eventually Consistent Transactions, by Sebastian Burckhardt, Manuel

More information

Causality and Time. The Happens-Before Relation

Causality and Time. The Happens-Before Relation Causality and Time The Happens-Before Relation Because executions are sequences of events, they induce a total order on all the events It is possible that two events by different processors do not influence

More information

Solving SAT Modulo Theories

Solving SAT Modulo Theories Solving SAT Modulo Theories R. Nieuwenhuis, A. Oliveras, and C.Tinelli. Solving SAT and SAT Modulo Theories: from an Abstract Davis-Putnam-Logemann-Loveland Procedure to DPLL(T) Mooly Sagiv Motivation

More information

Checking Safety Properties of Concurrent Programs

Checking Safety Properties of Concurrent Programs Checking Safety Properties of Concurrent Programs Huimin Lin joint work with Yi Lv, Hong Pan, Peng Wu Institute of Software, Chinese Academy of Sciences SERE 2012 June 22, 2012 Concurrent software systems

More information

Efficient Dependency Tracking for Relevant Events in Concurrent Systems

Efficient Dependency Tracking for Relevant Events in Concurrent Systems Distributed Computing manuscript No. (will be inserted by the editor) Anurag Agarwal Vijay K. Garg Efficient Dependency Tracking for Relevant Events in Concurrent Systems Received: date / Accepted: date

More information

EDA045F: Program Analysis LECTURE 10: TYPES 1. Christoph Reichenbach

EDA045F: Program Analysis LECTURE 10: TYPES 1. Christoph Reichenbach EDA045F: Program Analysis LECTURE 10: TYPES 1 Christoph Reichenbach In the last lecture... Performance Counters Challenges in Dynamic Performance Analysis Taint Analysis Binary Instrumentation 2 / 44 Types

More information

Umans Complexity Theory Lectures

Umans Complexity Theory Lectures Complexity Theory Umans Complexity Theory Lectures Lecture 1a: Problems and Languages Classify problems according to the computational resources required running time storage space parallelism randomness

More information

On Equilibria of Distributed Message-Passing Games

On Equilibria of Distributed Message-Passing Games On Equilibria of Distributed Message-Passing Games Concetta Pilotto and K. Mani Chandy California Institute of Technology, Computer Science Department 1200 E. California Blvd. MC 256-80 Pasadena, US {pilotto,mani}@cs.caltech.edu

More information

Propositional Logic: Models and Proofs

Propositional Logic: Models and Proofs Propositional Logic: Models and Proofs C. R. Ramakrishnan CSE 505 1 Syntax 2 Model Theory 3 Proof Theory and Resolution Compiled at 11:51 on 2016/11/02 Computing with Logic Propositional Logic CSE 505

More information

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Stavros Tripakis Abstract We introduce problems of decentralized control with communication, where we explicitly

More information

Example: Fib(N) = Fib(N-1) + Fib(N-2), Fib(1) = 0, Fib(2) = 1

Example: Fib(N) = Fib(N-1) + Fib(N-2), Fib(1) = 0, Fib(2) = 1 Algorithm Analysis Readings: Chapter 1.6-1.7. How can we determine if we have an efficient algorithm? Criteria: Does it meet specification/work correctly? Is it understandable/maintainable/simple? How

More information

On Expected Constant-Round Protocols for Byzantine Agreement

On Expected Constant-Round Protocols for Byzantine Agreement On Expected Constant-Round Protocols for Byzantine Agreement Jonathan Katz Chiu-Yuen Koo Abstract In a seminal paper, Feldman and Micali show an n-party Byzantine agreement protocol in the plain model

More information

Models of Concurrency

Models of Concurrency Models of Concurrency GERARDO SCHNEIDER UPPSALA UNIVERSITY DEPARTMENT OF INFORMATION TECHNOLOGY UPPSALA, SWEDEN Thanks to Frank Valencia Models of Concurrency p.1/57 Concurrency is Everywhere Concurrent

More information

Deterministic planning

Deterministic planning Chapter 3 Deterministic planning The simplest planning problems involves finding a sequence of actions that lead from a given initial state to a goal state. Only deterministic actions are considered. Determinism

More information

Conservation of Information

Conservation of Information Conservation of Information Amr Sabry (in collaboration with Roshan P. James) School of Informatics and Computing Indiana University May 8, 2012 Amr Sabry (in collaboration with Roshan P. James) (IU SOIC)

More information

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler Complexity Theory Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Reinhard

More information

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181. Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität

More information

DMP. Deterministic Shared Memory Multiprocessing. Presenter: Wu, Weiyi Yale University

DMP. Deterministic Shared Memory Multiprocessing. Presenter: Wu, Weiyi Yale University DMP Deterministic Shared Memory Multiprocessing 1 Presenter: Wu, Weiyi Yale University Outline What is determinism? How to make execution deterministic? What s the overhead of determinism? 2 What Is Determinism?

More information

Automated Verification of Privacy in Security Protocols:

Automated Verification of Privacy in Security Protocols: Automated Verification of Privacy in Security Protocols: Back and Forth Between Theory & Practice LSV, ENS Paris-Saclay, Université Paris-Saclay, CNRS April 21st 2017 PhD advisors: David Baelde & Stéphanie

More information

Model Checking: An Introduction

Model Checking: An Introduction Model Checking: An Introduction Meeting 3, CSCI 5535, Spring 2013 Announcements Homework 0 ( Preliminaries ) out, due Friday Saturday This Week Dive into research motivating CSCI 5535 Next Week Begin foundations

More information

Dynamic Semantics. Dynamic Semantics. Operational Semantics Axiomatic Semantics Denotational Semantic. Operational Semantics

Dynamic Semantics. Dynamic Semantics. Operational Semantics Axiomatic Semantics Denotational Semantic. Operational Semantics Dynamic Semantics Operational Semantics Denotational Semantic Dynamic Semantics Operational Semantics Operational Semantics Describe meaning by executing program on machine Machine can be actual or simulated

More information

Reasoning about Time and Reliability

Reasoning about Time and Reliability Reasoning about Time and Reliability Probabilistic CTL model checking Daniel Bruns Institut für theoretische Informatik Universität Karlsruhe 13. Juli 2007 Seminar Theorie und Anwendung von Model Checking

More information

A Self-Stabilizing Algorithm for Finding a Minimal Distance-2 Dominating Set in Distributed Systems

A Self-Stabilizing Algorithm for Finding a Minimal Distance-2 Dominating Set in Distributed Systems JOURNAL OF INFORMATION SCIENCE AND ENGINEERING 24, 1709-1718 (2008) A Self-Stabilizing Algorithm for Finding a Minimal Distance-2 Dominating Set in Distributed Systems JI-CHERNG LIN, TETZ C. HUANG, CHENG-PIN

More information

Verification of a Dynamic Channel Model using the SPIN Model Checker

Verification of a Dynamic Channel Model using the SPIN Model Checker Verification of a Dynamic Channel Model using the SPIN Model Checker Rune Møllegaard FRIBORG a,1 and Brian VINTER b a escience Center, University of Copenhagen b Niels Bohr Institute, University of Copenhagen

More information

Algebraic Trace Theory

Algebraic Trace Theory Algebraic Trace Theory EE249 Roberto Passerone Material from: Jerry R. Burch, Trace Theory for Automatic Verification of Real-Time Concurrent Systems, PhD thesis, CMU, August 1992 October 21, 2002 ee249

More information

Verification Using Temporal Logic

Verification Using Temporal Logic CMSC 630 February 25, 2015 1 Verification Using Temporal Logic Sources: E.M. Clarke, O. Grumberg and D. Peled. Model Checking. MIT Press, Cambridge, 2000. E.A. Emerson. Temporal and Modal Logic. Chapter

More information

Time Synchronization

Time Synchronization Massachusetts Institute of Technology Lecture 7 6.895: Advanced Distributed Algorithms March 6, 2006 Professor Nancy Lynch Time Synchronization Readings: Fan, Lynch. Gradient clock synchronization Attiya,

More information

Lock Inference for Atomic Sections

Lock Inference for Atomic Sections Lock Inference for Atomic Sections Michael Hicks University of Maryland, College Park mwh@cs.umd.edu Jeffrey S. Foster University of Maryland, College Park jfoster@cs.umd.edu Polyvios Pratikakis University

More information

Modelling Parallel Quantum Computing Using Transactional Memory

Modelling Parallel Quantum Computing Using Transactional Memory Electronic Notes in Theoretical Computer Science 270 (1) (2011) 183 190 www.elsevier.com/locate/entcs Modelling Parallel Quantum Computing Using Transactional Memory Juliana Kaizer Vizzotto 1 Programa

More information

Round-Efficient Multi-party Computation with a Dishonest Majority

Round-Efficient Multi-party Computation with a Dishonest Majority Round-Efficient Multi-party Computation with a Dishonest Majority Jonathan Katz, U. Maryland Rafail Ostrovsky, Telcordia Adam Smith, MIT Longer version on http://theory.lcs.mit.edu/~asmith 1 Multi-party

More information

Operational Semantics

Operational Semantics Operational Semantics Semantics and applications to verification Xavier Rival École Normale Supérieure Xavier Rival Operational Semantics 1 / 50 Program of this first lecture Operational semantics Mathematical

More information

Temporal & Modal Logic. Acronyms. Contents. Temporal Logic Overview Classification PLTL Syntax Semantics Identities. Concurrency Model Checking

Temporal & Modal Logic. Acronyms. Contents. Temporal Logic Overview Classification PLTL Syntax Semantics Identities. Concurrency Model Checking Temporal & Modal Logic E. Allen Emerson Presenter: Aly Farahat 2/12/2009 CS5090 1 Acronyms TL: Temporal Logic BTL: Branching-time Logic LTL: Linear-Time Logic CTL: Computation Tree Logic PLTL: Propositional

More information

Towards a Mechanised Denotational Semantics for Modelica

Towards a Mechanised Denotational Semantics for Modelica Towards a Mechanised Denotational Semantics for Modelica Simon Foster Bernhard Thiele Jim Woodcock Peter Fritzson Department of Computer Science, University of York PELAB, Linköping University 3rd February

More information

arxiv: v1 [cs.pl] 3 Jul 2017

arxiv: v1 [cs.pl] 3 Jul 2017 Checking Linearizability of Concurrent Priority Queues Ahmed Bouajjani 1, Constantin Enea 1, and Chao Wang 1 1 Institut de Recherche en Informatique Fondamentale, {abou,cenea,wangch}@irif.fr arxiv:1707.00639v1

More information

AGREEMENT PROBLEMS (1) Agreement problems arise in many practical applications:

AGREEMENT PROBLEMS (1) Agreement problems arise in many practical applications: AGREEMENT PROBLEMS (1) AGREEMENT PROBLEMS Agreement problems arise in many practical applications: agreement on whether to commit or abort the results of a distributed atomic action (e.g. database transaction)

More information

A Language for Task Orchestration and its Semantic Properties

A Language for Task Orchestration and its Semantic Properties DEPARTMENT OF COMPUTER SCIENCES A Language for Task Orchestration and its Semantic Properties David Kitchin, William Cook and Jayadev Misra Department of Computer Science University of Texas at Austin

More information

INF 4140: Models of Concurrency Series 3

INF 4140: Models of Concurrency Series 3 Universitetet i Oslo Institutt for Informatikk PMA Olaf Owe, Martin Steffen, Toktam Ramezani INF 4140: Models of Concurrency Høst 2016 Series 3 14. 9. 2016 Topic: Semaphores (Exercises with hints for solution)

More information

Denotational semantics: proofs

Denotational semantics: proofs APPENDIX A Denotational semantics: proofs We show that every closed term M has a computable functional [[M ] as its denotation. A.1. Unification We show that for any two constructor terms one can decide

More information