|
@@ -118,7 +118,7 @@ fanin : [ a_1 |->| b, a_2, |->| b, ..., a_n |->| b ]
|
|
|
fanin = cases, since '+' is simple union.
|
|
|
|
|
|
fastest : |<a>| * |<b>| -> |< a+b >|
|
|
|
-fastest : [ |<a_1>|, |<a_2>|, ..., |<a_n>| ] -> |< a_1|a_2+...+a_n >|
|
|
|
+fastest : [ |<a_1>|, |<a_2>|, ..., |<a_n>| ] -> |< a_1+a_2+...+a_n >|
|
|
|
|
|
|
slowest : |<a>| * |<b>| -> |< a+b >|
|
|
|
slowest : [ |<a_1>|, |<a_2>|, ..., |<a_n>| ] -> |< a_1+a_2+...+a_n >|
|
|
@@ -130,3 +130,46 @@ Loops
|
|
|
loopback : (a |->| {'stop', b}+{'loop', a}) -> (a |->| b)
|
|
|
|
|
|
loopback terminates when the operation returns 'stop'.
|
|
|
+
|
|
|
+
|
|
|
+Interpretation
|
|
|
+--------------
|
|
|
+
|
|
|
+simpl : |<a>| -> |<a>|
|
|
|
+simpl : (a |->| b) -> (a |->| b)
|
|
|
+
|
|
|
+simpl simplifies and optimizes a task or operation.
|
|
|
+
|
|
|
+linearize : |<a>| -> (0 -> a)
|
|
|
+linearize : (a |->| b) -> (a -> b)
|
|
|
+
|
|
|
+linearize interprets a task or operation to run sequentially on a single node.
|
|
|
+
|
|
|
+localize : |<a>| -> (0 -> a)
|
|
|
+localize : (a |->| b) -> (a -> b)
|
|
|
+
|
|
|
+localize interprets a task or operation to run in parallel on a single node.
|
|
|
+
|
|
|
+distribute : |<a>| -> (ResourceInfo -> a)
|
|
|
+distribute : (a |->| b) -> (ResourceInfo * a -> b)
|
|
|
+
|
|
|
+distribute interprets a task or operation to run in parallel distributed among
|
|
|
+several nodes.
|
|
|
+
|
|
|
+run_linear : |<a>| -> a
|
|
|
+run_linear : (a |->| b) * a -> b
|
|
|
+
|
|
|
+run_linear(x) = linearize(x)()
|
|
|
+run_linear(x, y) = linearize(x)(y)
|
|
|
+
|
|
|
+run_local : |<a>| -> a
|
|
|
+run_local : (a |->| b) * a -> b
|
|
|
+
|
|
|
+run_local(x) = localize(x)()
|
|
|
+run_local(x, y) = localize(x)(y)
|
|
|
+
|
|
|
+run : ResourceInfo * |<a>| -> a
|
|
|
+run : ResourceInfo * (a |->| b) * a -> b
|
|
|
+
|
|
|
+run(Info, x) = distribute(x)(Info)
|
|
|
+run(Info, x, y) = distribute(x)(Info, y)
|