Distributed resource calculus
Syntax
Let l, m, n range over locations (Loc).
Let a, b, c range over names (Var
union Loc).
Replace the syntactic category (Net Thread) by:
| N |
::= |
... |
|
|
| |
l[t] |
(Net Located thread) |
Extend the syntax of threads:
| t |
::= |
... |
|
|
| |
at a t |
(Thread Migration) |
Extend the syntax of values:
| v |
::= |
... |
|
|
| |
l |
(Val Location) |
Extend the syntax of types:
| T |
::= |
... |
|
|
| |
location |
(Type Location) |
Dynamic semantics
Structural equivalence is as before, but with the addition of locations
on threads in the let associativity rule:
| l[let p = D e;
t] |
 |
l[D let p = e; t] |
(Let Assoc) |
[bv D disjoint fv t] |
Reduction is as before, but with the addition of locations on threads:
The new rule is:
|
l[at m t]
|
 |
m[t] |
( Migration) |
Static semantics
Extend the judgements of types with:
|
(Type Location) |
|
 |
 |
location : type |
Replace the type rule (Net Thread) by:
 |
 |
t : thread |
|
(Net Located thread) |
|
 |
 |
l[t] network |
Extend the type rules for threads with:
 |
 |
a : location |
 |
 |
t : thread |
|
(Thread Migration) |
|
 |
 |
at a t : thread |
Extend the type rules for values with:
|
(Val Location) |
|
 |
 |
l : location |
Subject reduction
Proposition If
N : network and N
*
M then
M
: network.