Skip to content

Commit

Permalink
Merge pull request #1088 from fesch/bugfix
Browse files Browse the repository at this point in the history
Version 3.32-12 candidate
  • Loading branch information
fesch authored Sep 29, 2023
2 parents f7cfdb8 + f4327fa commit 2d5d136
Show file tree
Hide file tree
Showing 62 changed files with 1,572 additions and 761 deletions.
20 changes: 5 additions & 15 deletions samples/export/ARM_gnu/ELIZA.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated with Structorizer 3.32-06 on Tue Feb 08 12:00:35 CET 2022
// Generated with Structorizer 3.32-12 on Fri Sep 29 03:48:20 CEST 2023
.global _start
.data
.align 2
Expand Down Expand Up @@ -370,25 +370,15 @@ for_10:
CMP R1, #1
BGT end_10
LDR R6, [R7, R1, LSL #2]
R11 <- (R6, R9)
LDR ), =0xFF200050
LDR <-, [)]
LDR (, [)]
LDR R6, [)]
LDR R9, [)]
LDR ), [)]
// ERROR: Not implemented yet
// position <- pos(str, result)
while_11:
CMP R11, #0
BLE end_11
// ERROR: Not implemented yet
// result <- copy(result, 1, position-1) + copy(result, position+1, length(result))
R11 <- (R6, R9)
LDR ), =0xFF200050
LDR <-, [)]
LDR (, [)]
LDR R6, [)]
LDR R9, [)]
LDR ), [)]
// ERROR: Not implemented yet
// position <- pos(str, result)
B while_11
end_11:
ADD R1, R1, #1
Expand Down
8 changes: 3 additions & 5 deletions samples/export/ARM_keil/ELIZA.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; Generated with Structorizer 3.32-06 on Tue Feb 08 12:02:46 CET 2022
; Generated with Structorizer 3.32-12 on Fri Sep 29 03:49:21 CEST 2023
;AREA data, DATA, READWRITE
V_3 DCD '.',',',';','!','?'
result DCD -1,0
Expand Down Expand Up @@ -311,16 +311,14 @@ for_10
CMP R1, #1
BGT end_10
LDR R6, [R7, R1, LSL #2]
R11 <- (R6, R9)
; ERROR: INPUT operation only supported with GNU code
; ERROR: Not implemented yet
; position <- pos(str, result)
while_11
CMP R11, #0
BLE end_11
; ERROR: Not implemented yet
; result <- copy(result, 1, position-1) + copy(result, position+1, length(result))
R11 <- (R6, R9)
; ERROR: INPUT operation only supported with GNU code
; ERROR: Not implemented yet
; position <- pos(str, result)
B while_11
end_11
Expand Down
14 changes: 7 additions & 7 deletions samples/export/BASIC0/ELIZA.bas
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
100 REM 2019-03-28 Keyword "bot" inserted (same reply ring as "computer")
110 REM 2019-11-28 New global type "History" (to ensure a homogenous array)
120 REM 2022-01-11 Measures against substition inversions a -> b -> a in conjugateStrings, reflexions revised.
130 REM Generated by Structorizer 3.32-06
130 REM Generated by Structorizer 3.32-12
140
150 REM Copyright (C) 2018-05-14 Kay Gürtzig
160 REM License: GPLv3-link
Expand Down Expand Up @@ -102,8 +102,8 @@
1020 delete(result, 1, position)
1030 insert(uppercase(start), result, 1)
1040 END IF
1050 DIM arrayff31bf2c() AS String = {" i ", " i\'"}
1060 FOR EACH word IN arrayff31bf2c
1050 DIM array296e052e() AS String = {" i ", " i\'"}
1060 FOR EACH word IN array296e052e
1070 LET position = pos(word, result)
1080 DO WHILE position > 0
1090 delete(result, position+1, 1)
Expand Down Expand Up @@ -174,8 +174,8 @@
1740 LET result = left + right
1750 NEXT pair
1760 REM Eliminate multiple spaces (replaced by single ones) and vertical bars
1770 DIM array2a44329b() AS String = {" ", "|"}
1780 FOR EACH str IN array2a44329b
1770 DIM arrayc1deb5d4() AS String = {" ", "|"}
1780 FOR EACH str IN arrayc1deb5d4
1790 LET position = pos(str, result)
1800 DO WHILE position > 0
1810 LET result = copy(result, 1, position-1) + copy(result, position+1, length(result))
Expand Down Expand Up @@ -220,8 +220,8 @@
2200 REM TODO: add the respective type suffixes to your variable names if required
2210 LET sentence = lowercase(sentence)
2220 REM TODO: Specify an appropriate element type for the array!
2230 DIM array1789d343() AS FIXME_1789d343 = {'.', ',', ';', '!', '?'}
2240 FOR EACH symbol IN array1789d343
2230 DIM arrayee6dc523() AS FIXME_ee6dc523 = {'.', ',', ';', '!', '?'}
2240 FOR EACH symbol IN arrayee6dc523
2250 LET position = pos(symbol, sentence)
2260 DO WHILE position > 0
2270 LET sentence = copy(sentence, 1, position-1) + copy(sentence, position+1, length(sentence))
Expand Down
14 changes: 7 additions & 7 deletions samples/export/BASIC1/ELIZA.bas
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Rem 2019-03-15 key map joined from keyword array and index map
Rem 2019-03-28 Keyword "bot" inserted (same reply ring as "computer")
Rem 2019-11-28 New global type "History" (to ensure a homogenous array)
Rem 2022-01-11 Measures against substition inversions a -> b -> a in conjugateStrings, reflexions revised.
Rem Generated by Structorizer 3.32-06
Rem Generated by Structorizer 3.32-12

Rem Copyright (C) 2018-05-14 Kay Gürtzig
Rem License: GPLv3-link
Expand Down Expand Up @@ -123,8 +123,8 @@ Function adjustSpelling(sentence As String) As String
delete(result, 1, position)
insert(uppercase(start), result, 1)
End If
Dim arrayff31bf2c() As String = {" i ", " i\'"}
For Each word In arrayff31bf2c
Dim array296e052e() As String = {" i ", " i\'"}
For Each word In array296e052e
position = pos(word, result)
Do While position > 0
delete(result, position+1, 1)
Expand Down Expand Up @@ -211,8 +211,8 @@ Function conjugateStrings(sentence As String, key As String, keyPos As integer,
result = left + right
Next pair
Rem Eliminate multiple spaces (replaced by single ones) and vertical bars
Dim array2a44329b() As String = {" ", "|"}
For Each str In array2a44329b
Dim arrayc1deb5d4() As String = {" ", "|"}
For Each str In arrayc1deb5d4
position = pos(str, result)
Do While position > 0
result = copy(result, 1, position-1) + copy(result, position+1, length(result))
Expand Down Expand Up @@ -263,8 +263,8 @@ Function normalizeInput(sentence As String) As String
Rem
sentence = lowercase(sentence)
Rem TODO: Specify an appropriate element type for the array!
Dim array1789d343() As FIXME_1789d343 = {'.', ',', ';', '!', '?'}
For Each symbol In array1789d343
Dim arrayee6dc523() As FIXME_ee6dc523 = {'.', ',', ';', '!', '?'}
For Each symbol In arrayee6dc523
position = pos(symbol, sentence)
Do While position > 0
sentence = copy(sentence, 1, position-1) + copy(sentence, position+1, length(sentence))
Expand Down
4 changes: 1 addition & 3 deletions samples/export/C#/ELIZA.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by Structorizer 3.32-06
// Generated by Structorizer 3.32-12

// Copyright (C) 2018-05-14 Kay Gürtzig
// License: GPLv3-link
Expand Down Expand Up @@ -107,8 +107,6 @@ public static void Main(string[] args) {
userInput = Console.ReadLine();
// Converts the input to lowercase, cuts out interpunctation
// and pads the string
// Converts the input to lowercase, cuts out interpunctation
// and pads the string
userInput = normalizeInput(userInput);
isGone = checkGoodBye(userInput, byePhrases);
if (! isGone) {
Expand Down
64 changes: 31 additions & 33 deletions samples/export/C#/SORTING_TEST_MAIN.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by Structorizer 3.32-04
// Generated by Structorizer 3.32-12

// Copyright (C) 2019-10-02 Kay Gürtzig
// License: GPLv3-link
Expand All @@ -18,10 +18,10 @@
public class SORTING_TEST_MAIN {

// =========== START PARALLEL WORKER DEFINITIONS ============
class Worker1b4c8697_0{
class Worker6a4f081c_0{
// TODO: Check and accomplish the member declarations here
private int[] values1;
public Worker1b4c8697_0(int[] values1)
public Worker6a4f081c_0(int[] values1)
{
this.values1 = values1;
}
Expand All @@ -31,11 +31,11 @@ public void DoWork()
}
};

class Worker1b4c8697_1{
class Worker6a4f081c_1{
// TODO: Check and accomplish the member declarations here
private int[] values2;
private ??? elementCount;
public Worker1b4c8697_1(int[] values2, ??? elementCount)
public Worker6a4f081c_1(int[] values2, ??? elementCount)
{
this.values2 = values2;
this.elementCount = elementCount;
Expand All @@ -46,10 +46,10 @@ public void DoWork()
}
};

class Worker1b4c8697_2{
class Worker6a4f081c_2{
// TODO: Check and accomplish the member declarations here
private int[] values3;
public Worker1b4c8697_2(int[] values3)
public Worker6a4f081c_2(int[] values3)
{
this.values3 = values3;
}
Expand All @@ -61,12 +61,12 @@ public void DoWork()
// ============ END PARALLEL WORKER DEFINITIONS =============

// =========== START PARALLEL WORKER DEFINITIONS ============
class Worker1151c3b_0{
class Workerf09c235e_0{
// TODO: Check and accomplish the member declarations here
private ??? values;
private ??? start;
private ??? p;
public Worker1151c3b_0(??? values, ??? start, ??? p)
public Workerf09c235e_0(??? values, ??? start, ??? p)
{
this.values = values;
this.start = start;
Expand All @@ -79,12 +79,12 @@ public void DoWork()
}
};

class Worker1151c3b_1{
class Workerf09c235e_1{
// TODO: Check and accomplish the member declarations here
private ??? values;
private ??? p;
private ??? stop;
public Worker1151c3b_1(??? values, ??? p, ??? stop)
public Workerf09c235e_1(??? values, ??? p, ??? stop)
{
this.values = values;
this.p = p;
Expand Down Expand Up @@ -146,21 +146,21 @@ public static void Main(string[] args) {
// ================= START PARALLEL SECTION =================
// ==========================================================
{
Worker1b4c8697_0 worker1b4c8697_0 = new Worker1b4c8697_0(values1);
Thread thr1b4c8697_0 = new Thread(worker1b4c8697_0.DoWork);
thr1b4c8697_0.Start();
Worker6a4f081c_0 worker6a4f081c_0 = new Worker6a4f081c_0(values1);
Thread thr6a4f081c_0 = new Thread(worker6a4f081c_0.DoWork);
thr6a4f081c_0.Start();

Worker1b4c8697_1 worker1b4c8697_1 = new Worker1b4c8697_1(values2, elementCount);
Thread thr1b4c8697_1 = new Thread(worker1b4c8697_1.DoWork);
thr1b4c8697_1.Start();
Worker6a4f081c_1 worker6a4f081c_1 = new Worker6a4f081c_1(values2, elementCount);
Thread thr6a4f081c_1 = new Thread(worker6a4f081c_1.DoWork);
thr6a4f081c_1.Start();

Worker1b4c8697_2 worker1b4c8697_2 = new Worker1b4c8697_2(values3);
Thread thr1b4c8697_2 = new Thread(worker1b4c8697_2.DoWork);
thr1b4c8697_2.Start();
Worker6a4f081c_2 worker6a4f081c_2 = new Worker6a4f081c_2(values3);
Thread thr6a4f081c_2 = new Thread(worker6a4f081c_2.DoWork);
thr6a4f081c_2.Start();

thr1b4c8697_0.Join();
thr1b4c8697_1.Join();
thr1b4c8697_2.Join();
thr6a4f081c_0.Join();
thr6a4f081c_1.Join();
thr6a4f081c_2.Join();
}
// ==========================================================
// ================== END PARALLEL SECTION ==================
Expand Down Expand Up @@ -363,25 +363,23 @@ private static void quickSort(??? values, ??? start, ??? stop) {
??? p = random(stop-start) + start;
// Partition the array into smaller and greater elements
// Get the resulting (and final) position of the pivot element
// Partition the array into smaller and greater elements
// Get the resulting (and final) position of the pivot element
p = partition(values, start, stop, p);
// Sort subsequances separately and independently ...

// ==========================================================
// ================= START PARALLEL SECTION =================
// ==========================================================
{
Worker1151c3b_0 worker1151c3b_0 = new Worker1151c3b_0(values, start, p);
Thread thr1151c3b_0 = new Thread(worker1151c3b_0.DoWork);
thr1151c3b_0.Start();
Workerf09c235e_0 workerf09c235e_0 = new Workerf09c235e_0(values, start, p);
Thread thrf09c235e_0 = new Thread(workerf09c235e_0.DoWork);
thrf09c235e_0.Start();

Worker1151c3b_1 worker1151c3b_1 = new Worker1151c3b_1(values, p, stop);
Thread thr1151c3b_1 = new Thread(worker1151c3b_1.DoWork);
thr1151c3b_1.Start();
Workerf09c235e_1 workerf09c235e_1 = new Workerf09c235e_1(values, p, stop);
Thread thrf09c235e_1 = new Thread(workerf09c235e_1.DoWork);
thrf09c235e_1.Start();

thr1151c3b_0.Join();
thr1151c3b_1.Join();
thrf09c235e_0.Join();
thrf09c235e_1.Join();
}
// ==========================================================
// ================== END PARALLEL SECTION ==================
Expand Down
4 changes: 1 addition & 3 deletions samples/export/C++/ELIZA.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by Structorizer 3.32-06
// Generated by Structorizer 3.32-12

// Copyright (C) 2018-05-14 Kay Gürtzig
// License: GPLv3-link
Expand Down Expand Up @@ -590,8 +590,6 @@ int main(void)
std::cin >> userInput;
// Converts the input to lowercase, cuts out interpunctation
// and pads the string
// Converts the input to lowercase, cuts out interpunctation
// and pads the string
userInput = normalizeInput(userInput);
isGone = checkGoodBye(userInput, byePhrases);
if (! isGone) {
Expand Down
Loading

0 comments on commit 2d5d136

Please sign in to comment.