Meta-Reasoning in a Concurrent Logical Framework

Size: px
Start display at page:

Download "Meta-Reasoning in a Concurrent Logical Framework"

Transcription

1 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 in CLF 1 / 39

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., formal verification, static analyses, verifying program transformations. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 2 / 39

3 Logical frameworks 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. 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. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 3 / 39

4 Outline 1 CLF 2 Substructural operational semantics 3 Safety for SSOS 4 Meta-CLF 5 Conclusions and future work Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 4 / 39

5 Outline 1 CLF 2 Substructural operational semantics 3 Safety for SSOS 4 Meta-CLF 5 Conclusions and future work Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 5 / 39

6 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.B 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 this later) Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 6 / 39

7 CLF Synchronous types: is associative and commutative, 1 is a neutral element. x : A.!B C 1!x : A,!y 1 : B, y 2 : C Arguments can be uncurrified. Πx : A.B C {D} Π!x : A,!y 1 : B, y 2 : C. {D} We can redefine types in CLF to use contexts: A ::= Π.P Π.{ } (Async types) ::= x : A,!x : A, (Contexts) Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 7 / 39

8 CLF CLF combines: Asynchronous types (Π,, &) Linear Logical Framework Backward chaining operational semantics Synchronous types (, ) Encapsulated in a monad ({S}) Forward chaining operational semantics Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 8 / 39

9 CLF Asynchronous fragment Backward chaining (as in Twelf): plus : nat nat type. plus/z : plus 0 N N. plus/s : plus (s M) N (s P) plus M N P. Example: plus 2 2 X X? Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 9 / 39

10 CLF Asynchronous fragment Backward chaining (as in Twelf): plus : nat nat type. plus/z : plus 0 N N. plus/s : plus (s M) N (s P) plus M N P. Example: plus 1 2 X 1 plus 2 2 X X = s X 1 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 9 / 39

11 CLF Asynchronous fragment Backward chaining (as in Twelf): plus : nat nat type. plus/z : plus 0 N N. plus/s : plus (s M) N (s P) plus M N P. Example: plus 0 2 X 2 plus 1 2 X 1 plus 2 2 X X = s X 1 = s (s X 2 ) Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 9 / 39

12 CLF Asynchronous fragment Backward chaining (as in Twelf): plus : nat nat type. plus/z : plus 0 N N. plus/s : plus (s M) N (s P) plus M N P. Example: plus 0 2 X 2 plus 1 2 X 1 plus 2 2 X X = s X 1 = s (s X 2 ) = s (s 2) Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 9 / 39

13 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 (s N)} Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 10 / 39

14 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 (s N)} t 1 : tick, t 2 : tick, t 3 : tick, t 4 : tick, t 5 : tick, c 1 : count 0, c 2 : count 0 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 10 / 39

15 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 (s N)} 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 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 10 / 39

16 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 (s N)} 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 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 10 / 39

17 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 (s N)} 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 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 10 / 39

18 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 (s N)} 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 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 10 / 39

19 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 (s N)} 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 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 10 / 39

20 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. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 11 / 39

21 Traces Typing rules for traces: ε : can be read as trace ε transforms (rewrites) into : c : Π 0.{ 1 } Σ 0 { 1 } c 0 : 1 0 ε 1 : 1 1 ε 2 : 2 0 ε 1 ; ε 2 : 2 = 0 1 iff Persistent declarations in appear in both 0 and 1 Linear declarations in appear in exactly one of 0 and 1 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 12 / 39

22 Traces Example: in : tick count N {count (s N)} 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 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 13 / 39

23 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 =. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 14 / 39

24 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 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 15 / 39

25 Outline 1 CLF 2 Substructural operational semantics 3 Safety for SSOS 4 Meta-CLF 5 Conclusions and future work Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 16 / 39

26 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). Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 17 / 39

27 Example Simply-typed λ-calculus HOAS representation in (C)LF: exp : type. lam : (exp exp) exp. app : exp exp exp. e ::= x λx.e e e Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 18 / 39

28 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 Return value e to 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 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 19 / 39

29 SSOS Expressions represented as 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. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 20 / 39

30 Parallel evaluation semantics Transitions as multiset rewriting rules: eval e d ret e d if e is a value In CLF: step/eval : eval e d value e {ret e d}. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 21 / 39

31 Parallel evaluation semantics Transitions as multiset rewriting rules: 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}. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 21 / 39

32 Parallel evaluation semantics Transitions as multiset rewriting rules: 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} Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 21 / 39

33 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 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 22 / 39

34 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 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 22 / 39

35 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 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 22 / 39

36 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 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 22 / 39

37 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 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 22 / 39

38 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 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 22 / 39

39 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 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 22 / 39

40 Outline 1 CLF 2 Substructural operational semantics 3 Safety for SSOS 4 Meta-CLF 5 Conclusions and future work Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 23 / 39

41 Safety Recall that the previous semantics is parallel (more complex languages can have concurrent and distributed semantics as well). Safety. 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. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 24 / 39

42 Well-formed 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-formed multisets form a tree: fapp d 1 d 2 d eval d 1 fapp d 21 d 22 d 2 ret 0 d 21 eval 2 d 22 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 25 / 39

43 Well-formed multisets Well-formed multisets can be described by rewriting rules. gen t d means generate a term of type t rooted at d gen d Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 26 / 39

44 Well-formed multisets Well-formed multisets can be described by rewriting rules. gen t d means generate a term of type t rooted at d gen d gen d 1 gen d 2 fapp d 1 d 2 d Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 26 / 39

45 Well-formed multisets Well-formed multisets can be described by rewriting rules. gen t d means generate a term of type t rooted at d gen d gen d 1 gen d 2 eval plus d 1 fapp d 1 d 2 d Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 26 / 39

46 Well-formed multisets Well-formed multisets can be described by rewriting rules. gen t d means generate a term of type t rooted at d gen d gen d 1 gen d 2 gen d 21 gen d 22 eval plus d 1 fapp d 1 d 2 d fapp d 21 d 22 d Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 26 / 39

47 Well-formed multisets Well-formed multisets can be described by rewriting rules. gen t d means generate a term of type t rooted at d gen d gen d 1 gen d 2 gen d 21 gen d 22 eval plus d 1 fapp d 1 d 2 d ret 0 d 21 fapp d 21 d 22 d Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 26 / 39

48 Well-formed multisets Well-formed multisets can be described by rewriting rules. gen t d means generate a term of type t rooted at d gen d gen d 1 gen d 2 gen d 21 gen d 22 eval plus d 1 fapp d 1 d 2 d ret 0 d 21 fapp d 21 d 22 d eval 2 d 22 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 26 / 39

49 Well-formed multisets Well-formed multisets can be described by rewriting rules. gen t d means generate a term of type t rooted at d gen d gen d 1 gen d 2 gen d 21 gen d 22 = eval plus d 1, fapp d 1 d 2 d, ret 0 d 21, fapp d 21 d 22 d, eval 2 d 22 Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 26 / 39

50 Well-typed multisets Add a type argument: 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 value e {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). Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 27 / 39

51 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. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 28 / 39

52 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). Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 29 / 39

53 Outline 1 CLF 2 Substructural operational semantics 3 Safety for SSOS 4 Meta-CLF 5 Conclusions and future work Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 30 / 39

54 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 Σ. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 31 / 39

55 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. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 32 / 39

56 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 ψ 1, then ψ 2 is a well-typed state. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 32 / 39

57 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. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 32 / 39

58 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. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 32 / 39

59 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. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 32 / 39

60 Safety proof in Meta-CLF Case step/eval : eval e d value e {ret e d}. A, eval e d step A, ret e d Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 33 / 39

61 Safety proof in Meta-CLF Case step/eval : eval e d value e {ret e d}. gen t 0 d 0 gen The multiset A, eval e d is generated from gen t 0 d 0. A, eval e d step A, ret e d Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 33 / 39

62 Safety proof in Meta-CLF Case step/eval : eval e d value e {ret e d}. gen t 0 d 0 gen A, gen t d gen A, eval e d step A, ret e d There must be one step that generates eval e d using gen/eval; this step can be moved to the end, since no other step depends on it. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 33 / 39

63 Safety proof in Meta-CLF Case step/eval : eval e d value e {ret e d}. gen t 0 d 0 gen t 0 d 0 gen A, gen t d gen gen A, eval e d step A, ret e d? We want to show that it is possible to generate the multiset A, ret e d. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 33 / 39

64 Safety proof in Meta-CLF Case step/eval : eval e d value e {ret e d}. gen t 0 d 0 gen t 0 d 0 gen gen A, gen t d A, gen t d We generate the multiset A using the same rules as on the left. gen A, eval e d step A, ret e d Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 33 / 39

65 Safety proof in Meta-CLF Case step/eval : eval e d value e {ret e d}. 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 We generate the multiset A using the same rules as on the left. But change the last step to generate ret e d. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 33 / 39

66 Safety proof in Meta-CLF Case step/eval : eval e d value e {ret e d}. 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: Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 33 / 39

67 Safety proof in Meta-CLF Case step/eval : eval e d value e {ret e d}. 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 g 0 H) ({y} step/eval x H v ) (X 1 ; {y} gen/ret g 0 H H v ) where x : eval e d, g 0 : gen t d, H : of e t, H v : value e. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 33 / 39

68 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.) Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 34 / 39

69 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 : location, fref d 1 l, eval e d 1, ret (loc l) d}. step/fref : ret e d fref d l {cell l e}. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 35 / 39

70 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. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 35 / 39

71 Outline 1 CLF 2 Substructural operational semantics 3 Safety for SSOS 4 Meta-CLF 5 Conclusions and future work Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 36 / 39

72 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. Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 37 / 39

73 Future work Decidability of type checking Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 38 / 39

74 Future work Decidability of type checking Type reconstruction for implicit arguments (very important for usability) pres/ret : preservation (X 1 ; {x} gen/eval g 0 H) ({y} step/eval x H v ) (X 1 ; {y} gen/ret g 0 H H v ) Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 38 / 39

75 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 t d 0 g 0 H) ({y} step/eval e d 0 x H v ) (X 1 ; {y} gen/ret e t d 0 g 0 H H v ) Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 38 / 39

76 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 t d 0 g 0 H) ({y} step/eval e d 0 x H v ) (X 1 ; {y} gen/ret e t d 0 g 0 H H v ) Implementation Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 38 / 39

77 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) Iliano Cervesato and Jorge Luis Sacchini Meta-Reasoning in CLF 39 / 39

Meta-reasoning in the concurrent logical framework CLF

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

More information

Mode checking in the Concurrent Logical Framework

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

A Concurrent Logical Framework

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

Reasoning with Higher-Order Abstract Syntax and Contexts: A Comparison

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

Lecture Notes on A Concurrent Logical Framework

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

Lecture Notes on Call-by-Value and Call-by-Name

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

HOAS by example What is a Formal System? A Simply Typed Framework What Does it Mean? Canonical LF References HOAS. Randy Pollack

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

Type safety for substructural specifications: preliminary results

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

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

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

More information

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

Mechanizing a Decision Procedure for Coproduct Equality in Twelf

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

Specifying Properties of Concurrent Computations in CLF

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

The Curry-Howard Isomorphism

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

Relating State-Based and Process-Based Concurrency through Linear Logic

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

Specifying Properties of Concurrent Computations in CLF

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

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

Mechanizing Metatheory in a Logical Framework

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

Subtyping and Intersection Types Revisited

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

The Logical Meeting Point of Multiset Rewriting and Process Algebra

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

Towards Concurrent Type Theory

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

Relating Reasoning Methodologies in Linear Logic and Process Algebra

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

Lecture Notes on Inductive Definitions

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

More information

A concurrent logical framework I: Judgments and properties

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

Lecture Notes on The Concurrent Logical Framework

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

Focusing on Binding and Computation

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

Complete Partial Orders, PCF, and Control

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

More information

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

Properties of Terms in Continuation-Passing Style in an Ordered Logical Framework

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

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

Operational Semantics Using the Partiality Monad

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

Type Systems as a Foundation for Reliable Computing

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

Notes on Logical Frameworks

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

Lecture Notes on Intuitionistic Kripke Semantics

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

Termination and Reduction Checking for Higher-Order Logic Programs

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

Algebraic Trace Theory

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

More information

A Bidirectional Refinement Type System for LF

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

Intensionality, Extensionality, and Proof Irrelevance in Modal Type Theory

Intensionality, 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 information

Adjoint Logic and Its Concurrent Semantics

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

More information

Some Recent Logical Frameworks

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

Algebraic Trace Theory

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

More information

REFINEMENT TYPES FOR LOGICAL FRAMEWORKS AND THEIR INTERPRETATION AS PROOF IRRELEVANCE

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

Mary Southern and Gopalan Nadathur. This work was funded by NSF grant CCF

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

Overview. overview / 357

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

A Concurrent Logical Framework:

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

The Next 700 Challenge Problems for Reasoning with Higher-Order Abstract Syntax Representations

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

A Concurrent Logical Framework: the Propositional Fragment

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

Chapter 1 A computational interpretation of forcing in Type Theory

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

A Multiple-Conclusion Specification Logic

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

A Practical Module System for LF

A Practical Module System for LF A Practical Module System for LF Florian Rabe, Carsten Schürmann Jacobs University Bremen, IT University Copenhagen 1 History Harper, Honsell, Plotkin, 1993: LF Harper, Pfenning, 1998: A Module System

More information

An insider s look at LF type reconstruction:

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

Beyond First-Order Logic

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

Towards Modal Type Theory

Towards Modal Type Theory Towards Modal Type Theory Frank Pfenning Constructivism in Non-Classical Logics and Computer Science In Memoriam Pierangelo Miglioli Mantova, Italy October 2, 2000 Disclaimer: Work in Progress! Acknowledgments:

More information

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

A Meta Linear Logical Framework

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

From Operational Semantics to Abstract Machines

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

Modular Multiset Rewriting in Focused Linear Logic

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

Proof-Carrying Code in a Session-Typed Process Calculus

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

Theoretical Computer Science. Representing model theory in a type-theoretical logical framework

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

HORSes: format, termination and confluence

HORSes: 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 information

Classical First-Order Logic

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

A Meta Linear Logical Framework

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

20.1 Detecting the Need for Structural Induction

20.1 Detecting the Need for Structural Induction 183 Appendix 20: Structural Induction The relation r defined in the previous lecture is a function, but how could we prove it? Here s a semi-formal argument: The relation r is defined by a pair of constraints.

More information

Deductive System: Calculus of axioms and inference rules dening judgments. Used in the presentation of logics and programming derivable Logical Framew

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

A Constructor-Based Reachability Logic for Rewrite Theories

A Constructor-Based Reachability Logic for Rewrite Theories A Constructor-Based Reachability Logic for Rewrite Theories Stephen Skeirik, Andrei Stefanescu, Jose Meseguer October 10th, 2017 Outline 1 Introduction 2 Reachability Logic Semantics 3 The Invariant Paradox

More information

Lecture Notes: Axiomatic Semantics and Hoare-style Verification

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

Intersection Synchronous Logic

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

Alonzo Church ( ) Lambda Calculus. λ-calculus : syntax. Grammar for terms : Inductive denition for λ-terms

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

Probabilistic Applicative Bisimulation and Call-by-Value Lam

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

Safety Analysis versus Type Inference

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

Cylindrical Algebraic Decomposition in Coq

Cylindrical Algebraic Decomposition in Coq Cylindrical Algebraic Decomposition in Coq MAP 2010 - Logroño 13-16 November 2010 Assia Mahboubi INRIA Microsoft Research Joint Centre (France) INRIA Saclay Île-de-France École Polytechnique, Palaiseau

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

An extension of HM(X) with bounded existential and universal data-types

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

The L Machines are very high-level, in two senses:

The L Machines are very high-level, in two senses: What is a Computer? State of the machine. CMPSCI 630: Programming Languages An Abstract Machine for Control Spring 2009 (with thanks to Robert Harper) Internal registers, memory, etc. Initial and final

More information

AN OVERVIEW OF LINEAR LOGIC PROGRAMMING

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

Modal Logic as a Basis for Distributed Computation

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

Call-by-value non-determinism in a linear logic type discipline

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

The syntactic guard condition of Coq

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

A few bridges between operational and denotational semantics of programming languages

A few bridges between operational and denotational semantics of programming languages A few bridges between operational and denotational semantics of programming languages Soutenance d habilitation à diriger les recherches Tom Hirschowitz November 17, 2017 Hirschowitz Bridges between operational

More information

Induction on Failing Derivations

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

Evaluation Driven Proof-Search in Natural Deduction Calculi for Intuitionistic Propositional Logic

Evaluation Driven Proof-Search in Natural Deduction Calculi for Intuitionistic Propositional Logic Evaluation Driven Proof-Search in Natural Deduction Calculi for Intuitionistic Propositional Logic Mauro Ferrari 1, Camillo Fiorentini 2 1 DiSTA, Univ. degli Studi dell Insubria, Varese, Italy 2 DI, Univ.

More information

Semantics and Pragmatics of NLP

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

Lecture Notes on Classical Linear Logic

Lecture Notes on Classical Linear Logic Lecture Notes on Classical Linear Logic 15-816: Linear Logic Frank Pfenning Lecture 25 April 23, 2012 Originally, linear logic was conceived by Girard [Gir87] as a classical system, with one-sided sequents,

More information

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

Chapter 5: Linear Temporal Logic

Chapter 5: Linear Temporal Logic Chapter 5: Linear Temporal Logic Prof. Ali Movaghar Verification of Reactive Systems Spring 94 Outline We introduce linear temporal logic (LTL), a logical formalism that is suited for specifying LT properties.

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

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

Proof Calculus for Partial Correctness

Proof Calculus for Partial Correctness Proof Calculus for Partial Correctness Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan September 7, 2016 Bow-Yaw Wang (Academia Sinica) Proof Calculus for Partial Correctness September

More information

Causality Interfaces and Compositional Causality Analysis

Causality Interfaces and Compositional Causality Analysis Causality Interfaces and Compositional Causality Analysis Edward A. Lee Haiyang Zheng Ye Zhou {eal,hyzheng,zhouye}@eecs.berkeley.edu Center for Hybrid and Embedded Software Systems (CHESS) Department of

More information

A proof checking kernel for the λπ-calculus modulo

A proof checking kernel for the λπ-calculus modulo A proof checking kernel for the λπ-calculus modulo Mathieu Boespflug, École Polytechnique PhD defense, 18 january 2011 Funded by Pythia of Delphi Pythia of Delphi True False Proof implies truth. 1 1 For

More information

A New Look At Generalized Rewriting in Type Theory

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

Program Analysis Part I : Sequential Programs

Program Analysis Part I : Sequential Programs Program Analysis Part I : Sequential Programs IN5170/IN9170 Models of concurrency Program Analysis, lecture 5 Fall 2018 26. 9. 2018 2 / 44 Program correctness Is my program correct? Central question for

More information

Final Exam Substructural Logics Frank Pfenning. December 12, 2016

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

On Equivalence and Canonical Forms in the LF Type Theory

On Equivalence and Canonical Forms in the LF Type Theory On Equivalence and Canonical Forms in the LF Type Theory ROBERT HARPER and FRANK PFENNING Carnegie Mellon University Decidability of definitional equality and conversion of terms into canonical form play

More information

A Rewrite System for Strongly Normalizable Terms

A Rewrite System for Strongly Normalizable Terms A Rewrite System for Strongly Normalizable Terms IRIF Seminar Olivier Hermant & Ronan Saillard CRI, MINES ParisTech, PSL University June 28, 2018 O. Hermant (MINES ParisTech) Intersection Types in DMT

More information