From ea0cf27336a14075c2fbb1cd81e98166aee26264 Mon Sep 17 00:00:00 2001 From: Shinya Sato Date: Sun, 20 Feb 2022 01:24:58 +0900 Subject: v0.7.3 --- Changelog.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'Changelog.md') diff --git a/Changelog.md b/Changelog.md index 9668ad6..24f880a 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,31 @@ # Change log +### v0.7.3 (released on 20 February 2022) + +#### New Features: +* **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 interaction rules have a connection whose the left and the right hand sides have the same IDs to the active pair, computation of the connection can be realised by a loop operation that applies the same bytecode sequence of the rule with replacing ports of active pairs. For instance, take the following Fibonacci number: + + ``` + fib(ret) >< (int n) + | n == 0 => ret~0 + | n == 1 => ret~1 + | _ => Add(ret, cnt2)~cnt1, fib(cnt1)~(n-1), fib(cnt2)~(n-2); + ``` + This rule has `fib(cnt2)~(n-2)` as the connection for the loop, and it is possible to be applied the same bytecode sequence of `fib(ret)><(int n)` with replacing these ports `ret`, `n` into `cnt2`, `n-2`, respectively. So, this rule computation is realised by execution of the other connections and the loop operation for the connection `fib(cnt2)~(n-2)`. + + * 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: + + ``` + isort(ret) >< x:xs => insert(ret, x)~cnt, isort(cnt)~xs; + ``` + When the `xs` connects to an `Cons(y,ys)` agent, then the computation is also realised by the loop operation because the `isort(cnt)~xs` can be regarded as `isort(cnt)~y:ys`, whose agents have the same IDs of the active pair. So, by introducing a conditional branch if the `xs` is connected to a `Cons` agent or not, this rule computation is also realised by the loop operation. + + * In this version, this optimisation will be triggered when such the connection is placed at the tail of a sequence of connections. + + + ### v0.7.2-1 (released on 12 February 2022) #### Bug Fix: -- cgit v1.2.3