aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Sato <shinnya.sato@gmail.com>2021-11-10 19:44:52 +0900
committerShinya Sato <shinnya.sato@gmail.com>2021-11-10 19:44:52 +0900
commit748d341119da2d955c10cc797318280bab5f1237 (patch)
tree422567aba2326ada689c17fd5dd184907347394c
parent35424247ef28ab60fd57d04b8d5d6efbc581eac9 (diff)
downloadinpla-748d341119da2d955c10cc797318280bab5f1237.tar.gz
inpla-748d341119da2d955c10cc797318280bab5f1237.zip
v0.5.2
-rw-r--r--Changelog.md19
-rw-r--r--Makefile6
-rw-r--r--README.md3
-rw-r--r--src/inpla.y20
4 files changed, 30 insertions, 18 deletions
diff --git a/Changelog.md b/Changelog.md
index 25ccfb1..e1b54ce 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,12 +1,17 @@
# Change log
-### v0.5.1 (released 2 November 2021)
+### v0.5.2 (released on 10 November 2021)
+#### Bug Fix (minor)
+- `Free` command did not work for integer numbers, due to the change by v0.5.1, but it was fixed.
+
+
+### v0.5.1 (released on 2 November 2021)
#### Bug Fix
- Terms in which the same name occurs twice, such as `A(x,x)`, can be freed safely by the `free` command.
-### v0.5.0 (released 28 October 2021)
+### v0.5.0 (released on 28 October 2021)
#### New Features:
- **Abbreviation notation**: An abbreviation notation `<<` is introduced. The following description:
@@ -50,7 +55,7 @@
```
-### v0.4.2 (released 16 October 2021)
+### v0.4.2 (released on 16 October 2021)
#### Improved
- Line edit was improved to support multi-line paste, according to the following suggestion: https://github.com/antirez/linenoise/issues/43
- History in Line edit becomes available.
@@ -60,7 +65,7 @@
-### v0.4.1 (released 24 September 2021)
+### v0.4.1 (released on 24 September 2021)
#### Improved
- Line edit is improved so that history can be handled by linenoise:
@@ -78,7 +83,7 @@
-### v0.4.0 (released 17 September 2021)
+### v0.4.0 (released on 17 September 2021)
#### New Feature:
@@ -107,7 +112,7 @@
-### v0.3.2 (released 3 August 2021)
+### v0.3.2 (released on 3 August 2021)
#### New Feature:
@@ -135,7 +140,7 @@
-### v0.3.1 (released 7 May 2021)
+### v0.3.1 (released on 7 May 2021)
#### New Feature:
diff --git a/Makefile b/Makefile
index 256b94c..10da355 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ INCLUDE = -I ./src
SRC_DIR = ./src
OBJ_DIR = ./build
TARGET = inpla
-OBJS = $(OBJ_DIR)/$(TARGET).tab.c $(OBJ_DIR)/ast.o $(OBJ_DIR)/id_table.o $(OBJ_DIR)/linenoise.o
+OBJS = $(OBJ_DIR)/inpla.tab.c $(OBJ_DIR)/ast.o $(OBJ_DIR)/id_table.o $(OBJ_DIR)/linenoise.o
#MYOPTION = -DHAND_FIB -DHAND_FIB_INT -DHAND_I_CONS -DHAND_IS_CONS -DHAND_Apnd_CONS -DHAND_Part_CONS -DHAND_Split_CONS -DHAND_MergeCC_CONS -DHAND_B_CONS -DHAND_DUP_S -DHAND_ADD_S -DHAND_ACK_S
#MYOPTION = -DHAND_Split_CONS -DHAND_MergeCC_CONS
@@ -28,10 +28,10 @@ $(OBJ_DIR)/linenoise.o: $(SRC_DIR)/linenoise/linenoise.c
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
$(CC) $(CFLAGS) $(INCLUDE) -o $@ -c $<
-$(OBJ_DIR)/$(TARGET).tab.c : $(SRC_DIR)/$(TARGET).y $(OBJ_DIR)/lex.yy.c
+$(OBJ_DIR)/inpla.tab.c : $(SRC_DIR)/inpla.y $(OBJ_DIR)/lex.yy.c
bison -o $@ $<
-$(OBJ_DIR)/lex.yy.c : $(SRC_DIR)/$(TARGET).l
+$(OBJ_DIR)/lex.yy.c : $(SRC_DIR)/lex.l
flex -o $@ $^
$(OBJ_DIR):
diff --git a/README.md b/README.md
index 40081f8..3ab53ac 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,8 @@ Inpla is a multi-threaded parallel interpreter of interaction nets. Once you wri
| qsort 800000 | **0.15** | 1.16 | 97.30 | 1.85 | 1.55 | 0.76 | 0.41 |
| msort 800000 | **0.46** | 1.00 | 98.27 | 1.18 | 1.34 | 0.65 | 0.49 |
-- **Comparison in execution time** with other implementations: **Haskell** (GHC version 8.10.7), **Standard ML** v110.74 (interpreter mode) and **Python** 3.8.5 in execution time.
+- **Comparison in execution time** with other implementations: **Haskell** (GHC version 8.10.7), **Standard ML of New Jersey** v110.74 (interpreter mode) and **Python** 3.8.5 in execution time.
+
- The above table contains execution time in second on average of ten times execution by using Linux PC (Core i7-9700 (8 threads, no Hyper-threading), 16GB memory). The fastest one is shown with bold style. Scripts for the comparison table are in the `comparison` directory.
- Inpla*n* and Inpla*n*_**r** mean *n* threads without/with reuse-annotated execution, respectively.
diff --git a/src/inpla.y b/src/inpla.y
index 7b13db5..928a5c1 100644
--- a/src/inpla.y
+++ b/src/inpla.y
@@ -21,7 +21,7 @@
//#define COUNT_CNCT // count of execution of JMP_CNCT
//#define COUNT_MKAGENT // count of execution fo mkagent
-#define CELL_USE_VERBOSE // count of memory access
+//#define CELL_USE_VERBOSE // count of memory access
@@ -48,8 +48,8 @@ int ActiveThreadNum=0;
//#define YYDEBUG 1
-#define VERSION "0.5.1"
-#define BUILT_DATE "2 Nov. 2021"
+#define VERSION "0.5.2"
+#define BUILT_DATE "10 Nov. 2021"
extern FILE *yyin;
@@ -1278,12 +1278,18 @@ void freeName(VALUE ptr) {
void freeAgentRec(VALUE ptr) {
-
+
loop:
- if ((IS_FLAG_AVAIL(BASIC(ptr)->id)) ||
- (IS_FIXNUM(ptr)) || (ptr == (VALUE)NULL)) {
+ if ((IS_FIXNUM(ptr)) || (ptr == (VALUE)NULL)) {
return;
- } else if (IS_NAMEID(BASIC(ptr)->id)) {
+ }
+
+ if (IS_FLAG_AVAIL(BASIC(ptr)->id)) {
+ return;
+ }
+
+
+ if (IS_NAMEID(BASIC(ptr)->id)) {
if (ptr == ShowNameHeap) return;
if (NAME(ptr)->port != (VALUE)NULL) {