Скачать презентацию A Concurrent Logical Framework Iliano Cervesato iliano itd nrl Скачать презентацию A Concurrent Logical Framework Iliano Cervesato iliano itd nrl

a5d2b78a8320dc4af2de492cd2902169.ppt

  • Количество слайдов: 18

A Concurrent Logical Framework Iliano Cervesato iliano@itd. nrl. navy. mil ITT Industries, inc @ A Concurrent Logical Framework Iliano Cervesato iliano@itd. nrl. navy. mil ITT Industries, inc @ NRL Washington, DC http: //www. cs. stanford. edu/~iliano (Joint work with Frank Pfenning, David Walker, and Kevin Watkins) CS Department, UMBC February 27 -28 2003

CLF ©Where it comes from ©Logical Frameworks ©The LF approach ©What it is ©True CLF ©Where it comes from ©Logical Frameworks ©The LF approach ©What it is ©True concurrency ©Monadic encapsulation ©A canonical approach ©What’s next? 1

All about Logical Frameworks Represent and reason about object systems © Languages, logics, … All about Logical Frameworks Represent and reason about object systems © Languages, logics, … ©Often semi-formalized as deductive systems ©Reasoning often informal © Benefits ©Formal specification of object system ©Automate verification of reasoning arguments ©Feed back into other tools ©Theorem provers, PCC, … I. Cervesato: A Concurrent Logical Framework 2

The LF Way Identify fundamental mechanisms and build them into the framework (soundly!) Ø The LF Way Identify fundamental mechanisms and build them into the framework (soundly!) Ø done (right) once and for all instead of each time © Modular constructions: [S-Algebras] ©app f a © Variable binding, a-renaming, substitution [LF] ©lx. x+1 © Disposable, updateable cell [LLF] ©l^s’. f ^ s © True concurrency [CLF] I. Cervesato: A Concurrent Logical Framework 3

It’s all about Adequacy Representation Task - complex - long - tedious Automated Informal It’s all about Adequacy Representation Task - complex - long - tedious Automated Informal Object system ©Adequacy: correctness of the transcription ©LF: make adequacy as simple as possible rather than (Gödel numbers) I. Cervesato: A Concurrent Logical Framework 4

Representation Targets Mottos, mottos … © LF: judgments-as-types / proofs-as-objects © 3+5 = 8 Representation Targets Mottos, mottos … © LF: judgments-as-types / proofs-as-objects © 3+5 = 8 Judgment N : ev (+ 3 5) 8 object type (a statement we want to make) © LLF: state-as-linear-hypotheses / imperative-computations-aslinear-functions © CLF: concurrent-computations-as-monadic-expressions / … © next. LF: blablabla-as-blablablabla / blablablablabl -as-blablablabablablablabla I. Cervesato: A Concurrent Logical Framework 5

Make it Canonical, Sam Object system proofs _LF terms N: tm 1 -1 evaluations Make it Canonical, Sam Object system proofs _LF terms N: tm 1 -1 evaluations N: pf A B N: ev E V Each object of interest has exactly 1 representation © Canonical objects: ©h-long, b-normal _LF term ©Decidable, computable I. Cervesato: A Concurrent Logical Framework 6

But what is LLF? ©Types (“asynchronous” constructors of ILL) ©A : : = a But what is LLF? ©Types (“asynchronous” constructors of ILL) ©A : : = a | P x: A. B | A –o B | A & B | T ©Terms ©N : : = x | l x: A. N | N 1 N 2 l^x: A. N | N 1^N 2 | | fst N | snd N | <> ©Main judgment ©G ; D |- N : A I. Cervesato: A Concurrent Logical Framework 7

CLF I. Cervesato: A Concurrent Logical Framework 8 CLF I. Cervesato: A Concurrent Logical Framework 8

An Example netin(m) Security protocol spec. x. netout(x) netin(x) Security protocol spec. net(m) netout(m) An Example netin(m) Security protocol spec. x. netout(x) netin(x) Security protocol spec. net(m) netout(m) Many instances can be executing concurrently I. Cervesato: A Concurrent Logical Framework 9

LLF Encoding net : step o– netout m o– (netin m –o step). © LLF Encoding net : step o– netout m o– (netin m –o step). © LLF forces continuation-passing style © Consider 2 independent applications: © lni 1. net ^ no 1 ^ (lni 2. net ^ no 2 ^ C) © lni 2. net ^ no 2 ^ (lni 1. net ^ no 1 ^ C) Should be indistinguishable (true concurrency) © Equate them at the meta-level same-trace T 1 T 2 o- … Never-ending even for small system! I. Cervesato: A Concurrent Logical Framework 10

Encoding in Linear logic m. netout m –o netin m © Much simpler © Encoding in Linear logic m. netout m –o netin m © Much simpler © In general, requires “synchronous” operators © and 1 © Concurrency given by “commuting conversions” let x 1 y 1 = N 1 in (let x 2 y 2 = N 2 in M) = let x 2 y 2 = N 2 in (let x 1 y 1 = N 1 in M) if xi, yi FV(R 2 -i) © … looks like what we want … I. Cervesato: A Concurrent Logical Framework 11

However … © Commuting conversions are too wild ©Allow permutations we don’t care for However … © Commuting conversions are too wild ©Allow permutations we don’t care for © Synchronous types destroy uniqueness of canonical forms © nat: type. z: nat. s: nat->nat. c: 1. © Natural numbers: z, s (s z), … © What about let 1 = c in z ? What if c is linear? © No good! I. Cervesato: A Concurrent Logical Framework 12

Monadic Encapsulation Separate synchronous and asynchronous types © Outside the monad ©LLF types (asynchronous) Monadic Encapsulation Separate synchronous and asynchronous types © Outside the monad ©LLF types (asynchronous) ©h-long, b-normal forms © Inside the monad ©Synchronous types ©Commuting conversions ©Concurrency equation ©h-long, b-normal forms © Monad is a sandbox for synchronous behavior I. Cervesato: A Concurrent Logical Framework 13

CLF ©Types ©A : : = a | P x: A. B | A CLF ©Types ©A : : = a | P x: A. B | A –o B | A & B | T | {S} ©S : : = A | !A | S 1 S 2 | 1 | $x: A. S ©Terms ©N : : = x | l x: A. N | N 1 N 2 | l^x: A. N | N 1^N 2 | | fst N | snd N | <> | {E} ©E : : = M | let {p} = N in E ©M : : = N | !N | M 1 M 2 | 1 | [N, M] ©p : : = x | !x | p 1 p 2 | 1 | [x, p] I. Cervesato: A Concurrent Logical Framework 14

Example in CLF net : netin m –o { netout m }. ©Relating the Example in CLF net : netin m –o { netout m }. ©Relating the 2 specifications © 2 sets of CLF declarations ©Meta-level definition of trace transformation simplify-net {Ti/o} {T} ©Trivial mapping ©Permutations handled automatically ©No need to take action ©Critical for more complex examples I. Cervesato: A Concurrent Logical Framework 15

Examples and Applications © p-calculus ©Synchronous ©Asynchronous © Concurrent ML © Petri nets ©Execution-sequence Examples and Applications © p-calculus ©Synchronous ©Asynchronous © Concurrent ML © Petri nets ©Execution-sequence semantics ©Trace semantics © MSR security protocol specification language © No implementation … yet … I. Cervesato: A Concurrent Logical Framework 17

Conclusions CLF © A logical framework that internalizes true concurrency © Monadic encapsulation tames Conclusions CLF © A logical framework that internalizes true concurrency © Monadic encapsulation tames commuting conversions © Canonical approach to meta-theory © Good number of examples © This is just the beginning … plenty more to do! I. Cervesato: A Concurrent Logical Framework 21