Meta-reasoning in the concurrent logical framework CLF
|
|
- Dustin Gerald Mills
- 6 years ago
- Views:
Transcription
1 Meta-reasoning in the concurrent logical framework CLF Jorge Luis Sacchini (joint work with Iliano Cervesato) Carnegie Mellon University Qatar campus Nagoya University, 27 June 2014 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 1 / 48
2 Objectives Concurrency and distribution are essential features in modern systems. PLs are engineered (or retrofitted) to support them. Their formal semantics is not as well understood or studied as in the sequential case. Formal semantics will enable, e.g., development of formal verification, logical frameworks, verifying programs and program transformations. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 2 / 48
3 Logical frameworks Logical frameworks are formalisms used to specify PL and their metatheory. Coq, Agda, Twelf, Beluga, Delphin,... Our goal is to develop logical frameworks for specifying concurrent and distributed PL. Two main approaches. Deep approach: specify a concurrency model in a general purpose LF (Coq, Agda) Shallow approach: provide direct support in a special purpose LF (Twelf, Beluga, Delphin, LLF, HLF, CLF) We follow the shallow approach, using CLF as our LF. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 3 / 48
4 Outline 1 Twelf 2 CLF 3 Substructural operational semantics 4 Safety for SSOS 5 Meta-CLF 6 Conclusions and future work Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 4 / 48
5 Outline 1 Twelf 2 CLF 3 Substructural operational semantics 4 Safety for SSOS 5 Meta-CLF 6 Conclusions and future work Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 5 / 48
6 Twelf Logical framework designed to specify and prove properties about deductive systems (e.g. logics, programming languages). Based on the Edinburgh logical framework (LF). Binders are represented using Higher-Order Abstract Syntax (HOAS). Used in large specifications: SML, TALT, Proof-Carrying Code... Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 6 / 48
7 Twelf Example Natural numbers: Addition: z nat z + n = n n nat s(n) nat m + n = p s(m) + n = s(p) In Twelf: nat : type. z : nat. s : nat -> nat. plus : nat -> nat -> nat -> type. plus/z : plus z N N. plus/s : plus (s M) N (s P) <- plus M N P. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 7 / 48
8 Twelf Addition in Twelf: plus : nat -> nat -> nat -> type. plus/z : plus z N N. plus/s : plus (s M) N (s P) <- plus M N P. Backward chaining proof search: plus (s(s z)) (s(s z)) X X? Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 8 / 48
9 Twelf Addition in Twelf: plus : nat -> nat -> nat -> type. plus/z : plus z N N. plus/s : plus (s M) N (s P) <- plus M N P. Backward chaining proof search: plus (s z) (s(s z)) X 1 plus (s(s z)) (s(s z)) X X = s X 1 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 8 / 48
10 Twelf Addition in Twelf: plus : nat -> nat -> nat -> type. plus/z : plus z N N. plus/s : plus (s M) N (s P) <- plus M N P. Backward chaining proof search: plus z (s(s z)) X 2 plus (s z) (s(s z)) X 1 plus (s(s z)) (s(s z)) X X = s X 1 = s (s X 2 ) Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 8 / 48
11 Twelf Addition in Twelf: plus : nat -> nat -> nat -> type. plus/z : plus z N N. plus/s : plus (s M) N (s P) <- plus M N P. Backward chaining proof search: plus z (s(s z)) X 2 plus (s z) (s(s z)) X 1 plus (s(s z)) (s(s z)) X X = s X 1 = s (s X 2 ) = 4 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 8 / 48
12 Meta-theorems in Twelf Example: m, n, p. m + n = p n + m = p In Twelf: plus/comm: plus M N P -> plus N M P -> type. (Proof proceeds by induction on M). Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 9 / 48
13 Specifying PLs in Twelf Simply-typed λ-calculus: e ::= x λx.e e 1 e 2 τ ::= ρ τ τ (Expressions) (Types) In Twelf: exp : type. lam : (exp -> exp) -> exp. app : exp -> exp -> exp. tp : type. arr : tp -> tp -> tp. HOAS: variables in Twelf represent variables in the object language. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 10 / 48
14 Specifying PLs in Twelf Typing judgment: Γ e : τ x : τ Γ Γ x : τ Γ, x : τ e : τ Γ e 1 : τ τ Γ e 2 : τ Γ λx.r : τ τ Γ e 1 e 2 : τ In Twelf: of : exp -> tp -> type. of/lam : of (lam \x. E x) (arr T T ) <- ({x} of x T -> of (E x) T ). of/app : of (app E1 E2) T <- of E1 (arr T T) <- of E2 T. HOAS: Twelf context represents the object language context. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 11 / 48
15 Meta-theorems in Twelf Type preservation: Γ, e 1, e 2, τ. Γ e 1 : τ e 1 e 2 Γ e 2 : τ In Twelf: type-pres: of E1 T -> red E1 E2 -> of E2 T -> type. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 12 / 48
16 Extensions of Twelf Many PL features are difficult to represent in Twelf: State Concurrency Parallelism Distribution Several extensions have been proposed: Linear LF (state, linear logic) Hybrid LF (hybrid logic, reasoning about LLF) Concurrent LF (concurrency, distribution)... Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 13 / 48
17 Outline 1 Twelf 2 CLF 3 Substructural operational semantics 4 Safety for SSOS 5 Meta-CLF 6 Conclusions and future work Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 14 / 48
18 CLF CLF is an extension of the Edinburgh logical framework (LF) designed to specify distributed and concurrent systems. Large number of examples: semantics of PL, Petri nets, voting protocols, etc. CLF extends LF with linear types and a monad to encapsulate concurrent effects: K ::= type Π!x : A.K (Kinds) A ::= P Πx : A.A A B A B {S} (Async types) S ::= 1!A A S S x : A.S (Sync types) as well as proof terms for these types (more on that later) Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 15 / 48
19 CLF CLF combines: Asynchronous types (Π,, &) Linear Logical Framework Backward chaining operational semantics Synchronous types (, ) Encapsulated in a monad ({S}) Forward chaining operational semantics Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 16 / 48
20 CLF Synchronous fragment Monadic types are used to encapsulate concurrent effects: A B {C} (Multiset) Rewriting interpretation of linear logic. Example: in : tick count N {count (N + 1)} Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 17 / 48
21 CLF Synchronous fragment Monadic types are used to encapsulate concurrent effects: A B {C} (Multiset) Rewriting interpretation of linear logic. Example: in : tick count N plus N 1 M {count M} Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 17 / 48
22 CLF Synchronous fragment Monadic types are used to encapsulate concurrent effects: A B {C} (Multiset) Rewriting interpretation of linear logic. Example: in : tick count N {count (N + 1)} Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 17 / 48
23 CLF Synchronous fragment Monadic types are used to encapsulate concurrent effects: A B {C} (Multiset) Rewriting interpretation of linear logic. Example: in : tick count N {count (N + 1)} t 1 : tick, t 2 : tick, t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 0, c 2 : count 0 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 17 / 48
24 CLF Synchronous fragment Monadic types are used to encapsulate concurrent effects: A B {C} (Multiset) Rewriting interpretation of linear logic. Example: in : tick count N {count (N + 1)} t 1 : tick, t 2 : tick, t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 0, c 2 : count 0 t 2 : tick, t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 1, c 2 : count 0 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 17 / 48
25 CLF Synchronous fragment Monadic types are used to encapsulate concurrent effects: A B {C} (Multiset) Rewriting interpretation of linear logic. Example: in : tick count N {count (N + 1)} t 1 : tick, t 2 : tick, t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 0, c 2 : count 0 t 2 : tick, t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 1, c 2 : count 0 t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 2, c 2 : count 0 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 17 / 48
26 CLF Synchronous fragment Monadic types are used to encapsulate concurrent effects: A B {C} (Multiset) Rewriting interpretation of linear logic. Example: in : tick count N {count (N + 1)} t 1 : tick, t 2 : tick, t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 0, c 2 : count 0 t 2 : tick, t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 1, c 2 : count 0 t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 2, c 2 : count 0 t 4 : tick, t 5 : tick, c 1 : count 2, c 2 : count 1 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 17 / 48
27 CLF Synchronous fragment Monadic types are used to encapsulate concurrent effects: A B {C} (Multiset) Rewriting interpretation of linear logic. Example: in : tick count N {count (N + 1)} t 1 : tick, t 2 : tick, t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 0, c 2 : count 0 t 2 : tick, t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 1, c 2 : count 0 t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 2, c 2 : count 0 t 4 : tick, t 5 : tick, c 1 : count 2, c 2 : count 1 t 5 : tick, c 1 : count 3, c 2 : count 1 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 17 / 48
28 CLF Synchronous fragment Monadic types are used to encapsulate concurrent effects: A B {C} (Multiset) Rewriting interpretation of linear logic. Example: in : tick count N {count (N + 1)} t 1 : tick, t 2 : tick, t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 0, c 2 : count 0 t 2 : tick, t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 1, c 2 : count 0 t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 2, c 2 : count 0 t 4 : tick, t 5 : tick, c 1 : count 2, c 2 : count 1 t 5 : tick, c 1 : count 3, c 2 : count 1 c 1 : count 3, c 2 : count 2 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 17 / 48
29 Proof terms Monadic types are introduced by traces A trace is basically a sequence of rule applications: ε ::= { } c S ε 1 ; ε 2 Trace composition (;) is associative and is a neutral element Forward chaining with committed choice after every step. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 18 / 48
30 Traces Example: in : tick count N {count (N + 1)} t 1 : tick, t 2 : tick, t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 0, c 2 : count 0 {c 11 } in t 1, c 1 {c 12 } in t 2, c 11 {c 21 } in t 3, c 2 {c 13 } in t 4, c 12 {c 22 } in t 5, c 21 : c 13 : count 3, c 22 : count 2 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 19 / 48
31 Traces Equality on traces: α-equivalence modulo permutation of independent subtraces. Allows encoding of concurrent and distributed features. Two traces are independent (ε 1 ε 2 ) if they operate on different sets of variables. Trace interface: ( ) = ({ } c S) = FV(S) (ε 1 ; ε 2 ) = ε 1 ( ε 2 \ ε 1 ) ( ) = ({ } c S) = dom( ) (ε 1 ; ε 2 ) = ε 2 (ε 1 \ ε 2 )!(ε 1 ) ε 1 ε 2 ε 1 ε 2 = ε 1 ε 2 =. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 20 / 48
32 Traces Trace equality: ε; ε ε ε; ε 1 ; (ε 2 ; ε 3 ) (ε 1 ; ε 2 ); ε 3 Example: ε 1 ε 2 ε 1 ε 1 ε 2 ε 2 ε 1 ; ε 2 ε 2 ; ε 1 ε 1 ; ε 2 ε 1; ε 2 ε 1 ; ε 2 ε 1 ; ε 2 {c 11 } in t 1, c 1 {c 12 } in t 2, c 11 {c 21 } in t 3, c 2 {c 13 } in t 4, c 12 {c 22 } in t 5, c 21 {c 11 } in t 1, c 1 {c 21 } in t 3, c 2 {c 12 } in t 2, c 11 {c 13 } in t 4, c 12 {c 22 } in t 5, c 21 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 21 / 48
33 Outline 1 Twelf 2 CLF 3 Substructural operational semantics 4 Safety for SSOS 5 Meta-CLF 6 Conclusions and future work Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 22 / 48
34 Substructural operational semantics Substructural operational semantics combines Structural operational semantics Substructural logics Extensible: we can add features without breaking previous developments Expressive: wide variety of concurrent and distributed mechanisms (Simmons12). Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 23 / 48
35 Higher-order abstract syntax Simply-typed λ-calculus In (C)LF: exp : type. lam : (exp exp) exp. app : exp exp exp. e ::= x λx.e e e Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 24 / 48
36 SSOS Linear-destination passing style (Pfenning04) Based on multiset rewriting; suitable for specifying in linear logic Multiset of facts: eval e d ret e d fapp d 1 d 2 d Evaluate expression e in destination d Value e in destination d Application: expects the function and argument to be evaluated in d 1 and d 2, and the result is evaluated in d Evaluation rules transform multisets of facts Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 25 / 48
37 SSOS Multiset of facts: eval e d, ret e d, fapp d 1 d 2 d In CLF: dest : type. eval : exp dest type. ret : exp dest type. fapp : dest dest dest type. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 26 / 48
38 Evaluation rules Multiset rewriting rules (parallel semantics): eval e d ret e d if e is a value In CLF: step/eval : eval e d value e {ret e d}. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 27 / 48
39 Evaluation rules Multiset rewriting rules (parallel semantics): eval (e 1 e 2 ) d eval e 1 d 1, eval e 2 d 2, fapp d 1 d 2 d In CLF: where d 1, d 2 fresh step/app : eval (app e 1 e 2 ) d {!d 1!d 2 : dest, eval e 1 d 1, eval e 2 d 2, fapp d 1 d 2 d}. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 27 / 48
40 Evaluation rules Multiset rewriting rules (parallel semantics): ret (λx.e 1 ) d 1, ret e 2 d 2, fapp d 1 d 2 d eval (e 1 [e 2 /x]) d In CLF: step/beta : ret (lam e 1 ) d 1 ret e 2 d 2 fapp d 1 d 2 d {eval (e 1 e 2 ) d} Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 27 / 48
41 Example eval ((λx.x)(λy.y)) d In CLF:!d : dest, x 0 : eval (app (lam λx.x) (lam λy.y)) d : (!d : dest)(x 0 : eval (app (lam λx.x) (lam λy.y)) d) Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 28 / 48
42 Example eval ((λx.x)(λy.y)) d eval (λx.x) d 1, eval (λy.y) d 2, fapp d 1 d 2 d In CLF:!d : dest, x 0 : eval (app (lam λx.x) (lam λy.y)) d {!d 1,!d 2, x, y, z} step/app x 0 ; :!d!d 1!d 2 : dest, x : eval (lam λx.x) d 1, y : eval (lam λy.y) d 2, z : fapp d 1 d 2 d Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 28 / 48
43 Example eval ((λx.x)(λy.y)) d eval (λx.x) d 1, eval (λy.y) d 2, fapp d 1 d 2 d ret (λx.x) d 1, eval (λy.y) d 2, fapp d 1 d 2 d In CLF:!d : dest, x 0 : eval (app (lam λx.x) (lam λy.y)) d {!d 1,!d 2, x, y, z} step/app x 0 ; {x } step/eval x; :!d!d 1!d 2 : dest, x : ret (lam λx.x) d 1, y : eval (lam λy.y) d 2 z : fapp d 1 d 2 d Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 28 / 48
44 Example eval ((λx.x)(λy.y)) d eval (λx.x) d 1, eval (λy.y) d 2, fapp d 1 d 2 d ret (λx.x) d 1, eval (λy.y) d 2, fapp d 1 d 2 d ret (λx.x) d 1, ret (λy.y) d 2, fapp d 1 d 2 d In CLF:!d : dest, x 0 : eval (app (lam λx.x) (lam λy.y)) d {!d 1,!d 2, x, y, z} step/app x 0 ; {x } step/eval x; {y } step/eval y; :!d!d 1!d 2 : dest, x : ret (lam λx.x) d 1, y : ret (lam λy.y) d 2 z : fapp d 1 d 2 d Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 28 / 48
45 Example eval ((λx.x)(λy.y)) d eval (λx.x) d 1, eval (λy.y) d 2, fapp d 1 d 2 d ret (λx.x) d 1, eval (λy.y) d 2, fapp d 1 d 2 d ret (λx.x) d 1, ret (λy.y) d 2, fapp d 1 d 2 d eval (λy.y) d In CLF:!d : dest, x 0 : eval (app (lam λx.x) (lam λy.y)) d {!d 1,!d 2, x, y, z} step/app x 0 ; {x } step/eval x; {y } step/eval y; {w} step/beta x y z; :!d!d 1!d 2 : dest, w : eval (lam λy.y) d Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 28 / 48
46 Example eval ((λx.x)(λy.y)) d eval (λx.x) d 1, eval (λy.y) d 2, fapp d 1 d 2 d ret (λx.x) d 1, eval (λy.y) d 2, fapp d 1 d 2 d ret (λx.x) d 1, ret (λy.y) d 2, fapp d 1 d 2 d eval (λy.y) d ret (λy.y) d In CLF:!d : dest, x 0 : eval (app (lam λx.x) (lam λy.y)) d {!d 1,!d 2, x, y, z} step/app x 0 ; {x } step/eval x; {y } step/eval y; {w} step/beta x y z; {w } step/eval w; :!d!d 1!d 2 : dest, w : ret (lam λy.y) d Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 28 / 48
47 Example eval ((λx.x)(λy.y)) d eval (λx.x) d 1, eval (λy.y) d 2, fapp d 1 d 2 d ret (λx.x) d 1, eval (λy.y) d 2, fapp d 1 d 2 d ret (λx.x) d 1, ret (λy.y) d 2, fapp d 1 d 2 d eval (λy.y) d ret (λy.y) d In CLF:!d : dest, x 0 : eval (app (lam λx.x) (lam λy.y)) d {!d 1,!d 2, x, y, z} step/app x 0 ; {y } step/eval y; {x } step/eval x; {w} step/beta x y z; {w } step/eval w; :!d!d 1!d 2 : dest, w : ret (lam λy.y) d Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 28 / 48
48 π-calculus in CLF Example Process expressions: In CLF: exp : type. chan : type. P, Q ::= 0 (P Q) ν u.p!p u(v).p u v zero : exp. par : exp -> exp -> exp. new : (chan -> exp) -> exp.! : exp -> exp. inp : chan -> (chan -> exp) -> exp. outp : chan -> chan -> exp. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 29 / 48
49 π-calculus in CLF Example Operational semantics: In CLF: proc : exp -> type. msg : chan -> chan -> type. u(v) u w.p [v/w]p proc/zero : proc zero -o {1}. proc/par : proc (par P Q) -o {proc P proc Q}. proc/outp : proc (out U V) -o { msg U V }. proc/inp : proc U (inp \v. P v) -o msg U W -o { proc (P W) }. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 30 / 48
50 SSOS Many PL features can be represented using SSOS: State Threads Futures Concurrency (e.g. π-calculus) Distribution How to reason about CLF specifications? Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 31 / 48
51 Outline 1 Twelf 2 CLF 3 Substructural operational semantics 4 Safety for SSOS 5 Meta-CLF 6 Conclusions and future work Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 32 / 48
52 Safety Recall that the previous semantics is parallel (more complex languages can have concurrent and distributed semantics as well). Safety is the conjunction of the following properties: Preservation: evaluation preserves well-typed multisets. If is a well-typed multiset, and (step), then is a well-typed multiset. Progress: a well-typed multiset is either final (result) or is possible to take a step. If is a well-typed multiset, then either = {ret e d} or there exists such that. We need a notion of well-typed multiset for SSOS specifications. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 33 / 48
53 Well-typed multisets Example: eval e 1 d, eval e 2 d $ (repeated destination) fapp d 1 d 2 d, eval e 1 d 1 $ (no fact for d 2 ) Well-typed multisets form a tree: fapp d 1 d 2 d eval plus d 1 fapp d 21 d 22 d 2 ret 0 d 21 eval 2 d 22 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 34 / 48
54 Well-typed multisets Well-typed multisets can be described by rewriting rules. gen t d means generate a term of type t rooted at d gen d Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 35 / 48
55 Well-typed multisets Well-typed multisets can be described by rewriting rules. gen t d means generate a term of type t rooted at d fapp d 1 d 2 d gen d 1 gen d 2 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 35 / 48
56 Well-typed multisets Well-typed multisets can be described by rewriting rules. gen t d means generate a term of type t rooted at d fapp d 1 d 2 d eval plus d 1 gen d 2 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 35 / 48
57 Well-typed multisets Well-typed multisets can be described by rewriting rules. gen t d means generate a term of type t rooted at d fapp d 1 d 2 d eval plus d 1 fapp d 21 d 22 d 2 gen d 21 gen d 22 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 35 / 48
58 Well-typed multisets Well-typed multisets can be described by rewriting rules. gen t d means generate a term of type t rooted at d fapp d 1 d 2 d eval plus d 1 fapp d 21 d 22 d 2 ret 0 d 21 gen d 22 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 35 / 48
59 Well-typed multisets Well-typed multisets can be described by rewriting rules. gen t d means generate a term of type t rooted at d fapp d 1 d 2 d eval plus d 1 fapp d 21 d 22 d 2 ret 0 d 21 eval 2 d 22 Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 35 / 48
60 Well-typed multisets Generating well-typed states: gen t d A where A contains no fact of the form gen t 0 d 0. In CLF: gen : tp dest type. gen/eval : gen t d of e t {eval e d}. gen/ret : gen t d of e t {ret e d}. gen/fapp : gen t d {!d 1!d 2 : dest, fapp d 1 d 2 d, gen (arr t 1 t) d 1, gen t 1 d 2 }. We call these type of rules generative invariants (Simmons 12). Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 36 / 48
61 Safety Lemma (Safety) Preservation If {gen t d} gen A and A step A then {gen t d} gen A. Progress if {gen t d} gen A, then either A Is of the form {ret e d} or there exists A such that A step A. Proof. Preservation The proof proceeds by case analysis on the evaluation step. Progress The proof proceeds by induction on the generating trace. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 37 / 48
62 Limitations of CLF In CLF it is not possible to express preservation and progress. CLF lacks support for first-order traces, and quantification over contexts. We propose an extension of LF with trace types: Meta-CLF. Similar approaches are taken in Beluga, Delphin, Abella (in the sense of using a two-level approach). Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 38 / 48
63 Outline 1 Twelf 2 CLF 3 Substructural operational semantics 4 Safety for SSOS 5 Meta-CLF 6 Conclusions and future work Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 39 / 48
64 Meta-CLF Meta-CLF is an extension of LF with trace types and quantification over contexts and names: A ::=... { } Σ { } { } Σ 1 { } Πψ : ctx.a x.a { } Σ { } is the type of all traces ε satisfying ε : that use only rules in the signature Σ. { } Σ 1 { } is the type of all 1-step traces ε satisfying ε : that use only rules in the signature Σ. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 40 / 48
65 Meta-CLF In Meta-CLF we can express properties about traces: preservation : Πt : tp. d. g. Πψ 1 : ctx. Πψ 2 : ctx. {!d : dest, g : gen d t} Σ gen {ψ 1 } {ψ 1 } Σ 1 step {ψ 2 } {!d : dest, g : gen d t} Σ gen {ψ 2 } type. If ψ 1 is a well-typed state (generated from a single gen d) and there is a step from ψ 1 to ψ 2, then ψ 2 is a well-typed state Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 41 / 48
66 Meta-CLF In Meta-CLF we can express properties about traces: preservation : Πt : tp. d. g. Πψ 1 : ctx. Πψ 2 : ctx. {!d : dest, g : gen d t} Σ gen {ψ 1 } {ψ 1 } Σ 1 step {ψ 2 } {!d : dest, g : gen d t} Σ gen {ψ 2 } type. If ψ 1 is a well-typed state (generated from a single gen d) and there is a step from ψ 1 to ψ 2, then ψ 2 is a well-typed state Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 41 / 48
67 Meta-CLF In Meta-CLF we can express properties about traces: preservation : Πt : tp. d. g. Πψ 1 : ctx. Πψ 2 : ctx. {!d : dest, g : gen d t} Σ gen {ψ 1 } {ψ 1 } Σ 1 step {ψ 2 } {!d : dest, g : gen d t} Σ gen {ψ 2 } type. If ψ 1 is a well-typed state (generated from a single gen d) and there is a step from ψ 1 to ψ 2, then ψ 2 is a well-typed state Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 41 / 48
68 Meta-CLF In Meta-CLF we can express properties about traces: preservation : Πt : tp. d. g. Πψ 1 : ctx. Πψ 2 : ctx. {!d : dest, g : gen d t} Σ gen {ψ 1 } {ψ 1 } Σ 1 step {ψ 2 } {!d : dest, g : gen d t} Σ gen {ψ 2 } type. If ψ 1 is a well-typed state (generated from a single gen d) and there is a step from ψ 1 to ψ 2, then ψ 2 is a well-typed state Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 41 / 48
69 Meta-CLF In Meta-CLF we can express properties about traces: preservation : Πt : tp. d. g. Πψ 1 : ctx. Πψ 2 : ctx. {!d : dest, g : gen d t} Σ gen {ψ 1 } {ψ 1 } Σ 1 step {ψ 2 } {!d : dest, g : gen d t} Σ gen {ψ 2 } type. If ψ 1 is a well-typed state (generated from a single gen d) and there is a step from ψ 1 to ψ 2, then ψ 2 is a well-typed state Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 41 / 48
70 Meta-CLF In Meta-CLF we can express properties about traces: preservation : Πt : tp. d. g. Πψ 1 : ctx. Πψ 2 : ctx. {!d : dest, g : gen d t} Σ gen {ψ 1 } {ψ 1 } Σ 1 step {ψ 2 } {!d : dest, g : gen d t} Σ gen {ψ 2 } type. If ψ 1 is a well-typed state (generated from a single gen d) and there is a step from ψ 1 to ψ 2, then ψ 2 is a well-typed state Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 41 / 48
71 Meta-CLF The safety proof in Meta-CLF follows closely the paper proof. A, eval e d step A, ret e d Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 42 / 48
72 Meta-CLF The safety proof in Meta-CLF follows closely the paper proof. gen t 0 d 0 A, eval e d step A, ret e d Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 42 / 48
73 Meta-CLF The safety proof in Meta-CLF follows closely the paper proof. gen t 0 d 0 gen A, gen t d gen A, eval e d step A, ret e d Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 42 / 48
74 Meta-CLF The safety proof in Meta-CLF follows closely the paper proof. gen t 0 d 0 gen t 0 d 0 gen A, gen t d gen A, eval e d step A, ret e d Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 42 / 48
75 Meta-CLF The safety proof in Meta-CLF follows closely the paper proof. gen t 0 d 0 gen t 0 d 0 gen gen A, gen t d A.gen t d gen gen A, eval e d step A, ret e d Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 42 / 48
76 Meta-CLF The safety proof in Meta-CLF follows closely the paper proof. gen t 0 d 0 gen t 0 d 0 gen gen A, gen t d A.gen t d gen gen A, eval e d step A, ret e d In Meta-CLF: pres/ret : preservation (X 1 ; { x} gen/eval e d 0 g 0 H) ({ y} step/eval e d 0 x H v ) (X 1 ; { y} gen/ret e d 0 g 0 H H v ) Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 42 / 48
77 Meta-CLF Both proofs of preservation and progress in Meta-CLF follow the pen-and-paper proofs. Preservation is performed by case analysis (no induction). Progress relies on induction, but termination is easy (size of the trace). However, we rely on coverage to ensure the proof is total. Coverage checking in the presence of traces is tricky, due to the possibility of permuting steps. (Left for future work.) Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 43 / 48
78 SSOS We can extend this semantics with other features without invalidating the previous rules Example: store, futures, call/cc, communication,... location : type. loc : location exp. get : exp exp. ref : exp exp. set : exp exp exp. cell : location exp type. step/ref : eval (ref e) d {!d 1 : dest,!l : loc, fref d 1 l, eval e d 1, ret (loc l) d}. step/fref : ret e d fref d l {cell l e}. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 44 / 48
79 SSOS We can extend this semantics with other features without invalidating the previous rules Example: store, futures, call/cc, communication,... future : exp exp. promise : dest exp. deliver : exp dest type. step/fut : eval (future e) d {!d 1 : dest, eval e d 1, fdel d 1, ret (promise d 1 ) d}. step/fdel : ret e d fdel d 1 {!deliver e d}. step/promise : ret (promise d 1 ) d delivee e d 1 ret e d. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 44 / 48
80 Outline 1 Twelf 2 CLF 3 Substructural operational semantics 4 Safety for SSOS 5 Meta-CLF 6 Conclusions and future work Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 45 / 48
81 Conclusions Our goal is to develop logical frameworks suitable for specifying concurrent and distributed systems. We introduced Meta-CLF, an extension of LF to reason about CLF specifications. We showed that it is expressive enough to write safety proofs of parallel/concurrent PL. Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 46 / 48
82 Future work Decidability of type checking Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 47 / 48
83 Future work Decidability of type checking Type reconstruction for implicit arguments (very important for usability) pres/ret : preservation (X 1 ; { x} gen/eval e d 0 g 0 H) ({ y} step/eval e d 0 x H v ) (X 1 ; { y} gen/ret e d 0 g 0 H H v ) Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 47 / 48
84 Future work Decidability of type checking Type reconstruction for implicit arguments (very important for usability) pres/ret : x. y. d. g. d 0. g 0.Πψ 1 : ctx.πe : exp. Πt : tp.πt 0 : tp.πh : of e t 0.ΠH v : value e ΠX : {!d : dest, g : gen d t} Σ gen {ψ 1,!d 0 : dest, g 0 : gen d 0 t 0 }. preservation t d g (ψ 1,!d 0 : dest, x : eval e d 0 ) (ψ 1,!d 0 : dest, y : ret e d 0 ) (X 1 ; { x} gen/eval e d 0 g 0 H) ({ y} step/eval e d 0 x H v ) (X 1 ; { y} gen/ret e d 0 g 0 H H v ) Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 47 / 48
85 Future work Decidability of type checking Type reconstruction for implicit arguments (very important for usability) pres/ret : x. y. d. g. d 0. g 0.Πψ 1 : ctx.πe : exp. Πt : tp.πt 0 : tp.πh : of e t 0.ΠH v : value e ΠX : {!d : dest, g : gen d t} Σ gen {ψ 1,!d 0 : dest, g 0 : gen d 0 t 0 }. preservation t d g (ψ 1,!d 0 : dest, x : eval e d 0 ) (ψ 1,!d 0 : dest, y : ret e d 0 ) (X 1 ; { x} gen/eval e d 0 g 0 H) ({ y} step/eval e d 0 x H v ) (X 1 ; { y} gen/ret e d 0 g 0 H H v ) Implementation Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 47 / 48
86 Future work Coverage checking Coverage checking for traces is difficult due to the equality relation. Easier when restricted to generative invariants GI look like a generalization of context-free grammars gen/eval : gen t d of e t {eval e d}. gen/ret : gen t d of e t {ret e d}. gen/fapp : gen t d {!d 1!d 2 : dest, fapp d 1 d 2 d, gen (arr t 1 t) d 1, gen t 1 d 2 }. Non-terminal: gen. Terminals: eval, ret, fapp. Example: X 1 ; ({y} gen/eval x); X 2 X 1 ; X 2 ; ({y} gen/eval x) Termination (trace size) Jorge Luis Sacchini (joint work with Iliano Cervesato) Meta-reasoning in CLF 48 / 48
Meta-Reasoning in a Concurrent Logical Framework
Meta-Reasoning in a Concurrent Logical Framework Iliano Cervesato and Jorge Luis Sacchini Carnegie Mellon University Chalmers University, 16 Oct 2013 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning
More informationMode checking in the Concurrent Logical Framework
Mode checking in the Concurrent Logical Framework Jorge Luis Sacchini Iliano Cervesato Frank Pfenning Carsten Schürmann August 2014 CMU-CS-14-134 CMU-CS-QTR-123 School of Computer Science Carnegie Mellon
More informationA Concurrent Logical Framework
A Concurrent Logical Framework Frank Pfenning Carnegie Mellon University Types Workshop Torino, Italy, April 2003 Joint work with Iliano Cervesato, David Walker, and Kevin Watkins Types 03, Torino, April
More informationReasoning with Higher-Order Abstract Syntax and Contexts: A Comparison
1 Reasoning with Higher-Order Abstract Syntax and Contexts: A Comparison Amy Felty University of Ottawa July 13, 2010 Joint work with Brigitte Pientka, McGill University 2 Comparing Systems We focus on
More informationLecture Notes on Call-by-Value and Call-by-Name
Lecture Notes on Call-by-Value and Call-by-Name 15-816: Substructural Logics Frank Pfenning Lecture 22 November 16, 2017 In this lecture we consider two different polarization strategies for structural
More informationLecture Notes on A Concurrent Logical Framework
Lecture Notes on A Concurrent Logical Framework 15-816: Linear Logic Frank Pfenning Lecture 21 April 9, 2012 Today we will put many of pieces together that we have put in place so far, by moving from a
More informationType safety for substructural specifications: preliminary results
Type safety for substructural specifications: preliminary results Robert J. Simmons July 15, 2010 CMU-CS-10-134 School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 Abstract Substructural
More informationSpecifying Properties of Concurrent Computations in CLF
LFM 2004 Preliminary Version Specifying Properties of Concurrent Computations in CLF Kevin Watkins a,1 Iliano Cervesato b,2 Frank Pfenning a,3 David Walker c,4 a Department of Computer Science, Carnegie
More informationSpecifying Properties of Concurrent Computations in CLF
LFM 2004 Preliminary Version Specifying Properties of Concurrent Computations in CLF Kevin Watkins a,1 Iliano Cervesato b,2 Frank Pfenning a,3 David Walker c,4 a Department of Computer Science, Carnegie
More informationHOAS by example What is a Formal System? A Simply Typed Framework What Does it Mean? Canonical LF References HOAS. Randy Pollack
HOAS Randy Pollack Version of November 2, 2011 Outline 1 HOAS by example 2 What is a Formal System? 3 A Simply Typed Framework 4 What Does it Mean? 5 Canonical LF Judgement Forms and Rules Hereditary Substitution
More informationMechanizing a Decision Procedure for Coproduct Equality in Twelf
Mechanizing a Decision Procedure for Coproduct Equality in Twelf Arbob Ahmad (applying to PhD programs this fall!) Dan Licata Robert Harper Carnegie Mellon University Dan Licata WMM 2007...1 Equality Equality
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 informationOne Year Later. Iliano Cervesato. ITT Industries, NRL Washington, DC. MSR 3.0:
MSR 3.0: The Logical Meeting Point of Multiset Rewriting and Process Algebra MSR 3: Iliano Cervesato iliano@itd.nrl.navy.mil One Year Later ITT Industries, inc @ NRL Washington, DC http://www.cs.stanford.edu/~iliano
More informationMSR 3.0: The Logical Meeting Point of Multiset Rewriting and Process Algebra. Iliano Cervesato. ITT Industries, NRL Washington, DC
MSR 3.0: The Logical Meeting Point of Multiset Rewriting and Process Algebra Iliano Cervesato iliano@itd.nrl.navy.mil ITT Industries, inc @ NRL Washington, DC http://theory.stanford.edu/~iliano ISSS 2003,
More informationMechanizing Metatheory in a Logical Framework
Under consideration for publication in J. Functional Programming 1 Mechanizing Metatheory in a Logical Framework Robert Harper and Daniel R. Licata Carnegie Mellon University (e-mail: {rwh,drl}@cs.cmu.edu)
More informationThe Curry-Howard Isomorphism
The Curry-Howard Isomorphism Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2008/2009 Maria João Frade (DI-UM) The Curry-Howard Isomorphism MFES 2008/09
More informationRelating State-Based and Process-Based Concurrency through Linear Logic
École Polytechnique 17 September 2009 Relating State-Based and Process-Based oncurrency through Linear Logic Iliano ervesato arnegie Mellon University - Qatar iliano@cmu.edu Specifying oncurrent Systems
More informationNotes on Logical Frameworks
Notes on Logical Frameworks Robert Harper IAS November 29, 2012 1 Introduction This is a brief summary of a lecture on logical frameworks given at the IAS on November 26, 2012. See the references for technical
More informationSupplementary 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 informationFocusing on Binding and Computation
Focusing on Binding and Computation Dan Licata Joint work with Noam Zeilberger and Robert Harper Carnegie Mellon University 1 Programming with Proofs Represent syntax, judgements, and proofs Reason about
More informationTowards Concurrent Type Theory
Towards Concurrent Type Theory Luís Caires 1, Frank Pfenning 2, Bernardo Toninho 1,2 1 Universidade Nova de Lisboa 2 Carnegie Mellon University Workshop on Types in Language Design and Implementation (TLDI)
More informationOperational Semantics Using the Partiality Monad
page.1 Operational Semantics Using the Partiality Monad Nils Anders Danielsson (Göteborg) Shonan Meeting 026: Coinduction for computation structures and programming languages The research leading to these
More informationLecture Notes on The Concurrent Logical Framework
Lecture Notes on The Concurrent Logical Framework 15-816: Substructural Logics Frank Pfenning Lecture 23 November 17, 2016 A logical framework is a metalanguage for the representation and analysis of deductive
More informationThe Logical Meeting Point of Multiset Rewriting and Process Algebra
MFPS 20 @ MU May 25, 2004 The Logical Meeting Point of Multiset Rewriting and Process Algebra Iliano ervesato iliano@itd.nrl.navy.mil ITT Industries, inc @ NRL Washington, D http://theory.stanford.edu/~iliano
More informationRelating Reasoning Methodologies in Linear Logic and Process Algebra
Relating Reasoning Methodologies in Linear Logic and Process Algebra Yuxin Deng Robert J. Simmons Iliano Cervesato December 2011 CMU-CS-11-145 CMU-CS-QTR-111 School of Computer Science Carnegie Mellon
More informationLecture 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 informationA concurrent logical framework I: Judgments and properties
A concurrent logical framework I: Judgments and properties Kevin Watkins Iliano Cervesato Frank Pfenning David Walker March 2002, revised May 2003 CMU-CS-02-101 School of Computer Science Carnegie Mellon
More informationLecture 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 informationIntersection Synchronous Logic
UnB 2007 p. 1/2 Intersection Synchronous Logic Elaine Gouvêa Pimentel Simona Ronchi della Rocca Luca Roversi UFMG/UNITO, 2007 UnB 2007 p. 2/2 Outline Motivation UnB 2007 p. 2/2 Outline Motivation Intuitionistic
More informationAn insider s look at LF type reconstruction:
1 An insider s look at LF type reconstruction: Everything you (n)ever wanted to know Brigitte Pientka McGill University, Montreal, Canada bpientka@cs.mcgill.ca Abstract Although type reconstruction for
More informationType Inference. For the Simply-Typed Lambda Calculus. Peter Thiemann, Manuel Geffken. Albert-Ludwigs-Universität Freiburg. University of Freiburg
Type Inference For the Simply-Typed Lambda Calculus Albert-Ludwigs-Universität Freiburg Peter Thiemann, Manuel Geffken University of Freiburg 24. Januar 2013 Outline 1 Introduction 2 Applied Lambda Calculus
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 informationComplete Partial Orders, PCF, and Control
Complete Partial Orders, PCF, and Control Andrew R. Plummer TIE Report Draft January 2010 Abstract We develop the theory of directed complete partial orders and complete partial orders. We review the syntax
More informationHORSes: format, termination and confluence
HORSes: format, termination and confluence Jean-Pierre Jouannaud INRIA-LIAMA and singhua Software Chair Joint on-going work with Jianqi Li School of Software, singhua University Project CoqLF NList Cross-discipline
More informationMary Southern and Gopalan Nadathur. This work was funded by NSF grant CCF
A Translation-Based Animation of Dependently-Typed Specifications From LF to hohh(and back again) Mary Southern and Gopalan Nadathur Department of Computer Science and Engineering University of Minnesota
More informationINDUCTIVE DEFINITION
1 INDUCTIVE DEFINITION OUTLINE Judgements Inference Rules Inductive Definition Derivation Rule Induction 2 META-VARIABLES A symbol in a meta-language that is used to describe some element in an object
More informationLogical 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 informationOn 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 informationFrom Operational Semantics to Abstract Machines
From Operational Semantics to Abstract Machines John Hannan Department of Computer Science, University of Copenhagen, Universitetsparken 1, DK-2100 Copenhagen East, Denmark. hannan@diku.dk Dale Miller
More informationAdjoint Logic and Its Concurrent Semantics
Adjoint Logic and Its Concurrent Semantics Frank Pfenning ABCD Meeting, Edinburgh, December 18-19, 2017 Joint work with Klaas Pruiksma and William Chargin Outline Proofs as programs Linear sequent proofs
More informationProperties of Terms in Continuation-Passing Style in an Ordered Logical Framework
Properties of Terms in Continuation-Passing yle in an Ordered Logical Framework Jeff Polakow and Frank Pfenning Department of Computer Science Carnegie Mellon University jpolakow@cs.cmu.edu and fp@cs.cmu.edu
More informationType Systems as a Foundation for Reliable Computing
Type Systems as a Foundation for Reliable Computing Robert Harper Carnegie Mellon University Summer School on Reliable Computing University of Oregon July, 2005 References These lectures are based on the
More informationSome Recent Logical Frameworks
Some Recent Logical Frameworks Randy Pollack LFCS, University of Edinburgh Version of September 13, 2010 Outline Edinburgh Logical Framework (ELF) (LICS 1987) Reminder by Example Some Problems with ELF
More informationThe syntactic guard condition of Coq
The syntactic guard condition of Coq Bruno Barras February 2, 2010 Overview 1 Theory Basic criterion Extensions 2 Algorithm Efficiency 3 Discussion 4 Attic A short history of the syntactic guard criterion
More informationM, N ::= x λp : A.M MN (M, N) () c A. x : b p x : b
A PATTERN-MATCHING CALCULUS FOR -AUTONOMOUS CATEGORIES ABSTRACT. This article sums up the details of a linear λ-calculus that can be used as an internal language of -autonomous categories. The coherent
More informationThe Next 700 Challenge Problems for Reasoning with Higher-Order Abstract Syntax Representations
Journal of Automated Reasoning manuscript No. (will be inserted by the editor) The Next 700 Challenge Problems for Reasoning with Higher-Order Abstract Syntax Representations Part 1 A Foundational View
More informationHuman-Readable Machine-Verifiable Proofs for Teaching Constructive Logic
Human-Readable Machine-Verifiable Proofs for Teaching Constructive Logic Andreas Abel, Bor-Yuh Evan Chang, and Frank Pfenning Workshop on Proof Transformations, Proof Presentations and Complexity of Proofs
More informationTimed Automata VINO 2011
Timed Automata VINO 2011 VeriDis Group - LORIA July 18, 2011 Content 1 Introduction 2 Timed Automata 3 Networks of timed automata Motivation Formalism for modeling and verification of real-time systems.
More informationTermination and Reduction Checking for Higher-Order Logic Programs
Termination and Reduction Checking for Higher-Order Logic Programs Brigitte Pientka Department of Computer Science Carnegie Mellon University Pittsburgh, PA 15213, USA bp@cs.cmu.edu Abstract. In this paper,
More informationA Concurrent Logical Framework: the Propositional Fragment
A Concurrent Logical Framework: the Propositional Fragment Kevin Watkins 1, Iliano Cervesato 2, Frank Pfenning 1, and David Walker 3 1 kw,fp@cs.cmu.edu, Department of Computer Science, Carnegie Mellon
More informationAlonzo Church ( ) Lambda Calculus. λ-calculus : syntax. Grammar for terms : Inductive denition for λ-terms
Alonzo Church (1903-1995) Lambda Calculus 2 λ-calculus : syntax Grammar for terms : t, u ::= x (variable) t u (application) λx.t (abstraction) Notation : Application is left-associative so that t 1 t 2...
More informationModal Logic as a Basis for Distributed Computation
Modal Logic as a Basis for Distributed Computation Jonathan Moody 1 jwmoody@cs.cmu.edu October 2003 CMU-CS-03-194 School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 1 This material
More informationA Meta Linear Logical Framework
LFM 2004 Preliminary Version A Meta Linear Logical Framework Andrew McCreight and Carsten Schürmann 1,2 Yale University New Haven, CT, USA Abstract Logical frameworks serve as meta-languages to represent
More informationChapter 1 A computational interpretation of forcing in Type Theory
Chapter 1 A computational interpretation of forcing in Type Theory Thierry Coquand and Guilhem Jaber Abstract In a previous work, we showed the uniform continuity of definable functionals in intuitionistic
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 informationProof-Carrying Code in a Session-Typed Process Calculus
Proof-Carrying Code in a Session-Typed Process Calculus Frank Pfenning with Luís Caires and Bernardo Toninho Department of Computer Science Carnegie Mellon University 1st International Conference on Certified
More informationA Meta Linear Logical Framework
A Meta Linear Logical Framework Andrew McCreight and Carsten Schürmann Yale University New Haven, CT, USA {aem carsten}@cs.yale.edu Abstract. Over the years, logical framework research has produced various
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 informationInduction on Failing Derivations
Induction on Failing Derivations Technical Report PL-Sep13 September 2013, with addenda from Spring 2016 ay Ligatti Department of Computer Science and Engineering University of South Florida Abstract A
More informationREFINEMENT TYPES FOR LOGICAL FRAMEWORKS AND THEIR INTERPRETATION AS PROOF IRRELEVANCE
REFINEMENT TYPES FOR LOGICAL FRAMEWORKS AND THEIR INTERPRETATION AS PROOF IRRELEVANCE WILLIAM LOVAS AND FRANK PFENNING Carnegie Mellon University, Pittsburgh, PA 15213, USA e-mail address: wlovas@cs.cmu.edu
More informationLF P A Logical Framework with External Predicates
LF P A Logical Framework with External Predicates Petar Maksimović in collaboration with Furio Honsell, Marina Lenisa, Luigi Liquori, and Ivan Scagnetto Mathematical Institute of the Serbian Academy of
More informationLecture 1: Logical Foundations
Lecture 1: Logical Foundations Zak Kincaid January 13, 2016 Logics have two components: syntax and semantics Syntax: defines the well-formed phrases of the language. given by a formal grammar. Typically
More informationModular Multiset Rewriting in Focused Linear Logic
Modular Multiset Rewriting in Focused Linear Logic Iliano Cervesato and Edmund S. L. Lam July 2015 CMU-CS-15-117 CMU-CS-QTR-128 School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213
More informationA Bidirectional Refinement Type System for LF
LFMTP 2007 A Bidirectional Refinement Type System for LF William Lovas 1 Frank Pfenning 2 Computer Science Department Carnegie Mellon University Pittsburgh, PA, USA Abstract We present a system of refinement
More informationLecture Notes: Axiomatic Semantics and Hoare-style Verification
Lecture Notes: Axiomatic Semantics and Hoare-style Verification 17-355/17-665/17-819O: Program Analysis (Spring 2018) Claire Le Goues and Jonathan Aldrich clegoues@cs.cmu.edu, aldrich@cs.cmu.edu It has
More informationLecture Notes on Intuitionistic Kripke Semantics
Lecture Notes on Intuitionistic Kripke Semantics 15-816: Modal Logic Frank Pfenning Lecture 15 March 18, 2010 1 Introduction In this lecture we present an intuitionistic approach to describing a multipleworld
More informationAn extension of HM(X) with bounded existential and universal data-types
Groupe de travail Cristal July, 2003 An extension of HM(X) with bounded existential and universal data-types (To appear at ICFP 03) Vincent Simonet INRIA Rocquencourt Cristal project Vincent.Simonet@inria.fr
More informationClassical First-Order Logic
Classical 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) First-Order Logic (Classical) MFES 2008/09
More informationTyped 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 informationREASONING IN A LOGIC WITH DEFINITIONS AND INDUCTION RAYMOND CHARLES MCDOWELL COMPUTER AND INFORMATION SCIENCE
REASONING IN A LOGIC WITH DEFINITIONS AND INDUCTION RAYMOND CHARLES MCDOWELL A DISSERTATION in COMPUTER AND INFORMATION SCIENCE Presented to the Faculties of the University of Pennsylvania in Partial Fulfillment
More informationOn Equivalence and Canonical Forms in the LF Type Theory (Extended Abstract) Robert Harper and Frank Pfenning Department of Computer Science Carnegie
On Equivalence and Canonical Forms in the LF Type Theory (Extended Abstract) Robert Harper and Frank Pfenning Department of Computer Science Carnegie Mellon University August 30, 1999 Abstract Decidability
More informationA Concurrent Logical Framework:
A Concurrent Logical Framework: The Propositional Fragment Kevin Watkins 1, Iliano Cervesato 2, Frank Pfenning 1, and David Walker 3 1 kw,fp@cs.cmu.edu, Department of Computer Science, Carnegie Mellon
More informationAN OVERVIEW OF LINEAR LOGIC PROGRAMMING
AN OVERVIEW OF LINEAR LOGIC PROGRAMMING DALE MILLER Abstract. Logic programming can be given a foundation in sequent calculus, viewing computation as the process of building a cut-free sequent proof from
More informationHarvard School of Engineering and Applied Sciences CS 152: Programming Languages
Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Lecture 17 Tuesday, April 2, 2013 1 There is a strong connection between types in programming languages and propositions
More informationBenchmarks for reasoning with syntax trees containing binders and contexts of assumptions
Math. Struct. in Comp. Science: page 1 of 34. c Cambridge University Press 2017 doi:10.1017/s0960129517000093 Benchmarks for reasoning with syntax trees containing binders and contexts of assumptions AMY
More informationDeductive System: Calculus of axioms and inference rules dening judgments. Used in the presentation of logics and programming derivable Logical Framew
Paris, France PPDP'99, 30, 1999 September Logical and Meta-Logical Frameworks Frank Pfenning 1. Introduction 2. Logical Frameworks 3. Meta-Logical Frameworks 4. Conclusion (see also: upcoming article in
More informationA Temporal Dynamic Logic for Verifying Hybrid System Invariants
A Temporal Dynamic Logic for Verifying Hybrid System Invariants André Platzer 1,2 1 University of Oldenburg, Department of Computing Science, Germany 2 Carnegie Mellon University, Computer Science Department,
More informationMatching Logic: Syntax and Semantics
Matching Logic: Syntax and Semantics Grigore Roșu 1 and Traian Florin Șerbănuță 2 1 University of Illinois at Urbana-Champaign, USA grosu@illinois.edu 2 University of Bucharest, Romania traian.serbanuta@unibuc.ro
More informationProbabilistic Applicative Bisimulation and Call-by-Value Lam
Probabilistic Applicative and Call-by-Value Lambda Calculi Joint work with Ugo Dal Lago ENS Lyon February 9, 2014 Probabilistic Applicative and Call-by-Value Lam Introduction Fundamental question: when
More informationNominal Completion for Rewrite Systems with Binders
Nominal Completion for Rewrite Systems with Binders Maribel Fernández King s College London July 2012 Joint work with Albert Rubio Summary Motivations Nominal Rewriting Closed nominal rules Confluence
More informationA New Look At Generalized Rewriting in Type Theory
A New Look At Generalized Rewriting in Type Theory Matthieu Sozeau Harvard University TYPES 09 May 13th 2009 Aussois, France Generalized Rewriting Equational reasoning x = y - x + 1 ==> y + 1 Logical reasoning
More informationA Multiple-Conclusion Specification Logic
A Multiple-Conclusion Specification Logic Alwen Tiu Australian National University ANU Logic Summer School Lecture 3, December 14, 2007 Alwen Tiu (ANU) Intuitionistic and Linear Logic (5) LSS07 1 / 18
More informationAdjunction Based Categorical Logic Programming
.. Wesleyan University March 30, 2012 Outline.1 A Brief History of Logic Programming.2 Proof Search in Proof Theory.3 Adjunctions in Categorical Proof Theory.4 Connective Chirality and Search Strategy
More informationThe 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 informationFinal Exam Substructural Logics Frank Pfenning. December 12, 2016
Final Exam 15-816 Substructural Logics Frank Pfenning December 12, 2016 Name: Andrew ID: Instructions This exam is closed-book, closed-notes. You have 3 hours to complete the exam. There are 6 problems.
More information7 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 informationLecture Notes on Heyting Arithmetic
Lecture Notes on Heyting Arithmetic 15-317: Constructive Logic Frank Pfenning Lecture 8 September 21, 2017 1 Introduction In this lecture we discuss the data type of natural numbers. They serve as a prototype
More informationIntensionality, Extensionality, and Proof Irrelevance in Modal Type Theory
Intensionality, Extensionality, and Proof Irrelevance in Modal Type Theory Frank Pfenning LICS 01 Boston, Massachusetts June 17, 2001 Acknowledgments: Alberto Momigliano,... 1 Outline 1. Introduction 2.
More informationTheoretical Computer Science. Representing model theory in a type-theoretical logical framework
Theoretical Computer Science 412 (2011) 4919 4945 Contents lists available at ScienceDirect Theoretical Computer Science journal homepage: www.elsevier.com/locate/tcs Representing model theory in a type-theoretical
More informationCall-by-value non-determinism in a linear logic type discipline
Call-by-value non-determinism in a linear logic type discipline Alejandro Díaz-Caro? Giulio Manzonetto Université Paris-Ouest & INRIA LIPN, Université Paris 13 Michele Pagani LIPN, Université Paris 13
More informationTheoretical Foundations of the UML
Theoretical Foundations of the UML Lecture 17+18: A Logic for MSCs Joost-Pieter Katoen Lehrstuhl für Informatik 2 Software Modeling and Verification Group moves.rwth-aachen.de/teaching/ws-1718/fuml/ 5.
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 informationGroupe de travail. Analysis of Mobile Systems by Abstract Interpretation
Groupe de travail Analysis of Mobile Systems by Abstract Interpretation Jérôme Feret École Normale Supérieure http://www.di.ens.fr/ feret 31/03/2005 Introduction I We propose a unifying framework to design
More informationAn Open Logical Framework
An Open Logical Framework Furio Honsell 1, Marina Lenisa 1, Luigi Liquori 2, Petar Maksimovic 2,3, Ivan Scagnetto 1 1 Università di Udine, Italy [furio.honsell, marina.lenisa, ivan.scagnetto]@uniud.it
More informationSemantics and Pragmatics of NLP
Semantics and Pragmatics of NLP Alex Ewan School of Informatics University of Edinburgh 28 January 2008 1 2 3 Taking Stock We have: Introduced syntax and semantics for FOL plus lambdas. Represented FOL
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 informationRecitation 2: Binding, Semantics, and Safety : Foundations of Programming Languages
Recitation 2: Binding, Semantics, and Safety 15-312: Foundations of Programming Languages Charles Yuan, Jeanne Luning Prak September 5, 2018 1 Abstract Binding Trees The abstract syntax trees we saw previously
More informationOverview. overview / 357
Overview overview6.1 Introduction Modelling parallel systems Linear Time Properties Regular Properties Linear Temporal Logic (LTL) Computation Tree Logic syntax and semantics of CTL expressiveness of CTL
More informationFirst-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig
First-Order Logic First-Order Theories Roopsha Samanta Partly based on slides by Aaron Bradley and Isil Dillig Roadmap Review: propositional logic Syntax and semantics of first-order logic (FOL) Semantic
More informationClassical 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