Replies: 1 comment
|
Wonderful, thanks! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Since it was requested, I'm sketching here the correspondence between Par and linear logic. I will refine it over time.
Par is primarily based on a little process language called CP from Phil Wadler's paper "Propositions as Sessions".
The correspondence with linear logic is best shown via typing. While Par is dynamically typed, a type system lives in its spirit because every operation actually corresponds to a proof-line in linear logic's sequent calculus. All programs that will be typeable in the future can be given types now and type-checked on paper without any changes to the language.
There are two syntactic modes in Par: processes and expressions.
Processes are typeable by usual sequents (like
|- A, B, C), with all propositions having an equal position, none distinguished. Processes don't have any special result type, they just end after handling all of their variables.Expressions are typeable by sequents with a distinguished result proposition, such as
|- A | B, C, D, hereAbeing the result type. I separate the distinguished variable by a pipe.Let's adopt this ASCII terminology for linear logic:
**is "times"/"tensor"||is "par"+is "plus"&is "with"1,F,T,0are units of**,||,&,+respectively~is linear negationLet's only consider a subset of Par's syntax:
<name>chan <name> { <process> }<name>!- Closing a channel<name>?- Waiting for the other side to close a channel<name>(<expression>)- Sending a value<name>[<name>]- Receiving a value<name>.left/<name>.right- Sending a signal<name> { left => { <process> } right => { <process> } }- Receiving a signal<name> { }- Blocking forever on no signal possible (means unreachable point)The typing sequents then have this form:
<expression> |- <result type> | <name> : <type>, ...<process> |- <name> : <type>, ...The
<name> : <type>judgements are the context of free variables at that point.G, andHwill be contexts (sequences of variables judgments),P,Qwill denote processes,Ewill be an expression,A,Bwill be types, andx,ywill be variables. The typing rules then look like this:Hopefully I didn't make a mistake. I can possibly also attach a PDF with the rules, if this is too unreadable.
All other constructs (such as expression syntax) in Par are made from these basic operations, so their typing should follow from their translation to these basic rules.
All reactions