aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Sato <shinnya.sato@gmail.com>2021-10-30 14:03:33 +0900
committerShinya Sato <shinnya.sato@gmail.com>2021-10-30 14:03:33 +0900
commit28e12eab2e5fe062914a61395748099f4a5a4a22 (patch)
treea4fc1bec18b6326db2b151b367a7934160f6e19f
parent2275981c6ecfdd0cba83917260f83d90857a0aec (diff)
downloadinpla-28e12eab2e5fe062914a61395748099f4a5a4a22.tar.gz
inpla-28e12eab2e5fe062914a61395748099f4a5a4a22.zip
Update README.md
Diffstat (limited to '')
-rw-r--r--README.md9
1 files changed, 6 insertions, 3 deletions
diff --git a/README.md b/README.md
index 959f198..ab5c193 100644
--- a/README.md
+++ b/README.md
@@ -248,7 +248,8 @@ $ make thread
// Note: `Append' is implemented as the following built-in agent:
// Append(ret, b)~a --> ret ~ a++b
- // The ret << Append(left, x:right) is rewritten by the built-in abrreviation as:
+ // The ret << Append(left, x:right) is rewritten
+ // by the built-in abrreviation into:
// Append(ret, x:right)~left.
part(smaller, larger, int x) >< [] => smaller~[], larger~[];
@@ -487,7 +488,7 @@ Let's clean the result in case it could be used anywhere:
This is written in interaction nets as follows: ![add1](pic/add1.png)
- In Inpla, each agent is expressed as a term. For instance, after putting distinct names on auxiliary ports, the `add` agent is written as a term `add(ret,x)`. Every computation is performed on connections between principal ports (drawn as arrow) according to interaction rules. These rules are written textually as follows:
+ In Inpla, each agent is expressed as a term. For instance, after putting distinct names on auxiliary ports, the `add` agent is written as a term `add(ret,x)`. Every computation is performed on connections between principal ports (drawn as arrows) according to interaction rules. These rules are written textually as follows:
```
add(ret, x) >< Z => ret~x;
@@ -520,7 +521,9 @@ Let's clean the result in case it could be used anywhere:
add(ret,x) >< Z => ret~x;
add(ret,x) >< S(y) => ret~S(cnt), add(cnt, x)~y;
```
-
+ In comparison with the previous example such that computational results are stored in an auxiliary ports, the results `S(cnt)` can be sent to other soon. So, **this version is suitable for parallel execution**.
+
+
## Built-in agents