From 8b4522517bc854458ad92bc150dbdddcf916ffd5 Mon Sep 17 00:00:00 2001 From: Shinya Sato Date: Wed, 12 Jan 2022 23:58:40 +0900 Subject: v0.6.1 --- Changelog.md | 2 +- README.md | 8 ++++++-- src/inpla.y | 14 +++++++------- 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 Set input file name (Defalut: STDIN) - -x Set the unit size of the EQ stack (Default: 256) + -e Set the unit size of the EQ stack (Default: 256) + -w Enable Weak Reduction strategy (Default: false) -t Set the number of threads (Default: 1) -d = Bind to -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 Set input file name (Defalut: STDIN)\n"); - printf(" -x Set the unit size of the EQ stack (Default: %8u)\n", + printf(" -e 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); } -- cgit v1.2.3