Concurrent Pattern Calculus

Size: px
Start display at page:

Download "Concurrent Pattern Calculus"

Transcription

1 Concurrent Pattern Calculus Thomas Given-Wilson 1, Daniele Gorla 2, and Barry Jay 1 1 Centre for Quantum Computation and Intelligent Systems & School of Software, University of Technology, Sydney 2 Dip. di Informatica, Univ. di Roma La Sapienza Abstract. Concurrent pattern calculus drives interaction between processes by unifying patterns, just as sequential pattern calculus drives computation by matching a pattern against a data structure. By generalising from pattern matching to unification, interaction becomes symmetrical, with information flowing in both directions. This provides a natural language for describing any form of exchange or trade. Many popular process calculi can be encoded in concurrent pattern calculus. 1 Introduction The π-calculus [13] holds a pivotal position among process calculi as it is the simplest that is able to support computation as represented by λ-calculus [1]. However, pattern calculus [11, 9] supports even more computations than λ-calculus since pattern-matching functions are commonly intensional with respect to their arguments [10]. For example, the pattern x y can decompose any data structure in (static) pattern calculus by matching against the internal structure. Hence it is natural to wonder what a concurrent pattern calculus might look like. In fact it turns out rather well. This paper adapts the pattern matching mechanism of the pure pattern calculus [11, 9] to a concurrent process language that supports the standard constructs of parallel composition, name restriction and replication. This yields a concurrent pattern calculus (CPC) where the usual prefixes for input and output can be combined into patterns; their unification triggers a two-way, or symmetric, flow of information, as represented by the sole interaction rule (p P q Q) σp ρq where σ and ρ are the substitutions on names resulting from the unification of p and q. Its support for structure and symmetry of interaction makes its pattern matching more expressive than several representative approaches in the literature. For example, checking equality of channel names, as in π-calculus [13], can be viewed as a trivial form of pattern matching. This can be generalised to match tuples of names, as in polyadic π-calculus [12], fusion calculus [15] and Linda [4]. Spi calculus [6] has an even richer collection of patterns, for equality of terms, pairs of terms, numbers (zero and successors) and encryptions.

2 More formally, π-calculus, Spi calculus and Linda can all be encoded into CPC but CPC cannot be encoded in any of them. Although the patterns of fusion calculus are relatively simple, the peculiarities of name fusion ensure that there are no encodings of fusion calculus into CPC or conversely, of CPC into fusion calculus. A natural objection to CPC is that the unification is too complex to be an atomic operation. In particular, any limit to the size of communicated messages could be violated by some match. Also, one cannot, in practice, implement a simultaneous exchange of information, so that pattern unification must be implemented in terms of simpler primitives. This objection is similar to those made against λ-calculus, whose substitution is not atomic either. Even more, the pattern matching of Linda suffers from the same problems (it cannot be implemented as an atomic action), but there are many existing programming environments based on it (e.g. [14, 16]). Really it is a question of deciding how granular one wishes to be. CPC may prove to be a convenient specification language since, if symmetry between processes is to be taken seriously, there must always be some give and take, some exchange of information. This is most obvious in the world of trade, where negotiation is paramount, and the mechanics of settlement are secondary. To this end, our major example supports a simple negotiation. Buyer and seller must discover their compatibility in an open environment, establish trust (through a third party) and then communicate privately. The structure of the paper is as follows. Section 2 introduces symmetric matching through a concurrent pattern calculus. Section 3 develops a share trading example. Section 4 formalises the relation of CPC to other process calculi. Section 5 concludes and considers future work. Most proofs are omitted from this paper but can be found on-line [5]. 2 Concurrent pattern calculus This section presents a concurrent pattern calculus (CPC) that uses symmetric pattern matching as the basis of communication. Both symmetry and pattern matching appear in existing models of concurrency, but in more limited ways. For example, π-calculus requires a sender and receiver to share a channel, so that the presence of the channel is symmetric but information flow is in one direction only. Fusion calculus achieves symmetry by fusing names together but has no intensional patterns. On the other hand, Spi calculus has intensional patterns, e.g. for natural numbers, and can check equality of terms (i.e. patterns), but does not perform matching in general, or support much symmetry. The expressiveness of CPC comes from extending the traditional names to a class of patterns and unifying them (symmetrically) rather than matching them (asymmetrically). This supports equality testing and bi-directional input and output in a single step. Although the increased expressive power makes it harder to protect private information, this can be managed by allowing some 2

3 names (and patterns) to be protected, in the sense that they can be matched but not shared. 2.1 Syntax The CPC has two syntactic classes, the patterns (meta-variables p, p 1, q, q 1,...) and the processes (meta-variables P, P, P 1, Q, Q, Q 1...). The patterns have the following forms Patterns p ::= x variable name x protected name λx binding name p p compound. Variable names x are available for equality, output and substitution. Protected names x are only available for equality and substitution. Binding names λx are available for input only. A compound combines two patterns into a single one. Given a pattern p the sets of: variables names, denoted vn(p); protected names, denoted pn(p); and binding names, denoted bn(p), are as expected with the union being taken for compounds. The free names of a pattern p, written fn(p), is the union of the variable names and protected names of p. A pattern is well formed if each binding name appears exactly once. All patterns appearing in the rest of the paper are assumed to be well formed. As the protected names serve to test for equality and the binding names represent input, neither should be able to be communicated to another process. Thus, a pattern is communicable if it contains no protected or binding names. Protection can be extended to a communicable pattern p by defining x = x p q = p q. A substitution σ (also denoted σ 1, ρ, ρ 1,...) is defined as a partial function from names to communicable patterns. These are applied to patterns in the obvious manner on the understanding that σ x = σx if x is in the domain of σ. The symmetric matching or unification {p q} of two patterns p and q attempts to unify p and q by generating substitutions upon their binding names. When defined, the result is some pair of substitutions whose domains are the binding names of p and of q. The rules to generate the substitutions are: {x x} {x x } = Some ({}, {}) { x x} { x x } {λx q} = Some ({q/x}, {}) if q is communicable {p λx} = Some ({}, {p/x}) if { p is communicable {p1 q {p 1 p 2 q 1 q 2 } = Some ((σ 1 σ 2 ), (ρ 1 ρ 2 )) 1 } = Some (σ 1, ρ 1 ) {p 2 q 2 } = Some (σ 2, ρ 2 ) {p q} = undefined otherwise. 3

4 A name matches against itself when both instances are either variable or protected. That a protected name x unifies with the variable name x means that a process that protects a name may communicate with one that does not. A binding name λx binds any communicable pattern p by generating a substitution {p/x}. If both patterns are compounds and there is some matching for their respective components, then take the union of the substitutions. Otherwise the patterns cannot be unified and the matching is undefined. Lemma 1. If the unification of patterns p and q is defined then any protected name of p is a free name of q. The processes of CPC are given by Processes P ::= 0 zero P P parallel composition!p replication (νx)p restriction p P case. The zero, parallel composition, replication and restriction are all familiar. The traditional input and output primitives are replaced by the case p P that has a pattern p and a body P. The pattern of a case may be considered as a form of prefix, as commonly used for input or output. The free names of processes, denoted fn(p ), are defined as usual for all the traditional primitives and fn(p P ) = fn(p) (fn(p )\bn(p)) where the binding names of the pattern bind their free occurrences in the body. The general structural equivalence relation is defined just as in π-calculus [12], with α-conversion defined in the usual manner. The application of a substitution to a process is defined in the usual manner, to avoid name capture. 2.2 Operational Semantics CPC has one interaction rule given by (p P q Q) (σp ) (ρq) if {p q} = Some (σ, ρ). It states that if the unification of two patterns p and q is defined and generates Some (σ, ρ), then apply the substitutions σ and ρ to the bodies P and Q, respectively. If the matching of p and q is undefined then no interaction occurs. The interaction rule is then closed under parallel composition, restriction and structural equivalence in the usual manner. The reflexive, transitive closure of is denoted =. The examples and theorems developed later in the paper rely on control of interaction, as now defined. 4

5 Definition 1. The processes P and Q do not interact if, whenever P Q = R, then there are processes P and Q such that P = P, Q = Q and R P Q. Lemma 2. A process of the form p P with a protected name n in the pattern can only interact with a process Q containing n among its the free names. 3 Trade This section uses the example of share trading to explore the potential of CPC. The scenario is that two potential traders, a buyer and a seller, wish to engage in trade. To complete a transaction the traders need to progress through two stages: discovering each other and exchanging information. Both traders begin with a pattern for their desired transaction. The discovery phase can be characterised as a pattern-unification problem, where traders patterns are used to find a compatible partner. The exchange phase occurs when a buyer and seller have agreed upon a transaction. Now each trader wishes to exchange information in a single interaction, preventing any incomplete trades from occurring. The rest of this section explores three solutions to completing a transaction. The first demonstrates discovery, the second introduces a registrar to validate traders, the third extends the second with protected names to ensure privacy. Solution 1. Consider two traders, a buyer and a seller. The buyer Buy 1 with bank account b and desired shares s can be given by Buy 1 = s λm m b λx B(x). The first pattern s λm is used to match with a compatible seller using share information s, and to input a name m to be used as a channel to exchange bank account information b for share certificates bound to x. The transaction successfully concludes with B(x). The seller Sell 1 with share certificates c and desired share sale s is given by Sell 1 = (νn)s n n λy c S(y). The seller creates a channel name n and then tries to find a buyer for the shares described in s, offering n to the buyer to continue the transaction. The channel is then used to exchange billing information, bound to y, for the share certificates c. The seller then concludes with the successfully completed transaction as S(y). The discovery phase succeeds when the traders are place in a parallel composition and discover each other by matching on s Buy 1 Sell 1 (νn)(s λm m b λx B(x) s n n λy c S(y)) (νn)(n b λx B(x) n λy c S(y)). The next phase is to exchange billing information for share certificates, as in (νn)(n b λx B(x) n λy c S(y)) (νn)(b(c) S(b)). 5

6 The transaction concludes with the buyer having the share certificates c and the seller having the billing account b. This solution allows the traders to discover each other and exchange information atomically to complete a transaction. However, there is no way to determine if a process is a trustworthy trader. Solution 2. Now add a registrar that keeps track of registered traders. Traders offer their identity to potential partners and the registrar confirms if the identity belongs to a valid trader. The buyer is now Buy 2 = s i B λj n B j λm m b λx B(x). The first pattern now swaps the buyer s identity i B for the seller s, bound to j. The buyer then consults the registrar using the identifier n B to validate j, if valid the exchange continues as before. Now define the seller symmetrically by Sell 2 = s λj i S n S j λm m λy c S(y). Also define the registrar Reg 2 with identifiers n B and n S to communicate with the buyer and seller, respectively, by Reg 2 = (νn)(n B i S n 0 n S i B n 0). The registrar creates a new identifier n to provide to traders who have been validated; then it makes the identifier available to known traders who attempt to validate another known trader. Although rather simple, the registrar can easily be extended to support a multitude of traders. Running these processes in parallel yields the following interaction Buy 2 Sell 2 Reg 2 (νn)(s i B λj n B j λm m b λx B(x) n B i S n 0 s λj i S n S j λm m λy c S(y) n S i B n 0) (νn)(n B i S λm m b λx B(x) n B i S n 0 n S i B λm m λy c S(y) n S i B n 0). The share information s allows the buyer and seller to discover each other and swap identities i B and i S. The next two interactions involve the buyer and seller validating each other s identity and inputting the identifier to complete the transaction (νn)(n B i S λm m b λx B(x) n B i S n 0 n S i B λm m λy c S(y) n S i B n 0) (νn)(n b λx B(x) n S i B λm m λy c S(y) n S i B n 0) (νn)(n b λx B(x) n λy c S(y)). 6

7 Now that the traders have validated each other, they can continue with the exchange step from before (νn)(n b λx B(x) n λy c S(y)) (νn)(b(c) S(b)). The traders exchange information and successfully complete with B(c) and S(b). Although this solution satisfies the desire to validate that traders are legitimate, the freedom of matching allows for malicious processes to interfere. Consider the promiscuous process Prom given by Prom = λz 1 λz 2 a P (z 1, z 2 ). This process is willing to match any other process that will swap two pieces of information for some arbitrary name a. Such a process could interfere with the traders trying to complete the exchange phase of a transaction. For example, (νn)(n b λx B(x) n λy c S(y)) Prom (νn)(b(a) n λy c S(y) P (n, b)) where the promiscuous process has stolen the identifier n and the bank account information b. The unfortunate buyer is left with some useless information a and the seller is waiting to complete the transaction. Solution 3. The vulnerability of Solution 2 can be repaired by using protected names. The buyer, seller and registrar can be repaired to Buy 3 = s i B λj n B j λm m b λx B(x) Sell 3 = s λj i S n S j λm m λy c S(y) Reg 3 = (νn)( n B i S n 0 n S i B n 0). Now all communication between the buyer, seller and registrar use protected identifiers: n B, n S and m. Thus, all that remains is to ensure appropriate restrictions: (νn B )(νn S )(Buy 3 Sell 3 Reg 3 ). Therefore, other processes can only interact with the traders during the discovery phase, which will not lead to a successful transaction. The registrar will only interact with the traders as all the registrar s patterns have protected names known only to the registrar and a trader (Lemma 2). The solution could be extended further: although the share information is treated as a variable name in the example, it could be represented as a compound structure with a company code, number of shares and price per share, e.g. ABC 100 $0.38. This format allows discovery based on partial share information, for example: specify a company code and price, but not the number of shares ABC λv $0.38; or specify only the price and accept any company or number of shares λu λv $0.38. The seller could also offer similarly partial share information, 7

8 although this may be a very risky business strategy! Observe that either trader can protect any component of the pattern if they wish to ensure that the other party exactly meets that criterion. Another possibility is to allow for some checking of the integrity of the patterns being communicated. Given some standard language for the representation of data, such as XML, this could be checked by the matching. For example, a valid bank account may be required to have an account number and account name. Thus, a pattern to input only valid bank accounts, binding the account number to u, the name to v and using standardised tags accountnumber and accountname, could be ( accountnumber λu) ( accountname λv). Thus, any pattern that successfully matches must be identically structured and tagged. Indeed, this could be developed further to account for XML and web services such as in PiDuce [3]. 4 Comparison with other process calculi This section exploits the techniques developed in [7, 8] to formally asses the expressive power of CPC w.r.t. π-calculus, Linda, Fusion and Spi calculus. After briefly recalling these models and some basic material from [8], the relation to CPC is formalised. First, let each model, including CPC, be augmented with a reserved process, used to signal successful termination. 4.1 Some Process Calculi π-calculus [13, 12]. The π-calculus processes given by the following grammar: P ::= 0 a b.p a(x).p (νn)p P Q!P and the only reduction rule is a b.p a(x).q P Q{b/x}. Linda [4]. Consider an instance of Linda formulated to follow CPC s syntax. Processes are defined as: P ::= 0 b1,..., b k (t 1,..., t k ).P (νn)p P Q!P where b ranges over names and t denotes a template field, defined by: t ::= λx b. Assume that input variables occurring in templates are all distinct. This assumption rules out template (λx, λx), but accepts (λx, b, b ). Templates are used to implement Linda s pattern matching, defined as follows: Match( ; ) = {} Match( b ; b) = {} Match(λx; b) = {b/x} Match(t; b) = σ 1 Match( t; b) = σ 2 Match(t, t ; b, b) = σ 1 σ 2 8

9 where ẽ denotes a (possibly empty) sequence of entities of kind e (names or template fields, in our case) and denotes the union of partial functions with disjoint domains. The interaction rule is given by: b ( t).p σp if Match( t; b) = σ. The reduction relation is obtained by closing this interaction rule by parallel, restriction and the same structural equivalence relation defined for CPC. Fusion [15]. Following the the presentation in [17], processes are defined as: P ::= 0 P P (νx)p!p u x.p u( x).p. The interaction rule for Fusion is (νũ)(u x.p u(ỹ).q R) σp σq σr with dom(σ) ran(σ) { x, ỹ} and ũ = dom(σ) \ ran(σ) and σ(v) = σ(w) iff (v, w) E( x = ỹ) where E( x = ỹ) is the least equivalence relation on names generated by the equalities x = ỹ (that is defined whenever x = ỹ ). Fusion s reduction relation is obtained by closing the interaction axiom under parallel, restriction and the structural equivalence as for CPC. Spi calculus [6]. This language is unusual as names are now generalised to terms of the form M, N ::= n x (M, N) 0 suc(m) {M} N They are rather similar to the patterns of CPC in that they may have internal structure. Of particular interest are the pair, successor and encryption that may be bound to a name and then decomposed later by an intensional reduction. Concerning the operational semantics, we consider a slightly modified version of Spi calculus where interaction is generalised to M N.P M(x).Q P {N/x}Q where M is any term of the Spi calculus. 4.2 Valid Encodings and their Properties An encoding of a language L 1 into another language L 2 is a pair ([[ ], ϕ [ ] ) where [ ] translates every L 1 -process into an L 2 -process and ϕ [ ] maps every source name into a k-tuple of (target) names, for k > 0. The translation [ ] turns every source term into a target term; in doing this, the translation may fix some names to play a precise rôle or it may translate a single name into a tuple of names. This can be obtained by exploiting ϕ [ ] (details in [8]). Now consider only encodings that satisfy the following properties, that are justified and discussed at length in [8]. Let a k-ary context C( 1 ;... ; k) be a 9

10 term where k occurrences of 0 are linearly replaced by the holes { 1 ;... ; k} (every hole must occur once and only once). Moreover, denote with i and = i the relations and = in language L i ; denote with ω i an infinite sequence of reductions in L i. Moreover, we let i denote the reference behavioural equivalence for language L i. Also, let P i mean that there exists P such that P = i P and P P, for some P. Finally, to simplify reading, let S range over processes of the source language (viz., L 1 ) and T range over processes of the target language (viz., L 2 ). Definition 2 (Valid Encoding). An encoding ([ ], ϕ [ ] ) is valid if it satisfies the following five properties: 1. Compositionality: for every k-ary operator op of L 1 and for every subset of names N, there exists a k-ary context Cop( N 1 ;... ; k) such that, for all S 1,..., S k with fn(s 1,..., S k ) = N, it holds that [ op(s 1,..., S k ) ] = Cop([ N S 1 ];... ; [ S k ]). 2. Name invariance: for every S and name substitution σ, it holds that { = σ [ σs ] [ S ] if σ is injective σ [ S ] otherwise 2 where σ is such that ϕ [ ] (σ(a)) = σ (ϕ [ ] (a)) for every name a. 3. Operational correspondence: for all S = 1 S, it holds that [ S ] = 2 2 [ S ]; for all [ S ] = 2 T, there exists S such that S = 1 S and T = 2 2 [ S ]. 4. Divergence reflection: for every S such that [ S ] ω 2, it holds that S ω Success sensitiveness: for every S, it holds that S 1 if and only if [ S ] 2. [8] contains some results concerning valid encodings. In particular, it shows some proof-techniques for showing separation results, i.e. for proving that no valid encoding can exist between a pair of languages L 1 and L 2 satisfying certain conditions. Here, these languages will be limited to CPC and those introduced in Section 4.1. Further, the valid encodings considered will be assumed to be semi-homomorphic, i.e. where the interpretation of parallel composition is via a context of the form (νñ)( 1 2 R), for some ñ and R that only depend on the free names of the translated processes. Proposition 1 (from [8]). Let [ ] be a valid encoding; then, S / 1 implies that [ S ] / 2. Theorem 1 (from [8]). Assume that there exists S such that S / 1, S 1 and S S 1 ; moreover, assume that every T that does not reduce is such that T T / 2. Then, there cannot exist any semi-homomorphic valid encoding of L 1 into L 2. To state the following proof-technique, define the matching degree of a language L, written Md(L), as the least upper bound on the number of names that must be matched to yield a reduction in L. Theorem 2 (from [8]). If Md(L 1 ) > Md(L 2 ), then there exists no valid encoding of L 1 into L 2. 10

11 4.3 CPC vs π-calculus and Linda A hierarchy of process calculi with different communication primitives is obtained in [7] by combining four features: synchronism (synchronous vs asynchronous), arity (monadic vs polyadic data exchange), communication medium (channels vs shared dataspaces), and the presence of a form of pattern matching (that checks the arity of the tuple of names and equality of some specific names). This hierarchy is built upon a very similar notion of encoding to that presented in Definition 2 and, in particular, it is proved that Linda [4] (called L a,p,d,pm in [7]) is more expressive than monadic/polyadic π-calculus [13, 12] (called L s,m,c,no and L s,p,c,no, respectively, in [7]). Thus, it suffices to show that CPC is more expressive than L a,p,d,pm (this is the language called Linda in Section 4.1). First notice that CPC cannot be encoded into L a,p,d,pm : this is a corollary of Theorem 1. Indeed, consider the self-matching CPC process x : alone it cannot reduce and cannot report success but, reports success in parallel with itself. On the contrary, it is easy to prove that every L a,p,d,pm -process that reduces if put in parallel with itself is such that it reduces in isolation. The next step is to show a valid encoding of L a,p,d,pm into CPC. The encoding is a homomorphism w.r.t. to all operators, with the only two following exceptions: [ b ] def = pat d( b) 0 [ ( t).p ] def = pat t( t) [ P ] Functions pat d( ) and pat t( ) are used to translate data and templates into CPC patterns; they are defined as follows: pat d( ) def = λx pat d(b, b) def = λx b pat d( b) for x bn(pat d( b)) pat t( ) def = in pat t(t, t) def = in t pat t( t) where in is any name (a symbolic name is used for clarity but no result relies upon this). Moreover, the function pat d( ) associates a bound variable to every name in the sequence; this fact ensures that a pattern that translates a datum and a pattern that translates a template match only if they have the same length (this is a feature of L a,p,d,pm s pattern matching but not of CPC s). It is worth def noting that the simpler translation [[ b 1,..., b n ] = b 1... b n 0 would not work: the L a,p,d,pm -process b b does not reduce, whereas such an encoding (b 0 b 0) does. This fact would contradict Proposition 1. Next is to prove that this encoding is valid. This is an easy corollary of the following lemma, stating a strict correspondence between L a,p,d,pm s pattern matching and CPC s one (on patterns arising from the translation). Lemma 3. Match( t; b) = σ if and only if {pat t( t) pat d( b)} = Some(σ, {in/x 0,..., in/x n }), where {x 0,..., x n } = bn(pat d( b)) and σ maps names to names. 11

12 4.4 CPC vs Fusion Fusion calculus and CPC are unrelated in that there exists no valid encoding from one into the other. The impossibility for a valid encoding of CPC into Fusion is ensured by Theorem 2: the matching degree of Fusion is 1 (only the channel name is checked for equality in any interaction); by contrast, the matching degree of CPC is, since any number of name equalities can be checked atomically in a single CPC interaction. The converse separation result is ensured by the following theorem. Theorem 3. There exists no valid encoding of Fusion into CPC. Proof:(Sketch) The idea is to show that any interaction in Fusion can be rendered only by having: (1) two parallel processes performing an input and an output on the same channel, and (2) a restriction enclosing them to allow application of name fusions. Thus, to yield a reduction three entities have to mutually cooperate; this ternary interaction cannot be rendered in CPC, and this can be used to prove that no valid encoding can exist (see the technical report [5] for full details). 4.5 CPC vs Spi That CPC cannot be encoded into Spi calculus is a corollary of Theorem 1 and identical to the technique used in Section 4.3. The self-matching CPC process x cannot be encoded into Spi. The remainder of this section develops an encoding of Spi calculus into CPC. The terms can be encoded as patterns using the reserved names pair, encr, 0 and suc by [ n ] def = n [ (M, N) ] def = pair [ M ] [ N ] [ x ] def = x [ {M} N ] def = encr [ M ] [ N ] [ 0 ] def = 0 [ suc(m) ] def = suc [ M ]. The tagging is used for safety, as otherwise there are potential pathologies in the translation: without tags, the representation of a natural number could be confused with a pair or an encryption. The processes of the Spi calculus are P, Q ::= 0 P Q!P (νm)p M(x).P M N.P [M is N]P let (x, y) = M in P case M of {x} N : P case M of 0 : P suc(x) : Q. The nil process, parallel composition, replication and restriction are all familiar. The input M(x).P and output M N.P are generalised to allow terms in the place of channel names and output arguments. The match [M is N]P determines equality of M and N. The splitting let (x, y) = M in P decomposes pairs. The decryption case case M of {x} N : P decrypts M binding the encrypted message 12

13 to x. The integer case case M of 0 : P suc(x) : Q branches according to the number. Note that the last four can all get stuck if M is an incompatible term. Further, the last three are intensional, i.e. they depend on the internal structure of M. The encoding of the familiar forms are homomorphic as expected. The input and output both encode as cases: [ M(x).P ] def = in [ M ] λx [ P ] [ M N.P ] def = λx [ M ] ([ N ]) [ P ] x / fn([ P ], [ M ], [ N ]). The reserved name in (input) and fresh name x (output) are used to ensure that encoded inputs will only match with encoded outputs. Observe that in both processes forms [ M ] contains no binding names, and so is communicable. The four remaining process forms all require pattern matching and so translate to cases in parallel. In each encoding a fresh name n is used to prevent interaction with other processes, see Lemma 2. As in the Spi calculus, the encodings will reduce only after a successful matching and will be stuck otherwise. The encodings are [ [M is N]P ] def = (νn)( n [ M ] [ P ] n [ N ] 0) [ let (x, y) = M in P ] def = (νn)( n (pair λx λy) [ P ] n [ M ] 0) [ case M of {x} N : P ] def = (νn)( n (encr λx [ N ]) [ P ] n [ M ] 0) [ case M of 0 : P suc(x) : Q ] def = (νn)( n 0 [ P ] n (suc λx) [ Q ] n [ M ] 0). The match [M is N]P only reduces to P if M = N, thus the encoding creates two patterns using [ M ] and [ N ] with one reducing to [[ P ]. The pair splitting let (x, y) = M in P encoding creates a case with a pattern that matches a tagged pair and binds the components to x and y in [[ P ]. This is put in parallel with another case that has [ M ] in the pattern. The decryption case case M of {x} N : P checks whether M is a message encoded with key [ N ] and retrieves the value encrypted by binding it to x in the continuation. Lastly the integer case case M of 0 : P suc(x) : Q translation creates a case for each of the zero and the successor possibilities. These cases match the tag and the reserved names 0, reducing to [ P ], or suc and binding x in [ Q ]. The term to be compared M is as in the others. Theorem 4. The encoding of Spi calculus into CPC is valid. To conclude, notice that the criteria for a valid encoding does not imply full abstraction of the encoding (actually, they were defined in [7, 8] as an alternative 13

14 to full abstraction). This means that the encoding of equivalent Spi calculus processes can be distinguished by contexts in CPC that do not result from the encoding of any Spi calculus context. Indeed, while this encoding allows Spi calculus to be modelled in CPC, it does not entail that cryptography can be properly rendered. Consider the pattern encr λx λy that could match the encoding of an encrypted term to bind the message and key, so that CPC can break any encryption! One solution is to simply add this encryption to CPC, a topic for future work. 5 Conclusions and future work The concurrent pattern calculus uses patterns to represent input, output and tests for equality, whose interaction is driven by unification that allows a twoway flow of information. This symmetric information exchange provides a concise model of trade in the information age. This is illustrated by the example of traders who can discover each other in the open and then close the deal in private. CPC supports valid encodings of many popular concurrent calculi such as π-calculus, Spi calculus and Linda as its patterns describe more structures. However, these three calculi do not support valid encodings of CPC because, among other things, they are insufficiently symmetric. On the other hand, while fusion calculus is completely symmetric, it has an incompatible approach to interaction. Future work may proceed in several directions. Just as pattern calculus expands upon the expressive power of sequential programming, CPC expands the expressive power of concurrent programming. The consequences of this remain to be developed. Possibilities applications include web services based upon symmetric information exchange. As first step is to implement the calculus, perhaps by augmenting the programming language bondi [2] that was built to implement pattern calculus. Concurrent pattern calculus supports a generous class of patterns whose interaction is fully symmetric. The implications of this increased expressive power are worthy of further investigation. Acknowledgements. Thanks to Eugenio Moggi and the reviewers for their helpful comments on drafts of this paper. References 1. H. P. Barendregt. The Lambda Calculus. Its Syntax and Semantics. Studies in Logic and the Foundations of Mathematics. Elsevier Science Publishers B.V., bondi programming language. www-staff.it.uts.edu.au/~cbj/bondi. 3. A. L. Brown, C. Laneve, and L. G. Meredith. Piduce: A process calculus with native XML datatypes. In In Proc. of EPEW05/WS-FM05, volume 3670 of Lect, pages Springer, D. Gelernter. Generative communication in Linda. ACM Transactions on Programming Languages and Systems, 7(1):80 112,

15 5. T. Given-Wilson, D. Gorla, and B. Jay. Concurrent pattern calculus (long version) A. Gordon and M. Abadi. A calculus for cryptographic protocols: The spi calculus. 4th ACM Conference on Computer and Communications Security, pages 36 47, D. Gorla. Comparing communication primitives via their relative expressive power. Information and Computation, 206(8): , D. Gorla. Towards a unified approach to encodability and separation results for process calculi. In F. van Breugel and M. Chechik, editors, Proc. of 19th International Conference on Concurrency Theory (CONCUR 08), number 5201 in LNCS, pages Springer, B. Jay. Pattern Calculus: Computing with Functions and Data Structures. Springer, B. Jay and T. Given-Wilson. A combinatory account of internal structure, B. Jay and D. Kesner. First-class patterns. Journal of Functional Programming, 19(2):34 pages, R. Milner. The polyadic π-calculus: A tutorial. In F. L. Bauer, W. Brauer, and H. Schwichtenberg, editors, Logic and Algebra of Specification, volume 94 of Series F. NATO ASI, Springer, R. Milner, J. Parrow, and D. Walker. A calculus of mobile processes, part I/II. Information and Computation, 100:1 77, R. D. Nicola, G. Ferrari, and R. Pugliese. KLAIM: A kernel language for agents interaction and mobility. IEEE Transactions on Software Engineering, 24(5): , J. Parrow and B. Victor. The fusion calculus: Expressiveness and symmetry in mobile processes. In Proc. of LICS, pages IEEE Computer Society, G. Picco, A. Murphy, and G.-C. Roman. Lime: Linda Meets Mobility. In D. Garlan, editor, Proc. of the 21 st Int. Conference on Software Engineering (ICSE 99), pages ACM Press, L. Wischik and P. Gardner. Explicit fusions. Theor. Comput. Sci., 340(3): ,

A Concurrent Pattern Calculus

A Concurrent Pattern Calculus A Concurrent Pattern Calculus Thomas Given-Wilson, Daniele Gorla, Barry Jay To cite this version: Thomas Given-Wilson, Daniele Gorla, Barry Jay. A Concurrent Pattern Calculus. Logical Methods in Computer

More information

On the Expressiveness of Symmetric Communication

On the Expressiveness of Symmetric Communication On the Expressiveness of Symmetric Communication Thomas Given-Wilson, Axel Legay To cite this version: Thomas Given-Wilson, Axel Legay. On the Expressiveness of Symmetric Communication. Theoretical Aspects

More information

A π-calculus with preorders

A π-calculus with preorders A π-calculus with preorders Daniel Hirschkoff, Jean-Marie Madiot, Davide Sangiorgi École Normale Supérieure de Lyon Università di Bologna PACE kick-off meeting, 2013-04-23 Jean-Marie Madiot (Lyon, Bologna)

More information

A Graph Rewriting Semantics for the Polyadic π-calculus

A Graph Rewriting Semantics for the Polyadic π-calculus A Graph Rewriting Semantics for the Polyadic π-calculus BARBARA KÖNIG Fakultät für Informatik, Technische Universität München Abstract We give a hypergraph rewriting semantics for the polyadic π-calculus,

More information

Review of The π-calculus: A Theory of Mobile Processes

Review of The π-calculus: A Theory of Mobile Processes Review of The π-calculus: A Theory of Mobile Processes Riccardo Pucella Department of Computer Science Cornell University July 8, 2001 Introduction With the rise of computer networks in the past decades,

More information

hal , version 1-21 Oct 2009

hal , version 1-21 Oct 2009 ON SKOLEMISING ZERMELO S SET THEORY ALEXANDRE MIQUEL Abstract. We give a Skolemised presentation of Zermelo s set theory (with notations for comprehension, powerset, etc.) and show that this presentation

More information

COMP6463: λ-calculus

COMP6463: λ-calculus COMP6463: λ-calculus 1. Basics Michael Norrish Michael.Norrish@nicta.com.au Canberra Research Lab., NICTA Semester 2, 2015 Outline Introduction Lambda Calculus Terms Alpha Equivalence Substitution Dynamics

More information

From Constructibility and Absoluteness to Computability and Domain Independence

From Constructibility and Absoluteness to Computability and Domain Independence From Constructibility and Absoluteness to Computability and Domain Independence Arnon Avron School of Computer Science Tel Aviv University, Tel Aviv 69978, Israel aa@math.tau.ac.il Abstract. Gödel s main

More information

Strong bisimilarity can be opened

Strong bisimilarity can be opened Strong bisimilarity can be opened Henning E. Andersen Hans Hüttel Karina N. Jensen June 7, 2002 Abstract We present an extension of the semantics of the π-calculus without match where strong bisimilarity

More information

Axiomatic set theory. Chapter Why axiomatic set theory?

Axiomatic set theory. Chapter Why axiomatic set theory? Chapter 1 Axiomatic set theory 1.1 Why axiomatic set theory? Essentially all mathematical theories deal with sets in one way or another. In most cases, however, the use of set theory is limited to its

More information

Consequence Relations and Natural Deduction

Consequence Relations and Natural Deduction Consequence Relations and Natural Deduction Joshua D. Guttman Worcester Polytechnic Institute September 9, 2010 Contents 1 Consequence Relations 1 2 A Derivation System for Natural Deduction 3 3 Derivations

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

On the Complexity of the Reflected Logic of Proofs

On the Complexity of the Reflected Logic of Proofs On the Complexity of the Reflected Logic of Proofs Nikolai V. Krupski Department of Math. Logic and the Theory of Algorithms, Faculty of Mechanics and Mathematics, Moscow State University, Moscow 119899,

More information

Business Process Management

Business Process Management Business Process Management Theory: The Pi-Calculus Frank Puhlmann Business Process Technology Group Hasso Plattner Institut Potsdam, Germany 1 What happens here? We discuss the application of a general

More information

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events Massimo Franceschet Angelo Montanari Dipartimento di Matematica e Informatica, Università di Udine Via delle

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

Syntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P.

Syntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P. First-Order Logic Syntax The alphabet of a first-order language is organised into the following categories. Logical connectives:,,,,, and. Auxiliary symbols:.,,, ( and ). Variables: we assume a countable

More information

Chapter 3 Deterministic planning

Chapter 3 Deterministic planning Chapter 3 Deterministic planning In this chapter we describe a number of algorithms for solving the historically most important and most basic type of planning problem. Two rather strong simplifying assumptions

More information

First-Order Logic. Chapter Overview Syntax

First-Order Logic. Chapter Overview Syntax Chapter 10 First-Order Logic 10.1 Overview First-Order Logic is the calculus one usually has in mind when using the word logic. It is expressive enough for all of mathematics, except for those concepts

More information

A Propositional Dynamic Logic for Instantial Neighborhood Semantics

A Propositional Dynamic Logic for Instantial Neighborhood Semantics A Propositional Dynamic Logic for Instantial Neighborhood Semantics Johan van Benthem, Nick Bezhanishvili, Sebastian Enqvist Abstract We propose a new perspective on logics of computation by combining

More information

Notes on BAN Logic CSG 399. March 7, 2006

Notes on BAN Logic CSG 399. March 7, 2006 Notes on BAN Logic CSG 399 March 7, 2006 The wide-mouthed frog protocol, in a slightly different form, with only the first two messages, and time stamps: A S : A, {T a, B, K ab } Kas S B : {T s, A, K ab

More information

Communication Errors in the π-calculus are Undecidable

Communication Errors in the π-calculus are Undecidable Communication Errors in the π-calculus are Undecidable Vasco T. Vasconcelos Department of Informatics Faculty of Sciences, University of Lisbon António Ravara Department of Mathematics Lisbon Institute

More information

Equational Logic. Chapter 4

Equational Logic. Chapter 4 Chapter 4 Equational Logic From now on First-order Logic is considered with equality. In this chapter, I investigate properties of a set of unit equations. For a set of unit equations I write E. Full first-order

More information

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events Massimo Franceschet Angelo Montanari Dipartimento di Matematica e Informatica, Università di Udine Via delle

More information

Basic System and Subsystem Structures in the Dataflow Algebra. A. J. Cowling

Basic System and Subsystem Structures in the Dataflow Algebra. A. J. Cowling Verification Testing Research Group, Department of Computer Science, University of Sheffield, Regent Court, 211, Portobello Street, Sheffield, S1 4DP, United Kingdom Email: A.Cowling @ dcs.shef.ac.uk Telephone:

More information

Halting and Equivalence of Program Schemes in Models of Arbitrary Theories

Halting and Equivalence of Program Schemes in Models of Arbitrary Theories Halting and Equivalence of Program Schemes in Models of Arbitrary Theories Dexter Kozen Cornell University, Ithaca, New York 14853-7501, USA, kozen@cs.cornell.edu, http://www.cs.cornell.edu/~kozen In Honor

More information

Automated Synthesis of Tableau Calculi

Automated Synthesis of Tableau Calculi Automated Synthesis of Tableau Calculi Renate A. Schmidt 1 and Dmitry Tishkovsky 1 School of Computer Science, The University of Manchester Abstract This paper presents a method for synthesising sound

More information

Expressing Security Properties Using Selective Interleaving Functions

Expressing Security Properties Using Selective Interleaving Functions Expressing Security Properties Using Selective Interleaving Functions Joseph Halpern and Sabina Petride August 8, 2008 Abstract McLean s notion of Selective Interleaving Functions (SIFs) is perhaps the

More information

A Goal-Oriented Algorithm for Unification in EL w.r.t. Cycle-Restricted TBoxes

A Goal-Oriented Algorithm for Unification in EL w.r.t. Cycle-Restricted TBoxes A Goal-Oriented Algorithm for Unification in EL w.r.t. Cycle-Restricted TBoxes Franz Baader, Stefan Borgwardt, and Barbara Morawska {baader,stefborg,morawska}@tcs.inf.tu-dresden.de Theoretical Computer

More information

MOST OF the published research on control of discreteevent

MOST OF the published research on control of discreteevent IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. 43, NO. 1, JANUARY 1998 3 Discrete-Event Control of Nondeterministic Systems Michael Heymann and Feng Lin, Member, IEEE Abstract Nondeterminism in discrete-event

More information

A Tableau Calculus for Minimal Modal Model Generation

A Tableau Calculus for Minimal Modal Model Generation M4M 2011 A Tableau Calculus for Minimal Modal Model Generation Fabio Papacchini 1 and Renate A. Schmidt 2 School of Computer Science, University of Manchester Abstract Model generation and minimal model

More information

APPLICATIONS OF BAN-LOGIC JAN WESSELS CMG FINANCE B.V.

APPLICATIONS OF BAN-LOGIC JAN WESSELS CMG FINANCE B.V. APPLITIONS OF AN-LOGIC JAN WESSELS CMG FINANCE.V. APRIL 19, 2001 Chapter 1 Introduction This document is meant to give an overview of the AN-logic. The AN-logic is one of the methods for the analysis of

More information

Metainduction in Operational Set Theory

Metainduction in Operational Set Theory Metainduction in Operational Set Theory Luis E. Sanchis Department of Electrical Engineering and Computer Science Syracuse University Syracuse, NY 13244-4100 Sanchis@top.cis.syr.edu http://www.cis.syr.edu/

More information

Existential Second-Order Logic and Modal Logic with Quantified Accessibility Relations

Existential Second-Order Logic and Modal Logic with Quantified Accessibility Relations Existential Second-Order Logic and Modal Logic with Quantified Accessibility Relations preprint Lauri Hella University of Tampere Antti Kuusisto University of Bremen Abstract This article investigates

More information

A semantic framework for open processes

A semantic framework for open processes Theoretical Computer Science 389 (2007) 446 483 www.elsevier.com/locate/tcs A semantic framework for open processes P. Baldan a, A. Bracciali b,, R. Bruni b a Dipartimento di Matematica Pura e Applicata,

More information

Nested Epistemic Logic Programs

Nested Epistemic Logic Programs Nested Epistemic Logic Programs Kewen Wang 1 and Yan Zhang 2 1 Griffith University, Australia k.wang@griffith.edu.au 2 University of Western Sydney yan@cit.uws.edu.au Abstract. Nested logic programs and

More information

Towards a Denotational Semantics for Discrete-Event Systems

Towards a Denotational Semantics for Discrete-Event Systems Towards a Denotational Semantics for Discrete-Event Systems Eleftherios Matsikoudis University of California at Berkeley Berkeley, CA, 94720, USA ematsi@eecs. berkeley.edu Abstract This work focuses on

More information

A Note on Scope and Infinite Behaviour in CCS-like Calculi p.1/32

A Note on Scope and Infinite Behaviour in CCS-like Calculi p.1/32 A Note on Scope and Infinite Behaviour in CCS-like Calculi GERARDO SCHNEIDER UPPSALA UNIVERSITY DEPARTMENT OF INFORMATION TECHNOLOGY UPPSALA, SWEDEN Joint work with Pablo Giambiagi and Frank Valencia A

More information

Consequence Relations and Natural Deduction

Consequence Relations and Natural Deduction Consequence Relations and Natural Deduction Joshua D Guttman Worcester Polytechnic Institute September 16, 2010 Contents 1 Consequence Relations 1 2 A Derivation System for Natural Deduction 3 3 Derivations

More information

Designing and Evaluating Generic Ontologies

Designing and Evaluating Generic Ontologies Designing and Evaluating Generic Ontologies Michael Grüninger Department of Industrial Engineering University of Toronto gruninger@ie.utoronto.ca August 28, 2007 1 Introduction One of the many uses of

More information

Uniform Schemata for Proof Rules

Uniform Schemata for Proof Rules Uniform Schemata for Proof Rules Ulrich Berger and Tie Hou Department of omputer Science, Swansea University, UK {u.berger,cshou}@swansea.ac.uk Abstract. Motivated by the desire to facilitate the implementation

More information

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw Applied Logic Lecture 1 - Propositional logic Marcin Szczuka Institute of Informatics, The University of Warsaw Monographic lecture, Spring semester 2017/2018 Marcin Szczuka (MIMUW) Applied Logic 2018

More information

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic Mathematics 114L Spring 2018 D.A. Martin Mathematical Logic 1 First-Order Languages. Symbols. All first-order languages we consider will have the following symbols: (i) variables v 1, v 2, v 3,... ; (ii)

More information

Alternating-Time Temporal Logic

Alternating-Time Temporal Logic Alternating-Time Temporal Logic R.Alur, T.Henzinger, O.Kupferman Rafael H. Bordini School of Informatics PUCRS R.Bordini@pucrs.br Logic Club 5th of September, 2013 ATL All the material in this presentation

More information

Automata Theory and Formal Grammars: Lecture 1

Automata Theory and Formal Grammars: Lecture 1 Automata Theory and Formal Grammars: Lecture 1 Sets, Languages, Logic Automata Theory and Formal Grammars: Lecture 1 p.1/72 Sets, Languages, Logic Today Course Overview Administrivia Sets Theory (Review?)

More information

Syntactic Characterisations in Model Theory

Syntactic Characterisations in Model Theory Department of Mathematics Bachelor Thesis (7.5 ECTS) Syntactic Characterisations in Model Theory Author: Dionijs van Tuijl Supervisor: Dr. Jaap van Oosten June 15, 2016 Contents 1 Introduction 2 2 Preliminaries

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

Preliminaries. Introduction to EF-games. Inexpressivity results for first-order logic. Normal forms for first-order logic

Preliminaries. Introduction to EF-games. Inexpressivity results for first-order logic. Normal forms for first-order logic Introduction to EF-games Inexpressivity results for first-order logic Normal forms for first-order logic Algorithms and complexity for specific classes of structures General complexity bounds Preliminaries

More information

Lecture 2: Syntax. January 24, 2018

Lecture 2: Syntax. January 24, 2018 Lecture 2: Syntax January 24, 2018 We now review the basic definitions of first-order logic in more detail. Recall that a language consists of a collection of symbols {P i }, each of which has some specified

More information

Separation of synchronous and asynchronous communication via testing

Separation of synchronous and asynchronous communication via testing Separation of synchronous and asynchronous communication via testing D. Cacciagrano Dipartimento di Matematica e Informatica, Università degli Studi di Camerino, Camerino, Italy F. Corradini Dipartimento

More information

Herbrand Theorem, Equality, and Compactness

Herbrand Theorem, Equality, and Compactness CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Herbrand Theorem, Equality, and Compactness The Herbrand Theorem We now consider a complete method for proving the unsatisfiability of sets of first-order

More information

arxiv: v1 [cs.cc] 5 Dec 2018

arxiv: v1 [cs.cc] 5 Dec 2018 Consistency for 0 1 Programming Danial Davarnia 1 and J. N. Hooker 2 1 Iowa state University davarnia@iastate.edu 2 Carnegie Mellon University jh38@andrew.cmu.edu arxiv:1812.02215v1 [cs.cc] 5 Dec 2018

More information

On the Expressive Power of Global and Local Priority in Process Calculi

On the Expressive Power of Global and Local Priority in Process Calculi On the Expressive Power of Global and Local Priority in Process Calculi Cristian Versari Nadia Busi Roberto Gorrieri Università di Bologna, Dipartimento di Scienze dell Informazione Mura Anteo Zamboni

More information

Cheat Sheet Equational Logic (Spring 2013) Terms. Inductive Construction. Positions: Denoting Subterms TERMS

Cheat Sheet Equational Logic (Spring 2013) Terms. Inductive Construction. Positions: Denoting Subterms TERMS TERMS Cheat Sheet Equational Logic (Spring 2013) The material given here summarizes those notions from the course s textbook [1] that occur frequently. The goal is to have them at hand, as a quick reminder

More information

Communicating and Mobile Systems

Communicating and Mobile Systems Communicating and Mobile Systems Overview:! Programming Model! Interactive Behavior! Labeled Transition System! Bisimulation! The π-calculus! Data Structures and λ-calculus encoding in the π-calculus References:!

More information

Lloyd-Topor Completion and General Stable Models

Lloyd-Topor Completion and General Stable Models Lloyd-Topor Completion and General Stable Models Vladimir Lifschitz and Fangkai Yang Department of Computer Science The University of Texas at Austin {vl,fkyang}@cs.utexas.edu Abstract. We investigate

More information

A Semantic Framework for Open Processes

A Semantic Framework for Open Processes A Semantic Framework for Open Processes P. Baldan (1), A. Bracciali (2), R. Bruni (2) (1) Dipartimento di Matematica Pura e Applicata, Università di Padova (Italy) baldan@math.unipd.it (2) Dipartimento

More information

cis32-ai lecture # 18 mon-3-apr-2006

cis32-ai lecture # 18 mon-3-apr-2006 cis32-ai lecture # 18 mon-3-apr-2006 today s topics: propositional logic cis32-spring2006-sklar-lec18 1 Introduction Weak (search-based) problem-solving does not scale to real problems. To succeed, problem

More information

Lecture Notes on Inductive Definitions

Lecture Notes on Inductive Definitions Lecture Notes on Inductive Definitions 15-312: Foundations of Programming Languages Frank Pfenning Lecture 2 September 2, 2004 These supplementary notes review the notion of an inductive definition and

More information

Foundations of Mathematics

Foundations of Mathematics Foundations of Mathematics Andrew Monnot 1 Construction of the Language Loop We must yield to a cyclic approach in the foundations of mathematics. In this respect we begin with some assumptions of language

More information

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1 Přednáška 12 Důkazové kalkuly Kalkul Hilbertova typu 11/29/2006 Hilbertův kalkul 1 Formal systems, Proof calculi A proof calculus (of a theory) is given by: A. a language B. a set of axioms C. a set of

More information

Characterization of Semantics for Argument Systems

Characterization of Semantics for Argument Systems Characterization of Semantics for Argument Systems Philippe Besnard and Sylvie Doutre IRIT Université Paul Sabatier 118, route de Narbonne 31062 Toulouse Cedex 4 France besnard, doutre}@irit.fr Abstract

More information

Supplementary Notes on Inductive Definitions

Supplementary Notes on Inductive Definitions Supplementary Notes on Inductive Definitions 15-312: Foundations of Programming Languages Frank Pfenning Lecture 2 August 29, 2002 These supplementary notes review the notion of an inductive definition

More information

Control Flow Analysis of Security Protocols (I)

Control Flow Analysis of Security Protocols (I) Control Flow Analysis of Security Protocols (I) Mikael Buchholtz 02913 F2005 Mikael Buchholtz p. 1 History of Protocol Analysis Needham-Schroeder 78 Dolev-Yao 81 Algebraic view of cryptography 02913 F2005

More information

arxiv: v1 [cs.lo] 8 Jan 2013

arxiv: v1 [cs.lo] 8 Jan 2013 Lloyd-Topor Completion and General Stable Models Vladimir Lifschitz and Fangkai Yang Department of Computer Science The University of Texas at Austin {vl,fkyang}@cs.utexas.edu arxiv:1301.1394v1 [cs.lo]

More information

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory Motivation CS389L: Automated Logical Reasoning Lecture 10: Overview of First-Order Theories Işıl Dillig Last few lectures: Full first-order logic In FOL, functions/predicates are uninterpreted (i.e., structure

More information

Lecture Notes on Inductive Definitions

Lecture Notes on Inductive Definitions Lecture Notes on Inductive Definitions 15-312: Foundations of Programming Languages Frank Pfenning Lecture 2 August 28, 2003 These supplementary notes review the notion of an inductive definition and give

More information

A Discrete Duality Between Nonmonotonic Consequence Relations and Convex Geometries

A Discrete Duality Between Nonmonotonic Consequence Relations and Convex Geometries A Discrete Duality Between Nonmonotonic Consequence Relations and Convex Geometries Johannes Marti and Riccardo Pinosio Draft from April 5, 2018 Abstract In this paper we present a duality between nonmonotonic

More information

Information Systems Business Process Modelling I: Models

Information Systems Business Process Modelling I: Models Information Systems 2 Information Systems 2 5. Business Process Modelling I: Models Lars Schmidt-Thieme Information Systems and Machine Learning Lab (ISMLL) Institute for Business Economics and Information

More information

Making functionality more general

Making functionality more general Making functionality more general Graham Hutton, University of Glasgow Ed Voermans, Eindhoven University of Technology March 23, 1992 Abstract The notion of functionality is not cast in stone, but depends

More information

The Process of Mathematical Proof

The Process of Mathematical Proof 1 The Process of Mathematical Proof Introduction. Mathematical proofs use the rules of logical deduction that grew out of the work of Aristotle around 350 BC. In previous courses, there was probably an

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

Primitives for authentication in process algebras

Primitives for authentication in process algebras Theoretical Computer Science 283 (2002) 271 304 www.elsevier.com/locate/tcs Primitives for authentication in process algebras Chiara Bodei a, Pierpaolo Degano a;, Riccardo Focardi b, Corrado Priami c a

More information

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas. 1 Chapter 1 Propositional Logic Mathematical logic studies correct thinking, correct deductions of statements from other statements. Let us make it more precise. A fundamental property of a statement is

More information

Analysing privacy-type properties in cryptographic protocols

Analysing privacy-type properties in cryptographic protocols Analysing privacy-type properties in cryptographic protocols Stéphanie Delaune LSV, CNRS & ENS Cachan, France Wednesday, January 14th, 2015 S. Delaune (LSV) Verification of cryptographic protocols 14th

More information

Overview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method

Overview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method Overview CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL Agenda for today: Semantic argument method for proving FOL validity Işıl Dillig Important properties of FOL

More information

COMPUTER SCIENCE TRIPOS

COMPUTER SCIENCE TRIPOS CST.2016.6.1 COMPUTER SCIENCE TRIPOS Part IB Thursday 2 June 2016 1.30 to 4.30 COMPUTER SCIENCE Paper 6 Answer five questions. Submit the answers in five separate bundles, each with its own cover sheet.

More information

On the Semantics of Parsing Actions

On the Semantics of Parsing Actions On the Semantics of Parsing Actions Hayo Thielecke School of Computer Science University of Birmingham Birmingham B15 2TT, United Kingdom Abstract Parsers, whether constructed by hand or automatically

More information

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes These notes form a brief summary of what has been covered during the lectures. All the definitions must be memorized and understood. Statements

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

Automated Support for the Investigation of Paraconsistent and Other Logics

Automated Support for the Investigation of Paraconsistent and Other Logics Automated Support for the Investigation of Paraconsistent and Other Logics Agata Ciabattoni 1, Ori Lahav 2, Lara Spendier 1, and Anna Zamansky 1 1 Vienna University of Technology 2 Tel Aviv University

More information

CS 395T. Probabilistic Polynomial-Time Calculus

CS 395T. Probabilistic Polynomial-Time Calculus CS 395T Probabilistic Polynomial-Time Calculus Security as Equivalence Intuition: encryption scheme is secure if ciphertext is indistinguishable from random noise Intuition: protocol is secure if it is

More information

Abstract model theory for extensions of modal logic

Abstract model theory for extensions of modal logic Abstract model theory for extensions of modal logic Balder ten Cate Stanford, May 13, 2008 Largely based on joint work with Johan van Benthem and Jouko Väänänen Balder ten Cate Abstract model theory for

More information

Encoding security protocols in the cryptographic λ-calculus. Eijiro Sumii Joint work with Benjamin Pierce University of Pennsylvania

Encoding security protocols in the cryptographic λ-calculus. Eijiro Sumii Joint work with Benjamin Pierce University of Pennsylvania Encoding security protocols in the cryptographic λ-calculus Eijiro Sumii Joint work with Benjamin Pierce University of Pennsylvania An obvious fact Security is important Cryptography is a major way to

More information

Lazy Strong Normalization

Lazy Strong Normalization Lazy Strong Normalization Luca Paolini 1,2 Dipartimento di Informatica Università di Torino (ITALIA) Elaine Pimentel 1,2 Departamento de Matemática Universidade Federal de Minas Gerais (BRASIL) Dipartimento

More information

1.3 Linear Dependence & span K

1.3 Linear Dependence & span K ( ) Conversely, suppose that every vector v V can be expressed uniquely as v = u +w for u U and w W. Then, the existence of this expression for each v V is simply the statement that V = U +W. Moreover,

More information

A process algebraic analysis of privacy-type properties in cryptographic protocols

A process algebraic analysis of privacy-type properties in cryptographic protocols A process algebraic analysis of privacy-type properties in cryptographic protocols Stéphanie Delaune LSV, CNRS & ENS Cachan, France Saturday, September 6th, 2014 S. Delaune (LSV) Verification of cryptographic

More information

Lecture 4. Algebra. Section 1:. Signature, algebra in a signature. Isomorphisms, homomorphisms, congruences and quotient algebras.

Lecture 4. Algebra. Section 1:. Signature, algebra in a signature. Isomorphisms, homomorphisms, congruences and quotient algebras. V. Borschev and B. Partee, September 18, 2001 p. 1 Lecture 4. Algebra. Section 1:. Signature, algebra in a signature. Isomorphisms, homomorphisms, congruences and quotient algebras. CONTENTS 0. Why algebra?...1

More information

Canonical Calculi: Invertibility, Axiom expansion and (Non)-determinism

Canonical Calculi: Invertibility, Axiom expansion and (Non)-determinism Canonical Calculi: Invertibility, Axiom expansion and (Non)-determinism A. Avron 1, A. Ciabattoni 2, and A. Zamansky 1 1 Tel-Aviv University 2 Vienna University of Technology Abstract. We apply the semantic

More information

Formalising the π-calculus in Isabelle

Formalising the π-calculus in Isabelle Formalising the π-calculus in Isabelle Jesper Bengtson Department of Computer Systems University of Uppsala, Sweden 30th May 2006 Overview This talk will cover the following Motivation Why are we doing

More information

One Year Later. Iliano Cervesato. ITT Industries, NRL Washington, DC. MSR 3.0:

One Year Later. Iliano Cervesato. ITT Industries, NRL Washington, DC.  MSR 3.0: MSR 3.0: The Logical Meeting Point of Multiset Rewriting and Process Algebra MSR 3: Iliano Cervesato iliano@itd.nrl.navy.mil One Year Later ITT Industries, inc @ NRL Washington, DC http://www.cs.stanford.edu/~iliano

More information

Completeness Proof Strategies for Euler Diagram Logics

Completeness Proof Strategies for Euler Diagram Logics Completeness Proof Strategies for Euler Diagram Logics Jim Burton, Gem Stapleton, and John Howse Visual Modelling Group, University of Brighton, UK {j.burton,g.e.stapleton,john.howse}@brighton.ac.uk Abstract.

More information

Equivalence of Algebraic λ -calculi extended abstract

Equivalence of Algebraic λ -calculi extended abstract Equivalence of Algebraic λ -calculi extended abstract Alejandro Díaz-Caro LIG, Université de Grenoble, France Alejandro.Diaz-Caro@imag.fr Christine Tasson CEA-LIST, MeASI, France Christine.Tasson@cea.fr

More information

Complete Partial Orders, PCF, and Control

Complete Partial Orders, PCF, and Control Complete Partial Orders, PCF, and Control Andrew R. Plummer TIE Report Draft January 2010 Abstract We develop the theory of directed complete partial orders and complete partial orders. We review the syntax

More information

MAGIC Set theory. lecture 1

MAGIC Set theory. lecture 1 MAGIC Set theory lecture 1 David Asperó University of East Anglia 15 October 2014 Welcome Welcome to this set theory course. This will be a 10 hour introduction to set theory. The only prerequisite is

More information

Efficient Algorithms for Checking the Atomicity of a Run of Read and Write Operations

Efficient Algorithms for Checking the Atomicity of a Run of Read and Write Operations 1 Acta Informatica (Springer-Verlag) 32, pp.155-170, 1995 Efficient Algorithms for Checking the Atomicity of a Run of Read and Write Operations Lefteris M. Kirousis 1,2,3 Andreas G. Veneris 4,5 January

More information

Krivine s Intuitionistic Proof of Classical Completeness (for countable languages)

Krivine s Intuitionistic Proof of Classical Completeness (for countable languages) Krivine s Intuitionistic Proof of Classical Completeness (for countable languages) Berardi Stefano Valentini Silvio Dip. Informatica Dip. Mat. Pura ed Applicata Univ. Torino Univ. Padova c.so Svizzera

More information

Denotational Semantics

Denotational Semantics 5 Denotational Semantics In the operational approach, we were interested in how a program is executed. This is contrary to the denotational approach, where we are merely interested in the effect of executing

More information

A Unified Framework for Representing Logic Program Updates

A Unified Framework for Representing Logic Program Updates A Unified Framework for Representing Logic Program Updates Yan Zhang School of Computing & Information Technology University of Western Sydney NSW 1797 Australia E-mail: yan@cit.uws.edu.au Norman Foo School

More information

Deductive Algorithmic Knowledge

Deductive Algorithmic Knowledge Deductive Algorithmic Knowledge Riccardo Pucella Department of Computer Science Cornell University Ithaca, NY 14853 riccardo@cs.cornell.edu Abstract The framework of algorithmic knowledge assumes that

More information