aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Changelog.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/Changelog.md b/Changelog.md
index fd95ae1..5182e7a 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -5,7 +5,7 @@
#### Polished:
* **Bytecode optimisation inspired by Tail Recursive Optimisation**: As a result, this optimisation brings about faster computation up to about twice in comparison with no reuse-annotated computation.
- * When an interaction rule has a connection whose both sides agents have the same IDs to the active pair, computation of the connection can be realised by applying the same bytecode sequence of the rule to the connection with replacing ports of active pairs into the agent ports of the connection. Moreover, when the connection is placed at the tail of a connection sequence, we can restart the same bytecode sequence after replacing these ports. For instance, take the following rule for Fibonacci number:
+ * When an interaction rule has a connection whose both sides agents have the same IDs to the active pair, computation of the connection can be realised by applying the same bytecode sequence of the rule to the connection after replacing ports of active pairs into the agent ports of the connection. Moreover, when the connection is placed at the tail of a connection sequence, we can restart the same bytecode sequence after replacing these ports. For instance, take the following rule for Fibonacci number:
```
fib(ret) >< (int n)
@@ -13,7 +13,7 @@
| n == 1 => ret~1
| _ => Add(ret, cnt2)~cnt1, fib(cnt1)~(n-1), fib(cnt2)~(n-2);
```
- This rule has a connection `fib(cnt2)~(n-2)` at the tail of the third connection sequence. The connection is computable by using the same bytecode sequence of `fib(ret)><(int n)` with replacing these ports `ret`, `n` into `cnt2`, `n-2`, respectively. So, the computation of the third connection sequence is realised by the instructions of the other connections and the port replacing, and a loop operation to start execution from the top of the rule sequence.
+ This rule has a connection `fib(cnt2)~(n-2)` at the tail of the third connection sequence. The connection is computable by using the same bytecode sequence of `fib(ret)><(int n)` with replacing these ports `ret`, `n` into `cnt2`, `n-2`, respectively. So, the computation of the third connection sequence is realised by bytecode sequences of the other connections and the port replacing, and a loop operation to start execution from the top of the rule sequence.
* This is also possible not only for agents like `(int n)`, but also other constructor agents such as `Cons(x,xs)`, `S(x)`. The following is a part of rules for insertion sort: