aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Sato <shinnya.sato@gmail.com>2023-01-12 23:23:29 +0900
committerShinya Sato <shinnya.sato@gmail.com>2023-01-12 23:23:29 +0900
commit47df25063a7994b586b4171b52d6eaa61ba9262d (patch)
treed1cec600d25dfd46e4a64817f3ee6aa009c3d6b3
parent747e4413770ee08d503ab11774eac73d29df300a (diff)
downloadinpla-47df25063a7994b586b4171b52d6eaa61ba9262d.tar.gz
inpla-47df25063a7994b586b4171b52d6eaa61ba9262d.zip
v0.10.3
-rw-r--r--Changelog.md27
-rw-r--r--README.md2
-rw-r--r--src/inpla.y16
3 files changed, 22 insertions, 23 deletions
diff --git a/Changelog.md b/Changelog.md
index e8b76a8..81d2998 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,6 +1,15 @@
# Change log
+### v0.10.3 quite minor update (released on 12 January 2023)
+
+#### Minor bug fix
+
+- **The maximum number of ports**: The number of ports in agents is defined by `MAX_PORT` in `config.h`, but it put an error when we used these ports out fully. Now we use these ports the same as the definition.
+
+
+
### v0.10.2 minor update (released on 29 December 2022)
+
#### Polished
- **Avoiding suddenly crushing due to compilation errors**: The compilation process crushed and then the system aborted when property variables were referred to before the declaration, but it is now resolved. For instance, the system keeps working without avoiding for the following net where `x` is referred to before its declaration:
@@ -11,30 +20,20 @@
>>>
```
- So, even if we write the following rule having `r~(r1+r2) `, the system will not abort suddenly due to a compilation failure:
+ So, even if we write the following rule having `r~(r1+r2) `, the system will not abort suddenly, although the compilation crushes:
```
>>> fib(r) >< (int n)
- ... | n == 0 => r~0
- ... | n == 1 => r~1
+ ... | n == 0 => ret~0
+ ... | n == 1 => ret~1
... | _ => r~(r1+r2), fib(r1)~(n-1), fib(r2)~(n-2);
ERROR: `r1' is referred to as a property variable in an expression, although it has not yet been declared (as so).
ERROR: Compilation failure for fib >< Int.
>>>
```
- Of course, the following is successfully compiled as well:
-
- ```
- >>> fib(r) >< (int n)
- ... | n == 0 => r~0
- ... | n == 1 => r~1
- ... | _ => Add(r,r2)~r1, fib(r1)~(n-1), fib(r2)~(n-2);
- >>>
- ```
-
-
- **New sample programs**: Two programs of *higher-order operations* are joined in sample programs:
+
- `map.in`: It explains how map operation can be performed with built-in and not built-in agent and `%` notation.
- `reduce.in`: Here, Foldr and Foldl are realised.
diff --git a/README.md b/README.md
index b4c0fac..3d29225 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
Inpla is a multi-threaded parallel interpreter of interaction nets. Once you write programs for sequential execution, it works also in multi-threaded parallel execution. Each thread is managed on each CPU-core with POSIX-thread library.
-* The current version is 0.10.2 (minor update), released on **29 December 2022**. (See [Changelog.md](Changelog.md) for details.)
+* The current version is 0.10.3 (quite minor update), released on **12 January 2023**. (See [Changelog.md](Changelog.md) for details.)
* The below graph shows speed-up ratio to threads numbers for programs in the following benchmark table.
![speedup-ratio](pic/benchmark_reuse_v0.10.0.png)
diff --git a/src/inpla.y b/src/inpla.y
index 33f4701..161bd33 100644
--- a/src/inpla.y
+++ b/src/inpla.y
@@ -22,8 +22,8 @@
// ----------------------------------------------
-#define VERSION "0.10.2"
-#define BUILT_DATE "29 December 2022"
+#define VERSION "0.10.3"
+#define BUILT_DATE "12 January 2023"
// ------------------------------------------------------------------
@@ -2969,24 +2969,24 @@ void VMCode_puts(void **code, int n) {
i+=3;
} else if (code[i] == CodeAddr[OP_LOADP_L]) {
- printf("loadpl reg%lu $%ld\n",
+ printf("loadp_l reg%lu $%ld\n",
(unsigned long)code[i+1],
(unsigned long)code[i+2]);
i+=2;
} else if (code[i] == CodeAddr[OP_LOADP_R]) {
- printf("loadpr reg%lu $%ld\n",
+ printf("loadp_r reg%lu $%ld\n",
(unsigned long)code[i+1],
(unsigned long)code[i+2]);
i+=2;
} else if (code[i] == CodeAddr[OP_CHID_L]) {
- printf("chidl $%ld\n",
+ printf("chgid_l $%ld\n",
(unsigned long)code[i+1]);
i+=1;
} else if (code[i] == CodeAddr[OP_CHID_R]) {
- printf("chidr $%ld\n",
+ printf("chgid_r $%ld\n",
(unsigned long)code[i+1]);
i+=1;
@@ -7776,7 +7776,7 @@ int make_rule_oneway(Ast *ast) {
} else {
arity = get_arity_on_ast(ruleAgent_L);
}
- if (arity >= MAX_PORT) {
+ if (arity > MAX_PORT) {
printf("ERROR: Too many arguments of `%s'. It should be MAX_PORT(=%d) or less.\n",
ruleAgent_L->left->sym, MAX_PORT);
return 0;
@@ -7789,7 +7789,7 @@ int make_rule_oneway(Ast *ast) {
} else {
arity = get_arity_on_ast(ruleAgent_R);
}
- if (arity >= MAX_PORT) {
+ if (arity > MAX_PORT) {
printf("ERROR: Too many arguments of `%s'. It should be MAX_PORT(=%d) or less.\n",
ruleAgent_R->left->sym, MAX_PORT);
return 0;