360 likes | 438 Views
Focusing in Proof-search and Concurrent Synchronization. Deepak Garg Carnegie Mellon University (Based on joint work with Frank Pfenning). Objectives. Direct translation of asynchronous pi-calculus to intuitionistic linear logic formulas
E N D
Focusing in Proof-search and Concurrent Synchronization Deepak Garg Carnegie Mellon University (Based on joint work with Frank Pfenning)
Objectives • Direct translation of asynchronous pi-calculus to intuitionistic linear logic formulas • Committed Forward chaining in linear logic to simulate pi-calculus reductions • Combine with focusing to obtain atomicity in synchronization Focusing in Proof-search and Concurrent Synchronization
Direct translation • Connectives of pi-calculus map to connectives of linear logic Focusing in Proof-search and Concurrent Synchronization
First attempt at translation (No focusing, unsound!)
Pi-calculus, Linear Logic • Asynchronous pi-calculus (without replication): • Intuitionistic linear logic fragment: Focusing in Proof-search and Concurrent Synchronization
Pi-calculus: semantics • Modified CHAM semantics Focusing in Proof-search and Concurrent Synchronization
Linear Logic: Forward Chaining • Judgment: Term variables Formulas (Linear) Focusing in Proof-search and Concurrent Synchronization
Linear Logic: Forward Chaining Focusing in Proof-search and Concurrent Synchronization
Forward Chaining as Rewriting Focusing in Proof-search and Concurrent Synchronization
Forward Chaining as Rewriting Focusing in Proof-search and Concurrent Synchronization
Forward Chaining as Rewriting Focusing in Proof-search and Concurrent Synchronization
Translation Focusing in Proof-search and Concurrent Synchronization
Simulation example Focusing in Proof-search and Concurrent Synchronization
Unsound! • Another possible reduction sequence: Focusing in Proof-search and Concurrent Synchronization
Unsoundness analysis • Forward chaining may get stuck incorrectly • Universal quantifier and implication in inputs must be eliminated simultaneously • Can be done using focusing • Each communication is exactly one focusing Focusing in Proof-search and Concurrent Synchronization
Synchronous and Asynchronous • Divide formulas into (right) synchronous S and (right) asynchronous A • Coerce S to A via a monad (CLF, LolliMon) Focusing in Proof-search and Concurrent Synchronization
Focused Forward Chaining • Judgments • Different from CLF focusing • Decomposition of , 9 on left is not in focus • No right rules Focusing in Proof-search and Concurrent Synchronization
Focused Forward Chaining as Rewriting • We read rules bottom up, ignore synchronous goals and get a conditional rewrite system. • Judgments: Unchanged Focusing in Proof-search and Concurrent Synchronization
Complete Rewrite System Focusing in Proof-search and Concurrent Synchronization
Translation of the pi-calculus Focusing in Proof-search and Concurrent Synchronization
Simulation example Focusing in Proof-search and Concurrent Synchronization
Simulation example Focusing in Proof-search and Concurrent Synchronization
Correctness of translation Focusing in Proof-search and Concurrent Synchronization
A Strange External Choice… • What does A&B correspond to in the pi-calculus? • It corresponds to external choice between input/output actions Focusing in Proof-search and Concurrent Synchronization
Extension to the logic • Extension of asynchronous formulas • New focusing rules Focusing in Proof-search and Concurrent Synchronization
Translation of choice Correctness results remain the same Focusing in Proof-search and Concurrent Synchronization
Expressiveness • How expressive is this extension of the asynchronous pi-calculus? • Conjecture: It is as expressive as the synchronous pi-calculus (with choice, without replication) - Translation follows from Boudol’s encoding Focusing in Proof-search and Concurrent Synchronization
3-way synchronization • Can encode receivers with 2 simultaneous inputs Focusing in Proof-search and Concurrent Synchronization
Works because both implications must be eliminated in one focusing step Generalizes to n-way inputs Encoding 3-way synchronization Focusing in Proof-search and Concurrent Synchronization
Other connectives Focusing in Proof-search and Concurrent Synchronization
Summary • Dynamic semantics of the asynchronous pi-calculus can be simulated using focusing and forward chaining • Focusing – atomicity in synchronization • Correspondence between connectives of the pi-calculus and intuitionistic linear logic Focusing in Proof-search and Concurrent Synchronization
Related Work • Translation idea is not new • Miller92 – pi-calculus as a theory in linear logic • Cervesato03 – similar idea, no focusing • Abramsky93 – classical logic and concurrency • Concurrent Logic Programming Focusing in Proof-search and Concurrent Synchronization