A chemical abstract machine for graph reduction Alan Jeffrey
|
|
- Neal Lynch
- 6 years ago
- Views:
Transcription
1 UNIVERSITY OF SUSSEX COMPUTER SCIENCE A chemical abstract machine for graph reduction Alan Jeffrey Report 3/92 August 1992 Computer Science School of Cognitive and Computing Sciences University of Sussex Brighton BN1 9QH ISSN
2 A chemical abstract machine for graph reduction ALAN JEFFREY ABSTRACT. Graph reduction is an implementation technique for the lay λ-calculus. It has been used to implement many non-strict functional languages, such as lay ML, Gofer and Miranda. Parallel graph reduction allows for concurrent evaluation. In this paper, we present parallel graph reduction as a Chemical Abstract Machine, and show that the resulting testing semantics is adequate wrt testing equivalence for the lay λ-calculus. We also present a π-calculus implementation of the graph reduction machine, and show that the resulting testing semantics is also adequate. 1 Introduction The lay reduction strategy for the λ-calculus investigated by ABRAMSKY (1989) has only two reduction rules: λxeµf EFx E E ¼ EF E ¼ F This can be compared with the full evaluation strategy of BARENDREGT (1984): λxeµf EFx E E ¼ EF E ¼ F F F ¼ EF EF ¼ E E ¼ λxe λxe ¼ If the full evaluation strategy can terminate, then the lay evaluation strategy will. For example, if we define: à λxyx Á λxx λx λyx yyµµ λyx yyµµµ then Á but ÃÁ Áµ, whereas ÃÁ Áµ. However, the lay evaluation strategy is very inefficient, since it may duplicate arguments when applying a function. For example, if we define: 0 Á i 1 λxxxµi Copyright c 1992 Alan Jeffrey. Author s address: COGS, University of Sussex, Brighton BN1 9QH, UK. alanje@cogs.sussex.ac.uk This work was supported by SERC project GR/H Miranda is a trademark of Research Software Limited.
3 2 Alan Jeffrey Then i 2i Á but i 2i 1 2 Á, that is the lay strategy can be exponentially worse than the full strategy. Thus, the early functional languages, such as LISP (MCCARTHY et al., 1962) used a strict reduction scheme rather than the lay reduction scheme. Graph reduction was introduced by WADSWORTH (1971) as a means of efficiently implementing the lay reduction strategy. Rather than reducing syntax trees, we reduce syntax graphs which allows a more efficient representation of sharing. For example, we can represent the reduction of i 1 x x i Á Á Graph reduction has been used to implement non-strict functional languages such as JOHNSSON s lay ML (1984), JONES s Gofer (1992) and TURNER s Miranda (1985). It is discussed in PEYTON JONES s textbook (1987). However, there has been little work in the formal semantics of graph reduction. BARENDREGT et al. (1987) have shown that graph reduction is sound and complete with respect to term reduction. LESTER (1989) has shown that the G-machine of AUGUSTSSON (1984) and JOHNSSON (1984) is adequate wrt a denotational model of the lay λ-calculus. In this paper, we provide an alternative presentation of graph reduction, as a Chemical Abstract Machine (CHAM), in the style of BERRY and BOUDOL (1990). The CHAM was introduced as a way of presenting the operational semantics of parallel languages in a clean fashion. It has been used to give a semantics for MILNER s CCS (1989) and MILNER, PARROW and WALKER s π-calculus (1989). Here, we shall give a semantics for parallel graph reduction with blocking, as described by PEYTON JONES (1987). We will show that this is an adequate semantics for the lay λ-calculus, and that it can be implemented in a variant of the π-calculus. 2 The lay lambda-calculus The λ-calculus, introduced by CHURCH (1941), has the following syntax: E :: x EE λxe where x ranges over an infinite set of variables. This can be given a number of operational semantics, but we shall only look at two of these. We shall call these
4 the lay semantics: and the full semantics: λxeµf EFx A CHAM for graph reduction 3 λxeµf EFx E E ¼ EF E ¼ F E E ¼ EF E ¼ F F F ¼ EF EF ¼ E E ¼ λxe λxe ¼ Here, EFx is E, with every free occurrence of x replaced by F, up to the usual renaming of bound variables. PROPOSITION If E E ¼ and E E ¼¼ then E ¼ E ¼¼. 2. If E and E E ¼ then E ¼. 3. If E µ then E. PROOF. Part 1 is a simple induction. Part 2 follows from Theorem of BARANDREGT (1984), since E E ¼ is the leftmost full reduction of E. Part 3 follows from Theorem of BARANDREGT (1984). ¾ We can define a variant of MORRIS s testing pre-order (BARENDREGT, 1984, Exercise ): E Ú F iff C CF µ CE We can also define a variant of the λ-calculus with recursive declarations and strictness annotations: Here: M :: x xy λxm Öx : D Ò M D ::?M!M Öx :?M ÒN declares x recursively to be M in the context N. For example, a fixed point of f is Öx :? f Ò Öy :?xy Ò y. Öx :!M Ò N is the same, except that x is strict in N, and so evaluation of M can be sparked off as a parallel computation. We shall let bound variables be α-converted. The free variables of M are fv M: fvx x fv xyµ xy fv λxmµ fvm Ò x fv Öx : D ÒMµ fvd fvmµ Ò x fv!mµ fvm fv?mµ fvm
5 4 Alan Jeffrey There is a translation from the λ-calculus to the λ-calculus with Ö: x x EF Öx :!E Ò Öy :?F Ò xy λxe λxe Note that in the translation of EF, we know that E will be used, and so it can be evaluated strictly. On the other hand, we do not know if F will be used or not, so it cannot be annotated. 3 The chemical abstract machine The Chemical Abstract Machine (CHAM) of BERRY and BOUDOL (1990) is a way of presenting the operational semantics of parallel systems. We shall use it to give a semantics for parallel graph reduction of the λ-calculus with Ö. A CHAM gives reductions between solutions, which are multisets (or bags) of molecules. The definition of molecules is specific to each CHAM, but a solution can always be regarded as a molecule. In such a molecule, m 1 m n, the multiset brackets are called a membrane. There are three types of reduction: Heating rules, of the form S S ¼. Cooling rules, of the form S S ¼. Reaction rules, of the form S S ¼. Heating and cooling rules are always given in pairs S µ S ¼, whereas reaction rules are irreversible. We shall write µ for the transitive, reflexive, symmetric closure of µ, write for µ µ, and let µ range over, and. All CHAMs have the following structural rules, where m is a molecule containing precisely one hole: S µ S ¼ S S ¼¼ µ S ¼ S ¼¼ S µ S ¼ ms µ ms ¼ In addition, the CHAMs we shall consider in this paper allow the outermost membrane of any solution to be ignored. This allows us to write m 1 m n µ m ¼ 1 m¼ n ¼ for m 1 m n µ m ¼ 1 m¼ n ¼ : S µ S The molecules and reduction rules are specific to each CHAM. In the case of the graph reduction CHAM, molecules are defined: The free variables of m are fvm: m :: x : D S νxs fv x : Dµ x fvd
6 The defined variables of m are dvm: A CHAM for graph reduction 5 fvm 1 m n fvm 1 fvm n fv νxmµ fvm Ò x dv x : Dµ x dvm 1 m n dvm 1 dvm n dv νxmµ dvm Ò x We shall only consider solutions which do not define any variables twice, so in any solution m 1 m n, the defined variables of each m i are distinct. For example, we do not allow solutions such as νxx :!λwmx :!λwny :!xw which could reduce nondeterministically to y :!M or to y :!N. If x x 1 x n then we can write νxm for νxm and ν xm for νx 1 νx n m. Define: a molecule is a positive ion with valency x iff it is x :?M or x :!λym. a molecule is a negative ion with valency y iff it is x :!y or x :!y. a molecule is ionic iff it is a positive or negative ion. a solution is plasmic iff it is νỹm 1 m n or m 1 m n where each m i is ionic. A plasma is positive (negative) iff it contains only positive (negative) ions Plasmas can be regarded as graphs, for example the graph reduction:!λx!x?x? i? ² º? i? ² º! i 7i? ² º!λx!x!λx?!x!λx!x?!λx!x!λx!x!λx!x!λx!x
7 6 Alan Jeffrey is represented by the CHAM reduction: In these diagrams: νxy :!xyy :? ix :!λwww νuvy :!uvy :? iv :?yu :!y νuvy :!uvy :! iv :?yu :!y 7i νuvy :!uvy :! Áv :?yu :!y νuvy :!uvy :! Áv :?yu :! Á νvy :!vy :! Áv :?y νvy :!vy :! Áv :!y νv :!vv :! Á :! Á Tagged nodes x :!M are labelled with a!. Untagged nodes x :?M are labelled with a?. Application nodes x : y are labelled with Indirection nodes x : y are labelled with a y, if y is free, and with otherwise. Function nodes x : λym are labelled with a λy, and have the graph for :!M drawn beneath them, for some fresh variable. The supercombinators of HUGHES (1984) can be regarded as a form of solution. PEYTON JONES (1987) presents supercombinators as a collection of definitions, plus a variable to be evaluated. These are drawn: Definitions Variable These can be regarded as solutions. For example, the supercombinator program: is equivalent to the solution: $X 0 x 0 E 0 $X 1 x 1 E 1.. $X n x n E n $X 0 νx 0 X n X 0 :!λ x 0 E 0 X 1 :?λ x 1 E 1 X n :?λ x n E n The most important heating rule allows recursive declarations to become part of a solution, whilst hiding the bound variable. This is only valid when it would
8 A CHAM for graph reduction 7 not cause the free variable x to become bound by y, which we can achieve by α-converting y first. x :! Öy : D ÒM µ νyx :!My : D x yµ The scope of a hidden variable can migrate, as long as this does not result in variable capture: mνxm ¼ µ νxmm ¼ x ¾ fvmµ Hidden variables may be α-converted, exchanged and evaporated: νxm µ νy myx µ νxym µ νyxm νx µ y ¾ fvmµ Finally, we can perform garbage collection on positive plasmas, since a hidden positive plasma can never make any reductions: ν x x : D µ x : D is a positive plamaµ We shall sometimes write µ γ for this thermal action, and µγ for any other thermal action. For example, the graph reduction:!á?á?á can be derived: νyxx :!Áy :?Á :!xy νyxx :!Áy :?Á :!y νyxx :!Áy :?Á :!y νyνxx :!Á y :?Á :!y γ νyy :?Á :!y νyy :?Á :!y A reaction can occur whenever one positive and one negative ion with the same valency exist in a solution. Since there are two kinds of positive ion and two kinds of negative ion, there are four reaction rules. The first two allow untagged molecules to become tagged: x :!yy :?M x :!yy :!M x :!yy :?M x :!yy :!M
9 8 Alan Jeffrey These can be drawn:?m!m º?M º!M This models the first phase of graph reduction we search along the spine of a graph, tagging nodes for evaluation. Note that strict reactions do not occur: x :!y :?M x :!y :!M If a tagged indirection node points to a function, we can just copy the function. The SKIM (STOYE et al., 1984) and G-machine (JOHNNSON, 1984) use this as a method of eliminating indirection nodes. It was shown by LESTER (1989) to be adequate: This can be drawn: x :!yy :!λwm x :!λwmy :!λwm!λwm!λwm!λwm If an application node points to a function, it can be β-reduced: This can be drawn: x :!yy :!λwm x :!Mw y :!λwm!λw N M w w M!λw ²º M N w w We shall sometimes write β for this reaction, and β for any other reaction. This CHAM is summaried in Table 1. This CHAM implements the algorithm for parallel graph reduction described by PEYTON JONES (1987). A process is assigned to evaluating a node, which is tagged. It then searches along the spine, tagging each node as it passes. If
10 A CHAM for graph reduction 9 S µ S x :! Ö y : D Ò M µ νyx :!My : D x yµ mνxm ¼ µ νxmm¼ x ¾ fvmµ νxm µ νy myx µ νxym µ νyxm νx µ ν x x : D µ x :!yy :?M x :!yy :!M x :!yy :?M x :!yy :!M y ¾ fvmµ x :!yy :!λwm x :!λwmy :!λwm x : D is a positive plasmaµ x :!yy :!λwm x :!Mw y :!λwm TABLE 1. Summary of the graph reduction CHAM it reaches a function node which can be β-reduced, it does so. If it reaches a function node which cannot be β-reduced, this is returned as the result. If it reaches a previously tagged application or indirection node, it is blocked until the tagged node is evaluated. For example, in the graph: x ²?M?N only one process will evaluate M. This is mirrored in the CHAM by the fact that M will only be reduced once. However, this algorithm produces some surprising results with cyclic graphs. The solution y :! Öx :!x Ò x heats to become the plasma νxy :!xx :!x and the graph: y This has no reductions, because it is negative. This is mirrored in the parallel graph reduction algorithm, since the process evaluating y will discover that the indirection node at x has already been tagged. Thus, it is possible for evaluations to deadlock, when a sequential algorithm would diverge. Our translation of the λ-calculus will not produce cyclic graphs, although it
11 10 Alan Jeffrey can still produce divergent terms. For example, the translation of λxxxµ λxxxµ has the reductions: λx λx x x x x λx x x λx x x Since E has no tight loops, we will be able to show that the CHAM semantics for the λ-calculus is adequate. To do this, we define the testing preorder on molecules: m Ú m ¼ iff C Cm ¼ µ Cm and show in the next section that the CHAM semantics is adequate, that is if x :?Eµ Ú x :?Fµ then E Ú F. PROPOSITION For any S there is a plasmic S ¼ such that S γ S ¼. 2. If S is plasmic and S S ¼ then S µ S ¼. 3. S S ¼ iff S γ µ S ¼ 4. S γ µ iff S 5. S β iff S βγ 6. S β 7. If S S ¼ and S S ¼¼ then S ¼ µ S ¼¼ or S ¼ S ¼¼¼ and S ¼¼ S ¼¼¼. 8. S iff S PROOF. 1. Prove by induction on S. 2. Prove by case analysis that if S is plasmic and S µ S ¼ then S µ S ¼. Then show by induction on µ that if S µ S ¼ that S µ S ¼. 3. If S S ¼ then by parts 1 and 2, S γ S¼¼ µ S ¼ for some plasmic S ¼¼. Thus S γ µ S ¼. 4. If S then define S i by induction: S 0 S. Assuming S i, S i S ¼, so by part 3, S i γ γ S i 1 µ S ¼, so S i 1.
12 A CHAM for graph reduction 11 Thus, S S 0 γ S 1 γ and so S implies S γ µ. The reverse implication is trivial. 5. Is proved similarly. 6. Define #m by: Then: #m 1 m n #m 1 #m n # νxmµ #m # x : Dµ #D #!Mµ #M #?Mµ #M 1 # λxmµ 0 #y 1 #y 1 # Öx : D Ò Mµ #D #M S µγ S ¼ µ #S #S ¼ S β S ¼ µ #S #S ¼ Thus, S βγ, so by part 5, S β. 7. Show by case analysis that if S is plasmic and S S ¼ and S S ¼¼ then S ¼ S ¼¼ or S ¼ S ¼¼¼ and S ¼¼ S ¼¼¼. Then for any S, if S S ¼ and S S ¼¼ then by parts 1 and 2 there is a plasmic S 1 such that S µ S 1 S1 ¼ µ S ¼ and S 1 S1 ¼¼ µ S ¼¼. Then either S1 ¼ S¼¼ 1, so µ S¼ S ¼¼, or S1 ¼ S¼¼¼ and S1 ¼¼ S¼¼¼, so S ¼ S ¼¼¼ and S ¼¼ S ¼¼¼. 8. If S and S then we must have: Then for 0 i j n 1, define S i j S S 0 0 S0 1 S0 n S0 n 1 S S 0 0 S1 1 Sn n If S i j 1 1 µ S i j 1 then let Si j Si j 1. Otherwise, S i 1 j 2 Si 1 j 1 such that S i 1 j 1 Si j and Si j 1 Si j. such that Si 1 j 1 Si j and Si j 1 Si j : and Si 1 j 2 Si j 1 so by part 7, we can find Si j Then Sn n Sn 1 n which contradicts our hypothesis. Thus, if S then S. ¾ Note that Proposition 2.7 shows that this CHAM is Church-Rosser.
13 12 Alan Jeffrey 4 The CHAM semantics is adequate MILNER, PARROW and WALKER (1989) have shown a very close relationship between the lay reduction strategy and their translation of the λ-calculus into the π-calculus, that E F iff E F. This is not be true of the CHAM semantics for graph reduction, where there is no one-to-one correspondence between CHAM reductions and λ-calculus reductions. For example, the CHAM reduction: x?@?e?g?f x?e?g?f corresponds to the null reduction GFE 0 GFE, and the CHAM reduction:!λx x!λx x corresponds to ÁÁ ÁÁµ ÁÁ. In general, each CHAM reduction S β S ¼ corresponds to a λ-calculus reduction E 0 E, and each CHAM reduction S β S ¼ corresponds to a λ-calculus reduction E E ¼. In order to formalie this, we need to know when a CHAM solution can implement a λ-term. For example, some possible implementations of ÁÁ ÁÁµ are: x! Á! Á! Á! Á x! Á! Á x! Á! Á! Á x! Á We will write S M» E iff M implements E in the solution S. For example, S x» ÁÁ ÁÁµ for any of the above solutions. S M» E is defined in Table 2. PROPOSITION 3.
14 A CHAM for graph reduction 13 xµ S x» x x ¾ dvs S x» E S y» F xyµ S xy» EF S M» E λxµ x ¾ fvs S λxm» λxe S M» E νxµ x ¾ fvme νxs M» E µ S M» E S ¼ M» E S¼ S Sx :!M N» E?µ Sx :?M N» E Sx :!M x» E : Eµ x ¾ fvems S M» E S M» E : Iµ x ¾ fvems Sx :!M x» E TABLE 2. The definition of S M» E. 1. If S M» E and S M» F then E F. 2. If Sx :!y x» E then S y» F, S» G and E FG. 3. If Sx :!λym x» E then S M» F and E λyf. 4. If νxs M» E and x ¾ fvme then S M» E 5. If Sx :!M x» E and Sx :!M N» F then S N» G and F GEx. 6. If Sx :!yy :!M N» E then Sx :!My :!M N» E. 7. If x ¾ fve then x :!E x» E. PROOF. 1. First, prove by induction on the proof of S x»e that if x ¾ dvs and S x»e then E x. Then prove by induction on the proof of S M» E that if S M»E and S M»F then E F. The only tricky case is if S M»E follows from xµ, in which case M E x, and since S x» F the above gives that F x. 2. Prove by induction on the proof that if ν w Sx :!yµ x» E or S y» E then S y» F and S» G and E FG. 3. Prove by induction on the proof that if ν w Sx :!λymµ x» E or S λym»e then for any, Sy M»F and E λyf. The only tricky case is if S λym»e follows from νyµ, in which case S νys ¼ and S ¼ λym»e. By induction, S ¼ uy M» F and E λyf for some fresh u, so by νuµ, νu S ¼ uy µ M»F so by µ, νys ¼ M»F, so S M»F, so since y ¾ fvs,
15 14 Alan Jeffrey Sy M» F. 4. Prove by induction on the proof of ν xxs M» E that if ν xxs M» E and x ¾ fvme that ν xs M» E. 5. Prove by induction on the proof of ν w Sx :!Mµ N»F that if ν w Sx :!Mµ x» E and ν w Sx :!Mµ N» F then S N» G and F GEx. 6. First, prove by induction on the proof of S M» E that if y ¾ fvems and S M» E then Sy :!N M» E. Then prove by induction on the proof of S M» E that if ν w Sx :!yy :!Mµ N» E then Sx :!My :!M N» E and if ν w Sy :!Mµ y» E then Sy :!M M» E. 7. Proved by induction on E. ¾ However, the definition of S M» E ignores whether declarations are tagged or untagged. In order to reason about the reductions of a solution, we shall need to take tagging into account. The sequence x 0 : D 0 x n : D n is an x-spine in S iff: S µ νỹ x : DS ¼ where x x 0 and each x i : D i is a negative ion with valency x i 1. The variable x is lay in a plasma S iff the negative ions of S form an x-spine. The variable x is always lay in S iff for any S S ¼, x is lay in S ¼. For example, the -spine of the plasma: which can be drawn: νỹ :! 0 0 :! 1 y 1 n 1 :! n y n n :?My 0 :?N 1 y n :?N n...?n 1 º?M?N n is :! 0 0 :! 1 y 1 n 1 :! n y n. Since these are the only negative ions, this solution is lay. PROPOSITION 4. x is always lay in x :!E.
16 A CHAM for graph reduction 15 PROOF. Define x is invariantly lay (or i-lay) in S by: x is i-lay in If x is i-lay in S and x y then x is i-lay in νys If y is i-lay in S then x is i-lay in x :!ys. If y is i-lay in S then x is i-lay in x :!ys. If x is i-lay in S and y is i-lay in y :!M then x is i-lay in y :?MS. If x is i-lay in S and for all, y is i-lay in y :!Mw then x is i-lay in y :!λwms. If x is i-lay in S and S µ S ¼ then x is i-lay in S ¼. Then we can prove: If x is i-lay in S then x is lay in S. If x is i-lay in S and S S ¼ then x is i-lay in S ¼. x is i-lay in x :!E. Thus, if x is i-lay in S then x is always lay in S, and so x is always lay in x :!E. ¾ Then we can show the important properties, that link CHAM reductions to λ- calculus reductions. PROPOSITION 5. If S x» E and x is always lay in S then: 1. If S β S ¼ then S ¼ x» E. 2. If S β S ¼ then E E ¼ and S ¼ x» E ¼. 3. If E E ¼ then S β β S ¼, E ¼ E ¼¼ and S ¼ x» E ¼¼. PROOF. 1. If: then S ¼ x» E. If: then S ¼ x» E. If: S µ νỹu :!vv :?M S ¼ µ νỹu :!vv :!M S µ νỹu :!vwv :?M S ¼ µ νỹu :!vwv :!M S µ νỹu :!vv :!λym S ¼ µ νỹu :!λymv :!λym then S ¼ x» E. These are the only three rules for S β S ¼, so S ¼ x» E 2. Since x is lay in S, and S β S ¼, we know that: S µ ν x n 1 :!λwms ¼¼
17 16 Alan Jeffrey S ¼ µ ν x n 1 :!My n w S ¼¼ S ¼¼ µ x 0 :!M 0 x n :!M n M i x i 1 or x i 1 y i 1 x 0 x We shall prove the case when each M i x i 1 y i 1, since indirection nodes make little difference. By Propositions 3.4, 3.2 and 3.3 we have: and by Proposition 3.5: So: Since λwfµf n FF n w : so: E λwfµf n F 0 x n 1 :!λwms ¼¼ x i» λwfµf n F i x n 1 :!λwms ¼¼ M» F x n 1 :!λwms ¼¼ y i» F i S ¼¼ x n 1» λwf S ¼¼ y i» G i S ¼¼ y n» F n S ¼¼ x i» λwfµf n G n 1 G i F i G i λwfµf n x n S ¼ M» F S ¼ My n w» FF n w S ¼ x n» FF n w S ¼ y n» F n S ¼ y i» H i S ¼ x i» FF n w H n 1 H i S ¼ x» E ¼ H i G i FF n w x n E ¼ FF n w H n 1 H 0 F i G i λwfµf n x n G i FF n w x n H i Thus, S ¼ x» E ¼ and E E ¼. E λwfµf n F 0 FF n w F n 1 F 0 FF n w H n 1 H 0 E ¼
18 3. Define S i by induction: S 0 S. A CHAM for graph reduction 17 Let S i ν x 0 : D 0 x m : D m and let x 0 x n be the x-spine of S i. If D n 1?M then define: S i 1 ν x 0 : D 0 x n : D n x n 1 :!Mx n 2 : D n 2 x m : D m so S i β S i 1. If D n!x n 1 and D n 1!λwM then define: S i 1 ν x 0 : D 0 x n 1 : D n 1 x n : D n 1 x n 1 : D n 1 x m : D m so S i β S i 1. If D n!x n 1 y and D n 1!λwM then define: so S i β S ¼. Thus, either S β S ¼ ν x 0 : D 0 x n 1 : D n 1 x n :!Myw x n 1 : D n 1 x m : D m (which is impossible, by Proposition 2.6) or S β β S ¼. By parts 1 and 2, E E ¼¼¼ E ¼¼ and S ¼ x» E ¼¼. Since E E ¼ and E E ¼¼¼, by Proposition 1.1 E ¼ E ¼¼¼, and so E E ¼ E ¼¼. ¾ From the above propositions, we can show that a λ-term diverges iff its CHAM implementation diverges. PROPOSITION 6. If x ¾ fve then E iff x :!E PROOF. µ Define S i and E i by induction: S 0 x : E and E 0 E. By induction, S i x» E i and E i. Then by Proposition 5.3, S i S i 1, E i E i 1 and S i 1 x»e i 1. By Proposition 1.2, since E i, we know E i 1. Thus x :!E S 0 S 1 S 2. Since x :!E, by Proposition 2.6: so by Propositions 5.1 and 5.2: x :!E S 0 β β S 1 β β E E 0 E 1 so E µ, so by Proposition 1.3, E. ¾
19 18 Alan Jeffrey Thus, we can show that the CHAM semantics is adequate. THEOREM 7 (ADEQUACY). If x :?Eµ Ú x :?Fµ then E Ú F. PROOF. For any context C: Thus, E Ú F. CF µ λwcw µf µ :! λwcw µf µ νxy :!yxy :!λwcw x :?F µ νxy :!yxy :!λwcw x :?E µ :! λwcw µe µ λwcw µe µ CE However, it is not fully abstract. THEOREM 8. E Ú F does not imply x :?Eµ Ú x :?Fµ. PROOF. The CHAM semantics is not fully abstract because we can define ABRAM- SKY s (1989) combinator in the λ-calculus with Ö: λy Öx :!y Ò Á cannot be defined in the λ-calculus, and provides extra testing power to the λ-calculus with Ö. Define: E λxx λyxyµ F λxx xµ λx õ Á C νxy y :! :!xy ONG (1988, Theorem ) has shown that E and F are applicative bisimilar (ABRAMSKY, 1989) and so E Ú F. However: Cx :?E :! Cx :?F νxyx :!y :!x :! Thus, by Proposition 2.8, Cx :?E, so x :?Eµ Ú x :?Fµ. It is an open problem as to whether the CHAM semantics is fully abstract wrt the λ-calculus with, and as to whether the canonical semantics for the lay λ-calculus D ³ D Dµ is adequate wrt the CHAM semantics. ¾ ¾
20 A CHAM for graph reduction 19 S µ S P Q µ PQ νxp µ νxp mνxm ¼ µ νxmm ¼ x ¾ fvmµ νxm µ νy myx µ νxym µ νyxm νxxm µ νxm x x P µ P x y P µ P x yµ y ¾ fvmµ A xµ µ P xỹ A ỹµ def Pµ xy x vwµp Pyvw 5 The asynchronous pi-calculus TABLE 3. CHAM for the π-calculus The π-calculus, introduced by MILNER, PARROW and WALKER (1989) is a process algebra in which scope is considered important. MILNER has shown that it can be used to model pointer-structures (1991) and the lay λ-calculus (1992), which has been further investigated by SANGIORNI (1991). Since the π-calculus was designed with pointer structures and the λ-calculus in mind, it seems natural to use it to encode a parallel graph reduction algorithm. We shall consider a variant of BOUDOL s asynchronous π-calculus (1992). This has the syntax: Here: P :: xy x yµp P P νxp x y P x y P A xµ xy is the process which outputs the pair yµ along channel x. x yµp is the process which inputs a pair y ¼ ¼ µ along channel x, then behaves like Px ¼ xy ¼ y. P Q places P and Q in parallel. νxp creates a new channel x for use in P. x y P acts like P whenever x y, and deadlocks otherwise. x y P acts like P whenever x y, and deadlocks otherwise. A xµ is a recursive definition, in the style of MILNER (1989). We shall assume an environment of definitions A xµ def P, where fv P x. The CHAM for this variant of the asynchronous π-calculus is given in Table 3, and is very similar to BOUDOL s CHAM for the asynchronous π-calculus (1992). The only new rules are: S µ S, which is missing from BOUDOL s paper. This rule is required to
21 20 Alan Jeffrey prove the result that for any solution S there is a process P such that S µ P. For example, we cannot show xy µ xy without this rule. x x P µ P and x y P µ P whenever x y, which gives semantics for the conditional operators missing from BOUDOL s paper. A xµ µ P xỹ whenever A ỹµ def P, which gives semantics for recursive definitions which were not used in BOUDOL s paper. We can define much of the same vocabulary for this CHAM as we did for the graph reduction CHAM. In Proposition 10 we shall see that this abuse of notation is justified. A molecule is a positive ion with valency x iff it is x yµp. A molecule is a negative ion with valency x iff it is xy. A molecule is ionic iff it is a positive or negative ion. A solution is plasmic iff it is ν xp 1 P n or P 1 P n and each P i is ionic. A plasma is positive (negative) iff it contains only positive (negative) ions. We can give a translation of each molecule of the graph reduction CHAM into the π-calculus. This uses a special variable, which we shall use to represent a function which is being evaluated, but which has not (yet) been given an argument. The semantics for terms is: x def x xy def xy λxm def! xyµ x λxmy x Myµ Öx : D ÒM def νx Dx Mµ x µ where MILNER s (1991) replication operator is defined:!p def!p P Note that the definition of λxm is recursive, which is why we are taking recursion to be primitive, rather than replication. It is not obvious whether one could define semantics using replication for which Proposition 11 would hold. Note also that Öx : D Ò M is defined only when x, but we can use α-conversion on x to assure this. The semantics for declarations is: The semantics for molecules is:!m def M?M def xyµ xy Mµ x : D def Dx
22 !λxxx A CHAM for graph reduction 21? i?! i! Á?! Á 7i?? i?! Á?! Á! Á! Á TABLE 4. A sample graph reduction in the π-calculus νxm def νxm m 1 m n def m 1 m n! Á This semantics can be drawn with process graphs. For example, if we draw: D for D «Å «for!x x Å? for?x x Å «x y for!xy «Å?@ x y for?xy Then the reduction of i given on page 5 can be drawn (with some extraneous processes removed to account for garbage collection) in Table 4. This is exactly the same reduction as given on page 5. In general, we can show that each CHAM reduction is matched by exactly one π-calculus reduction, and thus that a CHAM solution diverges iff its π-calculus semantics diverges. This will allow us to show that the π-calculus semantics is adequate wrt the CHAM semantics for graph reduction (and so wrt the λ-calculus). PROPOSITION For any S there is a plasmic S ¼ such that S S ¼.
23 22 Alan Jeffrey 2. If S is plasmic and S S ¼ then S µ S ¼. 3. S iff S µ PROOF. As for Proposition 2. ¾ 6 The pi-calculus semantics is adequate We will show that the π-calculus semantics models the CHAM semantics for graph reduction without garbage collection. To begin with, we can justify an abuse of notation: PROPOSITION m is a (positive) (negative) ion iff m is a (positive) (negative) ion. 2. S is a (positive) (negative) plasma iff S is a (positive) (negative) plasma. PROOF. A simple case analysis. Then we can show that each reduction of the graph reduction CHAM can be matched by a π-calculus reduction: PROPOSITION If S T then T S ¼ and S γ S ¼. 2. If S γ S ¼ then S S ¼. 3. If S T then T S ¼ and S S ¼. 4. If S S ¼ then S S ¼. 5. S iff S PROOF. Parts 1 4 are simple case analyses. From parts 1 4, S µ iff S β µ, so by Propositions 2.4 and 9.3, S iff S, which proves part 5. This means that the π-calculus semantics is adequate. THEOREM 12 (ADEQUACY). If SÚ S ¼ then S Ú S ¼. PROOF. For any C, if CS ¼ then CS ¼ so CS ¼ so CS so CS so CS. Thus, S Ú S ¼. ¾ However, it is not fully abstract. THEOREM 13. m Ú m ¼ does not imply mú m ¼. PROOF. DefineR to be a simulation up to µ, similar to (MILNER, 1989, Definition 4.4), iff whenever mr m ¼ and m ¼ m ¼¼¼ then m m ¼¼ and m ¼¼ µ R µ m ¼¼¼. Let be the largest simulation up to µ, and let C be the largest precongruence contained in : m C m ¼ iff C Cm Cm ¼ ¾ ¾
24 A CHAM for graph reduction 23 Then if m m ¼ and m ¼ then m, so if m C m ¼ then m Ú m ¼. Define: m x :!y :! m ¼ x :!yy :! R Cx :!y :! x :!y :!λw 1 M 1 :!λw 1 M 1 x :!y :!λw n M n :!λw n M n Cx :!yy :! x :!yy :!λw 1 M 1 :!λw 1 M 1 x :!yy :!λw n M n :!λw n M n µ C is an n 1-place context ThenR is a simulation up to µ, so for any context C, Cm Cm ¼, so m C m ¼, so m Ú m ¼. We will now show that mú m ¼. Define: where is a divergent process such as: Then: whereas: so mú m ¼. C y uvµ def νw www w uvµµ Cm µ x y y uvµ Cm ¼ µ y x y y uvµ y SANGIORNI (1991) has investigated λ-calculi for which MILNER s π-calculus translation is fully abstract. It is an open problem as to whether similar results can be shown for the CHAM for graph reduction. Acknowledgements Many thanks to Lennart Augustsson for getting the ball rolling, to Thomas Hallgren, Magnus Carlsson and Niklas Röjemo for conversations about the innards of LML, and to K. V. S. Prasad, Jenny Petersson, Matthew Hennessy, Edmund Robinson, Steve Schneider and Mark Jones for many discussions. This work was conceived at Chalmers University and written at Sussex University and Drive Cottage, Ampney Knowle, Cirencester. References ABRAMSKY, S. (1989). The lay lambda calculus. In TURNER, D., editor, Declarative Programming. Addison-Wesley. ¾
25 24 Alan Jeffrey AUGUSTSSON, L. (1984). A compiler for lay ML. In Proc. ACM Symp. Lisp and Functional Programming, pages BARENDREGT, H. (1984). The Lambda Calculus. North-Holland. Studies in logic 103. BARENDREGT, H. P., VAN EEKELEN, M. C. J. D., GLAUERT, J. R. W., KENNAWAY, J. R., PLASMEI- JER, M. J., and SLEEP, M. R. (1987). Term graph rewriting. In Proc. PARLE 87, volume 2, pages Springer-Verlag. LNCS 259. BERRY, G. and BOUDOL, G. (1990). The chemical abstract machine. In Proc. 17th Ann. Symp. Principles of Programming Languages. BOUDOL, G. (1992). Asynchrony and the pi-calculus. INRIA Sophia-Antipolis. CHURCH, A. (1941). The Calculi of Lambda Conversion. Princeton University Press. HUGHES, R. J. M. (1984). The Design and Implementation of Programming Languages. D.Phil thesis, Oxford University. JOHNNSON, T. (1984). Effecient compilation of lay evaluation. In Proc. Sigplan 84 Symp. Compiler Construction, pages JONES, M. (1992). The Gofer technical manual. Part of the Gofer distribution. LESTER, D. (1989). Combinator Graph Reduction: A Congruence and its Applications. D.Phil thesis, Oxford University. MCCARTHY, J., ABRAHAMS, P. W., EDWARDS, D. J., HART, T. P., and LEVIN, M. I. (1962). The Lisp 1.5 Programmers Kit. MIT Press. MILNER, R. (1989). Communication and Concurrency. Prentice-Hall. MILNER, R. (1991). The polyadic π-calculus: a tutorial. In Proc. International Summer School on Logic and Algebra of Specification, Marktoberdorf. MILNER, R. (1992). Functions as processes. Math. Struct. in Comput. Science, 2: MILNER, R., PARROW, J., and WALKER, D. (1989). A calculus of mobile processes. Technical reports ECS-LFCS and -87, LFCS, University of Edinburgh. ONG, C.-H. L. (1988). The Lay Lambda Calculus: An Investigation into the Foundations of Functional Programming. PhD thesis, Imperial College, London University. PEYTON JONES, S. (1987). The Implementation of Functional Programming Languages. Prentice- Hall. SANGIORGI, D. (1991). The lay lambda calculus in a concurrency scenario. Technical Report ECS-LFCS , LFCS, Edinburgh University. STOYE, W. R., CLARKE, T. J. W., and NORMAN, A. C. (1984). Some practical methods for rapid combinator reduction. In Proc. ACM Symp. Lisp and Functional Programming, pages TURNER, D. (1985). Miranda: A non-strict functional language with polymorphic types. In Proc. IFIP Conf. Functional Programming Languages and Computer Architecture. Springer-Verlag. LNCS 201. WADSWORTH, C. P. (1971). Semantics and Pragmatics of the Lambda Calculus. D.Phil thesis, Oxford University.
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 informationA 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 informationReview 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 informationA fully abstract semantics for a nondeterministic functional language with monadic types
A fully abstract semantics for a nondeterministic functional language with monadic types Alan Jeffrey 1 School of Cognitive and Computing Sciences University of Sussex, Brighton BN1 9QH, UK alanje@cogs.susx.ac.uk
More informationCommunication Problems in the 7r-Calculus. M. R. F. Benevides* F. Prottit
Communication Problems in the 7r-Calculus M. R. F. Benevides* F. Prottit Abstract In this paper we deal with the notions of deadlock, starvation, and communication errors in the asynchronous polyadic 7f-calculus.
More informationBisimulation and coinduction in higher-order languages
Bisimulation and coinduction in higher-order languages Davide Sangiorgi Focus Team, University of Bologna/INRIA ICE, Florence, June 2013 Bisimulation Behavioural equality One of the most important contributions
More informationStrong 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 informationSimply Typed λ-calculus
Simply Typed λ-calculus Lecture 1 Jeremy Dawson The Australian National University Semester 2, 2017 Jeremy Dawson (ANU) COMP4630,Lecture 1 Semester 2, 2017 1 / 23 A Brief History of Type Theory First developed
More informationOrigin in Mathematical Logic
Lambda Calculus Origin in Mathematical Logic Foundation of mathematics was very much an issue in the early decades of 20th century. Cantor, Frege, Russel s Paradox, Principia Mathematica, NBG/ZF Origin
More informationThe Lambda-Calculus Reduction System
2 The Lambda-Calculus Reduction System 2.1 Reduction Systems In this section we present basic notions on reduction systems. For a more detailed study see [Klop, 1992, Dershowitz and Jouannaud, 1990]. Definition
More informationConcurrency theory. proof-techniques for syncronous and asynchronous pi-calculus. Francesco Zappa Nardelli. INRIA Rocquencourt, MOSCOVA research team
Concurrency theory proof-techniques for syncronous and asynchronous pi-calculus Francesco Zappa Nardelli INRIA Rocquencourt, MOSCOVA research team francesco.zappa nardelli@inria.fr together with Frank
More informationCS522 - Programming Language Semantics
1 CS522 - Programming Language Semantics Simply Typed Lambda Calculus Grigore Roşu Department of Computer Science University of Illinois at Urbana-Champaign 2 We now discuss a non-trivial extension of
More informationOn the Correctness and Efficiency of the Krivine Machine
On the Correctness and Efficiency of the Krivine Machine Mitchell Wand Northeastern University Daniel P. Friedman Indiana University February 12, 2003 Abstract We provide a short derivation of the Krivine
More informationAdvanced Lambda Calculus. Henk Barendregt & Giulio Manzonetto ICIS Faculty of Science Radboud University Nijmegen, The Netherlands
Advanced Lambda Calculus Henk Barendregt & Giulio Manzonetto ICIS Faculty of Science Radboud University Nijmegen, The Netherlands Form of the course Ordinary lecture Seminar form Exam: working out an exercise
More informationLambda-Calculus (I) 2nd Asian-Pacific Summer School on Formal Methods Tsinghua University, August 23, 2010
Lambda-Calculus (I) jean-jacques.levy@inria.fr 2nd Asian-Pacific Summer School on Formal Methods Tsinghua University, August 23, 2010 Plan computation models lambda-notation bound variables conversion
More informationIntroduction to lambda calculus Part 2
Introduction to lambda calculus Part 2 Antti-Juhani Kaijanaho 2017-01-24... 1 Untyped lambda calculus 1.1 Syntax... x, y, z Var t, u Term t, u ::= x t u λx t... In this document, I will be using the following
More informationConsequence 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 informationThe Lambda Calculus. Stephen A. Edwards. Fall Columbia University
The Lambda Calculus Stephen A. Edwards Columbia University Fall 2014 Lambda Expressions Function application written in prefix form. Add four and five is (+ 4 5) Evaluation: select a redex and evaluate
More informationA 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 informationThe 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 informationOrigin in Mathematical Logic
Lambda Calculus Origin in Mathematical Logic Foundation of mathematics was very much an issue in the early decades of 20th century. Cantor, Frege, Russel s Paradox, Principia Mathematica, NBG/ZF The Combinatory
More informationIntroduction to λ-calculus
p.1/65 Introduction to λ-calculus Ken-etsu FUJITA fujita@cs.gunma-u.ac.jp http://www.comp.cs.gunma-u.ac.jp/ fujita/ Department of Computer Science Gunma University :Church 32, 36, 40; Curry 34 1. Universal
More informationDistributed Processes and Location Failures (Extended Abstract)
Distributed Processes and Location Failures (Extended Abstract) James Riely and Matthew Hennessy Abstract Site failure is an essential aspect of distributed systems; nonetheless its effect on programming
More informationCS 4110 Programming Languages & Logics. Lecture 16 Programming in the λ-calculus
CS 4110 Programming Languages & Logics Lecture 16 Programming in the λ-calculus 30 September 2016 Review: Church Booleans 2 We can encode TRUE, FALSE, and IF, as: TRUE λx. λy. x FALSE λx. λy. y IF λb.
More information3.2 Equivalence, Evaluation and Reduction Strategies
3.2 Equivalence, Evaluation and Reduction Strategies The λ-calculus can be seen as an equational theory. More precisely, we have rules i.e., α and reductions, for proving that two terms are intensionally
More informationSHARING IN THE WEAK LAMBDA-CALCULUS REVISITED
SHARING IN THE WEAK LAMBDA-CALCULUS REVISITED TOMASZ BLANC, JEAN-JACQUES LÉVY, AND LUC MARANGET INRIA e-mail address: tomasz.blanc@inria.fr INRIA, Microsoft Research-INRIA Joint Centre e-mail address:
More informationCOMP6463: λ-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 informationExpressing 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 informationLambda Calculus. Andrés Sicard-Ramírez. Semester Universidad EAFIT
Lambda Calculus Andrés Sicard-Ramírez Universidad EAFIT Semester 2010-2 Bibliography Textbook: Hindley, J. R. and Seldin, J. (2008). Lambda-Calculus and Combinators. An Introduction. Cambridge University
More informationModels 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 informationThe Call-by-Need Lambda Calculus
The Call-by-Need Lambda Calculus John Maraist, Martin Odersky School of Computer and Information Science, University of South Australia Warrendi Road, The Levels, Adelaide, South Australia 5095 fmaraist,oderskyg@cis.unisa.edu.au
More informationOn Böhm Trees and Lévy-Longo Trees in π-calculus
On Böhm Trees and Lévy-Longo Trees in π-calculus Xian Xu East China University of Science and Technology (from ongoing work with Davide Sangiorgi) April, 1 Subject Encodings from to λ-calculus (sequential
More informationConstructive approach to relevant and affine term calculi
Constructive approach to relevant and affine term calculi Jelena Ivetić, University of Novi Sad, Serbia Silvia Ghilezan,University of Novi Sad, Serbia Pierre Lescanne, University of Lyon, France Silvia
More informationA probabilistic lambda calculus - Some preliminary investigations
A probabilistic lambda calculus - Some preliminary investigations Ugo Dal Lago, Margherita Zorzi Università di Bologna, Università di Verona June, 9-11, 2010, Torino Introduction: Λ P We present some results
More informationIntroduction to lambda calculus Part 6
Introduction to lambda calculus Part 6 Antti-Juhani Kaijanaho 2017-02-16 1 Untyped lambda calculus 2 Typed lambda calculi 2.1 Dynamically typed lambda calculus with integers 2.2 A model of Lisp 2.3 Simply
More informationReview. Principles of Programming Languages. Equality. The Diamond Property. The Church-Rosser Theorem. Corollaries. CSE 230: Winter 2007
CSE 230: Winter 2007 Principles of Programming Languages Lecture 12: The λ-calculus Ranjit Jhala UC San Diego Review The lambda calculus is a calculus of functions: e := x λx. e e 1 e 2 Several evaluation
More informationComputability via the Lambda Calculus with Patterns
Computability via the Lambda Calculus with Patterns Bodin Skulkiat (Corresponding author) Department of Mathematics, Faculty of Science Chulalongkorn University, Bangkok, Thailand Tel: 66-89-666-5804 E-mail:
More informationHenk Barendregt and Freek Wiedijk assisted by Andrew Polonsky. Radboud University Nijmegen. March 5, 2012
1 λ Henk Barendregt and Freek Wiedijk assisted by Andrew Polonsky Radboud University Nijmegen March 5, 2012 2 reading Femke van Raamsdonk Logical Verification Course Notes Herman Geuvers Introduction to
More informationPolymorphic Game Semantics for Dynamic Binding
Polymorphic Game Semantics for Dynamic Binding J. Laird University of Bath, UK August 30, 2016 Goals Extend game semantics of generic polymorphism in three (related) directions: Dynamic Binding of terms
More informationTrace 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 informationRecursive equations in higher-order process calculi
Theoretical Computer Science 266 (2001) 839 852 www.elsevier.com/locate/tcs Recursive equations in higher-order process calculi Mingsheng Ying a; ;1, Martin Wirsing b a State Key Laboratory of Intelligent
More informationConsequence 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 information1. Object Calculus. Object calculus is to OO languages what lambda calculus is to functional languages
1. Object Calculus In this section we will introduce a calculus of objects that gives a simple but powerful mathematical model to study object based languages. Object calculus is to OO languages what lambda
More informationLecture 3. Lambda calculus. Iztok Savnik, FAMNIT. October, 2015.
Lecture 3 Lambda calculus Iztok Savnik, FAMNIT October, 2015. 1 Literature Henk Barendregt, Erik Barendsen, Introduction to Lambda Calculus, March 2000. Lambda calculus Leibniz had as ideal the following
More information07 Equational Logic and Algebraic Reasoning
CAS 701 Fall 2004 07 Equational Logic and Algebraic Reasoning Instructor: W. M. Farmer Revised: 17 November 2004 1 What is Equational Logic? Equational logic is first-order logic restricted to languages
More informationComputer Science at Kent
Computer Science at Kent New eta-reduction and Church-Rosser Yong Luo Technical Report No. 7-05 October 2005 Copyright c 2005 University of Kent Published by the Computing Laboratory, University of Kent,
More informationEquational Theory of Kleene Algebra
Introduction to Kleene Algebra Lecture 7 CS786 Spring 2004 February 16, 2004 Equational Theory of Kleene Algebra We now turn to the equational theory of Kleene algebra. This and the next lecture will be
More informationSkew and ω-skew Confluence and Infinite Normal Forms
Skew and ω-skew Confluence and Infinite Normal Forms Zena M. riola and Stefan Blom University of Oregon University of Innsbruck bstract. The notion of skew confluence was introduced to characterize non-confluent
More informationIntroduction to Temporal Logic. The purpose of temporal logics is to specify properties of dynamic systems. These can be either
Introduction to Temporal Logic The purpose of temporal logics is to specify properties of dynamic systems. These can be either Desired properites. Often liveness properties like In every infinite run action
More informationA Semantics for Propositions as Sessions
A Semantics for Propositions as Sessions Sam Lindley and J. Garrett Morris The University of Edinburgh {Sam.Lindley,Garrett.Morris}@ed.ac.uk Abstract. Session types provide a static guarantee that concurrent
More informationInterpreting the Full λ-calculus in the π-calculus
Interpreting the Full λ-calculus in the π-calculus Xiaojuan Cai Joint work with Yuxi Fu BASICS Lab October 12, 2009 Motivation The λ-calculus: sequential model; The π-calculus: concurrent model A deep
More informationSafety Analysis versus Type Inference
Information and Computation, 118(1):128 141, 1995. Safety Analysis versus Type Inference Jens Palsberg palsberg@daimi.aau.dk Michael I. Schwartzbach mis@daimi.aau.dk Computer Science Department, Aarhus
More informationCommunication and Concurrency: CCS
Communication and Concurrency: CCS R. Milner, A Calculus of Communicating Systems, 1980 cours SSDE Master 1 Why calculi? Prove properties on programs and languages Principle: tiny syntax, small semantics,
More informationLecture Notes on Combinatory Modal Logic
Lecture Notes on Combinatory Modal Logic 15-816: Modal Logic Frank Pfenning Lecture 9 February 16, 2010 1 Introduction The connection between proofs and program so far has been through a proof term assignment
More informationSequent Combinators: A Hilbert System for the Lambda Calculus
Sequent Combinators: A Hilbert System for the Lambda Calculus Healfdene Goguen Department of Computer Science, University of Edinburgh The King s Buildings, Edinburgh, EH9 3JZ, United Kingdom Fax: (+44)
More informationSubtyping and Intersection Types Revisited
Subtyping and Intersection Types Revisited Frank Pfenning Carnegie Mellon University International Conference on Functional Programming (ICFP 07) Freiburg, Germany, October 1-3, 2007 Joint work with Rowan
More informationModularity of Confluence: A Simplified Proof
1 Modularity of Confluence: A Simplified Proof Jan Willem Klop 1,2,5,6 Aart Middeldorp 3,5 Yoshihito Toyama 4,7 Roel de Vrijer 2 1 Department of Software Technology CWI, Kruislaan 413, 1098 SJ Amsterdam
More informationλ Slide 1 Content Exercises from last time λ-calculus COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification
Content COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification Toby Murray, June Andronick, Gerwin Klein λ Slide 1 Intro & motivation, getting started [1] Foundations & Principles Lambda
More informationComputational Soundness of a Call by Name Calculus of Recursively-scoped Records. UMM Working Papers Series, Volume 2, Num. 3.
Computational Soundness of a Call by Name Calculus of Recursively-scoped Records. UMM Working Papers Series, Volume 2, Num. 3. Elena Machkasova Contents 1 Introduction and Related Work 1 1.1 Introduction..............................
More informationCommunicating 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 informationKleene realizability and negative translations
Q E I U G I C Kleene realizability and negative translations Alexandre Miquel O P. D E. L Ō A U D E L A R April 21th, IMERL Plan 1 Kleene realizability 2 Gödel-Gentzen negative translation 3 Lafont-Reus-Streicher
More informationSequentiality in Kahn- Macqueen nets and the λ-calculus
Sequentiality in Kahn- Macqueen nets and the λ-calculus Jean-Jacques Lévy Macqueen Fest, 11-05-2012 1 Plan Kahn-Macqueen networks Stability in the λ-calculus Stability in Kahn-Macqueen networks Revisiting
More informationExplicit Substitutions and Programming Languages
Explicit Substitutions and Programming Languages Jean-Jacques Lévy and Luc Maranget INRIA - Rocquencourt, Jean-Jacques.Levy@inria.fr Luc.Maranget@inria.fr, http://para.inria.fr/ {levy,maranget} Abstract.
More informationFunctional Programming with Coq. Yuxin Deng East China Normal University
Functional Programming with Coq Yuxin Deng East China Normal University http://basics.sjtu.edu.cn/ yuxin/ September 10, 2017 Functional Programming Y. Deng@ECNU 1 Reading materials 1. The Coq proof assistant.
More informationLazy 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 informationSimply Typed Lambda-Calculi (II)
THEORY AND PRACTICE OF FUNCTIONAL PROGRAMMING Simply Typed Lambda-Calculi (II) Dr. ZHANG Yu Institute of Software, Chinese Academy of Sciences Fall term, 2011 GUCAS, Beijing Introduction PCF Programming
More informationElectronic Notes in Theoretical Computer Science 18 (1998) URL: 8 pages Towards characterizing bisim
Electronic Notes in Theoretical Computer Science 18 (1998) URL: http://www.elsevier.nl/locate/entcs/volume18.html 8 pages Towards characterizing bisimilarity of value-passing processes with context-free
More informationCongruence of Bisimulation in a Non-Deterministic Call-By-Need Lambda Calculus
Congruence of Bisimulation in a Non-Deterministic Call-By-Need Lambda Calculus Matthias Mann Johann Wolfgang Goethe-Universität, Frankfurt, Germany Congruence of Bisimulation p. 1/21 Lambda Calculi and
More informationFunctions as Session-Typed Processes
Functions as Session-Typed Processes Bernardo Toninho 1,2, Luis Caires 2, and Frank Pfenning 1 1 Computer Science Department Carnegie Mellon University Pittsburgh, PA, USA 2 CITI and Faculdade de Ciências
More informationJustifying Algorithms for βη-conversion
Justifying Algorithms for βη-conversion Healfdene Goguen AT&T Labs, 180 Park Ave., Florham Park NJ 07932 USA hhg@att.com. Abstract. Deciding the typing judgement of type theories with dependent types such
More informationAn introduction to process calculi: Calculus of Communicating Systems (CCS)
An introduction to process calculi: Calculus of Communicating Systems (CCS) Lecture 2 of Modelli Matematici dei Processi Concorrenti Paweł Sobociński University of Southampton, UK Intro to process calculi:
More informationCategories, Proofs and Programs
Categories, Proofs and Programs Samson Abramsky and Nikos Tzevelekos Lecture 4: Curry-Howard Correspondence and Cartesian Closed Categories In A Nutshell Logic Computation 555555555555555555 5 Categories
More informationhal , 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 informationOn the Standardization Theorem for λβη-calculus
On the Standardization Theorem for λβη-calculus Ryo Kashima Department of Mathematical and Computing Sciences Tokyo Institute of Technology Ookayama, Meguro, Tokyo 152-8552, Japan. e-mail: kashima@is.titech.ac.jp
More informationOn the Correctness of the Krivine Machine
On the Correctness of the Krivine Machine Mitchell Wand Northeastern University 2003-10-03 15:55:00 wand October 3, 2003 Abstract We provide a short proof of the correctness of the Krivine machine by showing
More information3.2 Reduction 29. Truth. The constructor just forms the unit element,. Since there is no destructor, there is no reduction rule.
32 Reduction 29 32 Reduction In the preceding section, we have introduced the assignment of proof terms to natural deductions If proofs are programs then we need to explain how proofs are to be executed,
More informationSmall families. (at INRIA with Gérard and in the historical λ-calculus) Jean-Jacques Lévy
Small families (at INRIA with Gérard and in the historical λ-calculus) Jean-Jacques Lévy INRIA Rocquencourt and Microsoft Research-INRIA Joint Centre June 22, 2007 caml years coq sixty years is 31,557,600
More informationTutorial on Semantics Part I
Tutorial on Semantics Part I Basic Concepts Prakash Panangaden 1 1 School of Computer Science McGill University on sabbatical leave at Department of Computer Science Oxford University Fields Institute,
More informationProgramming Language Concepts: Lecture 18
Programming Language Concepts: Lecture 18 Madhavan Mukund Chennai Mathematical Institute madhavan@cmi.ac.in http://www.cmi.ac.in/~madhavan/courses/pl2009 PLC 2009, Lecture 18, 30 March 2009 One step reduction
More informationPartial model checking via abstract interpretation
Partial model checking via abstract interpretation N. De Francesco, G. Lettieri, L. Martini, G. Vaglini Università di Pisa, Dipartimento di Ingegneria dell Informazione, sez. Informatica, Via Diotisalvi
More informationFrom 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 informationLecture 2. Lambda calculus. Iztok Savnik, FAMNIT. March, 2018.
Lecture 2 Lambda calculus Iztok Savnik, FAMNIT March, 2018. 1 Literature Henk Barendregt, Erik Barendsen, Introduction to Lambda Calculus, March 2000. Lambda calculus Leibniz had as ideal the following
More informationTraditional and Non Traditional lambda calculi
Strategies July 2009 Strategies Syntax Semantics Manipulating Expressions Variables and substitutions Free and bound variables Subterms and substitution Grafting and substitution Ordered list of variables
More informationA Behavioral Congruence for Concurrent Constraint Programming with Nondeterministic Choice
A Behavioral Congruence for Concurrent Constraint Programming with Nondeterministic Choice Luis Pino*, Filippo Bonchi** and Frank Valencia* (Presented by: Jorge A. Pe rez) *E quipe Come te, LIX, Laboratoire
More informationOn the asynchronous nature of the asynchronous π-calculus
On the asynchronous nature of the asynchronous π-calculus Romain Beauxis, Catuscia Palamidessi, and Frank D. Valencia INRIA Saclay and LIX, École Polytechnique Abstract. We address the question of what
More informationTERMS FOR NATURAL DEDUCTION, SEQUENT CALCULUS AND CUT ELIMINATION IN CLASSICAL LOGIC
TERMS FOR NATURAL DEDUCTION, SEQUENT CALCULUS AND CUT ELIMINATION IN CLASSICAL LOGIC SILVIA GHILEZAN Faculty of Engineering, University of Novi Sad, Novi Sad, Serbia e-mail address: gsilvia@uns.ns.ac.yu
More informationThe physical Church Turing thesis and non-deterministic computation over the real numbers
370, 3349 3358 doi:10.1098/rsta.2011.0322 The physical Church Turing thesis and non-deterministic computation over the real numbers BY GILLES DOWEK* INRIA, 23 avenue d Italie, CS 81321, 75214 Paris Cedex
More informationLecture Notes on Classical Linear Logic
Lecture Notes on Classical Linear Logic 15-816: Linear Logic Frank Pfenning Lecture 25 April 23, 2012 Originally, linear logic was conceived by Girard [Gir87] as a classical system, with one-sided sequents,
More informationPeano Arithmetic. CSC 438F/2404F Notes (S. Cook) Fall, Goals Now
CSC 438F/2404F Notes (S. Cook) Fall, 2008 Peano Arithmetic Goals Now 1) We will introduce a standard set of axioms for the language L A. The theory generated by these axioms is denoted PA and called Peano
More informationNICTA Advanced Course. Theorem Proving Principles, Techniques, Applications
NICTA Advanced Course Theorem Proving Principles, Techniques, Applications λ 1 CONTENT Intro & motivation, getting started with Isabelle Foundations & Principles Lambda Calculus Higher Order Logic, natural
More informationReminder of Notation. For a variable-free term t, we let t N N stand for the interpretation of t in N. (For example, (SSS0 SS0) N equals 6.
Reminder of Notation Language is always L NT = (0, S, +,, E,
More informationCommunication and Concurrency: CCS. R. Milner, A Calculus of Communicating Systems, 1980
Communication and Concurrency: CCS R. Milner, A Calculus of Communicating Systems, 1980 Why calculi? Prove properties on programs and languages Principle: tiny syntax, small semantics, to be handled on
More informationOn Upper Bounds on the Church-Rosser Theorem
On Upper Bounds on the Church-Rosser Theorem Ken-etsu Fujita Department of Computer Science Gunma University Kiryu, Japan fujita@cs.gunma-u.ac.jp The Church-Rosser theorem in the type-free λ-calculus is
More informationLambda-Calculus (cont): Fixpoints, Naming. Lecture 10 CS 565 2/10/08
Lambda-Calculus (cont): Fixpoints, Naming Lecture 10 CS 565 2/10/08 Recursion and Divergence Consider the application: Ω ((λ x. (x x)) (λ x. (x x))) Ω evaluates to itself in one step. It has no normal
More informationBeyond First-Order Logic
Beyond First-Order Logic Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2008/2009 Maria João Frade (DI-UM) Beyond First-Order Logic MFES 2008/09 1 / 37 FOL
More informationBounded Stacks, Bags and Queues
Bounded Stacks, Bags and Queues J.C.M. Baeten 1 and J.A. Bergstra 2,3 1 Department of Mathematics and Computing Science, Eindhoven University of Technology, P.O. Box 513, NL-5600 MB Eindhoven, The Netherlands,
More informationEquivalence 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 informationModels of computation
Lambda-Calculus (I) jean-jacques.levy@inria.fr 2nd Asian-Pacific Summer School on Formal ethods Tsinghua University, August 23, 2010 Plan computation models lambda-notation bound variables odels of computation
More informationSemantics with Intersection Types
Semantics with Intersection Types Steffen van Bakel Department of Computing, Imperial College of Science, Technology and Medicine, 180 Queen s Gate, London SW7 2BZ, U.K., E-mail: svb@doc.ic.ac.uk (Sections
More informationNormalization by Evaluation
Normalization by Evaluation Andreas Abel Department of Computer Science and Engineering Chalmers and Gothenburg University PhD Seminar in Mathematical Engineering EAFIT University, Medellin, Colombia 9
More information