aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Sato <shinnya.sato@gmail.com>2022-01-12 23:58:40 +0900
committerShinya Sato <shinnya.sato@gmail.com>2022-01-12 23:58:40 +0900
commit8b4522517bc854458ad92bc150dbdddcf916ffd5 (patch)
treecc188581ec575d17be5b586d0410bc36eaa7fa65
parent581c14cad9a7dcea48100725bc74f0dffc31486d (diff)
downloadinpla-8b4522517bc854458ad92bc150dbdddcf916ffd5.tar.gz
inpla-8b4522517bc854458ad92bc150dbdddcf916ffd5.zip
v0.6.1
-rw-r--r--Changelog.md2
-rw-r--r--README.md8
-rw-r--r--src/inpla.y14
3 files changed, 14 insertions, 10 deletions
diff --git a/Changelog.md b/Changelog.md
index 37c0a2a..9c8fa52 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -4,7 +4,7 @@
### v0.6.1 (released on 12 January 2022)
#### New Features:
-- **Introduced automatically expandable equation stacks**: Stacks for equations are automatically expanded when the stacks overflow. The unit size is 256, so each stack size in virtual machines starts from 256, and these will be twice (256), triple (768) and so on. The unit size is specified by the execution option `-x`. For instance, Inpla invoked with `-x 1024` assigns a 1024-size equation stack for each thread. As for the global equation stack, the size is specified as `(the number of threads) * 8` in the `main` function as follows, so change it to improve the execution performance:
+- **Introduced automatically expandable equation stacks**: Stacks for equations are automatically expanded when the stacks overflow. The unit size is 256, so each stack size in virtual machines starts from 256, and these will be twice (256), triple (768) and so on. The unit size is specified by the execution option `-e`. For instance, Inpla invoked with `-e 1024` assigns a 1024-size equation stack for each thread. As for the global equation stack, the size is specified as `(the number of threads) * 8` in the `main` function as follows, so change it to improve the execution performance:
```
GlobalEQStack_Init(MaxThreadsNum*8);
diff --git a/README.md b/README.md
index bd4beb3..855398e 100644
--- a/README.md
+++ b/README.md
@@ -264,13 +264,17 @@ Inpla is a multi-threaded parallel interpreter of interaction nets. Once you wri
Options:
-f <filename> Set input file name (Defalut: STDIN)
- -x <number> Set the unit size of the EQ stack (Default: 256)
+ -e <number> Set the unit size of the EQ stack (Default: 256)
+ -w Enable Weak Reduction strategy (Default: false)
-t <number> Set the number of threads (Default: 1)
-d <Name>=<val> Bind <val> to <Name>
-h Print this help message
```
-(The option ```-t``` is available for the multi-thread version that is compiled by ```make thread```.)
+**Note**:
+
+* The option `-w` is available for the single-thread version.
+* The option ```-t``` is available for the multi-thread version that is compiled by ```make thread```.
diff --git a/src/inpla.y b/src/inpla.y
index d7bb8ab..728e19d 100644
--- a/src/inpla.y
+++ b/src/inpla.y
@@ -6568,7 +6568,7 @@ int main(int argc, char *argv[])
puts("Options:");
printf(" -f <filename> Set input file name (Defalut: STDIN)\n");
- printf(" -x <number> Set the unit size of the EQ stack (Default: %8u)\n",
+ printf(" -e <number> Set the unit size of the EQ stack (Default: %8u)\n",
max_EQStack);
@@ -6578,7 +6578,7 @@ int main(int argc, char *argv[])
MaxThreadsNum);
#else
- printf(" -w Enable Weak Reduction strategy (Default: false)\n"
+ printf(" -w Enable Weak Reduction strategy (Default: false)\n"
);
@@ -6647,23 +6647,23 @@ int main(int argc, char *argv[])
fname = argv[i];
retrieve_flag = 0;
} else {
- printf("ERROR: The option switch '-f' needs a string that specifies an input file name.");
+ printf("ERROR: The option switch '-f' needs a string of an input file name.");
exit(-1);
}
break;
- case 'x':
+ case 'e':
i++;
if (i < argc) {
param = atoi(argv[i]);
if (param == 0) {
- printf("ERROR: '%s' is illegal parameter for -x\n", argv[i]);
+ printf("ERROR: '%s' is illegal parameter for -e\n", argv[i]);
exit(-1);
}
} else {
- printf("ERROR: The option switch '-x' needs a number as an argument.");
+ printf("ERROR: The option switch '-e' needs a natural number.");
exit(-1);
}
max_EQStack=param;
@@ -6680,7 +6680,7 @@ int main(int argc, char *argv[])
exit(-1);
}
} else {
- printf("ERROR: The option switch '-t' needs a number as an argument.");
+ printf("ERROR: The option switch '-t' needs a number of threads.");
exit(-1);
}