Diagrams for Meaning Preservation

Size: px
Start display at page:

Download "Diagrams for Meaning Preservation"

Transcription

1 Diagrams for Meaning Preservation Joe Wells Detlef Plump Fairouz Kamareddine Heriot-Watt University University of York det Diagrams for Meaning Preservation p.1/28

2 Overview Motivation. The AES framework. Methods for proving meaning preservation. Discussion. Diagrams for Meaning Preservation p.2/28

3 Some Notation The notation t 1 R t 2 means t 1 is related to t 2 by zero or more steps of the relation R. Diagrams for Meaning Preservation p.3/28

4 Some Notation The notation t 1 R t 2 means t 1 is related to t 2 by zero or more steps of the relation R. The notation t 1 R,nf t 2 means t 1 R t 2 and furthermore t 2 is not related by 1 further step of R to any other term. Diagrams for Meaning Preservation p.3/28

5 Some Notation The notation t 1 R t 2 means t 1 is related to t 2 by zero or more steps of the relation R. The notation t 1 R,nf t 2 means t 1 R t 2 and furthermore t 2 is not related by 1 further step of R to any other term. The notation has-nf(r, t 1 ) means t 1 R,nf t 2 for some t 2. Diagrams for Meaning Preservation p.3/28

6 Some Notation The notation t 1 R t 2 means t 1 is related to t 2 by zero or more steps of the relation R. The notation t 1 R,nf t 2 means t 1 R t 2 and furthermore t 2 is not related by 1 further step of R to any other term. The notation has-nf(r, t 1 ) means t 1 R,nf t 2 for some t 2. Trm, Conf, LConf, and Std are short names for termination, confluence local confluence, and standardization. Diagrams for Meaning Preservation p.3/28

7 An Example Operational Semantics Example: functions with call-by-name evaluation to weak head normal form. Diagrams for Meaning Preservation p.4/28

8 An Example Operational Semantics Example: functions with call-by-name evaluation to weak head normal form. Terms: t T ::= x (λx. t) (t 1 t 2 ) Diagrams for Meaning Preservation p.4/28

9 An Example Operational Semantics Example: functions with call-by-name evaluation to weak head normal form. Terms: t T ::= x (λx. t) (t 1 t 2 ) Evaluation contexts: E EvalContext ::= (E t) Diagrams for Meaning Preservation p.4/28

10 An Example Operational Semantics Example: functions with call-by-name evaluation to weak head normal form. Terms: t T ::= x (λx. t) (t 1 t 2 ) Evaluation contexts: E EvalContext ::= (E t) Evaluation rewriting: E[(λx. t 1 ) t 2 ] E E[t 1 [x := t 2 ]] Diagrams for Meaning Preservation p.4/28

11 An Example Operational Semantics Example: functions with call-by-name evaluation to weak head normal form. Terms: t T ::= x (λx. t) (t 1 t 2 ) Evaluation contexts: E EvalContext ::= (E t) Evaluation rewriting: E[(λx. t 1 ) t 2 ] E E[t 1 [x := t 2 ]] Operational meaning: result(t) = diverges if has-nf(e, t) halt if t E,nf λx. t stuck if t E,nf t λx. t Diagrams for Meaning Preservation p.4/28

12 Rewriting for Program Equivalences Suppose we want to use the evaluation rewrite rule in arbitrary contexts C, i.e., the usual β rule: C[(λx. t 1 ) t 2 ] C[t 1 [x := t 2 ]] Diagrams for Meaning Preservation p.5/28

13 Rewriting for Program Equivalences Suppose we want to use the evaluation rewrite rule in arbitrary contexts C, i.e., the usual β rule: C[(λx. t 1 ) t 2 ] C[t 1 [x := t 2 ]] Example rewrite steps in non-evaluation position: (λy. (λw. w) y) (λy. y) Diagrams for Meaning Preservation p.5/28

14 Rewriting for Program Equivalences Suppose we want to use the evaluation rewrite rule in arbitrary contexts C, i.e., the usual β rule: C[(λx. t 1 ) t 2 ] C[t 1 [x := t 2 ]] Example rewrite steps in non-evaluation position: (λy. (λw. w) y) (λy. y) (λx. xx) (λy. (λw. w) y) (λx. xx) (λy. y) Diagrams for Meaning Preservation p.5/28

15 Rewriting for Program Equivalences Suppose we want to use the evaluation rewrite rule in arbitrary contexts C, i.e., the usual β rule: C[(λx. t 1 ) t 2 ] C[t 1 [x := t 2 ]] Example rewrite steps in non-evaluation position: (λy. (λw. w) y) (λy. y) (λx. xx) (λy. (λw. w) y) (λx. xx) (λy. y) Is this meaning-preserving, i.e., does t 1 t 2 imply that result(t 1 ) = result(t 2 )? Diagrams for Meaning Preservation p.5/28

16 Rewriting for Program Equivalences Suppose we want to use the evaluation rewrite rule in arbitrary contexts C, i.e., the usual β rule: C[(λx. t 1 ) t 2 ] C[t 1 [x := t 2 ]] Example rewrite steps in non-evaluation position: (λy. (λw. w) y) (λy. y) (λx. xx) (λy. (λw. w) y) (λx. xx) (λy. y) Is this meaning-preserving, i.e., does t 1 t 2 imply that result(t 1 ) = result(t 2 )? Is it an observational equivalence, i.e., does t 1 t 2 imply result(c[t 1 ]) = result(c[t 2 ]) for any context C? Diagrams for Meaning Preservation p.5/28

17 Overview Motivation. The AES framework. Methods for proving meaning preservation. Discussion. Diagrams for Meaning Preservation p.6/28

18 Abstract Evaluation Systems To discuss the issues, the notion of abstract evaluation system (AES) will be used. Diagrams for Meaning Preservation p.7/28

19 Abstract Evaluation Systems To discuss the issues, the notion of abstract evaluation system (AES) will be used. An AES is a 6-tuple: Diagrams for Meaning Preservation p.7/28

20 Abstract Evaluation Systems To discuss the issues, the notion of abstract evaluation system (AES) will be used. An AES is a 6-tuple: (T, set of terms Diagrams for Meaning Preservation p.7/28

21 Abstract Evaluation Systems To discuss the issues, the notion of abstract evaluation system (AES) will be used. An AES is a 6-tuple: (T, set of terms S, set of rewrite steps Diagrams for Meaning Preservation p.7/28

22 Abstract Evaluation Systems To discuss the issues, the notion of abstract evaluation system (AES) will be used. An AES is a 6-tuple: (T, set of terms S, set of rewrite steps R, set of evaluation results Diagrams for Meaning Preservation p.7/28

23 Abstract Evaluation Systems To discuss the issues, the notion of abstract evaluation system (AES) will be used. An AES is a 6-tuple: (T, set of terms S, set of rewrite steps R, set of evaluation results endpoints, maps S to T T Diagrams for Meaning Preservation p.7/28

24 Abstract Evaluation Systems To discuss the issues, the notion of abstract evaluation system (AES) will be used. An AES is a 6-tuple: (T, set of terms S, set of rewrite steps R, set of evaluation results endpoints, maps S to T T E, a subset of S, the evaluation steps Diagrams for Meaning Preservation p.7/28

25 Abstract Evaluation Systems To discuss the issues, the notion of abstract evaluation system (AES) will be used. An AES is a 6-tuple: (T, set of terms S, set of rewrite steps R, set of evaluation results endpoints, maps S to T T E, a subset of S, the evaluation steps result) maps T to R Diagrams for Meaning Preservation p.7/28

26 Abstract Evaluation Systems To discuss the issues, the notion of abstract evaluation system (AES) will be used. An AES is a 6-tuple: (T, set of terms S, set of rewrite steps R, set of evaluation results endpoints, maps S to T T E, a subset of S, the evaluation steps result) maps T to R Let the non-evaluation steps be N = S \ E. Diagrams for Meaning Preservation p.7/28

27 Comments on AES Framework (1) There is a separate set S of steps which are not just term pairs. Diagrams for Meaning Preservation p.8/28

28 Comments on AES Framework (1) There is a separate set S of steps which are not just term pairs. This helps distinguish between different redexes that reach the same term, e.g.: ((λx. xx) (λx. xx)) ((λx. xx) (λx. xx)) Diagrams for Meaning Preservation p.8/28

29 Comments on AES Framework (1) There is a separate set S of steps which are not just term pairs. This helps distinguish between different redexes that reach the same term, e.g.: ((λx. xx) (λx. xx)) ((λx. xx) (λx. xx)) So an AES definer does not need to reason about all other redexes in the same term when deciding whether a step is in E or N. Diagrams for Meaning Preservation p.8/28

30 Comments on AES Framework (1) There is a separate set S of steps which are not just term pairs. This helps distinguish between different redexes that reach the same term, e.g.: ((λx. xx) (λx. xx)) ((λx. xx) (λx. xx)) So an AES definer does not need to reason about all other redexes in the same term when deciding whether a step is in E or N. Rewriting notation for a subset S S: t 1 S t 2 s S. endpoints(s) = (t 1, t 2 ) Diagrams for Meaning Preservation p.8/28

31 Comments on AES Framework (1) There is a separate set S of steps which are not just term pairs. This helps distinguish between different redexes that reach the same term, e.g.: ((λx. xx) (λx. xx)) ((λx. xx) (λx. xx)) So an AES definer does not need to reason about all other redexes in the same term when deciding whether a step is in E or N. Rewriting notation for a subset S S: t 1 S t 2 s S. endpoints(s) = (t 1, t 2 ) t 1 S 1,S 2 t 2 t 1 S 1 S 2 t 2 Diagrams for Meaning Preservation p.8/28

32 Comments on AES Framework (2) Evaluation rewriting (i.e., E ) must be subcommutative. Often, it will be deterministic, but the extra flexibility is there for when needed. Diagrams for Meaning Preservation p.9/28

33 Comments on AES Framework (2) Evaluation rewriting (i.e., E ) must be subcommutative. Often, it will be deterministic, but the extra flexibility is there for when needed. The special result value diverges is reserved for terms with non-halting evaluation. Diagrams for Meaning Preservation p.9/28

34 Comments on AES Framework (2) Evaluation rewriting (i.e., E ) must be subcommutative. Often, it will be deterministic, but the extra flexibility is there for when needed. The special result value diverges is reserved for terms with non-halting evaluation. Evaluation steps must preserve results, i.e., t 1 E t 2 must imply that result(t 1 ) = result(t 2 ). Diagrams for Meaning Preservation p.9/28

35 Comments on AES Framework (2) Evaluation rewriting (i.e., E ) must be subcommutative. Often, it will be deterministic, but the extra flexibility is there for when needed. The special result value diverges is reserved for terms with non-halting evaluation. Evaluation steps must preserve results, i.e., t 1 E t 2 must imply that result(t 1 ) = result(t 2 ). The intention is to model execution where the only way to observe a result is to do evaluation steps as long as possible and then inspect the halted term, which is unique even when evaluation is non-deterministic (a deliberate AES framework limitation). Diagrams for Meaning Preservation p.9/28

36 Example AES Terms: t T ::= x (λx. t) (t 1 t 2 ) Diagrams for Meaning Preservation p.10/28

37 Example AES Terms: t T ::= x (λx. t) (t 1 t 2 ) Contexts: C Context ::= x (λx. t) (t 1 t 2 ) Rewrite steps: s S ::= (C, ((λx. t 1 ) t 2 )) Diagrams for Meaning Preservation p.10/28

38 Example AES Terms: t T ::= x (λx. t) (t 1 t 2 ) Contexts: C Context ::= x (λx. t) (t 1 t 2 ) Rewrite steps: s S ::= (C, ((λx. t 1 ) t 2 )) Evaluation results: r R = {diverges, stuck, halt} Diagrams for Meaning Preservation p.10/28

39 Example AES Terms: t T ::= x (λx. t) (t 1 t 2 ) Contexts: C Context ::= x (λx. t) (t 1 t 2 ) Rewrite steps: s S ::= (C, ((λx. t 1 ) t 2 )) Evaluation results: r R = {diverges, stuck, halt} Rewrite step endpoints: endpoints(c, (λx. t 1 ) t 2 ) = (C[(λx. t 1 ) t 2 ], C[t 1 [x := t 2 ]]) Diagrams for Meaning Preservation p.10/28

40 Example AES Terms: t T ::= x (λx. t) (t 1 t 2 ) Contexts: C Context ::= x (λx. t) (t 1 t 2 ) Rewrite steps: s S ::= (C, ((λx. t 1 ) t 2 )) Evaluation results: r R = {diverges, stuck, halt} Rewrite step endpoints: endpoints(c, (λx. t 1 ) t 2 ) = (C[(λx. t 1 ) t 2 ], C[t 1 [x := t 2 ]]) Evaluation contexts: E EvalContext ::= (E t) Evaluation steps: s E ::= (E, ((λx. t 1 ) t 2 )) Diagrams for Meaning Preservation p.10/28

41 Example AES Terms: t T ::= x (λx. t) (t 1 t 2 ) Contexts: C Context ::= x (λx. t) (t 1 t 2 ) Rewrite steps: s S ::= (C, ((λx. t 1 ) t 2 )) Evaluation results: r R = {diverges, stuck, halt} Rewrite step endpoints: endpoints(c, (λx. t 1 ) t 2 ) = (C[(λx. t 1 ) t 2 ], C[t 1 [x := t 2 ]]) Evaluation contexts: E EvalContext ::= (E t) Evaluation steps: s E ::= (E, ((λx. t 1 ) t 2 )) diverges if has-nf(e, t) Operational meaning: result(t) = halt if t E,nf λx. t stuck if t E,nf t λx. Diagrams for Meaning Preservation p.10/28

42 Overview Motivation. The AES framework. Methods for proving meaning preservation. Previous high-level proof methods. New high-level proof methods. Low-level proof methods with elementary diagrams. Marks (e.g., finite developments). Discussion. Diagrams for Meaning Preservation p.11/28

43 Proving Program Equivalences Denotational methods (semantic models). Diagrams for Meaning Preservation p.12/28

44 Proving Program Equivalences Denotational methods (semantic models). Logical relations. Requires a type system, so hard to use for the full untyped calculus. (An intersection type system can sometimes cover an entire untyped system, but this is difficult.) Diagrams for Meaning Preservation p.12/28

45 Proving Program Equivalences Denotational methods (semantic models). Logical relations. Requires a type system, so hard to use for the full untyped calculus. (An intersection type system can sometimes cover an entire untyped system, but this is difficult.) Operational techniques. Applicative bisimulation and co-induction. Howe s method. Diagrams for Meaning Preservation p.12/28

46 Proving Program Equivalences Denotational methods (semantic models). Logical relations. Requires a type system, so hard to use for the full untyped calculus. (An intersection type system can sometimes cover an entire untyped system, but this is difficult.) Operational techniques. Applicative bisimulation and co-induction. Howe s method. This talk will focus on rewriting-based methods: Plotkin [1975], Machkasova and Turbak [2000], Odersky [1993], Ariola and Blom [2002]. Diagrams for Meaning Preservation p.12/28

47 Suppose t 1 t 2. Plotkin s Method Diagrams for Meaning Preservation p.13/28

48 Suppose t 1 t 2. Plotkin s Method If both diverge, they are assigned same meaning (important!). Diagrams for Meaning Preservation p.13/28

49 Suppose t 1 t 2. Plotkin s Method If both diverge, they are assigned same meaning (important!). Suppose evaluation of one halts, maybe t 1. Then: E,nf E t 1 t 3 t 5 Std Conf t 6 N Std t 2 t 4 By definition, result(t 1 ) = result(t 5 ) and result(t 2 ) = result(t 4 ). E N Diagrams for Meaning Preservation p.13/28

50 Suppose t 1 t 2. Plotkin s Method If both diverge, they are assigned same meaning (important!). Suppose evaluation of one halts, maybe t 1. Then: E,nf E t 1 t 3 t 5 Std Conf t 6 N Std t 2 t 4 By definition, result(t 1 ) = result(t 5 ) and result(t 2 ) = result(t 4 ). Because t 5 has halted and N-conversion preserves both this fact and results (important!), result(t 5 ) = result(t 4 ). E N Diagrams for Meaning Preservation p.13/28

51 Comments on Plotkin s Method Plotkin [1975] originally developed it for the call-by-name and call-by-value λ-calculus. Diagrams for Meaning Preservation p.14/28

52 Comments on Plotkin s Method Plotkin [1975] originally developed it for the call-by-name and call-by-value λ-calculus. Other researchers have used it for variations on the λ-calculus, e.g., λ-calculus plus assignments and continuations [Felleisen and Hieb, 1992] and the call-by-need λ-calculus [Ariola and Felleisen, 1997; Maraist, Odersky, and Wadler, 1998]. Diagrams for Meaning Preservation p.14/28

53 Comments on Plotkin s Method Plotkin [1975] originally developed it for the call-by-name and call-by-value λ-calculus. Other researchers have used it for variations on the λ-calculus, e.g., λ-calculus plus assignments and continuations [Felleisen and Hieb, 1992] and the call-by-need λ-calculus [Ariola and Felleisen, 1997; Maraist, Odersky, and Wadler, 1998]. Requiring confluence prevents using some approaches for reasoning about mutually recursive bindings [Ariola and Klop, 1997]. Diagrams for Meaning Preservation p.14/28

54 Comments on Plotkin s Method Plotkin [1975] originally developed it for the call-by-name and call-by-value λ-calculus. Other researchers have used it for variations on the λ-calculus, e.g., λ-calculus plus assignments and continuations [Felleisen and Hieb, 1992] and the call-by-need λ-calculus [Ariola and Felleisen, 1997; Maraist, Odersky, and Wadler, 1998]. Requiring confluence prevents using some approaches for reasoning about mutually recursive bindings [Ariola and Klop, 1997]. Requiring standardization tends to force the evaluation contexts and rewrite rules to look arbitrarily deep into the term and inspect an arbitrary number of tree nodes. Diagrams for Meaning Preservation p.14/28

55 Lift & Project Method Machkasova and Turbak [2000] introduced the Lift and Project diagrams: Lift : t 1 t 4 E E t 2 t 3 N Proj : t 1 t 2 t 4 E E E t 3 t 5 N Diagrams for Meaning Preservation p.15/28

56 Lift & Project Method Machkasova and Turbak [2000] introduced the Lift and Project diagrams: Lift : t 1 t 4 E E t 2 t 3 N Proj : t 1 t 2 t 4 E E E t 3 t 5 N Lift and Project can be substituted for confluence and standardization when proving meaning preservation. Diagrams for Meaning Preservation p.15/28

57 Lift & Project Method Machkasova and Turbak [2000] introduced the Lift and Project diagrams: Lift : t 1 t 4 E E t 2 t 3 N Proj : t 1 t 2 t 4 E E E t 3 t 5 N Lift and Project can be substituted for confluence and standardization when proving meaning preservation. The key benefit is that Lift and Project do not imply confluence, although Lift is equivalent to standardization. Diagrams for Meaning Preservation p.15/28

58 Lift & Project Method Machkasova and Turbak [2000] introduced the Lift and Project diagrams: Lift : t 1 t 4 E E t 2 t 3 N Proj : t 1 t 2 t 4 E E E t 3 t 5 N Lift and Project can be substituted for confluence and standardization when proving meaning preservation. The key benefit is that Lift and Project do not imply confluence, although Lift is equivalent to standardization. In particular, Lift and Project can be used to prove correctness of Ariola/Blom/Klop-style rewrite rules for letrec. Diagrams for Meaning Preservation p.15/28

59 Comparison of Previous Proof Methods Lift & Project can handle cases for which confluence & standardization fail, e.g.: t 1 t 2 N t 3 N Diagrams for Meaning Preservation p.16/28

60 Comparison of Previous Proof Methods Lift & Project can handle cases for which confluence & standardization fail, e.g.: t 1 t 2 N t 3 (New result:) Confluence & standardization can handle cases for which Lift & Project fail, e.g.: N t 1 t 2 N E t 3 N E E Diagrams for Meaning Preservation p.16/28

61 Overview Motivation. The AES framework. Methods for proving meaning preservation. Previous high-level proof methods. New high-level proof methods. Low-level proof methods with elementary diagrams. Marks (e.g., finite developments). Discussion. Diagrams for Meaning Preservation p.17/28

62 Weakening the Proof Burden (1) By carefully inspecting how confluence & standardization and Lift & Project prove meaning preservation, we obtained the following weaker Lift/Project (LP) diagram which implies meaning preservation: t 1 E t 3 E t 5 LP : N E t 2 t 4 Diagrams for Meaning Preservation p.18/28

63 Weakening the Proof Burden (1) By carefully inspecting how confluence & standardization and Lift & Project prove meaning preservation, we obtained the following weaker Lift/Project (LP) diagram which implies meaning preservation: t 1 E t 3 E t 5 LP : N E t 2 t 4 We further weakened LP to the following Lift/Project when Terminating (LPT) diagram: LPT : t 1 t 3 E,nf E t 2 t 4 N Diagrams for Meaning Preservation p.18/28

64 Weakening the Proof Burden (2) The LPT diagram gives the fundamental essence of this family of proof methods and is the weakest condition we know of its kind. It is weaker than similar conditions in the related work by Ariola and Blom [2002]. Diagrams for Meaning Preservation p.19/28

65 Weakening the Proof Burden (2) The LPT diagram gives the fundamental essence of this family of proof methods and is the weakest condition we know of its kind. It is weaker than similar conditions in the related work by Ariola and Blom [2002]. We further weaken the conditions by parameterizing all diagrams on rewrite steps or step sets. Diagrams for Meaning Preservation p.19/28

66 Weakening the Proof Burden (2) The LPT diagram gives the fundamental essence of this family of proof methods and is the weakest condition we know of its kind. It is weaker than similar conditions in the related work by Ariola and Blom [2002]. We further weaken the conditions by parameterizing all diagrams on rewrite steps or step sets. E.g., actual definition of LPT is: s LPT s t 1 t 3 E,nf E t 2 t 4 N Diagrams for Meaning Preservation p.19/28

67 Weakening the Proof Burden (2) The LPT diagram gives the fundamental essence of this family of proof methods and is the weakest condition we know of its kind. It is weaker than similar conditions in the related work by Ariola and Blom [2002]. We further weaken the conditions by parameterizing all diagrams on rewrite steps or step sets. E.g., actual definition of LPT is: s LPT s t 1 t 3 E,nf E t 2 t 4 N This is important because sometimes different methods are needed for different parts of a rewriting system. Diagrams for Meaning Preservation p.19/28

68 Overview Motivation. The AES framework. Methods for proving meaning preservation. Previous high-level proof methods. New high-level proof methods. Low-level proof methods with elementary diagrams. Marks (e.g., finite developments). Discussion. Diagrams for Meaning Preservation p.20/28

69 Proving the High-Level Diagrams Diagrams like confluence, standardization, Lift, Proj, LP, and LPT can be used to prove meaning preservation, but they are themselves quite hard to prove, because the diagrams are quite high-level and abstract. Diagrams for Meaning Preservation p.21/28

70 Proving the High-Level Diagrams Diagrams like confluence, standardization, Lift, Proj, LP, and LPT can be used to prove meaning preservation, but they are themselves quite hard to prove, because the diagrams are quite high-level and abstract. We present 2 new meaning preservation proof methods which are low-level because their conditions are only elementary diagrams and simple (to understand, not necessarily to prove) kinds of termination. Diagrams for Meaning Preservation p.21/28

71 Proving the High-Level Diagrams Diagrams like confluence, standardization, Lift, Proj, LP, and LPT can be used to prove meaning preservation, but they are themselves quite hard to prove, because the diagrams are quite high-level and abstract. We present 2 new meaning preservation proof methods which are low-level because their conditions are only elementary diagrams and simple (to understand, not necessarily to prove) kinds of termination. It is expected that a rewriting system will be partitioned into step sets that are closed under residuals w.r.t. evaluation and the right method will be used for each partition. Often, each partition will contain all of the steps for some subset of the rewrite rules. Diagrams for Meaning Preservation p.21/28

72 Low-level Method 1 Well Behaved with Standardization: WB+Std(S) Trm(E S) WL1(S, S) WL1(S, S) WP1( Weak Lift 1-Step: Weak Project 1-Step: WL1(S, S ) t 1 t E,S 4 N,S E,S S WP1(S) t 2 t 3 t 1 t 2 t 3 t 4 Useful for difficult rewrite step sets which do not have finite developments, e.g., Ariola/Blom/Klop-style letrec rewrite rules. N,S E E S Diagrams for Meaning Preservation p.22/28

73 Low-level Method 2 Well Behaved without Standardization: WB Std(S) Trm(S) LConf(S) WLP1(S) NE(S) Weak Lift/Project 1-Step: N-Steps Do Not Create E-Step WLP1(S) N,S t 1 t 4 E E t 2 t 3 S NE(S) N,S Useful for difficult rewrite step sets which do not have standardization but do have termination. t 1 t 4 E,S E,S t 2 t 3 Diagrams for Meaning Preservation p.23/28

74 Overview Motivation. The AES framework. Methods for proving meaning preservation. Previous high-level proof methods. New high-level proof methods. Low-level proof methods with elementary diagrams. Marks (e.g., finite developments). Discussion. Diagrams for Meaning Preservation p.24/28

75 When Termination Properties Fail Sometimes, a desired termination property fails for a rewrite step set S generated by some rewrite rule(s), but holds for S M where M is a set of marked steps. Diagrams for Meaning Preservation p.25/28

76 When Termination Properties Fail Sometimes, a desired termination property fails for a rewrite step set S generated by some rewrite rule(s), but holds for S M where M is a set of marked steps. The marks typically force termination by forbidding contracting unmarked redexes and ensuring created redexes are unmarked. Diagrams for Meaning Preservation p.25/28

77 When Termination Properties Fail Sometimes, a desired termination property fails for a rewrite step set S generated by some rewrite rule(s), but holds for S M where M is a set of marked steps. The marks typically force termination by forbidding contracting unmarked redexes and ensuring created redexes are unmarked. The rewriting system is embedded in a larger marked system with additional marked terms and rewrite steps. Proving the larger system correct is enough. Diagrams for Meaning Preservation p.25/28

78 When Termination Properties Fail Sometimes, a desired termination property fails for a rewrite step set S generated by some rewrite rule(s), but holds for S M where M is a set of marked steps. The marks typically force termination by forbidding contracting unmarked redexes and ensuring created redexes are unmarked. The rewriting system is embedded in a larger marked system with additional marked terms and rewrite steps. Proving the larger system correct is enough. We give conditions on marking such that proving LPT for S M (i.e., the marked fragment of the larger marked system) is sufficient to prove LPT for S. Diagrams for Meaning Preservation p.25/28

79 Overview Motivation. The AES framework. Methods for proving meaning preservation. Discussion. Diagrams for Meaning Preservation p.26/28

80 Related Work Our work is a direct successor to the work of Machkasova and Turbak [2000]. Diagrams for Meaning Preservation p.27/28

81 Related Work Our work is a direct successor to the work of Machkasova and Turbak [2000]. The work of Ariola and Blom [2002] has important similarities at a deep level. Their framework does not make it easy to prove operational properties, e.g., the user must prove a connection between infinite normal forms and operational behavior. Also, there are no low-level abstract proof methods. Diagrams for Meaning Preservation p.27/28

82 Related Work Our work is a direct successor to the work of Machkasova and Turbak [2000]. The work of Ariola and Blom [2002] has important similarities at a deep level. Their framework does not make it easy to prove operational properties, e.g., the user must prove a connection between infinite normal forms and operational behavior. Also, there are no low-level abstract proof methods. Odersky [1993] gives conditions that a transformation is an observational equivalence. Despite similarities, the formal presentation is quite different and tied to a particular syntactic formalism. Diagrams for Meaning Preservation p.27/28

83 Conclusions Overall, the meaning-preservation proof methods we present gather together the strengths of existing methods and improve on them in a number of ways. Diagrams for Meaning Preservation p.28/28

84 Conclusions Overall, the meaning-preservation proof methods we present gather together the strengths of existing methods and improve on them in a number of ways. Our proof methods are designed to be easy for someone who is not a rewriting specialist to read, understand, and apply to their programming language calculi. Diagrams for Meaning Preservation p.28/28

85 Conclusions Overall, the meaning-preservation proof methods we present gather together the strengths of existing methods and improve on them in a number of ways. Our proof methods are designed to be easy for someone who is not a rewriting specialist to read, understand, and apply to their programming language calculi. We expect that our methods will help in making the expertise of the rewriting community accessible and useful to the outside world. Diagrams for Meaning Preservation p.28/28

86 References Zena M. Ariola and Stefan Blom. Skew confluence and the lambda calculus with letrec. Ann. Pure Appl. Logic, 117(1 3): , Zena M. Ariola and Matthias Felleisen. The call-by-need lambda calculus. J. Funct. Programming, 3(7), May Zena M. Ariola and Jan Willem Klop. Lambda calculus with explicit recursion. Inform. & Comput., 139: , Matthias Felleisen and Robert Hieb. The revised report on the syntactic theories of sequential control and state. Theoret. Comput. Sci., 102: , Elena Machkasova and Franklyn A. Turbak. A calculus for link-time compilation. In Programming Languages & Systems, 9th European Symp. Programming, volume 1782 of LNCS, pages Springer-Verlag, ISBN URL John Maraist, Martin Odersky, and Philip Wadler. The call-byneed lambda calculus J. Funct. Programming, 8(3), May Martin Odersky. A syntactic method for proving observational 28-1

87 equivalences. Research Report YALEU/DCS/RR-964, Yale Univ., Dept. of Comp. Science, May Gordon D. Plotkin. Call-by-name, call-by-value and the lambda calculus. Theoret. Comput. Sci., 1: ,

Diagrams for Meaning Preservation

Diagrams for Meaning Preservation Diagrams for Meaning Preservation J. B. Wells 1, Detlef Plump 2, and Fairouz Kamareddine 1 1 Heriot-Watt University http://www.cee.hw.ac.uk/ultra/ 2 University of York http://www.cs.york.ac.uk/~det/ Abstract.

More information

Diagrams for Meaning Preservation

Diagrams for Meaning Preservation Diagrams for Meaning Preservation J. B. Wells 1, Detlef Plump 2, and Fairouz Kamareddine 1 1 Heriot-Watt University http://www.cee.hw.ac.uk/ultra/ 2 University of York http://www.cs.york.ac.uk/~det/ Abstract.

More information

Diagrams for Meaning Preservation 89 rules. ome transformations may involve global reasoning about the entire program, but many are local and a good m

Diagrams for Meaning Preservation 89 rules. ome transformations may involve global reasoning about the entire program, but many are local and a good m Diagrams for Meaning Preservation Joe B. Wells 1, Detlef Plump 2, and Fairouz Kamareddine 1 1 Heriot-Watt University http://www.cee.hw.ac.uk/ultra/ 2 University of York http://www.cs.york.ac.uk/ det/ Abstract.

More information

Computational 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. 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 information

Simulation in the Call-by-Need Lambda-Calculus with letrec

Simulation in the Call-by-Need Lambda-Calculus with letrec Simulation in the Call-by-Need Lambda-Calculus with letrec Manfred Schmidt-Schauss 1 and David Sabel 1 and Elena Machkasova 2 1 Dept. Informatik und Mathematik, Inst. Informatik, J.W. Goethe-University,

More information

Skew and ω-skew Confluence and Infinite Normal Forms

Skew 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 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

Continuations, Processes, and Sharing. Paul Downen, Luke Maurer, Zena M. Ariola, Daniele Varacca. September 8, 2014

Continuations, Processes, and Sharing. Paul Downen, Luke Maurer, Zena M. Ariola, Daniele Varacca. September 8, 2014 Continuations, Processes, and Sharing Paul Downen, Luke Maurer, Zena M. Ariola, Daniele Varacca University of Oregon, Université Paris Diderot September 8, 2014 The plethora of semantic artifacts Many

More information

λ S : A Lambda Calculus with Side-effects

λ S : A Lambda Calculus with Side-effects L14-1 λ S : A Lambda Calculus with Side-effects delivered by Jacob Schwartz Laboratory for Computer Science M.I.T. Lecture 14 M-Structures and Barriers L14-2 Some problems cannot be expressed functionally

More information

The Call-by-Need Lambda Calculus

The 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 information

CS611 Lecture 25 Solving Domain Equations 22 October 2007 Lecturer: Andrew Myers

CS611 Lecture 25 Solving Domain Equations 22 October 2007 Lecturer: Andrew Myers CS611 Lecture 25 Solving Domain Equations 22 October 2007 Lecturer: Andrew Myers To develop a denotational semantics for a language with recursive types, or to give a denotational semantics for the untyped

More information

Congruence of Bisimulation in a Non-Deterministic Call-By-Need Lambda Calculus

Congruence 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 information

CS 6110 Lecture 35 Solving Domain Equations 19 April 2013 Lecturer: Andrew Myers

CS 6110 Lecture 35 Solving Domain Equations 19 April 2013 Lecturer: Andrew Myers CS 6110 Lecture 35 Solving Domain Equations 19 April 2013 Lecturer: Andrew Myers To develop a denotational semantics for a language with recursive types, or to give a denotational semantics for the untyped

More information

2 Results I: Lifting Computer Science

2 Results I: Lifting Computer Science Ben Greenman December 12, 2015 Call-By-Name, Call-By-Value, and the λ Calculus Abstract Plotkin s 1975 paper is strictly business. There are many theorems packed in the space of 35 pages, with little room

More information

Non-Idempotent Typing Operators, beyond the λ-calculus

Non-Idempotent Typing Operators, beyond the λ-calculus Non-Idempotent Typing Operators, beyond the λ-calculus Soutenance de thèse Pierre VIAL IRIF (Univ. Paris Diderot and CNRS) December 7, 2017 Non-idempotent typing operators P. Vial 0 1 /46 Certification

More information

Congruence of Bisimulation in a Non-Deterministic Call-By-Need Lambda Calculus

Congruence of Bisimulation in a Non-Deterministic Call-By-Need Lambda Calculus SOS 2004 Preliminary Version Congruence of Bisimulation in a Non-Deterministic Call-By-Need Lambda Calculus Matthias Institut für Informatik Johann Wolfgang Goethe-Universität Postfach 11 19 32 D-60054

More information

NICTA Advanced Course. Theorem Proving Principles, Techniques, Applications

NICTA 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 information

Introduction 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 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 information

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

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

More information

Simulation in the Call-by-Need Lambda-Calculus with Letrec, Case, Constructors, and Seq

Simulation in the Call-by-Need Lambda-Calculus with Letrec, Case, Constructors, and Seq Simulation in the Call-by-Need Lambda-Calculus with Letrec, Case, Constructors, and Seq Manfred Schmidt-Schauss 1 and David Sabel 1 and Elena Machkasova 2 1 Dept. Informatik und Mathematik, Inst. Informatik,

More information

A Call-by-Need Lambda-Calculus with Locally Bottom-Avoiding Choice: Context Lemma and Correctness of Transformations

A Call-by-Need Lambda-Calculus with Locally Bottom-Avoiding Choice: Context Lemma and Correctness of Transformations A Call-by-Need Lambda-Calculus with Locally Bottom-Avoiding Choice: Context Lemma and Correctness of Transformations David Sabel and Manfred Schmidt-Schauß Research group for Artificial Intelligence and

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

Simply Typed λ-calculus

Simply 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 information

Variations on a theme: call-by-value and factorization

Variations on a theme: call-by-value and factorization Variations on a theme: call-by-value and factorization Beniamino Accattoli INRIA & LIX, Ecole Polytechnique Accattoli (INRIA Parsifal) Variations on a theme: call-by-value and factorization 1 / 31 Outline

More information

Operational Semantics

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

More information

SHARING IN THE WEAK LAMBDA-CALCULUS REVISITED

SHARING 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 information

Modularity of Confluence: A Simplified Proof

Modularity 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

Algorithms for Extended Alpha-Equivalence and Complexity

Algorithms for Extended Alpha-Equivalence and Complexity Algorithms for Extended Alpha-Equivalence and Complexity Manfred Schmidt-Schauß, Conrad Rau, and David Sabel Goethe-Universität, Frankfurt, Germany {schauss,rau,sabel}@ki.informatik.uni-frankfurt.de Abstract

More information

7 RC Simulates RA. Lemma: For every RA expression E(A 1... A k ) there exists a DRC formula F with F V (F ) = {A 1,..., A k } and

7 RC Simulates RA. Lemma: For every RA expression E(A 1... A k ) there exists a DRC formula F with F V (F ) = {A 1,..., A k } and 7 RC Simulates RA. We now show that DRC (and hence TRC) is at least as expressive as RA. That is, given an RA expression E that mentions at most C, there is an equivalent DRC expression E that mentions

More information

Normalization by Evaluation

Normalization 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

Normalisation by evaluation

Normalisation by evaluation Normalisation by evaluation Sam Lindley Laboratory for Foundations of Computer Science The University of Edinburgh Sam.Lindley@ed.ac.uk August 11th, 2016 Normalisation and embedded domain specific languages

More information

Simply Typed Lambda-Calculi (II)

Simply 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 information

Classical Program Logics: Hoare Logic, Weakest Liberal Preconditions

Classical Program Logics: Hoare Logic, Weakest Liberal Preconditions Chapter 1 Classical Program Logics: Hoare Logic, Weakest Liberal Preconditions 1.1 The IMP Language IMP is a programming language with an extensible syntax that was developed in the late 1960s. We will

More information

arxiv: v1 [cs.lo] 29 May 2014

arxiv: v1 [cs.lo] 29 May 2014 An Introduction to the Clocked Lambda Calculus Jörg Endrullis, Dimitri Hendriks, Jan Willem Klop, and Andrew Polonsky VU University Amsterdam, The Netherlands Abstract We give a brief introduction to the

More information

Curry-Howard Correspondence for Classical Logic

Curry-Howard Correspondence for Classical Logic Curry-Howard Correspondence for Classical Logic Stéphane Graham-Lengrand CNRS, Laboratoire d Informatique de l X Stephane.Lengrand@Polytechnique.edu 2 Practicalities E-mail address: Stephane.Lengrand@Polytechnique.edu

More information

Inducing syntactic cut-elimination for indexed nested sequents

Inducing syntactic cut-elimination for indexed nested sequents Inducing syntactic cut-elimination for indexed nested sequents Revantha Ramanayake Technische Universität Wien (Austria) IJCAR 2016 June 28, 2016 Revantha Ramanayake (TU Wien) Inducing syntactic cut-elimination

More information

Introduction to lambda calculus Part 2

Introduction 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 information

α-recursion Theory and Ordinal Computability

α-recursion Theory and Ordinal Computability α-recursion Theory and Ordinal Computability by Peter Koepke University of Bonn 1 3. 2. 2007 Abstract Motivated by a talk of S. D. Friedman at BIWOC we show that the α-recursive and α-recursively enumerable

More information

Streams and Coalgebra Lecture 2

Streams and Coalgebra Lecture 2 Streams and Coalgebra Lecture 2 Helle Hvid Hansen and Jan Rutten Radboud University Nijmegen & CWI Amsterdam Representing Streams II, Lorentz Center, Leiden, January 2014 Tutorial Overview Lecture 1 (Hansen):

More information

λ Slide 1 Content Exercises from last time λ-calculus COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification

λ 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 information

The Permutative λ-calculus

The Permutative λ-calculus The Permutative λ-calculus Beniamino Accattoli 1 Delia Kesner 2 INRIA and LIX (École Polytechnique) PPS (CNRS and Université Paris-Diderot) 1 / 34 Outline 1 λ-calculus 2 Permutative extension 3 Confluence

More information

Rules and derivations in an elementary logic course arxiv: v1 [cs.lo] 7 Jan 2016

Rules and derivations in an elementary logic course arxiv: v1 [cs.lo] 7 Jan 2016 Rules and derivations in an elementary logic course arxiv:160101483v1 [cslo] 7 Jan 2016 Gilles Dowek Inria, 23 avenue d Italie, CS 81321, 75214 Paris Cedex 13, France gillesdowek@inriafr When teaching

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

Program verification using Hoare Logic¹

Program verification using Hoare Logic¹ Program verification using Hoare Logic¹ Automated Reasoning - Guest Lecture Petros Papapanagiotou Part 2 of 2 ¹Contains material from Mike Gordon s slides: Previously on Hoare Logic A simple while language

More information

FIXED POINTS AND EXTENSIONALITY IN TYPED FUNCTIONAL PROGRAMMING LANGUAGES

FIXED POINTS AND EXTENSIONALITY IN TYPED FUNCTIONAL PROGRAMMING LANGUAGES FIXED POINTS AND EXTENSIONALITY IN TYPED FUNCTIONAL PROGRAMMING LANGUAGES a dissertation submitted to the department of computer science and the committee on graduate studies of stanford university in

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

Towards Correctness of Program Transformations Through Unification and Critical Pair Computation

Towards Correctness of Program Transformations Through Unification and Critical Pair Computation Towards Correctness of Program Transformations Through Unification and Critical Pair Computation Conrad Rau and Manfred Schmidt-Schauß Institut für Informatik Johann Wolfgang Goethe-Universität Postfach

More information

A Terminating and Confluent Linear Lambda Calculus

A Terminating and Confluent Linear Lambda Calculus A Terminating and Confluent Linear Lambda Calculus Yo Ohta and Masahito Hasegawa Research Institute for Mathematical Sciences, Kyoto University Kyoto 606-8502, Japan Abstract. We present a rewriting system

More information

Formal Methods for Probabilistic Systems

Formal Methods for Probabilistic Systems 1 Formal Methods for Probabilistic Systems Annabelle McIver Carroll Morgan Source-level program logic Introduction to probabilistic-program logic Systematic presentation via structural induction Layout

More information

Mid-Semester Quiz Second Semester, 2012

Mid-Semester Quiz Second Semester, 2012 THE AUSTRALIAN NATIONAL UNIVERSITY Mid-Semester Quiz Second Semester, 2012 COMP2600 (Formal Methods for Software Engineering) Writing Period: 1 hour duration Study Period: 10 minutes duration Permitted

More information

Chapter 4: Computation tree logic

Chapter 4: Computation tree logic INFOF412 Formal verification of computer systems Chapter 4: Computation tree logic Mickael Randour Formal Methods and Verification group Computer Science Department, ULB March 2017 1 CTL: a specification

More information

3.2 Reduction 29. Truth. The constructor just forms the unit element,. Since there is no destructor, there is no reduction rule.

3.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 information

Lecture Notes on Subject Reduction and Normal Forms

Lecture Notes on Subject Reduction and Normal Forms Lecture Notes on Subject Reduction and Normal Forms 15-814: Types and Programming Languages Frank Pfenning Lecture 4 September 13, 2018 1 Introduction In the last lecture we proved some key aspect of a

More information

Typing λ-terms. Types. Typed λ-terms. Base Types. The Typing Relation. Advanced Formal Methods. Lecture 3: Simply Typed Lambda calculus

Typing λ-terms. Types. Typed λ-terms. Base Types. The Typing Relation. Advanced Formal Methods. Lecture 3: Simply Typed Lambda calculus Course 2D1453, 200607 Advanced Formal Methods Lecture 3: Simply Typed Lambda calculus Mads Dam KTH/CSC Some material from B. Pierce: TAPL + some from G. Klein, NICTA Typing λterms The uptyped λcalculus

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

CSCI 490 problem set 6

CSCI 490 problem set 6 CSCI 490 problem set 6 Due Tuesday, March 1 Revision 1: compiled Tuesday 23 rd February, 2016 at 21:21 Rubric For full credit, your solutions should demonstrate a proficient understanding of the following

More information

Minimal logic for computable functionals

Minimal logic for computable functionals Minimal logic for computable functionals Helmut Schwichtenberg Mathematisches Institut der Universität München Contents 1. Partial continuous functionals 2. Total and structure-total functionals 3. Terms;

More information

Reasoning about Strategies: From module checking to strategy logic

Reasoning about Strategies: From module checking to strategy logic Reasoning about Strategies: From module checking to strategy logic based on joint works with Fabio Mogavero, Giuseppe Perelli, Luigi Sauro, and Moshe Y. Vardi Luxembourg September 23, 2013 Reasoning about

More information

ESE601: Hybrid Systems. Introduction to verification

ESE601: Hybrid Systems. Introduction to verification ESE601: Hybrid Systems Introduction to verification Spring 2006 Suggested reading material Papers (R14) - (R16) on the website. The book Model checking by Clarke, Grumberg and Peled. What is verification?

More information

Lazy Functions as Processes

Lazy Functions as Processes Lazy Functions as Processes Luke Maurer University of Oregon maurerl@cs.uoregon.edu Abstract CPS transforms have long been important tools in the study of programming languages, especially those related

More information

A λ-calculus with Constants and Let-blocks

A λ-calculus with Constants and Let-blocks A λ-calculus with Constants and Let-blocks Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. September 19, 2006 September 19, 2006 http://www.csg.csail.mit.edu/6.827 L04-1 Outline Recursion

More information

The Locally Nameless Representation

The Locally Nameless Representation Noname manuscript No. (will be inserted by the editor) The Locally Nameless Representation Arthur Charguéraud Received: date / Accepted: date Abstract This paper provides an introduction to the locally

More information

Denoting computation

Denoting computation A jog from Scott Domains to Hypercoherence Spaces 13/12/2006 Outline Motivation 1 Motivation 2 What Does Denotational Semantic Mean? Trivial examples Basic things to know 3 Scott domains di-domains 4 Event

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

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

Non- -overlappings TRSs are UN. Stefan Kahrs and Connor Smith University of Kent

Non- -overlappings TRSs are UN. Stefan Kahrs and Connor Smith University of Kent Non- -overlappings TRSs are UN Stefan Kahrs and Connor Smith University of Kent This is about: When is the equational theory of a TRS consistent (CON), when does it have unique normal forms (UN), How can

More information

Logical specification and coinduction

Logical specification and coinduction Logical specification and coinduction Robert J. Simmons Carnegie Mellon University, Pittsburgh PA 15213, USA, rjsimmon@cs.cmu.edu, WWW home page: http://www.cs.cmu.edu/ rjsimmon Abstract. The notion of

More information

Program Testing and Constructive Validity

Program Testing and Constructive Validity Program Testing and Constructive Validity Peter Dybjer Chalmers University of Technology, Göteborg, Sweden Philosophy and Foundations of Mathematics: Epistemological and Ontological Aspects - to Per Martin-Löf

More information

A Systematic Approach to Delimited Control with Multiple Prompts. Paul Downen, Zena M. Ariola. March 25, University of Oregon

A Systematic Approach to Delimited Control with Multiple Prompts. Paul Downen, Zena M. Ariola. March 25, University of Oregon A Systematic Approach to Delimited Control with Multiple Prompts Paul Downen, Zena M. Ariola University of Oregon March 25, 2012 Introduction to control operators Separating a redex from its evaluation

More information

Threesomes, With and Without Blame

Threesomes, With and Without Blame hreesomes, With and Without Blame Jeremy G. Siek 1 and Philip Wadler 2 1 University of Colorado at Boulder 2 University of Edinburgh Abstract. he blame calculus of Wadler and Findler gives a high-level

More information

Typed Arithmetic Expressions

Typed Arithmetic Expressions Typed Arithmetic Expressions CS 550 Programming Languages Jeremy Johnson TAPL Chapters 3 and 5 1 Types and Safety Evaluation rules provide operational semantics for programming languages. The rules provide

More information

Probabilistic Logics and Probabilistic Networks

Probabilistic Logics and Probabilistic Networks Probabilistic Logics and Probabilistic Networks Jan-Willem Romeijn, Philosophy, Groningen Jon Williamson, Philosophy, Kent ESSLLI 2008 Course Page: http://www.kent.ac.uk/secl/philosophy/jw/2006/progicnet/esslli.htm

More information

Developing Modal Tableaux and Resolution Methods via First-Order Resolution

Developing Modal Tableaux and Resolution Methods via First-Order Resolution Developing Modal Tableaux and Resolution Methods via First-Order Resolution Renate Schmidt University of Manchester Reference: Advances in Modal Logic, Vol. 6 (2006) Modal logic: Background Established

More information

Communication and Concurrency: CCS

Communication 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 information

Proving Completeness for Nested Sequent Calculi 1

Proving Completeness for Nested Sequent Calculi 1 Proving Completeness for Nested Sequent Calculi 1 Melvin Fitting abstract. Proving the completeness of classical propositional logic by using maximal consistent sets is perhaps the most common method there

More information

Introduction to lambda calculus Part 6

Introduction 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 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

Mathematical Foundations of Programming. Nicolai Kraus. Draft of February 15, 2018

Mathematical Foundations of Programming. Nicolai Kraus. Draft of February 15, 2018 Very short lecture notes: Mathematical Foundations of Programming University of Nottingham, Computer Science, module code G54FOP, Spring 2018 Nicolai Kraus Draft of February 15, 2018 What is this? This

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

Implementing -Reduction by. Hypergraph Rewriting. Sabine Kuske 1. Fachbereich Mathematik und Informatik. Universitat Bremen. D{28334 Bremen, Germany

Implementing -Reduction by. Hypergraph Rewriting. Sabine Kuske 1. Fachbereich Mathematik und Informatik. Universitat Bremen. D{28334 Bremen, Germany URL: http://www.elsevier.nl/locate/entcs/volume2.html 8 pages Implementing -Reduction by Hypergraph Rewriting abine Fachbereich Mathematik und Informatik Universitat Bremen D{28334 Bremen, Germany email:

More information

Term Graph Rewriting. syntax and semantics

Term Graph Rewriting. syntax and semantics Term Graph Rewriting synta and semantics IPA Dissertation Series, no. 2001-05 c 2001 Stefan Blom The work in this thesis has been carried out under the auspices of the research school IPA (Institute for

More information

Semantical study of intuitionistic modal logics

Semantical study of intuitionistic modal logics Semantical study of intuitionistic modal logics Department of Intelligence Science and Technology Graduate School of Informatics Kyoto University Kensuke KOJIMA January 16, 2012 Abstract We investigate

More information

A probabilistic lambda calculus - Some preliminary investigations

A 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 information

Reducibility proofs in λ-calculi with intersection types

Reducibility proofs in λ-calculi with intersection types Reducibility proofs in λ-calculi with intersection types Fairouz Kamareddine, Vincent Rahli, and J. B. Wells ULTRA group, Heriot-Watt University, http://www.macs.hw.ac.uk/ultra/ March 14, 2008 Abstract

More information

Five Basic Concepts of. Axiomatic Rewriting Theory

Five Basic Concepts of. Axiomatic Rewriting Theory Five Basic Concepts of Axiomatic Rewriting Theory Paul-André Melliès Institut de Recherche en Informatique Fondamentale (IRIF) CNRS & Université Paris Denis Diderot 5th International Workshop on Confluence

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

Probabilistic Guarded Commands Mechanized in HOL

Probabilistic Guarded Commands Mechanized in HOL Probabilistic Guarded Commands Mechanized in HOL Joe Hurd joe.hurd@comlab.ox.ac.uk Oxford University Joint work with Annabelle McIver (Macquarie University) and Carroll Morgan (University of New South

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

Confluence Modulo Equivalence with Invariants in Constraint Handling Rules

Confluence Modulo Equivalence with Invariants in Constraint Handling Rules Confluence Modulo Equivalence with Invariants in Constraint Handling Rules Daniel Gall and Thom Frühwirth Institute of Software Engineering and Programming Languages, Ulm University, 89069 Ulm, Germany

More information

Strength; Weakest Preconditions

Strength; Weakest Preconditions 12/14: solved Strength; Weakest Preconditions CS 536: Science of Programming, Spring 2018 A. Why To combine correctness triples, we need to weaken and strengthen conditions. A weakest precondition is the

More information

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

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

More information

Program verification. Hoare triples. Assertional semantics (cont) Example: Semantics of assignment. Assertional semantics of a program

Program verification. Hoare triples. Assertional semantics (cont) Example: Semantics of assignment. Assertional semantics of a program Program verification Assertional semantics of a program Meaning of a program: relation between its inputs and outputs; specified by input assertions (pre-conditions) and output assertions (post-conditions)

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

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

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

On some Metatheorems about FOL

On some Metatheorems about FOL On some Metatheorems about FOL February 25, 2014 Here I sketch a number of results and their proofs as a kind of abstract of the same items that are scattered in chapters 5 and 6 in the textbook. You notice

More information

The lambda calculus with constructors

The lambda calculus with constructors The lambda calculus with constructors Categorical semantic and Continuations Barbara Petit Focus - Univ. Bologna CaCos 2012 Barbara Petit (Focus - Univ. Bologna) The lambda calculus with constructors 1

More information

Standardization of a call-by-value calculus

Standardization of a call-by-value calculus Standardization of a call-by-value calculus Giulio Guerrieri 1, Luca Paolini 2, and Simona Ronchi Della Rocca 2 1 Laboratoire PPS, UMR 7126, Université Paris Diderot, Sorbonne Paris Cité F-75205 Paris,

More information

Models of computation

Models 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 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