From f776fdd41a623463a69fcd48c13e875ad1d9a5d8 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Thu, 27 Apr 2023 23:27:06 +0530 Subject: [PATCH 01/72] PKG: Move normalize funcs to utils pkg --- integration_tests/lnn/perceptron/__init__.py | 2 +- .../lnn/perceptron/perceptron_main.py | 31 ------------------- integration_tests/lnn/utils/__init__.py | 1 + integration_tests/lnn/utils/utils_main.py | 30 ++++++++++++++++++ .../{test_pkg_lnn.py => test_pkg_lnn_01.py} | 3 +- 5 files changed, 34 insertions(+), 33 deletions(-) create mode 100644 integration_tests/lnn/utils/__init__.py create mode 100644 integration_tests/lnn/utils/utils_main.py rename integration_tests/{test_pkg_lnn.py => test_pkg_lnn_01.py} (95%) diff --git a/integration_tests/lnn/perceptron/__init__.py b/integration_tests/lnn/perceptron/__init__.py index a88f2db560..1f60fac51f 100644 --- a/integration_tests/lnn/perceptron/__init__.py +++ b/integration_tests/lnn/perceptron/__init__.py @@ -1 +1 @@ -from .perceptron_main import init_perceptron, train_dataset, test_perceptron, normalize_input_vectors, print_perceptron, Perceptron +from .perceptron_main import init_perceptron, train_dataset, test_perceptron, print_perceptron, Perceptron diff --git a/integration_tests/lnn/perceptron/perceptron_main.py b/integration_tests/lnn/perceptron/perceptron_main.py index 2e7ecbd73a..924c2d4f14 100644 --- a/integration_tests/lnn/perceptron/perceptron_main.py +++ b/integration_tests/lnn/perceptron/perceptron_main.py @@ -11,37 +11,6 @@ class Perceptron: cur_accuracy: f64 epochs_cnt: i32 -def normalize(value: f64, leftMin: f64, leftMax: f64, rightMin: f64, rightMax: f64) -> f64: - # Figure out how 'wide' each range is - leftSpan: f64 = leftMax - leftMin - rightSpan: f64 = rightMax - rightMin - - # Convert the left range into a 0-1 range (float) - valueScaled: f64 = (value - leftMin) / leftSpan - - # Convert the 0-1 range into a value in the right range. - return rightMin + (valueScaled * rightSpan) - -def normalize_input_vectors(input_vectors: list[list[f64]]): - rows: i32 = len(input_vectors) - cols: i32 = len(input_vectors[0]) - - j: i32 - for j in range(cols): - colMinVal: f64 = input_vectors[0][j] - colMaxVal: f64 = input_vectors[0][j] - i: i32 - for i in range(rows): - if input_vectors[i][j] > colMaxVal: - colMaxVal = input_vectors[i][j] - if input_vectors[i][j] < colMinVal: - colMinVal = input_vectors[i][j] - - for i in range(rows): - input_vectors[i][j] = normalize(input_vectors[i][j], colMinVal, colMaxVal, -1.0, 1.0) - - - def get_inp_vec_with_bias(a: list[f64]) -> list[f64]: b: list[f64] = [] i: i32 diff --git a/integration_tests/lnn/utils/__init__.py b/integration_tests/lnn/utils/__init__.py new file mode 100644 index 0000000000..31c6326561 --- /dev/null +++ b/integration_tests/lnn/utils/__init__.py @@ -0,0 +1 @@ +from .utils_main import normalize, normalize_input_vectors diff --git a/integration_tests/lnn/utils/utils_main.py b/integration_tests/lnn/utils/utils_main.py new file mode 100644 index 0000000000..61facaa6d8 --- /dev/null +++ b/integration_tests/lnn/utils/utils_main.py @@ -0,0 +1,30 @@ +from lpython import i32, f64 + +def normalize(value: f64, leftMin: f64, leftMax: f64, rightMin: f64, rightMax: f64) -> f64: + # Figure out how 'wide' each range is + leftSpan: f64 = leftMax - leftMin + rightSpan: f64 = rightMax - rightMin + + # Convert the left range into a 0-1 range (float) + valueScaled: f64 = (value - leftMin) / leftSpan + + # Convert the 0-1 range into a value in the right range. + return rightMin + (valueScaled * rightSpan) + +def normalize_input_vectors(input_vectors: list[list[f64]]): + rows: i32 = len(input_vectors) + cols: i32 = len(input_vectors[0]) + + j: i32 + for j in range(cols): + colMinVal: f64 = input_vectors[0][j] + colMaxVal: f64 = input_vectors[0][j] + i: i32 + for i in range(rows): + if input_vectors[i][j] > colMaxVal: + colMaxVal = input_vectors[i][j] + if input_vectors[i][j] < colMinVal: + colMinVal = input_vectors[i][j] + + for i in range(rows): + input_vectors[i][j] = normalize(input_vectors[i][j], colMinVal, colMaxVal, -1.0, 1.0) diff --git a/integration_tests/test_pkg_lnn.py b/integration_tests/test_pkg_lnn_01.py similarity index 95% rename from integration_tests/test_pkg_lnn.py rename to integration_tests/test_pkg_lnn_01.py index 151e4ab2dc..63dcbf5ee2 100644 --- a/integration_tests/test_pkg_lnn.py +++ b/integration_tests/test_pkg_lnn_01.py @@ -1,4 +1,5 @@ -from lnn.perceptron import init_perceptron, print_perceptron, normalize_input_vectors, Perceptron, train_dataset +from lnn.perceptron import init_perceptron, print_perceptron, Perceptron, train_dataset +from lnn.utils import normalize_input_vectors from lpdraw import Line, Circle, Display, Clear from lpython import i32, f64, Const from numpy import empty, int32 From 1f7932e4efb2bf8942e80c9b63d0db3cc10e04a6 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Thu, 27 Apr 2023 23:55:19 +0530 Subject: [PATCH 02/72] PKG: Add regression and its test --- integration_tests/CMakeLists.txt | 3 +- integration_tests/lnn/regression/__init__.py | 1 + .../lnn/regression/regression_main.py | 92 +++++++++++++++++++ integration_tests/lnn/utils/__init__.py | 2 +- integration_tests/lnn/utils/utils_main.py | 14 +++ integration_tests/test_pkg_lnn_02.py | 89 ++++++++++++++++++ 6 files changed, 199 insertions(+), 2 deletions(-) create mode 100644 integration_tests/lnn/regression/__init__.py create mode 100644 integration_tests/lnn/regression/regression_main.py create mode 100644 integration_tests/test_pkg_lnn_02.py diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index 83063546a2..fab0589ba1 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -491,7 +491,8 @@ RUN(NAME str_to_list_cast LABELS cpython llvm c) RUN(NAME test_package_01 LABELS cpython llvm) RUN(NAME test_pkg_lpdraw LABELS cpython llvm wasm) -RUN(NAME test_pkg_lnn LABELS cpython llvm) +RUN(NAME test_pkg_lnn_01 LABELS cpython llvm) +RUN(NAME test_pkg_lnn_02 LABELS cpython llvm) RUN(NAME generics_01 LABELS cpython llvm c) RUN(NAME generics_02 LABELS cpython llvm c) diff --git a/integration_tests/lnn/regression/__init__.py b/integration_tests/lnn/regression/__init__.py new file mode 100644 index 0000000000..de58667620 --- /dev/null +++ b/integration_tests/lnn/regression/__init__.py @@ -0,0 +1 @@ +from .regression_main import init_perceptron, train_dataset, test_perceptron, print_perceptron, Perceptron diff --git a/integration_tests/lnn/regression/regression_main.py b/integration_tests/lnn/regression/regression_main.py new file mode 100644 index 0000000000..9caa4983db --- /dev/null +++ b/integration_tests/lnn/regression/regression_main.py @@ -0,0 +1,92 @@ +from lpython import dataclass, i32, f64 +from sys import exit + +@dataclass +class Perceptron: + no_of_inputs: i32 + weights: list[f64] + learn_rate: f64 + iterations_limit: i32 + err_limit: f64 + err: f64 + epochs_cnt: i32 + +def get_inp_vec_with_bias(a: list[f64]) -> list[f64]: + b: list[f64] = [] + i: i32 + for i in range(len(a)): + b.append(a[i]) + b.append(1.0) + return b + +def init_weights(size: i32) -> list[f64]: + weights: list[f64] = [] + i: i32 + for i in range(size): + weights.append(0.0) + weights.append(0.0) # append bias + return weights + +def init_perceptron(p: Perceptron, n: i32, rate: f64, iterations_limit: i32, err_limit: f64): + p.no_of_inputs = n + p.weights = init_weights(n) + p.learn_rate = rate + p.iterations_limit = iterations_limit + p.err_limit = err_limit + p.err = 1.0 + p.epochs_cnt = 0 + +def train_perceptron(p: Perceptron, input_vector: list[f64], actual_output: f64): + predicted_output: f64 = predict_perceptron(p, input_vector) + error: f64 = actual_output - predicted_output + i: i32 + for i in range(len(input_vector)): + p.weights[i] += p.learn_rate * f64(error) * f64(input_vector[i]) + +def predict_perceptron(p: Perceptron, input_vector: list[f64]) -> f64: + weighted_sum: f64 = 0.0 + i: i32 = 0 + for i in range(len(input_vector)): + weighted_sum = weighted_sum + p.weights[i] * f64(input_vector[i]) + return activation_function(weighted_sum) + +def activation_function(value: f64) -> f64: + return value + +def train_epoch(p: Perceptron, input_vectors: list[list[f64]], outputs: list[f64]): + i: i32 + for i in range(len(input_vectors)): + input_vector: list[f64] = get_inp_vec_with_bias(input_vectors[i]) + if predict_perceptron(p, input_vector) != outputs[i]: + train_perceptron(p, input_vector, outputs[i]) + +def train_dataset(p: Perceptron, input_vectors: list[list[f64]], outputs: list[f64]): + prev_err: f64 = 0.0 + p.err = 1.0 + p.epochs_cnt = 0 + while abs(p.err - prev_err) >= p.err_limit and p.epochs_cnt < p.iterations_limit: + p.epochs_cnt += 1 + train_epoch(p, input_vectors, outputs) + prev_err = p.err + p.err = test_perceptron(p, input_vectors, outputs) + +def test_perceptron(p: Perceptron, input_vectors: list[list[f64]], outputs: list[f64]) -> f64: + err: f64 = 0.0 + i: i32 + for i in range(len(input_vectors)): + input_vector: list[f64] = get_inp_vec_with_bias(input_vectors[i]) + err = err + (outputs[i] - predict_perceptron(p, input_vector)) ** 2.0 + return err + +def print_perceptron(p: Perceptron): + print("weights = [", end = "") + i: i32 + for i in range(p.no_of_inputs): + print(p.weights[i], end = ", ") + print(p.weights[p.no_of_inputs], end = "(bias)]\n") + print("learn_rate = ", end = "") + print(p.learn_rate) + print("error = ", end = "") + print(p.err) + print("epochs_cnt = ", end = "") + print(p.epochs_cnt) diff --git a/integration_tests/lnn/utils/__init__.py b/integration_tests/lnn/utils/__init__.py index 31c6326561..26df89840f 100644 --- a/integration_tests/lnn/utils/__init__.py +++ b/integration_tests/lnn/utils/__init__.py @@ -1 +1 @@ -from .utils_main import normalize, normalize_input_vectors +from .utils_main import normalize, normalize_input_vectors, normalize_output_vector diff --git a/integration_tests/lnn/utils/utils_main.py b/integration_tests/lnn/utils/utils_main.py index 61facaa6d8..fd0b67c232 100644 --- a/integration_tests/lnn/utils/utils_main.py +++ b/integration_tests/lnn/utils/utils_main.py @@ -28,3 +28,17 @@ def normalize_input_vectors(input_vectors: list[list[f64]]): for i in range(rows): input_vectors[i][j] = normalize(input_vectors[i][j], colMinVal, colMaxVal, -1.0, 1.0) + +def normalize_output_vector(output_vector: list[f64]): + rows: i32 = len(output_vector) + colMinVal: f64 = output_vector[0] + colMaxVal: f64 = output_vector[0] + i: i32 + for i in range(rows): + if output_vector[i] > colMaxVal: + colMaxVal = output_vector[i] + if output_vector[i] < colMinVal: + colMinVal = output_vector[i] + + for i in range(rows): + output_vector[i] = normalize(output_vector[i], colMinVal, colMaxVal, -1.0, 1.0) diff --git a/integration_tests/test_pkg_lnn_02.py b/integration_tests/test_pkg_lnn_02.py new file mode 100644 index 0000000000..6fb8fca070 --- /dev/null +++ b/integration_tests/test_pkg_lnn_02.py @@ -0,0 +1,89 @@ +from lnn.regression import init_perceptron, print_perceptron, Perceptron, train_dataset +from lnn.utils import normalize_input_vectors, normalize_output_vector +from lpdraw import Line, Circle, Display, Clear +from lpython import i32, f64, Const +from numpy import empty, int32 + + +def compute_decision_boundary(p: Perceptron, x: f64) -> f64: + bias: f64 = p.weights[1] + slope: f64 = p.weights[0] + intercept: f64 = bias + return slope * x + intercept + +def plot_graph(p: Perceptron, input_vectors: list[list[f64]], outputs: list[f64]): + Width: Const[i32] = 500 # x-axis limits [0, 499] + Height: Const[i32] = 500 # y-axis limits [0, 499] + Screen: i32[Height, Width] = empty((Height, Width), dtype=int32) + Clear(Height, Width, Screen) + + x1: f64 = 1.0 + y1: f64 = compute_decision_boundary(p, x1) + x2: f64 = -1.0 + y2: f64 = compute_decision_boundary(p, x2) + + # center the graph using the following offset + scale_offset: f64 = Width / 4 + shift_offset: f64 = Width / 2 + x1 *= scale_offset + y1 *= scale_offset + x2 *= scale_offset + y2 *= scale_offset + + # print (x1, y1, x2, y2) + Line(Height, Width, Screen, i32(int(x1 + shift_offset)), i32(int(y1 + shift_offset)), i32(int(x2 + shift_offset)), i32(int(y2 + shift_offset))) + + i: i32 + point_size: i32 = 5 + for i in range(len(input_vectors)): + input_vectors[i][0] *= scale_offset + input_vectors[i][0] += shift_offset + outputs[i] *= scale_offset + outputs[i] += shift_offset + + Circle(Height, Width, Screen, i32(int(input_vectors[i][0])), i32(int(outputs[i])), f64(point_size)) + + Display(Height, Width, Screen) + +def main0(): + p: Perceptron = Perceptron(0, [0.0], 0.0, 0, 0.0, 0.0, 0) + init_perceptron(p, 1, 0.0005, 10000, 1e-16) + + input_vectors: list[list[f64]] = [[1.1], [1.3], [1.5], [2.0], [2.2], [2.9], [3.0], [3.2], [3.2], [3.7], [3.9], [4.0], [4.0], [4.1], [4.5], [4.9], [5.1], [5.3], [5.9], [6.0], [6.8], [7.1], [7.9], [8.2], [8.7], [9.0], [9.5], [9.6], [10.3], [10.5], [11.2], [11.5], [12.3], [12.9], [13.5]] + outputs: list[f64] = [39343.0, 46205.0, 37731.0, 43525.0, 39891.0, 56642.0, 60150.0, 54445.0, 64445.0, 57189.0, 63218.0, 55794.0, 56957.0, 57081.0, 61111.0, 67938.0, 66029.0, 83088.0, 81363.0, 93940.0, 91738.0, 98273.0, 101302.0, 113812.0, 109431.0, 105582.0, 116969.0, 112635.0, 122391.0, 121872.0, 127345.0, 126756.0, 128765.0, 135675.0, 139465.0] + + normalize_input_vectors(input_vectors) + normalize_output_vector(outputs) + + train_dataset(p, input_vectors, outputs) + print_perceptron(p) + + assert abs(p.weights[0] - (1.0640975812232145)) <= 1e-12 + assert abs(p.weights[1] - (0.0786977829749839)) <= 1e-12 + assert abs(p.err - (0.4735308448814293)) <= 1e-12 + assert p.epochs_cnt == 4515 + + plot_graph(p, input_vectors, outputs) + +def main1(): + p: Perceptron = Perceptron(0, [0.0], 0.0, 0, 0.0, 0.0, 0) + init_perceptron(p, 1, 0.0005, 10000, 1e-16) + + input_vectors: list[list[f64]] = [[1.0], [3.0], [7.0]] + outputs: list[f64] = [8.0, 4.0, -2.0] + + normalize_input_vectors(input_vectors) + normalize_output_vector(outputs) + + train_dataset(p, input_vectors, outputs) + print_perceptron(p) + + assert abs(p.weights[0] - (-0.9856542200697508)) <= 1e-12 + assert abs(p.weights[1] - (-0.0428446744717655)) <= 1e-12 + assert abs(p.err - 0.011428579012311327) <= 1e-12 + assert p.epochs_cnt == 10000 + + plot_graph(p, input_vectors, outputs) + +main0() +main1() From 6111d4652ad007cb6aaab1646c461a2f5999d76c Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Fri, 28 Apr 2023 00:57:52 +0530 Subject: [PATCH 03/72] PKG: Fixes in lpdraw Also support drawing vertical line --- integration_tests/lpdraw/draw.py | 21 ++++++++++++++------- integration_tests/test_pkg_lnn_01.py | 8 ++++---- integration_tests/test_pkg_lpdraw.py | 3 ++- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/integration_tests/lpdraw/draw.py b/integration_tests/lpdraw/draw.py index 5ea4b67c84..183bd65608 100644 --- a/integration_tests/lpdraw/draw.py +++ b/integration_tests/lpdraw/draw.py @@ -6,7 +6,7 @@ def Pixel(H: i32, W: i32, Screen: i32[H, W], x: i32, y: i32) -> None: if x >= 0 and y >= 0 and x < W and y < H: - Screen[i32(int(H - 1 - y)), i32(int(x))] = 255 + Screen[H - 1 - y, x] = 255 def Clear(H: i32, W: i32, Screen: i32[H, W]): i: i32 @@ -53,30 +53,37 @@ def Display(H: i32, W: i32, Screen: i32[H, W]): def Line(H: i32, W: i32, Screen: i32[H, W], x1: i32, y1: i32, x2: i32, y2: i32) -> None: dx: i32 = abs(x2 - x1) dy: i32 = abs(y2 - y1) + sx: i32 sy: i32 - if x1 > x2: - sx = -1 - else: + if x1 < x2: sx = 1 - if y1 > y2: - sy = -1 else: + sx = -1 + + if y1 < y2: sy = 1 + else: + sy = -1 err: i32 = dx - dy while x1 != x2 or y1 != y2: Pixel(H, W, Screen, x1, y1) e2: i32 = 2 * err + if e2 > -dy: err -= dy x1 += sx + + if x1 == x2 and y1 == y2: + Pixel(H, W, Screen, x1, y1) + break + if e2 < dx: err += dx y1 += sy - Pixel(H, W, Screen, x2, y2) def Circle(H: i32, W: i32, Screen: i32[H, W], x: i32, y: i32, r: f64) -> None: x0: i32 = i32(int(r)) diff --git a/integration_tests/test_pkg_lnn_01.py b/integration_tests/test_pkg_lnn_01.py index 63dcbf5ee2..aab71cdc24 100644 --- a/integration_tests/test_pkg_lnn_01.py +++ b/integration_tests/test_pkg_lnn_01.py @@ -31,7 +31,7 @@ def plot_graph(p: Perceptron, input_vectors: list[list[f64]], outputs: list[i32] y2 *= scale_offset # print (x1, y1, x2, y2) - Line(Height, Width, Screen, i32(x1 + shift_offset), i32(y1 + shift_offset), i32(x2 + shift_offset), i32(y2 + shift_offset)) + Line(Height, Width, Screen, i32(int(x1 + shift_offset)), i32(int(y1 + shift_offset)), i32(int(x2 + shift_offset)), i32(int(y2 + shift_offset))) i: i32 point_size: i32 = 5 @@ -41,12 +41,12 @@ def plot_graph(p: Perceptron, input_vectors: list[list[f64]], outputs: list[i32] input_vectors[i][0] += shift_offset input_vectors[i][1] += shift_offset if outputs[i] == 1: - x: i32 = i32(input_vectors[i][0]) - y: i32 = i32(input_vectors[i][1]) + x: i32 = i32(int(input_vectors[i][0])) + y: i32 = i32(int(input_vectors[i][1])) Line(Height, Width, Screen, x - point_size, y, x + point_size, y) Line(Height, Width, Screen, x, y - point_size, x, y + point_size) else: - Circle(Height, Width, Screen, i32(input_vectors[i][0]), i32(input_vectors[i][1]), f64(point_size)) + Circle(Height, Width, Screen, i32(int(input_vectors[i][0])), i32(int(input_vectors[i][1])), f64(point_size)) Display(Height, Width, Screen) diff --git a/integration_tests/test_pkg_lpdraw.py b/integration_tests/test_pkg_lpdraw.py index 3ba5a8450f..75fd1148da 100644 --- a/integration_tests/test_pkg_lpdraw.py +++ b/integration_tests/test_pkg_lpdraw.py @@ -14,7 +14,8 @@ def test_screen(H: i32, W: i32, Screen: i32[H, W]): for j in range(W): cnt += (Screen[i, j] - 256) - assert cnt == -979375 + assert cnt == -979630 + def main(): Width: i32 = 100 # x-axis limits [0, 99] From dac940b2e70c976372e28388123620c27e950ffb Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Fri, 28 Apr 2023 04:39:01 +0530 Subject: [PATCH 04/72] ASR: Support modules in pickle_json() --- src/bin/lpython.cpp | 2 +- src/lpython/pickle.cpp | 87 +++++++++++++++++++++++------------------- src/lpython/pickle.h | 6 +-- 3 files changed, 51 insertions(+), 44 deletions(-) diff --git a/src/bin/lpython.cpp b/src/bin/lpython.cpp index 340aca1cd6..598d82da9d 100644 --- a/src/bin/lpython.cpp +++ b/src/bin/lpython.cpp @@ -210,7 +210,7 @@ int emit_asr(const std::string &infile, std::cout << LCompilers::LPython::pickle_tree(*asr, compiler_options.use_colors, with_intrinsic_modules) << std::endl; } else if (compiler_options.json) { - std::cout << LCompilers::LPython::pickle_json(*asr, lm) << std::endl; + std::cout << LCompilers::LPython::pickle_json(*asr, lm, with_intrinsic_modules) << std::endl; } else { std::cout << LCompilers::LPython::pickle(*asr, compiler_options.use_colors, compiler_options.indent, with_intrinsic_modules) << std::endl; diff --git a/src/lpython/pickle.cpp b/src/lpython/pickle.cpp index d294868ca1..27c7327e48 100644 --- a/src/lpython/pickle.cpp +++ b/src/lpython/pickle.cpp @@ -185,6 +185,8 @@ class ASRJsonVisitor : public ASR::JsonBaseVisitor { public: + bool show_intrinsic_modules; + using ASR::JsonBaseVisitor::JsonBaseVisitor; std::string get_str() { @@ -200,59 +202,64 @@ class ASRJsonVisitor : } void visit_Module(const ASR::Module_t &x) { - s.append("{"); - inc_indent(); s.append("\n" + indtd); - s.append("\"node\": \"Module\""); - s.append(",\n" + indtd); - s.append("\"fields\": {"); - inc_indent(); s.append("\n" + indtd); - s.append("\"name\": "); - s.append("\"" + std::string(x.m_name) + "\""); - s.append(",\n" + indtd); - s.append("\"dependencies\": "); - s.append("["); - if (x.n_dependencies > 0) { + if (x.m_intrinsic && !show_intrinsic_modules) { // do not show intrinsic modules by default + s.append("{"); + inc_indent(); s.append("\n" + indtd); + s.append("\"node\": \"Module\""); + s.append(",\n" + indtd); + s.append("\"fields\": {"); inc_indent(); s.append("\n" + indtd); - for (size_t i=0; i 0) { + inc_indent(); s.append("\n" + indtd); + for (size_t i=0; i::visit_Module(x); } - dec_indent(); s.append("\n" + indtd); - s.append("}"); - s.append(",\n" + indtd); - append_location(s, x.base.base.loc.first, x.base.base.loc.last); - dec_indent(); s.append("\n" + indtd); - s.append("}"); } }; -std::string pickle_json(ASR::asr_t &asr, LocationManager &lm) { +std::string pickle_json(ASR::asr_t &asr, LocationManager &lm, bool show_intrinsic_modules) { ASRJsonVisitor v(lm); + v.show_intrinsic_modules = show_intrinsic_modules; v.visit_asr(asr); return v.get_str(); } -std::string pickle_json(ASR::TranslationUnit_t &asr, LocationManager &lm) { - return pickle_json((ASR::asr_t &)asr, lm); +std::string pickle_json(ASR::TranslationUnit_t &asr, LocationManager &lm, bool show_intrinsic_modules) { + return pickle_json((ASR::asr_t &)asr, lm, show_intrinsic_modules); } } diff --git a/src/lpython/pickle.h b/src/lpython/pickle.h index 9c070954c7..64e7f47850 100644 --- a/src/lpython/pickle.h +++ b/src/lpython/pickle.h @@ -13,15 +13,15 @@ namespace LCompilers::LPython { bool show_intrinsic_modules=false); std::string pickle(ASR::TranslationUnit_t &asr, bool colors=false, bool indent=false, bool show_intrinsic_modules=false); - + // Print the tree structure std::string pickle_tree_python(AST::ast_t &ast, bool colors=true); std::string pickle_tree(ASR::asr_t &asr, bool colors, bool show_intrinsic_modules); std::string pickle_tree(ASR::TranslationUnit_t &asr, bool colors, bool show_intrinsic_modules); std::string pickle_json(AST::ast_t &ast, LocationManager &lm); - std::string pickle_json(ASR::asr_t &asr, LocationManager &lm); - std::string pickle_json(ASR::TranslationUnit_t &asr, LocationManager &lm); + std::string pickle_json(ASR::asr_t &asr, LocationManager &lm, bool show_intrinsic_modules); + std::string pickle_json(ASR::TranslationUnit_t &asr, LocationManager &lm, bool show_intrinsic_modules); } From 8506de27fa216a4fdf247d0ae42191d93d23d8da Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Fri, 28 Apr 2023 04:43:46 +0530 Subject: [PATCH 05/72] TEST: Enable test and update ref tests --- run_tests.py | 10 + .../asr_json-modules_02-70a491a.json | 13 + .../asr_json-modules_02-70a491a.stdout | 1015 +++++++++++++++++ tests/tests.toml | 1 + 4 files changed, 1039 insertions(+) create mode 100644 tests/reference/asr_json-modules_02-70a491a.json create mode 100644 tests/reference/asr_json-modules_02-70a491a.stdout diff --git a/run_tests.py b/run_tests.py index 63310c7510..1d78d8fcb4 100755 --- a/run_tests.py +++ b/run_tests.py @@ -21,6 +21,7 @@ def is_included(backend): ast = is_included("ast") ast_new = is_included("ast_new") asr = is_included("asr") + asr_json = is_included("asr_json") llvm = is_included("llvm") llvm_dbg = is_included("llvm_dbg") cpp = is_included("cpp") @@ -80,6 +81,15 @@ def is_included(backend): update_reference, extra_args) + if asr_json: + run_test( + filename, + "asr_json", + "lpython --show-asr --json {infile} -o {outfile}", + filename, + update_reference, + extra_args) + if pass_ is not None: cmd = "lpython --pass=" + pass_ + \ " --show-asr --indent --no-color {infile} -o {outfile}" diff --git a/tests/reference/asr_json-modules_02-70a491a.json b/tests/reference/asr_json-modules_02-70a491a.json new file mode 100644 index 0000000000..dfc608ea56 --- /dev/null +++ b/tests/reference/asr_json-modules_02-70a491a.json @@ -0,0 +1,13 @@ +{ + "basename": "asr_json-modules_02-70a491a", + "cmd": "lpython --show-asr --json {infile} -o {outfile}", + "infile": "tests/../integration_tests/modules_02.py", + "infile_hash": "dcb00ac27cbbcdec61d81f1df9e852ba81a2197e7804ec89cab76e44", + "outfile": null, + "outfile_hash": null, + "stdout": "asr_json-modules_02-70a491a.stdout", + "stdout_hash": "adc3ed3cc499317e76d8755750cbd9eee8f78810d3b83ecf6cfcef15", + "stderr": null, + "stderr_hash": null, + "returncode": 0 +} \ No newline at end of file diff --git a/tests/reference/asr_json-modules_02-70a491a.stdout b/tests/reference/asr_json-modules_02-70a491a.stdout new file mode 100644 index 0000000000..d127615c82 --- /dev/null +++ b/tests/reference/asr_json-modules_02-70a491a.stdout @@ -0,0 +1,1015 @@ +{ + "node": "TranslationUnit", + "fields": { + "global_scope": { + "node": "SymbolTable1", + "fields": { + "_global_symbols": { + "node": "Module", + "fields": { + "symtab": { + "node": "SymbolTable11", + "fields": { + "_lpython_main_program": { + "node": "Function", + "fields": { + "symtab": { + "node": "SymbolTable10", + "fields": {} + }, + "name": "_lpython_main_program", + "function_signature": { + "node": "FunctionType", + "fields": { + "arg_types": [], + "return_var_type": [], + "abi": "Source", + "deftype": "Implementation", + "bindc_name": [], + "elemental": false, + "pure": false, + "module": false, + "inline": false, + "static": false, + "type_params": [], + "restrictions": [], + "is_restriction": false + }, + "loc": { + "first": 0, + "last": 125, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 1, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 10, + "last_column": 7 + } + }, + "dependencies": [ + "main0" + ], + "args": [], + "body": [ + { + "node": "SubroutineCall", + "fields": { + "name": "main0 (SymbolTable11)", + "original_name": [], + "args": [], + "dt": [] + }, + "loc": { + "first": 119, + "last": 125, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 10, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 10, + "last_column": 7 + } + } + ], + "return_var": [], + "access": "Public", + "deterministic": false, + "side_effect_free": false, + "c_header": [] + }, + "loc": { + "first": 0, + "last": 125, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 1, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 10, + "last_column": 7 + } + }, + "f": { + "node": "ExternalSymbol", + "fields": { + "parent_symtab": 11, + "name": "f", + "external": "f (SymbolTable3)", + "module_name": "modules_02b", + "scope_names": [], + "original_name": "f", + "access": "Public" + }, + "loc": { + "first": 154, + "last": 186, + "first_filename": "tests/../integration_tests/modules_02b.py", + "first_line": 3, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02b.py", + "last_line": 5, + "last_column": 16 + } + }, + "main0": { + "node": "Function", + "fields": { + "symtab": { + "node": "SymbolTable8", + "fields": { + "x": { + "node": "Variable", + "fields": { + "parent_symtab": 8, + "name": "x", + "dependencies": [], + "intent": "Local", + "symbolic_value": [], + "value": [], + "storage": "Default", + "type": { + "node": "Integer", + "fields": { + "kind": 4, + "dims": [] + }, + "loc": { + "first": 71, + "last": 73, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 5, + "first_column": 8, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 5, + "last_column": 10 + } + }, + "abi": "Source", + "access": "Public", + "presence": "Required", + "value_attr": false + }, + "loc": { + "first": 68, + "last": 73, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 5, + "first_column": 5, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 5, + "last_column": 10 + } + } + } + }, + "name": "main0", + "function_signature": { + "node": "FunctionType", + "fields": { + "arg_types": [], + "return_var_type": [], + "abi": "Source", + "deftype": "Implementation", + "bindc_name": [], + "elemental": false, + "pure": false, + "module": false, + "inline": false, + "static": false, + "type_params": [], + "restrictions": [], + "is_restriction": false + }, + "loc": { + "first": 51, + "last": 116, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 4, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 8, + "last_column": 7 + } + }, + "dependencies": [ + "f" + ], + "args": [], + "body": [ + { + "node": "Assignment", + "fields": { + "target": { + "node": "Var", + "fields": { + "v": "x (SymbolTable8)" + }, + "loc": { + "first": 79, + "last": 79, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 6, + "first_column": 5, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 6, + "last_column": 5 + } + }, + "value": { + "node": "IntegerBinOp", + "fields": { + "left": { + "node": "IntegerBinOp", + "fields": { + "left": { + "node": "IntegerConstant", + "fields": { + "n": 2, + "type": { + "node": "Integer", + "fields": { + "kind": 4, + "dims": [] + }, + "loc": { + "first": 84, + "last": 84, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 6, + "first_column": 10, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 6, + "last_column": 10 + } + } + }, + "loc": { + "first": 84, + "last": 84, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 6, + "first_column": 10, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 6, + "last_column": 10 + } + }, + "op": "Add", + "right": { + "node": "IntegerConstant", + "fields": { + "n": 3, + "type": { + "node": "Integer", + "fields": { + "kind": 4, + "dims": [] + }, + "loc": { + "first": 86, + "last": 86, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 6, + "first_column": 12, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 6, + "last_column": 12 + } + } + }, + "loc": { + "first": 86, + "last": 86, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 6, + "first_column": 12, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 6, + "last_column": 12 + } + }, + "type": { + "node": "Integer", + "fields": { + "kind": 4, + "dims": [] + }, + "loc": { + "first": 84, + "last": 84, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 6, + "first_column": 10, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 6, + "last_column": 10 + } + }, + "value": { + "node": "IntegerConstant", + "fields": { + "n": 5, + "type": { + "node": "Integer", + "fields": { + "kind": 4, + "dims": [] + }, + "loc": { + "first": 84, + "last": 84, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 6, + "first_column": 10, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 6, + "last_column": 10 + } + } + }, + "loc": { + "first": 84, + "last": 86, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 6, + "first_column": 10, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 6, + "last_column": 12 + } + } + }, + "loc": { + "first": 84, + "last": 86, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 6, + "first_column": 10, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 6, + "last_column": 12 + } + }, + "op": "Mul", + "right": { + "node": "IntegerConstant", + "fields": { + "n": 5, + "type": { + "node": "Integer", + "fields": { + "kind": 4, + "dims": [] + }, + "loc": { + "first": 89, + "last": 89, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 6, + "first_column": 15, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 6, + "last_column": 15 + } + } + }, + "loc": { + "first": 89, + "last": 89, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 6, + "first_column": 15, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 6, + "last_column": 15 + } + }, + "type": { + "node": "Integer", + "fields": { + "kind": 4, + "dims": [] + }, + "loc": { + "first": 84, + "last": 84, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 6, + "first_column": 10, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 6, + "last_column": 10 + } + }, + "value": { + "node": "IntegerConstant", + "fields": { + "n": 25, + "type": { + "node": "Integer", + "fields": { + "kind": 4, + "dims": [] + }, + "loc": { + "first": 84, + "last": 84, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 6, + "first_column": 10, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 6, + "last_column": 10 + } + } + }, + "loc": { + "first": 83, + "last": 89, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 6, + "first_column": 9, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 6, + "last_column": 15 + } + } + }, + "loc": { + "first": 83, + "last": 89, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 6, + "first_column": 9, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 6, + "last_column": 15 + } + }, + "overloaded": [] + }, + "loc": { + "first": 79, + "last": 89, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 6, + "first_column": 5, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 6, + "last_column": 15 + } + }, + { + "node": "Assert", + "fields": { + "test": { + "node": "IntegerCompare", + "fields": { + "left": { + "node": "Var", + "fields": { + "v": "x (SymbolTable8)" + }, + "loc": { + "first": 102, + "last": 102, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 7, + "first_column": 12, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 7, + "last_column": 12 + } + }, + "op": "Eq", + "right": { + "node": "IntegerConstant", + "fields": { + "n": 25, + "type": { + "node": "Integer", + "fields": { + "kind": 4, + "dims": [] + }, + "loc": { + "first": 107, + "last": 108, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 7, + "first_column": 17, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 7, + "last_column": 18 + } + } + }, + "loc": { + "first": 107, + "last": 108, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 7, + "first_column": 17, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 7, + "last_column": 18 + } + }, + "type": { + "node": "Logical", + "fields": { + "kind": 4, + "dims": [] + }, + "loc": { + "first": 102, + "last": 108, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 7, + "first_column": 12, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 7, + "last_column": 18 + } + }, + "value": [] + }, + "loc": { + "first": 102, + "last": 108, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 7, + "first_column": 12, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 7, + "last_column": 18 + } + }, + "msg": [] + }, + "loc": { + "first": 95, + "last": 108, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 7, + "first_column": 5, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 7, + "last_column": 18 + } + }, + { + "node": "SubroutineCall", + "fields": { + "name": "f (SymbolTable11)", + "original_name": [], + "args": [], + "dt": [] + }, + "loc": { + "first": 114, + "last": 116, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 8, + "first_column": 5, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 8, + "last_column": 7 + } + } + ], + "return_var": [], + "access": "Public", + "deterministic": false, + "side_effect_free": false, + "c_header": [] + }, + "loc": { + "first": 51, + "last": 116, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 4, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 8, + "last_column": 7 + } + } + } + }, + "name": "_global_symbols", + "dependencies": [ + "modules_02b" + ], + "loaded_from_mod": false, + "intrinsic": false + }, + "loc": { + "first": 0, + "last": 125, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 1, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 10, + "last_column": 7 + } + }, + "main_program": { + "node": "Program", + "fields": { + "symtab": { + "node": "SymbolTable9", + "fields": { + "_lpython_main_program": { + "node": "ExternalSymbol", + "fields": { + "parent_symtab": 9, + "name": "_lpython_main_program", + "external": "_lpython_main_program (SymbolTable11)", + "module_name": "_global_symbols", + "scope_names": [], + "original_name": "_lpython_main_program", + "access": "Public" + }, + "loc": { + "first": 0, + "last": 125, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 1, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 10, + "last_column": 7 + } + } + } + }, + "name": "main_program", + "dependencies": [ + "_global_symbols" + ], + "body": [ + { + "node": "SubroutineCall", + "fields": { + "name": "_lpython_main_program (SymbolTable9)", + "original_name": [], + "args": [], + "dt": [] + }, + "loc": { + "first": 0, + "last": 125, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 1, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 10, + "last_column": 7 + } + } + ] + }, + "loc": { + "first": 0, + "last": 125, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 1, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 10, + "last_column": 7 + } + }, + "modules_02b": { + "node": "Module", + "fields": { + "symtab": { + "node": "SymbolTable3", + "fields": { + "f": { + "node": "Function", + "fields": { + "symtab": { + "node": "SymbolTable7", + "fields": {} + }, + "name": "f", + "function_signature": { + "node": "FunctionType", + "fields": { + "arg_types": [], + "return_var_type": [], + "abi": "Source", + "deftype": "Implementation", + "bindc_name": [], + "elemental": false, + "pure": false, + "module": false, + "inline": false, + "static": false, + "type_params": [], + "restrictions": [], + "is_restriction": false + }, + "loc": { + "first": 154, + "last": 186, + "first_filename": "tests/../integration_tests/modules_02b.py", + "first_line": 3, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02b.py", + "last_line": 5, + "last_column": 16 + } + }, + "dependencies": [ + "g" + ], + "args": [], + "body": [ + { + "node": "SubroutineCall", + "fields": { + "name": "g (SymbolTable3)", + "original_name": [], + "args": [], + "dt": [] + }, + "loc": { + "first": 167, + "last": 169, + "first_filename": "tests/../integration_tests/modules_02b.py", + "first_line": 4, + "first_column": 5, + "last_filename": "tests/../integration_tests/modules_02b.py", + "last_line": 4, + "last_column": 7 + } + }, + { + "node": "Print", + "fields": { + "fmt": [], + "values": [ + { + "node": "StringConstant", + "fields": { + "s": "f()", + "type": { + "node": "Character", + "fields": { + "kind": 1, + "len": 3, + "len_expr": [], + "dims": [] + }, + "loc": { + "first": 181, + "last": 185, + "first_filename": "tests/../integration_tests/modules_02b.py", + "first_line": 5, + "first_column": 11, + "last_filename": "tests/../integration_tests/modules_02b.py", + "last_line": 5, + "last_column": 15 + } + } + }, + "loc": { + "first": 181, + "last": 185, + "first_filename": "tests/../integration_tests/modules_02b.py", + "first_line": 5, + "first_column": 11, + "last_filename": "tests/../integration_tests/modules_02b.py", + "last_line": 5, + "last_column": 15 + } + } + ], + "separator": [], + "end": [] + }, + "loc": { + "first": 175, + "last": 186, + "first_filename": "tests/../integration_tests/modules_02b.py", + "first_line": 5, + "first_column": 5, + "last_filename": "tests/../integration_tests/modules_02b.py", + "last_line": 5, + "last_column": 16 + } + } + ], + "return_var": [], + "access": "Public", + "deterministic": false, + "side_effect_free": false, + "c_header": [] + }, + "loc": { + "first": 154, + "last": 186, + "first_filename": "tests/../integration_tests/modules_02b.py", + "first_line": 3, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02b.py", + "last_line": 5, + "last_column": 16 + } + }, + "g": { + "node": "ExternalSymbol", + "fields": { + "parent_symtab": 3, + "name": "g", + "external": "g (SymbolTable5)", + "module_name": "modules_02c", + "scope_names": [], + "original_name": "g", + "access": "Public" + }, + "loc": { + "first": 188, + "last": 212, + "first_filename": "tests/../integration_tests/modules_02c.py", + "first_line": 1, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02c.py", + "last_line": 2, + "last_column": 16 + } + } + } + }, + "name": "modules_02b", + "dependencies": [ + "modules_02c" + ], + "loaded_from_mod": false, + "intrinsic": false + }, + "loc": { + "first": 127, + "last": 186, + "first_filename": "tests/../integration_tests/modules_02b.py", + "first_line": 1, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02b.py", + "last_line": 5, + "last_column": 16 + } + }, + "modules_02c": { + "node": "Module", + "fields": { + "symtab": { + "node": "SymbolTable5", + "fields": { + "g": { + "node": "Function", + "fields": { + "symtab": { + "node": "SymbolTable6", + "fields": {} + }, + "name": "g", + "function_signature": { + "node": "FunctionType", + "fields": { + "arg_types": [], + "return_var_type": [], + "abi": "Source", + "deftype": "Implementation", + "bindc_name": [], + "elemental": false, + "pure": false, + "module": false, + "inline": false, + "static": false, + "type_params": [], + "restrictions": [], + "is_restriction": false + }, + "loc": { + "first": 188, + "last": 212, + "first_filename": "tests/../integration_tests/modules_02c.py", + "first_line": 1, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02c.py", + "last_line": 2, + "last_column": 16 + } + }, + "dependencies": [], + "args": [], + "body": [ + { + "node": "Print", + "fields": { + "fmt": [], + "values": [ + { + "node": "StringConstant", + "fields": { + "s": "g()", + "type": { + "node": "Character", + "fields": { + "kind": 1, + "len": 3, + "len_expr": [], + "dims": [] + }, + "loc": { + "first": 207, + "last": 211, + "first_filename": "tests/../integration_tests/modules_02c.py", + "first_line": 2, + "first_column": 11, + "last_filename": "tests/../integration_tests/modules_02c.py", + "last_line": 2, + "last_column": 15 + } + } + }, + "loc": { + "first": 207, + "last": 211, + "first_filename": "tests/../integration_tests/modules_02c.py", + "first_line": 2, + "first_column": 11, + "last_filename": "tests/../integration_tests/modules_02c.py", + "last_line": 2, + "last_column": 15 + } + } + ], + "separator": [], + "end": [] + }, + "loc": { + "first": 201, + "last": 212, + "first_filename": "tests/../integration_tests/modules_02c.py", + "first_line": 2, + "first_column": 5, + "last_filename": "tests/../integration_tests/modules_02c.py", + "last_line": 2, + "last_column": 16 + } + } + ], + "return_var": [], + "access": "Public", + "deterministic": false, + "side_effect_free": false, + "c_header": [] + }, + "loc": { + "first": 188, + "last": 212, + "first_filename": "tests/../integration_tests/modules_02c.py", + "first_line": 1, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02c.py", + "last_line": 2, + "last_column": 16 + } + } + } + }, + "name": "modules_02c", + "dependencies": [], + "loaded_from_mod": false, + "intrinsic": false + }, + "loc": { + "first": 188, + "last": 212, + "first_filename": "tests/../integration_tests/modules_02c.py", + "first_line": 1, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02c.py", + "last_line": 2, + "last_column": 16 + } + } + } + }, + "items": [] + }, + "loc": { + "first": 0, + "last": 125, + "first_filename": "tests/../integration_tests/modules_02.py", + "first_line": 1, + "first_column": 1, + "last_filename": "tests/../integration_tests/modules_02.py", + "last_line": 10, + "last_column": 7 + } +} diff --git a/tests/tests.toml b/tests/tests.toml index bea12f2519..d8c2232c27 100644 --- a/tests/tests.toml +++ b/tests/tests.toml @@ -196,6 +196,7 @@ asr = true [[test]] filename = "../integration_tests/modules_02.py" asr = true +asr_json = true [[test]] filename = "../integration_tests/test_import_02.py" From a40eebe2216806e297e6e8000f54f9af64424e4b Mon Sep 17 00:00:00 2001 From: Thirumalai Shaktivel <74826228+Thirumalai-Shaktivel@users.noreply.github.com> Date: Wed, 3 May 2023 21:10:59 +0530 Subject: [PATCH 06/72] Register ``Partition`` in IntrinsicFunction (#1673) --- src/libasr/asr_utils.h | 59 ++ src/libasr/pass/intrinsic_function_registry.h | 796 ++++++++++++------ src/lpython/semantics/python_ast_to_asr.cpp | 176 +--- 3 files changed, 633 insertions(+), 398 deletions(-) diff --git a/src/libasr/asr_utils.h b/src/libasr/asr_utils.h index 6bd71febe6..f04f918fc5 100644 --- a/src/libasr/asr_utils.h +++ b/src/libasr/asr_utils.h @@ -3315,6 +3315,65 @@ static inline void collect_variable_dependencies(Allocator& al, SetChar& deps_ve } } +static inline int KMP_string_match(std::string &s_var, std::string &sub) { + int str_len = s_var.size(); + int sub_len = sub.size(); + bool flag = 0; + int res = -1; + std::vector lps(sub_len, 0); + if (str_len == 0 || sub_len == 0) { + res = (!sub_len || (sub_len == str_len))? 0: -1; + } else { + for(int i = 1, len = 0; i < sub_len;) { + if (sub[i] == sub[len]) { + lps[i++] = ++len; + } else { + if (len != 0) { + len = lps[len - 1]; + } else { + lps[i++] = 0; + } + } + } + for (int i = 0, j = 0; (str_len - i) >= (sub_len - j) && !flag;) { + if (sub[j] == s_var[i]) { + j++, i++; + } + if (j == sub_len) { + res = i - j; + flag = 1; + j = lps[j - 1]; + } else if (i < str_len && sub[j] != s_var[i]) { + if (j != 0) { + j = lps[j - 1]; + } else { + i = i + 1; + } + } + } + } + return res; +} + +static inline void visit_expr_list(Allocator &al, Vec& exprs, + Vec& exprs_vec) { + LCOMPILERS_ASSERT(exprs_vec.reserve_called); + for( size_t i = 0; i < exprs.n; i++ ) { + exprs_vec.push_back(al, exprs[i].m_value); + } +} + +static inline void visit_expr_list(Allocator &al, Vec exprs, + Vec& exprs_vec) { + LCOMPILERS_ASSERT(exprs_vec.reserve_called); + for( size_t i = 0; i < exprs.n; i++ ) { + ASR::call_arg_t arg; + arg.loc = exprs[i]->base.loc; + arg.m_value = exprs[i]; + exprs_vec.push_back(al, arg); + } +} + } // namespace ASRUtils } // namespace LCompilers diff --git a/src/libasr/pass/intrinsic_function_registry.h b/src/libasr/pass/intrinsic_function_registry.h index f90497d345..0cd957c0e4 100644 --- a/src/libasr/pass/intrinsic_function_registry.h +++ b/src/libasr/pass/intrinsic_function_registry.h @@ -53,14 +53,229 @@ enum class IntrinsicFunctions : int64_t { Abs, Any, ListIndex, + Partition, // ... }; -namespace ControlFlowConstructorAPI { + +class ASRBuilder { + private: + + Allocator& al; + // TODO: use the location to point C++ code in `intrinsic_function_registry` + const Location &loc; + + public: + + ASRBuilder(Allocator& al_, const Location& loc_): al(al_), loc(loc_) {} + + #define declare_basic_variables(name) \ + std::string fn_name = scope->get_unique_name(name); \ + SymbolTable *fn_symtab = al.make_new(scope); \ + ASRBuilder b(al, loc); \ + Vec args; args.reserve(al, 1); \ + Vec body; body.reserve(al, 1); \ + SetChar dep; dep.reserve(al, 1); + + // Symbols ----------------------------------------------------------------- + ASR::expr_t *Variable(SymbolTable *symtab, std::string var_name, + ASR::ttype_t *type, ASR::intentType intent, + ASR::abiType abi=ASR::abiType::Source, bool a_value_attr=false) { + ASR::symbol_t* sym = ASR::down_cast( + ASR::make_Variable_t(al, loc, symtab, s2c(al, var_name), nullptr, 0, + intent, nullptr, nullptr, ASR::storage_typeType::Default, type, abi, + ASR::Public, ASR::presenceType::Required, a_value_attr)); + symtab->add_symbol(s2c(al, var_name), sym); + return ASRUtils::EXPR(ASR::make_Var_t(al, loc, sym)); + } + + #define declare(var_name, type, intent) \ + b.Variable(fn_symtab, var_name, type, ASR::intentType::intent) + + #define fill_func_arg(arg_name, type) { \ + auto arg = declare(arg_name, type, In); \ + args.push_back(al, arg); } + + #define make_Function_t(name, symtab, dep, args, body, return_var, abi, \ + deftype, bindc_name) \ + ASR::down_cast( ASRUtils::make_Function_t_util(al, loc, \ + symtab, s2c(al, name), dep.p, dep.n, args.p, args.n, body.p, body.n, \ + return_var, ASR::abiType::abi, ASR::accessType::Public, \ + ASR::deftypeType::deftype, bindc_name, false, false, false, false, \ + false, nullptr, 0, nullptr, 0, false, false, false)); + + #define make_Function_Without_ReturnVar_t(name, symtab, dep, args, body, \ + abi, deftype, bindc_name) \ + ASR::down_cast( ASRUtils::make_Function_t_util(al, loc, \ + symtab, s2c(al, name), dep.p, dep.n, args.p, args.n, body.p, body.n, \ + nullptr, ASR::abiType::abi, ASR::accessType::Public, \ + ASR::deftypeType::deftype, bindc_name, false, false, false, false, \ + false, nullptr, 0, nullptr, 0, false, false, false)); + + // Types ------------------------------------------------------------------- + #define int32 TYPE(ASR::make_Integer_t(al, loc, 4, nullptr, 0)) + #define logical TYPE(ASR::make_Logical_t(al, loc, 4, nullptr, 0)) + #define character(x) TYPE(ASR::make_Character_t(al, loc, 1, x, nullptr, \ + nullptr, 0)) + #define List(x) TYPE(ASR::make_List_t(al, loc, x)) + ASR::ttype_t *Tuple(std::vector tuple_type) { + Vec m_tuple_type; m_tuple_type.reserve(al, 3); + for (auto &x: tuple_type) { + m_tuple_type.push_back(al, x); + } + return TYPE(ASR::make_Tuple_t(al, loc, m_tuple_type.p, m_tuple_type.n)); + } + + // Expressions ------------------------------------------------------------- + #define i32(x) EXPR(ASR::make_IntegerConstant_t(al, loc, x, int32)) + #define i32_n(x) EXPR(ASR::make_IntegerUnaryMinus_t(al, loc, i32(abs(x)), \ + int32, i32(x))) + #define bool32(x) EXPR(ASR::make_LogicalConstant_t(al, loc, x, logical)) + + #define ListItem(x, pos, type) EXPR(ASR::make_ListItem_t(al, loc, x, pos, \ + type, nullptr)) + #define ListAppend(x, val) STMT(ASR::make_ListAppend_t(al, loc, x, val)) + + #define StringSection(s, start, end) EXPR(ASR::make_StringSection_t(al, loc,\ + s, start, end, nullptr, character(-2), nullptr)) + #define StringItem(x, idx) EXPR(ASR::make_StringItem_t(al, loc, x, idx, \ + character(-2), nullptr)) + #define StringConstant(s, type) EXPR(ASR::make_StringConstant_t(al, loc, \ + s2c(al, s), type)) + #define StringLen(s) EXPR(ASR::make_StringLen_t(al, loc, s, int32, nullptr)) + + #define iAdd(left, right) EXPR(ASR::make_IntegerBinOp_t(al, loc, left, \ + ASR::binopType::Add, right, int32, nullptr)) + #define iSub(left, right) EXPR(ASR::make_IntegerBinOp_t(al, loc, left, \ + ASR::binopType::Sub, right, int32, nullptr)) + + #define And(x, y) EXPR(ASR::make_LogicalBinOp_t(al, loc, x, \ + ASR::logicalbinopType::And, y, logical, nullptr)) + #define Not(x) EXPR(ASR::make_LogicalNot_t(al, loc, x, logical, nullptr)) + + #define iEq(x, y) EXPR(ASR::make_IntegerCompare_t(al, loc, x, \ + ASR::cmpopType::Eq, y, logical, nullptr)) + #define sEq(x, y) EXPR(ASR::make_StringCompare_t(al, loc, x, \ + ASR::cmpopType::Eq, y, logical, nullptr)) + #define iNotEq(x, y) EXPR(ASR::make_IntegerCompare_t(al, loc, x, \ + ASR::cmpopType::NotEq, y, logical, nullptr)) + #define sNotEq(x, y) EXPR(ASR::make_StringCompare_t(al, loc, x, \ + ASR::cmpopType::NotEq, y, logical, nullptr)) + #define iLt(x, y) EXPR(ASR::make_IntegerCompare_t(al, loc, x, \ + ASR::cmpopType::Lt, y, logical, nullptr)) + #define iLtE(x, y) EXPR(ASR::make_IntegerCompare_t(al, loc, x, \ + ASR::cmpopType::LtE, y, logical, nullptr)) + #define iGtE(x, y) EXPR(ASR::make_IntegerCompare_t(al, loc, x, \ + ASR::cmpopType::GtE, y, logical, nullptr)) + + ASR::stmt_t *If(ASR::expr_t *a_test, std::vector if_body, + std::vector else_body) { + Vec m_if_body; m_if_body.reserve(al, 1); + for (auto &x: if_body) m_if_body.push_back(al, x); + + Vec m_else_body; m_else_body.reserve(al, 1); + for (auto &x: else_body) m_else_body.push_back(al, x); + + return STMT(ASR::make_If_t(al, loc, a_test, m_if_body.p, m_if_body.n, + m_else_body.p, m_else_body.n)); + } + + ASR::stmt_t *While(ASR::expr_t *a_test, std::vector body) { + Vec m_body; m_body.reserve(al, 1); + for (auto &x: body) m_body.push_back(al, x); + + return STMT(ASR::make_WhileLoop_t(al, loc, nullptr, a_test, + m_body.p, m_body.n)); + } + + ASR::expr_t *TupleConstant(std::vector ele, ASR::ttype_t *type) { + Vec m_ele; m_ele.reserve(al, 3); + for (auto &x: ele) m_ele.push_back(al, x); + return EXPR(ASR::make_TupleConstant_t(al, loc, m_ele.p, m_ele.n, type)); + } + + #define make_Compare(Constructor, left, op, right, loc) ASRUtils::EXPR(ASR::Constructor( \ + al, loc, left, op, right, \ + ASRUtils::TYPE(ASR::make_Logical_t( \ + al, loc, 4, nullptr, 0)), nullptr)); \ + + #define create_ElementalBinOp(OpType, BinOpName, OpName) case ASR::ttypeType::OpType: { \ + return ASRUtils::EXPR(ASR::BinOpName(al, loc, \ + left, ASR::binopType::OpName, right, \ + ASRUtils::expr_type(left), nullptr)); \ + } \ + + ASR::expr_t* ElementalAdd(ASR::expr_t* left, ASR::expr_t* right, + const Location& loc) { + switch (ASRUtils::expr_type(left)->type) { + create_ElementalBinOp(Real, make_RealBinOp_t, Add) + create_ElementalBinOp(Integer, make_IntegerBinOp_t, Add) + create_ElementalBinOp(Complex, make_ComplexBinOp_t, Add) + default: { + throw LCompilersException("Expression type, " + + std::to_string(left->type) + + " not yet supported"); + } + } + } + + ASR::expr_t* ElementalPow(ASR::expr_t* left, ASR::expr_t* right, + const Location& loc) { + switch (ASRUtils::expr_type(left)->type) { + create_ElementalBinOp(Real, make_RealBinOp_t, Pow) + create_ElementalBinOp(Integer, make_IntegerBinOp_t, Pow) + create_ElementalBinOp(Complex, make_ComplexBinOp_t, Pow) + default: { + throw LCompilersException("Expression type, " + + std::to_string(left->type) + + " not yet supported"); + } + } + } + + ASR::expr_t* ElementalOr(ASR::expr_t* left, ASR::expr_t* right, + const Location& loc) { + return ASRUtils::EXPR(ASR::make_LogicalBinOp_t(al, loc, + left, ASR::Or, right, + ASRUtils::TYPE(ASR::make_Logical_t( al, loc, 4, + nullptr, 0)), nullptr)); + } + + ASR::expr_t* Or(ASR::expr_t* left, ASR::expr_t* right, + const Location& loc) { + return ASRUtils::EXPR(ASR::make_LogicalBinOp_t(al, loc, + left, ASR::Or, right, ASRUtils::expr_type(left), + nullptr)); + } + + ASR::expr_t* Call(ASR::symbol_t* s, Vec& args, + ASR::ttype_t* return_type) { + return ASRUtils::EXPR(ASR::make_FunctionCall_t(al, loc, + s, s, args.p, args.size(), return_type, nullptr, nullptr)); + } + + ASR::expr_t* Call(ASR::symbol_t* s, Vec& args, + ASR::ttype_t* return_type) { + Vec args_; args_.reserve(al, 2); + visit_expr_list(al, args, args_); + return ASRUtils::EXPR(ASR::make_FunctionCall_t(al, loc, + s, s, args_.p, args_.size(), return_type, nullptr, nullptr)); + } + + ASR::expr_t* Call(ASR::symbol_t* s, Vec& args, + ASR::ttype_t* return_type, ASR::expr_t* value) { + return ASRUtils::EXPR(ASR::make_FunctionCall_t(al, loc, + s, s, args.p, args.size(), return_type, value, nullptr)); + } + + // Statements -------------------------------------------------------------- + #define Return() STMT(ASR::make_Return_t(al, loc)) + #define Assignment(lhs, rhs) ASRUtils::STMT(ASR::make_Assignment_t(al, loc, \ + lhs, rhs, nullptr)) + template ASR::stmt_t* create_do_loop( - Allocator& al, const Location& loc, - int rank, ASR::expr_t* array, + const Location& loc, int rank, ASR::expr_t* array, SymbolTable* scope, Vec& idx_vars, Vec& doloop_body, LOOP_BODY loop_body) { PassUtils::create_idx_vars(idx_vars, rank, loc, al, scope, "_i"); @@ -88,15 +303,10 @@ namespace ControlFlowConstructorAPI { template ASR::stmt_t* create_do_loop( - Allocator& al, const Location& loc, - ASR::expr_t* array, ASR::expr_t* result, + const Location& loc, ASR::expr_t* array, Vec& loop_vars, std::vector& loop_dims, Vec& doloop_body, LOOP_BODY loop_body) { - if( result ) { - - } - ASR::stmt_t* doloop = nullptr; for( int i = (int) loop_vars.size() - 1; i >= 0; i-- ) { ASR::do_loop_head_t head; @@ -117,37 +327,76 @@ namespace ControlFlowConstructorAPI { } return doloop; } -} -namespace UnaryIntrinsicFunction { + template + void generate_reduction_intrinsic_stmts_for_scalar_output(const Location& loc, + ASR::expr_t* array, SymbolTable* fn_scope, + Vec& fn_body, Vec& idx_vars, + Vec& doloop_body, INIT init_stmts, LOOP_BODY loop_body) { + init_stmts(); + int rank = ASRUtils::extract_n_dims_from_ttype(ASRUtils::expr_type(array)); + ASR::stmt_t* doloop = create_do_loop(loc, + rank, array, fn_scope, idx_vars, doloop_body, + loop_body); + fn_body.push_back(al, doloop); + } -#define create_variable(var, name, intent, abi, value_attr, symtab, type) \ - ASR::symbol_t* sym_##var = ASR::down_cast( \ - ASR::make_Variable_t(al, loc, symtab, s2c(al, name), nullptr, 0, \ - intent, nullptr, nullptr, ASR::storage_typeType::Default, type, abi, \ - ASR::Public, ASR::presenceType::Required, value_attr)); \ - symtab->add_symbol(s2c(al, name), sym_##var); \ - ASR::expr_t* var = ASRUtils::EXPR(ASR::make_Var_t(al, loc, sym_##var)); - - -#define make_Function_t(name, symtab, dep, args, body, return_var, abi, deftype,\ - bindc_name) \ - ASR::down_cast( ASRUtils::make_Function_t_util(al, loc, \ - symtab, s2c(al, name), dep.p, dep.n, args.p, args.n, body.p, body.n, \ - return_var, ASR::abiType::abi, ASR::accessType::Public, \ - ASR::deftypeType::deftype, bindc_name, false, false, false, false, false, \ - nullptr, 0, nullptr, 0, false, false, false)); - -#define make_Function_Without_ReturnVar_t(name, symtab, dep, args, body, abi, \ - deftype, bindc_name) \ - ASR::down_cast( ASRUtils::make_Function_t_util(al, loc, \ - symtab, s2c(al, name), dep.p, dep.n, args.p, args.n, body.p, body.n, \ - nullptr, ASR::abiType::abi, ASR::accessType::Public, \ - ASR::deftypeType::deftype, bindc_name, false, false, false, false, false, \ - nullptr, 0, nullptr, 0, false, false, false)); + template + void generate_reduction_intrinsic_stmts_for_array_output(const Location& loc, + ASR::expr_t* array, ASR::expr_t* dim, SymbolTable* fn_scope, + Vec& fn_body, Vec& idx_vars, + Vec& target_idx_vars, Vec& doloop_body, + INIT init_stmts, LOOP_BODY loop_body) { + init_stmts(); + int n_dims = ASRUtils::extract_n_dims_from_ttype(ASRUtils::expr_type(array)); + ASR::stmt_t** else_ = nullptr; + size_t else_n = 0; + idx_vars.reserve(al, n_dims); + PassUtils::create_idx_vars(idx_vars, n_dims, loc, al, fn_scope, "_j"); + for( int i = 1; i <= n_dims; i++ ) { + ASR::expr_t* current_dim = i32(i); + ASR::expr_t* test_expr = make_Compare(make_IntegerCompare_t, dim, + ASR::cmpopType::Eq, current_dim, loc); + + Vec loop_vars; + std::vector loop_dims; + loop_dims.reserve(n_dims); + loop_vars.reserve(al, n_dims); + target_idx_vars.reserve(al, n_dims - 1); + for( int j = 1; j <= n_dims; j++ ) { + if( j == i ) { + continue ; + } + target_idx_vars.push_back(al, idx_vars[j - 1]); + loop_dims.push_back(j); + loop_vars.push_back(al, idx_vars[j - 1]); + } + loop_dims.push_back(i); + loop_vars.push_back(al, idx_vars[i - 1]); + + ASR::stmt_t* doloop = create_do_loop(loc, + array, loop_vars, loop_dims, doloop_body, + loop_body); + Vec if_body; + if_body.reserve(al, 1); + if_body.push_back(al, doloop); + ASR::stmt_t* if_ = ASRUtils::STMT(ASR::make_If_t(al, loc, test_expr, + if_body.p, if_body.size(), else_, else_n)); + Vec if_else_if; + if_else_if.reserve(al, 1); + if_else_if.push_back(al, if_); + else_ = if_else_if.p; + else_n = if_else_if.size(); + } + fn_body.push_back(al, else_[0]); + } + +}; + +namespace UnaryIntrinsicFunction { static inline ASR::expr_t* instantiate_functions(Allocator &al, - const Location &loc, SymbolTable *global_scope, std::string new_name, + const Location &loc, SymbolTable *scope, std::string new_name, ASR::ttype_t *arg_type, Vec& new_args, int64_t /*overload_id*/, ASR::expr_t *value) { std::string c_func_name; @@ -170,45 +419,27 @@ static inline ASR::expr_t* instantiate_functions(Allocator &al, } new_name = "_lcompilers_" + new_name + "_" + type_to_str_python(arg_type); - if (global_scope->get_symbol(new_name)) { - ASR::symbol_t *s = global_scope->get_symbol(new_name); + declare_basic_variables(new_name); + if (scope->get_symbol(new_name)) { + ASR::symbol_t *s = scope->get_symbol(new_name); ASR::Function_t *f = ASR::down_cast(s); - return ASRUtils::EXPR(ASR::make_FunctionCall_t(al, loc, s, s, - new_args.p, new_args.size(), expr_type(f->m_return_var), - value, nullptr)); - } - new_name = global_scope->get_unique_name(new_name); - SymbolTable *fn_symtab = al.make_new(global_scope); - - Vec args; - { - args.reserve(al, 1); - create_variable(arg, "x", ASR::intentType::In, ASR::abiType::Source, - false, fn_symtab, arg_type); - args.push_back(al, arg); + return b.Call(s, new_args, expr_type(f->m_return_var), value); } - - create_variable(return_var, new_name, ASRUtils::intent_return_var, - ASR::abiType::Source, false, fn_symtab, arg_type); - - Vec body; - body.reserve(al, 1); - - SetChar dep; - dep.reserve(al, 1); + fill_func_arg("x", arg_type); + auto result = declare(new_name, arg_type, ReturnVar); { SymbolTable *fn_symtab_1 = al.make_new(fn_symtab); Vec args_1; { args_1.reserve(al, 1); - create_variable(arg, "x", ASR::intentType::In, ASR::abiType::BindC, - true, fn_symtab_1, arg_type); + ASR::expr_t *arg = b.Variable(fn_symtab_1, "x", arg_type, + ASR::intentType::In, ASR::abiType::BindC, true); args_1.push_back(al, arg); } - create_variable(return_var_1, c_func_name, ASRUtils::intent_return_var, - ASR::abiType::BindC, false, fn_symtab_1, arg_type); + ASR::expr_t *return_var_1 = b.Variable(fn_symtab_1, c_func_name, + arg_type, ASRUtils::intent_return_var, ASR::abiType::BindC, false); SetChar dep_1; dep_1.reserve(al, 1); Vec body_1; body_1.reserve(al, 1); @@ -216,23 +447,13 @@ static inline ASR::expr_t* instantiate_functions(Allocator &al, body_1, return_var_1, BindC, Interface, s2c(al, c_func_name)); fn_symtab->add_symbol(c_func_name, s); dep.push_back(al, s2c(al, c_func_name)); - Vec call_args; - { - call_args.reserve(al, 1); - ASR::call_arg_t arg; - arg.m_value = args[0]; - call_args.push_back(al, arg); - } - body.push_back(al, ASRUtils::STMT(ASR::make_Assignment_t(al, loc, - return_var, ASRUtils::EXPR(ASR::make_FunctionCall_t(al, loc, s, s, - call_args.p, call_args.n, arg_type, nullptr, nullptr)), nullptr))); + body.push_back(al, Assignment(result, b.Call(s, args, arg_type))); } - ASR::symbol_t *new_symbol = make_Function_t(new_name, fn_symtab, dep, args, - body, return_var, Source, Implementation, nullptr); - global_scope->add_symbol(new_name, new_symbol); - return ASRUtils::EXPR(ASR::make_FunctionCall_t(al, loc, new_symbol, - new_symbol, new_args.p, new_args.size(), arg_type, value, nullptr)); + ASR::symbol_t *new_symbol = make_Function_t(fn_name, fn_symtab, dep, args, + body, result, Source, Implementation, nullptr); + scope->add_symbol(fn_name, new_symbol); + return b.Call(new_symbol, new_args, arg_type, value); } static inline ASR::asr_t* create_UnaryFunction(Allocator& al, const Location& loc, @@ -251,6 +472,92 @@ static inline ASR::asr_t* create_UnaryFunction(Allocator& al, const Location& lo args.p, args.n, overload_id, type, value); } +static inline ASR::symbol_t *create_KMP_function(Allocator &al, + const Location &loc, SymbolTable *scope) +{ + /* + * Knuth-Morris-Pratt (KMP) string-matching + * This function takes two parameters: + * the sub-string or pattern string and the target string, + * then returns the position of the first occurrence of the + * string in the pattern. + */ + declare_basic_variables("KMP_string_matching"); + fill_func_arg("target_string", character(-2)); + fill_func_arg("pattern", character(-2)); + + auto result = declare("result", int32, ReturnVar); + auto pi_len = declare("pi_len", int32, Local); + auto i = declare("i", int32, Local); + auto j = declare("j", int32, Local); + auto s_len = declare("s_len", int32, Local); + auto pat_len = declare("pat_len", int32, Local); + auto flag = declare("flag", logical, Local); + auto lps = declare("lps", List(int32), Local); + + body.push_back(al, Assignment(s_len, StringLen(args[0]))); + body.push_back(al, Assignment(pat_len, StringLen(args[1]))); + body.push_back(al, Assignment(result, i32_n(-1))); + body.push_back(al, b.If(iEq(pat_len, i32(0)), { + Assignment(result, i32(0)), Return() + }, { + b.If(iEq(s_len, i32(0)), { Return() }, {}) + })); + body.push_back(al, Assignment(lps, + EXPR(ASR::make_ListConstant_t(al, loc, nullptr, 0, List(int32))))); + body.push_back(al, Assignment(i, i32(0))); + body.push_back(al, b.While(iLtE(i, iSub(pat_len, i32(1))), { + Assignment(i, iAdd(i, i32(1))), + ListAppend(lps, i32(0)) + })); + body.push_back(al, Assignment(flag, bool32(false))); + body.push_back(al, Assignment(i, i32(1))); + body.push_back(al, Assignment(pi_len, i32(0))); + body.push_back(al, b.While(iLt(i, pat_len), { + b.If(sEq(StringItem(args[1], iAdd(i, i32(1))), + StringItem(args[1], iAdd(pi_len, i32(1)))), { + Assignment(pi_len, iAdd(pi_len, i32(1))), + Assignment(ListItem(lps, i, int32), pi_len), + Assignment(i, iAdd(i, i32(1))) + }, { + b.If(iNotEq(pi_len, i32(0)), { + Assignment(pi_len, ListItem(lps, iSub(pi_len, i32(1)), int32)) + }, { + Assignment(i, iAdd(i, i32(1))) + }) + }) + })); + body.push_back(al, Assignment(j, i32(0))); + body.push_back(al, Assignment(i, i32(0))); + body.push_back(al, b.While(And(iGtE(iSub(s_len, i), + iSub(pat_len, j)), Not(flag)), { + b.If(sEq(StringItem(args[1], iAdd(j, i32(1))), + StringItem(args[0], iAdd(i, i32(1)))), { + Assignment(i, iAdd(i, i32(1))), + Assignment(j, iAdd(j, i32(1))) + }, {}), + b.If(iEq(j, pat_len), { + Assignment(result, iSub(i, j)), + Assignment(flag, bool32(true)), + Assignment(j, ListItem(lps, iSub(j, i32(1)), int32)) + }, { + b.If(And(iLt(i, s_len), sNotEq(StringItem(args[1], iAdd(j, i32(1))), + StringItem(args[0], iAdd(i, i32(1))))), { + b.If(iNotEq(j, i32(0)), { + Assignment(j, ListItem(lps, iSub(j, i32(1)), int32)) + }, { + Assignment(i, iAdd(i, i32(1))) + }) + }, {}) + }) + })); + body.push_back(al, Return()); + ASR::symbol_t *fn_sym = make_Function_t(fn_name, fn_symtab, dep, args, + body, result, Source, Implementation, nullptr); + scope->add_symbol(fn_name, fn_sym); + return fn_sym; +} + } // namespace UnaryIntrinsicFunction #define instantiate_UnaryFunctionArgs Allocator &al, const Location &loc, \ @@ -357,7 +664,7 @@ create_trig(Tanh, tanh, tanh) namespace Abs { - static ASR::expr_t *eval_Abs(Allocator &al, const Location &loc, + static inline ASR::expr_t *eval_Abs(Allocator &al, const Location &loc, Vec &args) { LCOMPILERS_ASSERT(ASRUtils::all_args_evaluated(args)); ASR::expr_t* arg = args[0]; @@ -411,32 +718,15 @@ namespace Abs { Vec& new_args, int64_t /*overload_id*/, ASR::expr_t* compile_time_value) { std::string func_name = "_lcompilers_abs_" + type_to_str_python(arg_types[0]); ASR::ttype_t *return_type = arg_types[0]; + declare_basic_variables(func_name); if (scope->get_symbol(func_name)) { ASR::symbol_t *s = scope->get_symbol(func_name); ASR::Function_t *f = ASR::down_cast(s); - return ASRUtils::EXPR(ASR::make_FunctionCall_t(al, loc, s, s, - new_args.p, new_args.size(), expr_type(f->m_return_var), - compile_time_value, nullptr)); - } - - func_name = scope->get_unique_name(func_name); - SymbolTable *fn_symtab = al.make_new(scope); - - Vec args; - { - args.reserve(al, 1); - create_variable(arg, "x", ASR::intentType::In, ASR::abiType::Source, - false, fn_symtab, arg_types[0]); - args.push_back(al, arg); + return b.Call(s, new_args, expr_type(f->m_return_var), + compile_time_value); } - - create_variable(return_var, func_name, ASRUtils::intent_return_var, - ASR::abiType::Source, false, fn_symtab, return_type); - - Vec body; - body.reserve(al, 1); - SetChar dep; - dep.reserve(al, 1); + fill_func_arg("x", arg_types[0]); + auto result = declare(func_name, return_type, ReturnVar); if (is_integer(*arg_types[0]) || is_real(*arg_types[0])) { /* @@ -463,18 +753,17 @@ namespace Abs { } Vec if_body; if_body.reserve(al, 1); - if_body.push_back(al, STMT(ASR::make_Assignment_t(al, loc, - return_var, args[0], nullptr))); + if_body.push_back(al, Assignment(result, args[0])); Vec else_body; else_body.reserve(al, 1); - else_body.push_back(al, STMT(ASR::make_Assignment_t(al, loc, - return_var, negative_x, nullptr))); + else_body.push_back(al, Assignment(result, negative_x)); body.push_back(al, STMT(ASR::make_If_t(al, loc, test, if_body.p, if_body.n, else_body.p, else_body.n))); } else { // * Complex type: `r = (real(x)**2 + aimag(x)**2)**0.5` ASR::ttype_t *real_type = TYPE(ASR::make_Real_t(al, loc, extract_kind_from_ttype_t(arg_types[0]), nullptr, 0)); - ASR::Variable_t *r_var = ASR::down_cast(sym_return_var); + ASR::symbol_t *sym_result = ASR::down_cast(result)->m_v; + ASR::Variable_t *r_var = ASR::down_cast(sym_result); r_var->m_type = return_type = real_type; ASR::expr_t *aimag_of_x; { @@ -488,13 +777,13 @@ namespace Abs { Vec args_1; { args_1.reserve(al, 1); - create_variable(arg, "x", ASR::intentType::In, ASR::abiType::BindC, - true, fn_symtab_1, arg_types[0]); + auto arg = b.Variable(fn_symtab_1, "x", arg_types[0], + ASR::intentType::In, ASR::abiType::BindC, true); args_1.push_back(al, arg); } - create_variable(return_var_1, c_func_name, ASRUtils::intent_return_var, - ASR::abiType::BindC, false, fn_symtab_1, real_type); + auto return_var_1 = b.Variable(fn_symtab_1, c_func_name, real_type, + ASR::intentType::ReturnVar, ASR::abiType::BindC, false); SetChar dep_1; dep_1.reserve(al, 1); Vec body_1; body_1.reserve(al, 1); @@ -502,15 +791,7 @@ namespace Abs { body_1, return_var_1, BindC, Interface, s2c(al, c_func_name)); fn_symtab->add_symbol(c_func_name, s); dep.push_back(al, s2c(al, c_func_name)); - Vec call_args; - { - call_args.reserve(al, 1); - ASR::call_arg_t arg; - arg.m_value = args[0]; - call_args.push_back(al, arg); - } - aimag_of_x = EXPR(ASR::make_FunctionCall_t(al, loc, s, - s, call_args.p, call_args.n, real_type, nullptr, nullptr)); + aimag_of_x = b.Call(s, args, real_type); } ASR::expr_t *constant_two = EXPR(ASR::make_RealConstant_t(al, loc, 2.0, real_type)); @@ -527,17 +808,15 @@ namespace Abs { bin_op_1 = EXPR(ASR::make_RealBinOp_t(al, loc, bin_op_1, ASR::binopType::Add, bin_op_2, real_type, nullptr)); - body.push_back(al, STMT(ASR::make_Assignment_t(al, loc, - return_var, EXPR(ASR::make_RealBinOp_t(al, loc, bin_op_1, - ASR::binopType::Pow, constant_point_five, real_type, nullptr)), - nullptr))); + body.push_back(al, Assignment(result, EXPR(ASR::make_RealBinOp_t(al, + loc, bin_op_1, ASR::binopType::Pow, constant_point_five, + real_type, nullptr)))); } - ASR::symbol_t *f_sym = make_Function_t(func_name, fn_symtab, dep, args, - body, return_var, Source, Implementation, nullptr); - scope->add_symbol(func_name, f_sym); - return ASRUtils::EXPR(ASR::make_FunctionCall_t(al, loc, f_sym, f_sym, - new_args.p, new_args.size(), return_type, compile_time_value, nullptr)); + ASR::symbol_t *f_sym = make_Function_t(fn_name, fn_symtab, dep, args, + body, result, Source, Implementation, nullptr); + scope->add_symbol(fn_name, f_sym); + return b.Call(f_sym, new_args, return_type, compile_time_value); } } // namespace Abs @@ -655,95 +934,46 @@ static inline ASR::asr_t* create_Any( static inline void generate_body_for_scalar_output(Allocator& al, const Location& loc, ASR::expr_t* array, ASR::expr_t* return_var, SymbolTable* fn_scope, Vec& fn_body) { - ASR::expr_t* logical_false = ASRUtils::EXPR(ASR::make_LogicalConstant_t( - al, loc, false, ASRUtils::expr_type(array))); - ASR::stmt_t* return_var_init = ASRUtils::STMT(ASR::make_Assignment_t(al, loc, - return_var, logical_false, nullptr)); - fn_body.push_back(al, return_var_init); - int rank = ASRUtils::extract_n_dims_from_ttype(ASRUtils::expr_type(array)); + ASRBuilder builder(al, loc); Vec idx_vars; - idx_vars.reserve(al, 1); Vec doloop_body; - doloop_body.reserve(al, 1); - ASR::stmt_t* doloop = ControlFlowConstructorAPI::create_do_loop(al, loc, - rank, array, fn_scope, idx_vars, doloop_body, - [=, &al, &idx_vars, &doloop_body] () { - ASR::expr_t* array_ref = PassUtils::create_array_ref(array, idx_vars, al); - ASR::expr_t* logical_or = ASRUtils::EXPR(ASR::make_LogicalBinOp_t(al, loc, - return_var, ASR::Or, array_ref, ASRUtils::expr_type(return_var), nullptr)); - ASR::stmt_t* loop_invariant = ASRUtils::STMT(ASR::make_Assignment_t(al, loc, - return_var, logical_or, nullptr)); - doloop_body.push_back(al, loop_invariant); - }); - fn_body.push_back(al, doloop); + builder.generate_reduction_intrinsic_stmts_for_scalar_output(loc, + array, fn_scope, fn_body, idx_vars, doloop_body, + [=, &al, &fn_body] () { + ASR::expr_t* logical_false = bool32(false); + ASR::stmt_t* return_var_init = Assignment(return_var, logical_false); + fn_body.push_back(al, return_var_init); + }, + [=, &al, &idx_vars, &doloop_body, &builder] () { + ASR::expr_t* array_ref = PassUtils::create_array_ref(array, idx_vars, al); + ASR::expr_t* logical_or = builder.Or(return_var, array_ref, loc); + ASR::stmt_t* loop_invariant = Assignment(return_var, logical_or); + doloop_body.push_back(al, loop_invariant); + } + ); } static inline void generate_body_for_array_output(Allocator& al, const Location& loc, ASR::expr_t* array, ASR::expr_t* dim, ASR::expr_t* result, SymbolTable* fn_scope, Vec& fn_body) { - ASR::expr_t* logical_false = ASRUtils::EXPR(ASR::make_LogicalConstant_t( - al, loc, false, ASRUtils::TYPE(ASR::make_Logical_t( - al, loc, 4, nullptr, 0)))); - ASR::stmt_t* result_init = ASRUtils::STMT(ASR::make_Assignment_t(al, loc, - result, logical_false, nullptr)); - fn_body.push_back(al, result_init); - - int n_dims = ASRUtils::extract_n_dims_from_ttype(ASRUtils::expr_type(array)); - ASR::stmt_t** else_ = nullptr; - size_t else_n = 0; - Vec idx_vars; - idx_vars.reserve(al, n_dims); - PassUtils::create_idx_vars(idx_vars, n_dims, loc, al, fn_scope, "_j"); - for( int i = 1; i <= n_dims; i++ ) { - ASR::expr_t* current_dim = ASRUtils::EXPR(ASR::make_IntegerConstant_t( - al, loc, i, ASRUtils::expr_type(dim))); - ASR::expr_t* test_expr = ASRUtils::EXPR(ASR::make_IntegerCompare_t( - al, loc, dim, ASR::cmpopType::Eq, - current_dim, ASRUtils::TYPE(ASR::make_Logical_t( - al, loc, 4, nullptr, 0)), nullptr)); - - Vec target_idx_vars, loop_vars; - std::vector loop_dims; - loop_dims.reserve(n_dims); - loop_vars.reserve(al, n_dims); - target_idx_vars.reserve(al, n_dims - 1); - for( int j = 1; j <= n_dims; j++ ) { - if( j == i ) { - continue ; - } - target_idx_vars.push_back(al, idx_vars[j - 1]); - loop_dims.push_back(j); - loop_vars.push_back(al, idx_vars[j - 1]); - } - loop_dims.push_back(i); - loop_vars.push_back(al, idx_vars[i - 1]); - - Vec doloop_body; - ASR::stmt_t* doloop = ControlFlowConstructorAPI::create_do_loop(al, loc, - array, result, loop_vars, loop_dims, doloop_body, - [=, &al, &idx_vars, &target_idx_vars, &doloop_body] () { - ASR::expr_t* result_ref = PassUtils::create_array_ref(result, target_idx_vars, al); - ASR::expr_t* array_ref = PassUtils::create_array_ref(array, idx_vars, al); - ASR::expr_t* logical_or = ASRUtils::EXPR(ASR::make_LogicalBinOp_t(al, loc, - result_ref, ASR::Or, array_ref, - ASRUtils::TYPE(ASR::make_Logical_t( al, loc, 4, - nullptr, 0)), nullptr)); - ASR::stmt_t* loop_invariant = ASRUtils::STMT(ASR::make_Assignment_t(al, loc, - result_ref, logical_or, nullptr)); - doloop_body.push_back(al, loop_invariant); + ASRBuilder builder(al, loc); + Vec idx_vars, target_idx_vars; + Vec doloop_body; + builder.generate_reduction_intrinsic_stmts_for_array_output( + loc, array, dim, fn_scope, fn_body, + idx_vars, target_idx_vars, doloop_body, + [=, &al, &fn_body] { + ASR::expr_t* logical_false = bool32(false); + ASR::stmt_t* result_init = Assignment(result, logical_false); + fn_body.push_back(al, result_init); + }, + [=, &al, &idx_vars, &target_idx_vars, &doloop_body, &result, &builder] () { + ASR::expr_t* result_ref = PassUtils::create_array_ref(result, target_idx_vars, al); + ASR::expr_t* array_ref = PassUtils::create_array_ref(array, idx_vars, al); + ASR::expr_t* logical_or = builder.ElementalOr(result_ref, array_ref, loc); + ASR::stmt_t* loop_invariant = Assignment(result_ref, logical_or); + doloop_body.push_back(al, loop_invariant); }); - Vec if_body; - if_body.reserve(al, 1); - if_body.push_back(al, doloop); - ASR::stmt_t* if_ = ASRUtils::STMT(ASR::make_If_t(al, loc, test_expr, - if_body.p, if_body.size(), else_, else_n)); - Vec if_else_if; - if_else_if.reserve(al, 1); - if_else_if.push_back(al, if_); - else_ = if_else_if.p; - else_n = if_else_if.size(); - } - fn_body.push_back(al, else_[0]); } static inline ASR::expr_t* instantiate_Any(Allocator &al, const Location &loc, @@ -757,6 +987,7 @@ static inline ASR::expr_t* instantiate_Any(Allocator &al, const Location &loc, std::string new_name = "any_" + std::to_string(kind) + "_" + std::to_string(rank) + "_" + std::to_string(overload_id); + declare_basic_variables(new_name); // Check if Function is already defined. { std::string new_func_name = new_name; @@ -774,37 +1005,25 @@ static inline ASR::expr_t* instantiate_Any(Allocator &al, const Location &loc, } else { return_type = ASRUtils::expr_type(f->m_args[(int) f->n_args - 1]); } - return ASRUtils::EXPR(ASR::make_FunctionCall_t(al, loc, s, - s, new_args.p, new_args.size(), return_type, compile_time_value, - nullptr)); + return b.Call(s, new_args, return_type, compile_time_value); } else { new_func_name += std::to_string(i); i++; } } } - - new_name = scope->get_unique_name(new_name); - SymbolTable *fn_symtab = al.make_new(scope); - ASR::ttype_t* logical_return_type = ASRUtils::TYPE(ASR::make_Logical_t( al, loc, 4, nullptr, 0)); - Vec args; int result_dims = 0; { - args.reserve(al, 1); ASR::ttype_t* mask_type = ASRUtils::duplicate_type_with_empty_dims(al, arg_type); - create_variable(mask_arg, "mask", ASR::intentType::In, ASR::abiType::Source, - false, fn_symtab, mask_type); - args.push_back(al, mask_arg); + fill_func_arg("mask", mask_type); if( overload_id == 1 ) { ASR::ttype_t* dim_type = ASRUtils::expr_type(new_args[1].m_value); LCOMPILERS_ASSERT(ASR::is_a(*dim_type)); int kind = ASRUtils::extract_kind_from_ttype_t(dim_type); LCOMPILERS_ASSERT(kind == 4); - create_variable(dim_arg, "dim", ASR::intentType::In, ASR::abiType::Source, - false, fn_symtab, dim_type); - args.push_back(al, dim_arg); + fill_func_arg("dim", dim_type); Vec dims; size_t n_dims = ASRUtils::extract_n_dims_from_ttype(arg_type); @@ -820,8 +1039,7 @@ static inline ASR::expr_t* instantiate_Any(Allocator &al, const Location &loc, logical_return_type = ASRUtils::TYPE(ASR::make_Logical_t( al, loc, 4, dims.p, dims.size())); if( result_dims > 0 ) { - create_variable(result_arg, "result", ASR::intentType::Out, ASR::abiType::Source, - false, fn_symtab, logical_return_type); + auto result_arg = declare("result", logical_return_type, Out); args.push_back(al, result_arg); } } @@ -829,13 +1047,10 @@ static inline ASR::expr_t* instantiate_Any(Allocator &al, const Location &loc, ASR::expr_t* return_var = nullptr; if( result_dims == 0 ) { - create_variable(return_var_, new_name, ASRUtils::intent_return_var, - ASR::abiType::Source, false, fn_symtab, logical_return_type); + auto return_var_ = declare(new_name, logical_return_type, ReturnVar); return_var = return_var_; } - Vec body; - body.reserve(al, 1); if( overload_id == 0 || return_var ) { generate_body_for_scalar_output(al, loc, args[0], return_var, fn_symtab, body); } else if( overload_id == 1 ) { @@ -843,28 +1058,124 @@ static inline ASR::expr_t* instantiate_Any(Allocator &al, const Location &loc, } else { LCOMPILERS_ASSERT(false); } - - Vec dep; - dep.reserve(al, 1); // TODO: fill dependencies ASR::symbol_t *new_symbol = nullptr; if( return_var ) { - new_symbol = make_Function_t(new_name, fn_symtab, dep, args, + new_symbol = make_Function_t(fn_name, fn_symtab, dep, args, body, return_var, Source, Implementation, nullptr); } else { new_symbol = make_Function_Without_ReturnVar_t( - new_name, fn_symtab, dep, args, + fn_name, fn_symtab, dep, args, body, Source, Implementation, nullptr); } - scope->add_symbol(new_name, new_symbol); - return ASRUtils::EXPR(ASR::make_FunctionCall_t(al, loc, new_symbol, - new_symbol, new_args.p, new_args.size(), logical_return_type, - compile_time_value, nullptr)); + scope->add_symbol(fn_name, new_symbol); + return b.Call(new_symbol, new_args, logical_return_type, compile_time_value); } } // namespace Any +namespace Partition { + + static inline ASR::expr_t* eval_Partition(Allocator &al, const Location &loc, + std::string &s_var, std::string &sep) { + /* + using KMP algorithm to find separator inside string + res_tuple: stores the resulting 3-tuple expression ---> + (if separator exist) tuple: (left of separator, separator, right of separator) + (if separator does not exist) tuple: (string, "", "") + res_tuple_type: stores the type of each expression present in resulting 3-tuple + */ + ASRBuilder b(al, loc); + int sep_pos = ASRUtils::KMP_string_match(s_var, sep); + std::string first_res, second_res, third_res; + if(sep_pos == -1) { + /* seperator does not exist */ + first_res = s_var; + second_res = ""; + third_res = ""; + } else { + first_res = s_var.substr(0, sep_pos); + second_res = sep; + third_res = s_var.substr(sep_pos + sep.size()); + } + + Vec res_tuple; res_tuple.reserve(al, 3); + ASR::ttype_t *first_res_type = character(first_res.size()); + ASR::ttype_t *second_res_type = character(second_res.size()); + ASR::ttype_t *third_res_type = character(third_res.size()); + return b.TupleConstant({ StringConstant(first_res, first_res_type), + StringConstant(second_res, second_res_type), + StringConstant(third_res, third_res_type) }, + b.Tuple({first_res_type, second_res_type, third_res_type})); + } + + static inline ASR::asr_t *create_partition(Allocator &al, const Location &loc, + Vec &args, ASR::expr_t *s_var, + const std::function err) { + ASRBuilder b(al, loc); + if (args.size() != 1) { + err("str.partition() takes exactly one argument", loc); + } + ASR::expr_t *arg = args[0]; + if (!ASRUtils::is_character(*expr_type(arg))) { + err("str.partition() takes one arguments of type: str", arg->base.loc); + } + + Vec e_args; e_args.reserve(al, 2); + e_args.push_back(al, s_var); + e_args.push_back(al, arg); + + ASR::ttype_t *return_type = b.Tuple({character(-2), character(-2), character(-2)}); + ASR::expr_t *value = nullptr; + if (ASR::is_a(*s_var) + && ASR::is_a(*arg)) { + std::string s_sep = ASR::down_cast(arg)->m_s; + std::string s_str = ASR::down_cast(s_var)->m_s; + if (s_sep.size() == 0) { + err("Separator cannot be an empty string", arg->base.loc); + } + value = eval_Partition(al, loc, s_str, s_sep); + } + + return ASR::make_IntrinsicFunction_t(al, loc, + static_cast(ASRUtils::IntrinsicFunctions::Partition), + e_args.p, e_args.n, 0, return_type, value); + } + + static inline ASR::expr_t *instantiate_Partition(Allocator &al, + const Location &loc, SymbolTable *scope, + Vec& /*arg_types*/, Vec& new_args, + int64_t /*overload_id*/, ASR::expr_t* compile_time_value) + { + // TODO: show runtime error for empty separator or pattern + declare_basic_variables("_lpython_str_partition"); + fill_func_arg("target_string", character(-2)); + fill_func_arg("pattern", character(-2)); + + ASR::ttype_t *return_type = b.Tuple({character(-2), character(-2), character(-2)}); + auto result = declare("result", return_type, ReturnVar); + auto index = declare("index", int32, Local); + body.push_back(al, Assignment(index, b.Call(UnaryIntrinsicFunction:: + create_KMP_function(al, loc, scope), args, int32))); + body.push_back(al, b.If(iEq(index, i32_n(-1)), { + Assignment(result, b.TupleConstant({ args[0], + StringConstant("", character(0)), + StringConstant("", character(0)) }, + b.Tuple({character(-2), character(0), character(0)}))) + }, { + Assignment(result, b.TupleConstant({ + StringSection(args[0], i32(0), index), args[1], + StringSection(args[0], iAdd(index, StringLen(args[1])), + StringLen(args[0]))}, return_type)) + })); + body.push_back(al, Return()); + ASR::symbol_t *fn_sym = make_Function_t(fn_name, fn_symtab, dep, args, + body, result, Source, Implementation, nullptr); + scope->add_symbol(fn_name, fn_sym); + return b.Call(fn_sym, new_args, return_type, compile_time_value); + } +} // namespace Partition namespace IntrinsicFunctionRegistry { @@ -893,7 +1204,9 @@ namespace IntrinsicFunctionRegistry { {static_cast(ASRUtils::IntrinsicFunctions::Abs), &Abs::instantiate_Abs}, {static_cast(ASRUtils::IntrinsicFunctions::Any), - &Any::instantiate_Any} + &Any::instantiate_Any}, + {static_cast(ASRUtils::IntrinsicFunctions::Partition), + &Partition::instantiate_Partition} }; static const std::map& intrinsic_function_id_to_name = { @@ -1019,6 +1332,7 @@ inline std::string get_intrinsic_name(int x) { INTRINSIC_NAME_CASE(Abs) INTRINSIC_NAME_CASE(Any) INTRINSIC_NAME_CASE(ListIndex) + INTRINSIC_NAME_CASE(Partition) default : { throw LCompilersException("pickle: intrinsic_id not implemented"); } diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index 03b1bf449f..584ab5d931 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -862,14 +862,6 @@ class CommonVisitor : public AST::BaseVisitor { return true; } - void visit_expr_list(Vec& exprs, size_t n, - Vec& exprs_vec) { - LCOMPILERS_ASSERT(exprs_vec.reserve_called); - for( size_t i = 0; i < n; i++ ) { - exprs_vec.push_back(al, exprs[i].m_value); - } - } - void visit_expr_list_with_cast(ASR::expr_t** m_args, size_t n_args, Vec& call_args_vec, Vec& args, @@ -1187,7 +1179,7 @@ class CommonVisitor : public AST::BaseVisitor { } else if( ASR::is_a(*s) ) { Vec args_new; args_new.reserve(al, args.size()); - visit_expr_list(args, args.size(), args_new); + ASRUtils::visit_expr_list(al, args, args_new); ASR::EnumType_t* enumtype = ASR::down_cast(s); for( size_t i = 0; i < std::min(args.size(), enumtype->n_members); i++ ) { std::string member_name = enumtype->m_members[i]; @@ -6060,7 +6052,6 @@ class BodyVisitor : public CommonVisitor { fn_args.push_back(al, str); fn_args.push_back(al, suffix); } else if (attr_name == "partition") { - /* str.partition(seperator) ----> @@ -6069,31 +6060,12 @@ class BodyVisitor : public CommonVisitor { If the separator is not found, return a 3-tuple containing the string itself, followed by two empty strings. */ - - if(args.size() != 1) { - throw SemanticError("str.partition() takes one argument", - loc); - } - - ASR::expr_t *arg_seperator = args[0].m_value; - ASR::ttype_t *arg_seperator_type = ASRUtils::expr_type(arg_seperator); - if (!ASRUtils::is_character(*arg_seperator_type)) { - throw SemanticError("str.partition() takes one argument of type: str", - loc); - } - - fn_call_name = "_lpython_str_partition"; - - ASR::call_arg_t str; - str.loc = loc; - str.m_value = s_var; - ASR::call_arg_t seperator; - seperator.loc = loc; - seperator.m_value = args[0].m_value; - - fn_args.push_back(al, str); - fn_args.push_back(al, seperator); - + Vec args_; args_.reserve(al, args.n); + ASRUtils::visit_expr_list(al, args, args_); + tmp = ASRUtils::Partition::create_partition(al, loc, args_, s_var, + [&](const std::string &msg, const Location &loc) { + throw SemanticError(msg, loc); }); + return; } else if(attr_name.size() > 2 && attr_name[0] == 'i' && attr_name[1] == 's') { /* String Validation Methods i.e all "is" based functions are handled here @@ -6120,115 +6092,6 @@ class BodyVisitor : public CommonVisitor { tmp = make_call_helper(al, fn_call, current_scope, fn_args, fn_call_name, loc); } - int KMP_string_match(std::string &s_var, std::string &sub) { - int str_len = s_var.size(); - int sub_len = sub.size(); - bool flag = 0; - int res = -1; - std::vector lps(sub_len, 0); - if (str_len == 0 || sub_len == 0) { - res = (!sub_len || (sub_len == str_len))? 0: -1; - } else { - for(int i = 1, len = 0; i < sub_len;) { - if (sub[i] == sub[len]) { - lps[i++] = ++len; - } else { - if (len != 0) { - len = lps[len - 1]; - } else { - lps[i++] = 0; - } - } - } - for (int i = 0, j = 0; (str_len - i) >= (sub_len - j) && !flag;) { - if (sub[j] == s_var[i]) { - j++, i++; - } - if (j == sub_len) { - res = i - j; - flag = 1; - j = lps[j - 1]; - } else if (i < str_len && sub[j] != s_var[i]) { - if (j != 0) { - j = lps[j - 1]; - } else { - i = i + 1; - } - } - } - } - return res; - } - - ASR::expr_t* eval_partition(std::string &s_var, ASR::expr_t* arg_seperator, - const Location &loc, ASR::ttype_t *arg_seperator_type) { - /* - Invoked when Seperator argument is provided as a constant string - */ - ASR::StringConstant_t* seperator_constant = ASR::down_cast(arg_seperator); - std::string seperator = seperator_constant->m_s; - if(seperator.size() == 0) { - throw SemanticError("empty separator", arg_seperator->base.loc); - } - /* - using KMP algorithm to find seperator inside string - res_tuple: stores the resulting 3-tuple expression ---> - (if seperator exist) tuple: (left of seperator, seperator, right of seperator) - (if seperator does not exist) tuple: (string, "", "") - res_tuple_type: stores the type of each expression present in resulting 3-tuple - */ - int seperator_pos = KMP_string_match(s_var, seperator); - Vec res_tuple; - Vec res_tuple_type; - res_tuple.reserve(al, 3); - res_tuple_type.reserve(al, 3); - std :: string first_res, second_res, third_res; - if(seperator_pos == -1) { - /* seperator does not exist */ - first_res = s_var; - second_res = ""; - third_res = ""; - } else { - first_res = s_var.substr(0, seperator_pos); - second_res = seperator; - third_res = s_var.substr(seperator_pos + seperator.size()); - } - - res_tuple.push_back(al, ASRUtils::EXPR(ASR::make_StringConstant_t(al, loc, s2c(al, first_res), arg_seperator_type))); - res_tuple.push_back(al, ASRUtils::EXPR(ASR::make_StringConstant_t(al, loc, s2c(al, second_res), arg_seperator_type))); - res_tuple.push_back(al, ASRUtils::EXPR(ASR::make_StringConstant_t(al, loc, s2c(al, third_res), arg_seperator_type))); - res_tuple_type.push_back(al, arg_seperator_type); - res_tuple_type.push_back(al,arg_seperator_type); - res_tuple_type.push_back(al,arg_seperator_type); - ASR::ttype_t *tuple_type = ASRUtils::TYPE(ASR::make_Tuple_t(al, loc, res_tuple_type.p, res_tuple_type.n)); - ASR::expr_t* value = ASRUtils::EXPR(ASR::make_TupleConstant_t(al, loc, res_tuple.p, res_tuple.size(), tuple_type)); - return value; - } - - void create_partition(const Location &loc, std::string &s_var, ASR::expr_t *arg_seperator, - ASR::ttype_t *arg_seperator_type) { - - ASR::expr_t *value = nullptr; - if(ASRUtils::expr_value(arg_seperator)) { - value = eval_partition(s_var, arg_seperator, loc, arg_seperator_type); - } - ASR::symbol_t *fn_div = resolve_intrinsic_function(loc, "_lpython_str_partition"); - Vec args; - args.reserve(al, 1); - ASR::call_arg_t str_arg; - str_arg.loc = loc; - ASR::ttype_t *str_type = ASRUtils::TYPE(ASR::make_Character_t(al, loc, 1, s_var.size(), nullptr, nullptr, 0)); - str_arg.m_value = ASRUtils::EXPR(ASR::make_StringConstant_t(al, loc, s2c(al, s_var), str_type)); - ASR::call_arg_t sub_arg; - sub_arg.loc = loc; - sub_arg.m_value = arg_seperator; - args.push_back(al, str_arg); - args.push_back(al, sub_arg); - tmp = make_call_helper(al, fn_div, current_scope, args, "_lpython_str_partition", loc); - ASR::down_cast2(tmp)->m_value = value; - return; - } - void handle_constant_string_attributes(std::string &s_var, Vec &args, std::string attr_name, const Location &loc) { if (attr_name == "capitalize") { @@ -6278,7 +6141,7 @@ class BodyVisitor : public CommonVisitor { if (ASRUtils::expr_value(arg) != nullptr) { ASR::StringConstant_t* sub_str_con = ASR::down_cast(arg); std::string sub = sub_str_con->m_s; - int res = KMP_string_match(s_var, sub); + int res = ASRUtils::KMP_string_match(s_var, sub); tmp = ASR::make_IntegerConstant_t(al, loc, res, ASRUtils::TYPE(ASR::make_Integer_t(al,loc, 4, nullptr, 0))); } else { @@ -6451,20 +6314,19 @@ class BodyVisitor : public CommonVisitor { If the separator is not found, return a 3-tuple containing the string itself, followed by two empty strings. */ - if (args.size() != 1) { - throw SemanticError("str.partition() takes one arguments", - loc); - } - ASR::expr_t *arg_seperator = args[0].m_value; - ASR::ttype_t *arg_seperator_type = ASRUtils::expr_type(arg_seperator); - if (!ASRUtils::is_character(*arg_seperator_type)) { - throw SemanticError("str.partition() takes one arguments of type: str", - arg_seperator->base.loc); - } + Vec args_; args_.reserve(al, args.n); + ASRUtils::visit_expr_list(al, args, args_); if(s_var.size() == 0) { - throw SemanticError("string to undergo partition cannot be empty",loc); + throw SemanticError("String to undergo partition cannot be empty", + loc); } - create_partition(loc, s_var, arg_seperator, arg_seperator_type); + ASR::ttype_t *char_type = ASRUtils::TYPE(ASR::make_Character_t(al, + loc, 1, s_var.size(), nullptr, nullptr, 0)); + ASR::expr_t *str = ASRUtils::EXPR(ASR::make_StringConstant_t(al, + loc, s2c(al, s_var), char_type)); + tmp = ASRUtils::Partition::create_partition(al, loc, args_, str, + [&](const std::string &msg, const Location &loc) { + throw SemanticError(msg, loc); }); return; } else if (attr_name.size() > 2 && attr_name[0] == 'i' && attr_name[1] == 's') { /* From 51ad8b49c4be4b0fa3aed486620e9772bf0d66fd Mon Sep 17 00:00:00 2001 From: Sarthak Gupta <62467938+gptsarthak@users.noreply.github.com> Date: Wed, 3 May 2023 23:58:21 +0530 Subject: [PATCH 07/72] Improve performance of ``exp()`` and ``exp2()`` (#1712) --- src/libasr/codegen/asr_to_c_cpp.h | 4 ++ src/libasr/codegen/asr_to_julia.cpp | 3 + src/libasr/codegen/asr_to_llvm.cpp | 62 +++++++++++++++++++ src/libasr/pass/intrinsic_function_registry.h | 53 +++++++++++++++- src/lpython/semantics/python_ast_to_asr.cpp | 17 ++++- src/lpython/semantics/python_comptime_eval.h | 5 +- src/runtime/math.py | 16 ----- 7 files changed, 139 insertions(+), 21 deletions(-) diff --git a/src/libasr/codegen/asr_to_c_cpp.h b/src/libasr/codegen/asr_to_c_cpp.h index 31f22513c3..a908d43dd7 100644 --- a/src/libasr/codegen/asr_to_c_cpp.h +++ b/src/libasr/codegen/asr_to_c_cpp.h @@ -2181,12 +2181,16 @@ R"(#include SET_INTRINSIC_NAME(Cosh, "cosh"); SET_INTRINSIC_NAME(Tanh, "tanh"); SET_INTRINSIC_NAME(Abs, "abs"); + SET_INTRINSIC_NAME(Exp, "exp"); + SET_INTRINSIC_NAME(Exp2, "exp2"); + SET_INTRINSIC_NAME(Expm1, "expm1"); default : { throw LCompilersException("IntrinsicFunction: `" + ASRUtils::get_intrinsic_name(x.m_intrinsic_id) + "` is not implemented"); } } + headers.insert("math.h"); this->visit_expr(*x.m_args[0]); out += "(" + src + ")"; src = out; diff --git a/src/libasr/codegen/asr_to_julia.cpp b/src/libasr/codegen/asr_to_julia.cpp index f71cc8d61b..94b58f70a7 100644 --- a/src/libasr/codegen/asr_to_julia.cpp +++ b/src/libasr/codegen/asr_to_julia.cpp @@ -1896,6 +1896,9 @@ class ASRToJuliaVisitor : public ASR::BaseVisitor SET_INTRINSIC_NAME(Cosh, "cosh"); SET_INTRINSIC_NAME(Tanh, "tanh"); SET_INTRINSIC_NAME(Abs, "abs"); + SET_INTRINSIC_NAME(Exp, "exp"); + SET_INTRINSIC_NAME(Exp2, "exp2"); + SET_INTRINSIC_NAME(Expm1, "expm1"); default : { throw LCompilersException("IntrinsicFunction: `" + ASRUtils::get_intrinsic_name(x.m_intrinsic_id) diff --git a/src/libasr/codegen/asr_to_llvm.cpp b/src/libasr/codegen/asr_to_llvm.cpp index b5c43e5e6a..5ee8494b6e 100644 --- a/src/libasr/codegen/asr_to_llvm.cpp +++ b/src/libasr/codegen/asr_to_llvm.cpp @@ -1929,6 +1929,26 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor tmp = list_api->index(plist, item, asr_el_type, *module); } + void generate_Exp(ASR::expr_t* m_arg) { + this->visit_expr_wrapper(m_arg, true); + llvm::Value *item = tmp; + tmp = builder->CreateUnaryIntrinsic(llvm::Intrinsic::exp, item); + } + + void generate_Exp2(ASR::expr_t* m_arg) { + this->visit_expr_wrapper(m_arg, true); + llvm::Value *item = tmp; + tmp = builder->CreateUnaryIntrinsic(llvm::Intrinsic::exp2, item); + } + + void generate_Expm1(ASR::expr_t* m_arg) { + this->visit_expr_wrapper(m_arg, true); + llvm::Value *item = tmp; + llvm::Value* exp = builder->CreateUnaryIntrinsic(llvm::Intrinsic::exp, item); + llvm::Value* one = llvm::ConstantFP::get(builder->getFloatTy(), 1.0); + tmp = builder->CreateFSub(exp, one); + } + void visit_IntrinsicFunction(const ASR::IntrinsicFunction_t& x) { switch (static_cast(x.m_intrinsic_id)) { case ASRUtils::IntrinsicFunctions::ListIndex: { @@ -1946,6 +1966,48 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor } break ; } + case ASRUtils::IntrinsicFunctions::Exp: { + switch (x.m_overload_id) { + case 0: { + ASR::expr_t* m_arg = x.m_args[0]; + generate_Exp(m_arg); + break ; + } + default: { + throw CodeGenError("exp() only accepts one argument", + x.base.base.loc); + } + } + break ; + } + case ASRUtils::IntrinsicFunctions::Exp2: { + switch (x.m_overload_id) { + case 0: { + ASR::expr_t* m_arg = x.m_args[0]; + generate_Exp2(m_arg); + break ; + } + default: { + throw CodeGenError("exp2() only accepts one argument", + x.base.base.loc); + } + } + break ; + } + case ASRUtils::IntrinsicFunctions::Expm1: { + switch (x.m_overload_id) { + case 0: { + ASR::expr_t* m_arg = x.m_args[0]; + generate_Expm1(m_arg); + break ; + } + default: { + throw CodeGenError("expm1() only accepts one argument", + x.base.base.loc); + } + } + break ; + } default: { throw CodeGenError( ASRUtils::IntrinsicFunctionRegistry:: get_intrinsic_function_name(x.m_intrinsic_id) + diff --git a/src/libasr/pass/intrinsic_function_registry.h b/src/libasr/pass/intrinsic_function_registry.h index 0cd957c0e4..f8ae6e3844 100644 --- a/src/libasr/pass/intrinsic_function_registry.h +++ b/src/libasr/pass/intrinsic_function_registry.h @@ -51,6 +51,9 @@ enum class IntrinsicFunctions : int64_t { Gamma, LogGamma, Abs, + Exp, + Exp2, + Expm1, Any, ListIndex, Partition, @@ -821,6 +824,39 @@ namespace Abs { } // namespace Abs +#define create_exp_macro(X, stdeval) \ +namespace X { \ + static inline ASR::expr_t* eval_##X(Allocator &al, const Location &loc, \ + Vec &args) { \ + LCOMPILERS_ASSERT(ASRUtils::all_args_evaluated(args)); \ + double rv; \ + ASR::ttype_t* t = ASRUtils::expr_type(args[0]); \ + if( ASRUtils::extract_value(args[0], rv) ) { \ + double val = std::stdeval(rv); \ + return ASRUtils::EXPR(ASR::make_RealConstant_t(al, loc, val, t)); \ + } \ + return nullptr; \ + } \ + static inline ASR::asr_t* create_##X(Allocator& al, const Location& loc, \ + Vec& args, \ + const std::function err) { \ + if (args.size() != 1) { \ + err("Intrinsic function `"#X"` accepts exactly 1 argument", loc); \ + } \ + ASR::ttype_t *type = ASRUtils::expr_type(args[0]); \ + if (!ASRUtils::is_real(*type)) { \ + err("Argument of the `"#X"` function must be Real", \ + args[0]->base.loc); \ + } \ + return UnaryIntrinsicFunction::create_UnaryFunction(al, loc, args, eval_##X, \ + static_cast(ASRUtils::IntrinsicFunctions::X), 0, type); \ + } \ +} // namespace X + +create_exp_macro(Exp, exp) +create_exp_macro(Exp2, exp2) +create_exp_macro(Expm1, expm1) + namespace ListIndex { static inline ASR::expr_t *eval_list_index(Allocator &/*al*/, @@ -1233,6 +1269,12 @@ namespace IntrinsicFunctionRegistry { "tanh"}, {static_cast(ASRUtils::IntrinsicFunctions::Abs), "abs"}, + {static_cast(ASRUtils::IntrinsicFunctions::Exp), + "exp"}, + {static_cast(ASRUtils::IntrinsicFunctions::Exp2), + "exp2"}, + {static_cast(ASRUtils::IntrinsicFunctions::Expm1), + "expm1"}, {static_cast(ASRUtils::IntrinsicFunctions::ListIndex), "list.index"} }; @@ -1251,6 +1293,9 @@ namespace IntrinsicFunctionRegistry { {"cosh", {&Cosh::create_Cosh, &Cosh::eval_Cosh}}, {"tanh", {&Tanh::create_Tanh, &Tanh::eval_Tanh}}, {"abs", {&Abs::create_Abs, &Abs::eval_Abs}}, + {"exp", {&Exp::create_Exp, &Exp::eval_Exp}}, + {"exp2", {&Exp2::create_Exp2, &Exp2::eval_Exp2}}, + {"expm1", {&Expm1::create_Expm1, &Expm1::eval_Expm1}}, {"any", {&Any::create_Any, &Any::eval_Any}}, {"list.index", {&ListIndex::create_ListIndex, &ListIndex::eval_list_index}}, }; @@ -1269,7 +1314,10 @@ namespace IntrinsicFunctionRegistry { id_ == ASRUtils::IntrinsicFunctions::Cos || id_ == ASRUtils::IntrinsicFunctions::Gamma || id_ == ASRUtils::IntrinsicFunctions::LogGamma || - id_ == ASRUtils::IntrinsicFunctions::Sin ); + id_ == ASRUtils::IntrinsicFunctions::Sin || + id_ == ASRUtils::IntrinsicFunctions::Exp || + id_ == ASRUtils::IntrinsicFunctions::Exp2 || + id_ == ASRUtils::IntrinsicFunctions::Expm1 ); } /* @@ -1330,6 +1378,9 @@ inline std::string get_intrinsic_name(int x) { INTRINSIC_NAME_CASE(Gamma) INTRINSIC_NAME_CASE(LogGamma) INTRINSIC_NAME_CASE(Abs) + INTRINSIC_NAME_CASE(Exp) + INTRINSIC_NAME_CASE(Exp2) + INTRINSIC_NAME_CASE(Expm1) INTRINSIC_NAME_CASE(Any) INTRINSIC_NAME_CASE(ListIndex) INTRINSIC_NAME_CASE(Partition) diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index 584ab5d931..e86d156ad2 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -4018,6 +4018,8 @@ class BodyVisitor : public CommonVisitor { std::map> goto_name2id; int64_t gotoids; std::vector do_loop_variables; + // Stores the name of imported functions and the modules they are imported from + std::map imported_functions; BodyVisitor(Allocator &al, LocationManager &lm, ASR::asr_t *unit, diag::Diagnostics &diagnostics, @@ -4256,6 +4258,9 @@ class BodyVisitor : public CommonVisitor { // Here, we call the global_initializer & global_statements to // initialize and execute the global symbols std::string mod_name = x.m_module; + for (size_t i = 0; i < x.n_names; i++) { + imported_functions[x.m_names[i].m_name] = mod_name; + } ASR::symbol_t *mod_sym = current_scope->resolve_symbol(mod_name); if (mod_sym) { ASR::Module_t *mod = ASR::down_cast(mod_sym); @@ -6567,14 +6572,20 @@ class BodyVisitor : public CommonVisitor { if (!s) { std::set not_cpython_builtin = { - "sin", "cos", "gamma", "tan", "asin", "acos", "atan", "sinh", "cosh", "tanh" + "sin", "cos", "gamma", "tan", "asin", "acos", "atan", "sinh", "cosh", "tanh", "exp", "exp2", "expm1" }; - if (ASRUtils::IntrinsicFunctionRegistry::is_intrinsic_function(call_name) - && not_cpython_builtin.find(call_name) == not_cpython_builtin.end()) { + if (ASRUtils::IntrinsicFunctionRegistry::is_intrinsic_function(call_name) && + (not_cpython_builtin.find(call_name) == not_cpython_builtin.end() || + imported_functions.find(call_name) != imported_functions.end() )) { ASRUtils::create_intrinsic_function create_func = ASRUtils::IntrinsicFunctionRegistry::get_create_function(call_name); Vec args_; args_.reserve(al, x.n_args); visit_expr_list(x.m_args, x.n_args, args_); + if (ASRUtils::is_array(ASRUtils::expr_type(args_[0])) && + imported_functions[call_name] == "math" ) { + throw SemanticError("Function '" + call_name + "' does not accept vector values", + x.base.base.loc); + } tmp = create_func(al, x.base.base.loc, args_, [&](const std::string &msg, const Location &loc) { throw SemanticError(msg, loc); }); diff --git a/src/lpython/semantics/python_comptime_eval.h b/src/lpython/semantics/python_comptime_eval.h index 7494d17499..21aa0794de 100644 --- a/src/lpython/semantics/python_comptime_eval.h +++ b/src/lpython/semantics/python_comptime_eval.h @@ -25,7 +25,10 @@ struct ProceduresDatabase { "float32", "float64", "reshape", "array", "int16", "complex64", "complex128", - "int8"}}, + "int8", "exp", "exp2"}}, + {"math", {"sin", "cos", "tan", + "asin", "acos", "atan", + "exp", "exp2", "expm1"}}, {"enum", {"Enum"}} }; } diff --git a/src/runtime/math.py b/src/runtime/math.py index 587c727a02..86af575ed1 100644 --- a/src/runtime/math.py +++ b/src/runtime/math.py @@ -459,18 +459,6 @@ def ldexp(x: f64, i: i32) -> f64: return result -def exp(x: f64) -> f64: - """ - Return `e` raised to the power `x`. - """ - return e**x - -def exp2(x: f64) -> f64: - """ - Return `2` raised to the power `x`. - """ - return f64((2.0)**x) - def mod(a: i32, b: i32) -> i32: """ @@ -694,10 +682,6 @@ def atanh(x: f64) -> f64: return _lfortran_datanh(x) -def expm1(x: f64) -> f64: - return exp(x) - 1.0 - - def log1p(x: f64) -> f64: return log(1.0 + x) From 2bea899e3295600b0aa1783d87936235c5bc790b Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Fri, 5 May 2023 02:50:15 +0530 Subject: [PATCH 08/72] lpython: Support auto conversion --- src/runtime/lpython/lpython.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/runtime/lpython/lpython.py b/src/runtime/lpython/lpython.py index b9438db218..1456b4b4b5 100644 --- a/src/runtime/lpython/lpython.py +++ b/src/runtime/lpython/lpython.py @@ -13,15 +13,31 @@ # data-types +type_to_convert_func = { + "i8": int, + "i16": int, + "i32": int, + "i64": int, + "f32": float, + "f64": float, + "c32": complex, + "c64": complex, + "c_ptr": lambda x: x, + "Const": lambda x: x, + "Callable": lambda x: x, + "Pointer": lambda x: x, +} + class Type: def __init__(self, name): self._name = name + self._convert = type_to_convert_func[name] def __getitem__(self, params): return Array(self, params) def __call__(self, arg): - return arg + return self._convert(arg) def dataclass(arg): return py_dataclass(arg) From 4c28bc9c4de880706da61baef913983055aa6df5 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Fri, 5 May 2023 02:50:49 +0530 Subject: [PATCH 09/72] TEST: Update tests to use just i32() --- integration_tests/elemental_03.py | 4 ++-- integration_tests/elemental_04.py | 2 +- integration_tests/global_syms_04.py | 4 ++-- integration_tests/lpdraw/draw.py | 2 +- integration_tests/test_numpy_03.py | 4 ++-- integration_tests/test_pkg_lnn_01.py | 8 ++++---- integration_tests/test_pkg_lnn_02.py | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/integration_tests/elemental_03.py b/integration_tests/elemental_03.py index 99431b1537..240b1d4289 100644 --- a/integration_tests/elemental_03.py +++ b/integration_tests/elemental_03.py @@ -20,7 +20,7 @@ def elemental_sqrt64(): shape[0] = 4096 observed = reshape(sqrt(array), shape) for l in range(4096): - i = i32(int(l/256)) + i = i32(l/256) j = (l - i*256)//16 k = (l - i*256 - j*16) assert abs(observed[l]**2.0 - f64(i + j + k)) <= eps @@ -42,7 +42,7 @@ def elemental_sqrt32(): shape[0] = 256 observed = reshape(sqrt(array), shape) for l in range(256): - i = i32(int(l/16)) + i = i32(l/16) j = (l - i*16) assert abs(observed[l]**f32(2.0) - f32(i + j)) <= eps diff --git a/integration_tests/elemental_04.py b/integration_tests/elemental_04.py index fd86a5846c..6f2055c69e 100644 --- a/integration_tests/elemental_04.py +++ b/integration_tests/elemental_04.py @@ -23,7 +23,7 @@ def verify(observed: f32[:], base: i32, eps: f32): j: i32 for k in range(100): - i = i32(int(k/10)) + i = i32(k/10) j = (k - i*10) assert abs(f32(base)**(observed[k]) - f32(i + j + 1)) <= eps diff --git a/integration_tests/global_syms_04.py b/integration_tests/global_syms_04.py index d70999a811..7b035167e2 100644 --- a/integration_tests/global_syms_04.py +++ b/integration_tests/global_syms_04.py @@ -19,9 +19,9 @@ def test_global_symbols(): def update_global_symbols(): global b, c, d x: f64 = f64(c) * d - b = i32(int(x)) + b = i32(x) y: f64 = f64(b) / 12.0 - c = i64(int(y)) + c = i64(y) z: i64 = i64(b) * c d = f64(z) diff --git a/integration_tests/lpdraw/draw.py b/integration_tests/lpdraw/draw.py index 183bd65608..771d9ea7a9 100644 --- a/integration_tests/lpdraw/draw.py +++ b/integration_tests/lpdraw/draw.py @@ -86,7 +86,7 @@ def Line(H: i32, W: i32, Screen: i32[H, W], x1: i32, y1: i32, x2: i32, y2: i32) y1 += sy def Circle(H: i32, W: i32, Screen: i32[H, W], x: i32, y: i32, r: f64) -> None: - x0: i32 = i32(int(r)) + x0: i32 = i32(r) y0: i32 = 0 err: i32 = 0 diff --git a/integration_tests/test_numpy_03.py b/integration_tests/test_numpy_03.py index d0e60006ad..04587d0c89 100644 --- a/integration_tests/test_numpy_03.py +++ b/integration_tests/test_numpy_03.py @@ -30,7 +30,7 @@ def test_nd_to_1d(a: f64[:, :]): newshape1[0] = 4096 d = reshape(c, newshape1) for l in range(4096): - i = i32(int(l/256)) + i = i32(l/256) j = (l - i*256)//16 k = (l - i*256 - j*16) assert abs(d[l] - f64(i + j + k) - 0.5) <= eps @@ -87,7 +87,7 @@ def test_reshape_with_argument(): d: f64[4096] = empty(4096) for l in range(4096): - i = i32(int(l/256)) + i = i32(l/256) j = (l - i*256)//16 k = (l - i*256 - j*16) d[l] = f64(i + j + k) + 0.5 diff --git a/integration_tests/test_pkg_lnn_01.py b/integration_tests/test_pkg_lnn_01.py index aab71cdc24..63dcbf5ee2 100644 --- a/integration_tests/test_pkg_lnn_01.py +++ b/integration_tests/test_pkg_lnn_01.py @@ -31,7 +31,7 @@ def plot_graph(p: Perceptron, input_vectors: list[list[f64]], outputs: list[i32] y2 *= scale_offset # print (x1, y1, x2, y2) - Line(Height, Width, Screen, i32(int(x1 + shift_offset)), i32(int(y1 + shift_offset)), i32(int(x2 + shift_offset)), i32(int(y2 + shift_offset))) + Line(Height, Width, Screen, i32(x1 + shift_offset), i32(y1 + shift_offset), i32(x2 + shift_offset), i32(y2 + shift_offset)) i: i32 point_size: i32 = 5 @@ -41,12 +41,12 @@ def plot_graph(p: Perceptron, input_vectors: list[list[f64]], outputs: list[i32] input_vectors[i][0] += shift_offset input_vectors[i][1] += shift_offset if outputs[i] == 1: - x: i32 = i32(int(input_vectors[i][0])) - y: i32 = i32(int(input_vectors[i][1])) + x: i32 = i32(input_vectors[i][0]) + y: i32 = i32(input_vectors[i][1]) Line(Height, Width, Screen, x - point_size, y, x + point_size, y) Line(Height, Width, Screen, x, y - point_size, x, y + point_size) else: - Circle(Height, Width, Screen, i32(int(input_vectors[i][0])), i32(int(input_vectors[i][1])), f64(point_size)) + Circle(Height, Width, Screen, i32(input_vectors[i][0]), i32(input_vectors[i][1]), f64(point_size)) Display(Height, Width, Screen) diff --git a/integration_tests/test_pkg_lnn_02.py b/integration_tests/test_pkg_lnn_02.py index 6fb8fca070..c72543b179 100644 --- a/integration_tests/test_pkg_lnn_02.py +++ b/integration_tests/test_pkg_lnn_02.py @@ -31,7 +31,7 @@ def plot_graph(p: Perceptron, input_vectors: list[list[f64]], outputs: list[f64] y2 *= scale_offset # print (x1, y1, x2, y2) - Line(Height, Width, Screen, i32(int(x1 + shift_offset)), i32(int(y1 + shift_offset)), i32(int(x2 + shift_offset)), i32(int(y2 + shift_offset))) + Line(Height, Width, Screen, i32(x1 + shift_offset), i32(y1 + shift_offset), i32(x2 + shift_offset), i32(y2 + shift_offset)) i: i32 point_size: i32 = 5 @@ -41,7 +41,7 @@ def plot_graph(p: Perceptron, input_vectors: list[list[f64]], outputs: list[f64] outputs[i] *= scale_offset outputs[i] += shift_offset - Circle(Height, Width, Screen, i32(int(input_vectors[i][0])), i32(int(outputs[i])), f64(point_size)) + Circle(Height, Width, Screen, i32(input_vectors[i][0]), i32(outputs[i]), f64(point_size)) Display(Height, Width, Screen) From 87cb5d600ca6ee2370ee0c44b09f2a25347670a9 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Fri, 5 May 2023 02:53:55 +0530 Subject: [PATCH 10/72] TEST: Add and enable test ... which fails in current main branch --- integration_tests/CMakeLists.txt | 1 + integration_tests/test_types_02.py | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 integration_tests/test_types_02.py diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index fab0589ba1..b3ab956052 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -335,6 +335,7 @@ RUN(NAME if_01 LABELS cpython llvm c wasm wasm_x86 wasm_x64) RUN(NAME if_02 LABELS cpython llvm c wasm wasm_x86 wasm_x64) RUN(NAME print_02 LABELS cpython llvm c) RUN(NAME test_types_01 LABELS cpython llvm c) +RUN(NAME test_types_02 LABELS cpython llvm c wasm) RUN(NAME test_str_01 LABELS cpython llvm c) RUN(NAME test_str_02 LABELS cpython llvm c) RUN(NAME test_str_03 LABELS cpython llvm c) diff --git a/integration_tests/test_types_02.py b/integration_tests/test_types_02.py new file mode 100644 index 0000000000..68d338dc94 --- /dev/null +++ b/integration_tests/test_types_02.py @@ -0,0 +1,10 @@ +from lpython import i32, f64 + +def main0(): + a: f64 + a = 3.25 + b: i32 = i32(a) * 4 + print(b) + assert b == 12 + +main0() From 05bde7d90809aa1b41735b0d93bbe50241950427 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Fri, 5 May 2023 02:58:52 +0530 Subject: [PATCH 11/72] TEST: Update reference tests --- .../reference/asr-test_numpy_03-6dd742e.json | 4 +- .../asr-test_numpy_03-6dd742e.stdout | 74 ++++++++----------- 2 files changed, 34 insertions(+), 44 deletions(-) diff --git a/tests/reference/asr-test_numpy_03-6dd742e.json b/tests/reference/asr-test_numpy_03-6dd742e.json index 2acf06676d..e3b1c7a6bd 100644 --- a/tests/reference/asr-test_numpy_03-6dd742e.json +++ b/tests/reference/asr-test_numpy_03-6dd742e.json @@ -2,11 +2,11 @@ "basename": "asr-test_numpy_03-6dd742e", "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_numpy_03.py", - "infile_hash": "7adaceaf3fd681036b880955e851507a36d42b61fae4e8b0b5527ac9", + "infile_hash": "c0ff0b1ddaee26393573088dbfd8babf9e0c95c3b2cfddbe36c2b633", "outfile": null, "outfile_hash": null, "stdout": "asr-test_numpy_03-6dd742e.stdout", - "stdout_hash": "10b1b9b4a271cfc5db527fe2a0a1df4158cfe2501d49bef13ec562fa", + "stdout_hash": "00fc9276ccbb947926b561a3c8d00470a3bffcb39e180913855ebc6d", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_numpy_03-6dd742e.stdout b/tests/reference/asr-test_numpy_03-6dd742e.stdout index 2b8216b845..202299888c 100644 --- a/tests/reference/asr-test_numpy_03-6dd742e.stdout +++ b/tests/reference/asr-test_numpy_03-6dd742e.stdout @@ -812,32 +812,27 @@ [(= (Var 193 i) (Cast - (Cast - (RealBinOp - (Cast - (Var 193 l) - IntegerToReal - (Real 8 []) - () - ) - Div - (Cast - (IntegerConstant 256 (Integer 4 [])) - IntegerToReal - (Real 8 []) - (RealConstant - 256.000000 - (Real 8 []) - ) - ) + (RealBinOp + (Cast + (Var 193 l) + IntegerToReal (Real 8 []) () ) - RealToInteger - (Integer 8 []) + Div + (Cast + (IntegerConstant 256 (Integer 4 [])) + IntegerToReal + (Real 8 []) + (RealConstant + 256.000000 + (Real 8 []) + ) + ) + (Real 8 []) () ) - IntegerToInteger + RealToInteger (Integer 4 []) () ) @@ -1352,32 +1347,27 @@ [(= (Var 195 i) (Cast - (Cast - (RealBinOp - (Cast - (Var 195 l) - IntegerToReal - (Real 8 []) - () - ) - Div - (Cast - (IntegerConstant 256 (Integer 4 [])) - IntegerToReal - (Real 8 []) - (RealConstant - 256.000000 - (Real 8 []) - ) - ) + (RealBinOp + (Cast + (Var 195 l) + IntegerToReal (Real 8 []) () ) - RealToInteger - (Integer 8 []) + Div + (Cast + (IntegerConstant 256 (Integer 4 [])) + IntegerToReal + (Real 8 []) + (RealConstant + 256.000000 + (Real 8 []) + ) + ) + (Real 8 []) () ) - IntegerToInteger + RealToInteger (Integer 4 []) () ) From df30c8ba4c57cc03ea179344d0fbea0c80c6a5a1 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Fri, 5 May 2023 04:09:43 +0530 Subject: [PATCH 12/72] WASM_X64: Support visit_I32TruncF64S() --- src/libasr/codegen/wasm_to_x64.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libasr/codegen/wasm_to_x64.cpp b/src/libasr/codegen/wasm_to_x64.cpp index 2ffac69ed9..3eb67ec66e 100644 --- a/src/libasr/codegen/wasm_to_x64.cpp +++ b/src/libasr/codegen/wasm_to_x64.cpp @@ -342,6 +342,7 @@ class X64Visitor : public WASMDecoder, void visit_I32Ne() { visit_I64Ne(); } void visit_I32WrapI64() { } // empty, since i32's and i64's are considered similar currently. + void visit_I32TruncF64S() { visit_I64TruncF64S(); } void visit_I64Const(int64_t value) { m_a.asm_mov_r64_imm64(X64Reg::rax, labs((int64_t)value)); From 3117c4ef2ed82caaf0d5848f2e2c02d28d2f6e02 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sat, 6 May 2023 12:55:15 +0530 Subject: [PATCH 13/72] Keep strings unescaped in AST, ASR --- src/libasr/codegen/asr_to_c_cpp.h | 12 ++++- src/libasr/codegen/asr_to_julia.cpp | 12 ++++- src/libasr/codegen/asr_to_llvm.cpp | 3 +- src/lpython/parser/semantics.h | 69 +++-------------------------- 4 files changed, 26 insertions(+), 70 deletions(-) diff --git a/src/libasr/codegen/asr_to_c_cpp.h b/src/libasr/codegen/asr_to_c_cpp.h index a908d43dd7..1ac1f2dfe2 100644 --- a/src/libasr/codegen/asr_to_c_cpp.h +++ b/src/libasr/codegen/asr_to_c_cpp.h @@ -935,8 +935,16 @@ R"(#include void visit_StringConstant(const ASR::StringConstant_t &x) { src = "\""; std::string s = x.m_s; - for (size_t idx=0; idx < s.size(); idx++) { - src += s[idx]; + for (size_t idx = 0; idx < s.size(); idx++) { + if (s[idx] == '\n') { + src += "\\n"; + } else if (s[idx] == '\\') { + src += "\\\\"; + } else if (s[idx] == '\"') { + src += "\\\""; + } else { + src += s[idx]; + } } src += "\""; last_expr_precedence = 2; diff --git a/src/libasr/codegen/asr_to_julia.cpp b/src/libasr/codegen/asr_to_julia.cpp index 94b58f70a7..bc66419c82 100644 --- a/src/libasr/codegen/asr_to_julia.cpp +++ b/src/libasr/codegen/asr_to_julia.cpp @@ -1441,8 +1441,16 @@ class ASRToJuliaVisitor : public ASR::BaseVisitor { src = "\""; std::string s = x.m_s; - for (size_t idx=0; idx < s.size(); idx++) { - src += s[idx]; + for (size_t idx = 0; idx < s.size(); idx++) { + if (s[idx] == '\n') { + src += "\\n"; + } else if (s[idx] == '\\') { + src += "\\\\"; + } else if (s[idx] == '\"') { + src += "\\\""; + } else { + src += s[idx]; + } } src += "\""; last_expr_precedence = julia_prec::Base; diff --git a/src/libasr/codegen/asr_to_llvm.cpp b/src/libasr/codegen/asr_to_llvm.cpp index 5ee8494b6e..6adb70dbc5 100644 --- a/src/libasr/codegen/asr_to_llvm.cpp +++ b/src/libasr/codegen/asr_to_llvm.cpp @@ -6006,8 +6006,7 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor } void visit_StringConstant(const ASR::StringConstant_t &x) { - std::string s = unescape_string(al, x.m_s); - tmp = builder->CreateGlobalStringPtr(s); + tmp = builder->CreateGlobalStringPtr(x.m_s); } inline void fetch_ptr(ASR::Variable_t* x) { diff --git a/src/lpython/parser/semantics.h b/src/lpython/parser/semantics.h index 99010a784b..b038514c8a 100644 --- a/src/lpython/parser/semantics.h +++ b/src/lpython/parser/semantics.h @@ -720,55 +720,6 @@ static inline ast_t* BOOLOP_01(Allocator &al, Location &loc, #define COMPARE(x, op, y, l) make_Compare_t(p.m_a, l, \ EXPR(x), cmpopType::op, EXPRS(A2LIST(p.m_a, y)), 1) -char *get_raw_string(Allocator &al, std::string s) { - std::string x; - for (size_t idx=0; idx < s.size(); idx++) { - if (s[idx] == '\n') { - x += "\\n"; - } else if (s[idx] == '\t') { - x += "\\t"; - } else if (s[idx] == '\b') { - x += "\\b"; - } else if (s[idx] == '\v') { - x += "\\v"; - } else if (s[idx] == '\\' && (s[idx+1] == 'n' || s[idx+1] == 'N' - || s[idx+1] == 't' || s[idx+1] == 'b' || s[idx+1] == 'v')) { - x += "\\\\"; - x += s[idx+1]; - idx++; - } else if (s[idx] == '\\') { - x += "\\\\"; - } else if (s[idx] == '"') { - x += "\\\""; - } else { - x += s[idx]; - } - } - return LCompilers::s2c(al, x); -} - -char* escape_string(Allocator &al, LCompilers::Str &s) { - std::string x; - for (size_t idx=0; idx < s.size(); idx++) { - if (s.p[idx] == '\n') { - x += "\\n"; - } else if (s.p[idx] == '\\' && s.p[idx+1] == '\n') { - idx++; - } else if (s.p[idx] == '\\' && s.p[idx+1] == '\\') { - x += "\\\\"; - idx++; - } else if (s.p[idx] == '\\' && s.p[idx+1] == '\'') { - x += '\''; - idx++; - } else if (s.p[idx-1] != '\\' && s.p[idx] == '"') { - x += "\\\""; - } else { - x += s.p[idx]; - } - } - return LCompilers::s2c(al, x); -} - static inline ast_t* concat_string(Allocator &al, Location &l, expr_t *string, std::string str, expr_t *string_literal) { std::string str1 = ""; @@ -847,8 +798,8 @@ static inline ast_t* concat_string(Allocator &al, Location &l, x.c_str(p.m_a), expr_contextType::Load) // `x.int_n` is of type BigInt but we store the int64_t directly in AST #define INTEGER(x, l) make_ConstantInt_t(p.m_a, l, x, nullptr) -#define STRING1(x, l) make_ConstantStr_t(p.m_a, l, escape_string(p.m_a, x), nullptr) -#define STRING2(x, y, l) concat_string(p.m_a, l, EXPR(x), escape_string(p.m_a, y), nullptr) +#define STRING1(x, l) make_ConstantStr_t(p.m_a, l, unescape_string(p.m_a, x), nullptr) +#define STRING2(x, y, l) concat_string(p.m_a, l, EXPR(x), unescape_string(p.m_a, y), nullptr) #define STRING3(id, x, l) PREFIX_STRING(p.m_a, l, name2char(id), x.c_str(p.m_a)) #define STRING4(x, s, l) concat_string(p.m_a, l, EXPR(x), "", EXPR(s)) #define FLOAT(x, l) make_ConstantFloat_t(p.m_a, l, x, nullptr) @@ -900,9 +851,6 @@ static inline ast_t *PREFIX_STRING(Allocator &al, Location &l, char *prefix, cha for (size_t i = 0; i < strs.size(); i++) { if (strs[i][0] == '"') { strs[i] = strs[i].substr(1, strs[i].length() - 2); - if (strcmp(prefix, "fr") == 0 || strcmp(prefix, "rf") == 0) { - strs[i] = std::string(get_raw_string(al, strs[i])); - } tmp = make_ConstantStr_t(al, l, LCompilers::s2c(al, strs[i]), nullptr); exprs.push_back(al, down_cast(tmp)); } else { @@ -913,19 +861,12 @@ static inline ast_t *PREFIX_STRING(Allocator &al, Location &l, char *prefix, cha } } tmp = make_JoinedStr_t(al, l, exprs.p, exprs.size()); - } else if (strcmp(prefix, "b") == 0) { - std::string str_1 = std::string(s); - LCompilers::Str str_2; - str_2.from_str_view(str_1); - str_1 = escape_string(al, str_2); - str_1 = "b'" + str_1 + "'"; - tmp = make_ConstantBytes_t(al, l, LCompilers::s2c(al, str_1), nullptr); - } else if (strcmp(prefix, "br") == 0|| strcmp(prefix, "rb") == 0) { - std::string str = std::string(get_raw_string(al, std::string(s))); + } else if (strcmp(prefix, "b") == 0 || strcmp(prefix, "br") == 0 + || strcmp(prefix, "rb") == 0) { + std::string str = std::string(s); str = "b'" + str + "'"; tmp = make_ConstantBytes_t(al, l, LCompilers::s2c(al, str), nullptr); } else if (strcmp(prefix, "r") == 0 ) { - s = get_raw_string(al, std::string(s)); tmp = make_ConstantStr_t(al, l, s, nullptr); } else if (strcmp(prefix, "u") == 0 ) { tmp = make_ConstantStr_t(al, l, s, LCompilers::s2c(al, "u")); From 7ef0b662abbcc7a7f0b38407149fbbe7d64c23f7 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sat, 6 May 2023 12:56:56 +0530 Subject: [PATCH 14/72] Make unescape_string() work with Str --- src/libasr/containers.h | 4 ++++ src/libasr/string_utils.cpp | 4 ++-- src/libasr/string_utils.h | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/libasr/containers.h b/src/libasr/containers.h index dff550dd8b..a14191b7ec 100644 --- a/src/libasr/containers.h +++ b/src/libasr/containers.h @@ -235,6 +235,10 @@ struct Str { // Returns a copy of the string as a NULL terminated std::string std::string str() const { return std::string(p, n); } + char operator[](size_t pos) { + return p[pos]; + } + // Initializes Str from std::string by making a copy excluding the null char void from_str(Allocator &al, const std::string &s) { n = s.size(); diff --git a/src/libasr/string_utils.cpp b/src/libasr/string_utils.cpp index ccd6e6f910..e918efe0ee 100644 --- a/src/libasr/string_utils.cpp +++ b/src/libasr/string_utils.cpp @@ -154,7 +154,7 @@ std::string join_paths(const std::vector &paths) { return p; } -std::string unescape_string(Allocator &/*al*/, std::string s) { +char* unescape_string(Allocator &al, LCompilers::Str &s) { std::string x; for (size_t idx=0; idx < s.size(); idx++) { if (s[idx] == '\\' && s[idx+1] == 'n') { @@ -179,7 +179,7 @@ std::string unescape_string(Allocator &/*al*/, std::string s) { x += s[idx]; } } - return x; + return LCompilers::s2c(al, x); } } // namespace LCompilers diff --git a/src/libasr/string_utils.h b/src/libasr/string_utils.h index 1ea4adf57b..8d06ba3b1c 100644 --- a/src/libasr/string_utils.h +++ b/src/libasr/string_utils.h @@ -6,6 +6,7 @@ #include #include +#include namespace LCompilers { @@ -37,7 +38,7 @@ bool is_relative_path(const std::string &path); // Joins paths (paths can be empty) std::string join_paths(const std::vector &paths); -std::string unescape_string(Allocator &al, std::string s); +char* unescape_string(Allocator &al, LCompilers::Str &s); } // namespace LCompilers From 52419e83fadaa087253d27cdbfbc05798e69dddb Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sat, 6 May 2023 12:57:22 +0530 Subject: [PATCH 15/72] Escape strings while printing --- src/libasr/asdl_cpp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libasr/asdl_cpp.py b/src/libasr/asdl_cpp.py index 8f5c6f77a3..b58bf855e8 100644 --- a/src/libasr/asdl_cpp.py +++ b/src/libasr/asdl_cpp.py @@ -1615,12 +1615,12 @@ def visitField(self, field, cons): elif field.type == "string" and not field.seq: if field.opt: self.emit("if (x.m_%s) {" % field.name, 2) - self.emit( 's.append("\\"" + std::string(x.m_%s) + "\\"");' % field.name, 3) + self.emit( 's.append("\\"" + get_escaped_str(x.m_%s) + "\\"");' % field.name, 3) self.emit("} else {", 2) self.emit( 's.append("()");', 3) self.emit("}", 2) else: - self.emit('s.append("\\"" + std::string(x.m_%s) + "\\"");' % field.name, 2) + self.emit('s.append("\\"" + get_escaped_str(x.m_%s) + "\\"");' % field.name, 2) elif field.type == "int" and not field.seq: if field.opt: self.emit("if (x.m_%s) {" % field.name, 2) From f1def7d4ba951aa0a196359eac8b71c9f07a41a2 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sat, 6 May 2023 13:09:48 +0530 Subject: [PATCH 16/72] Support ', \r, \newline in unescape_string() --- src/libasr/string_utils.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/libasr/string_utils.cpp b/src/libasr/string_utils.cpp index e918efe0ee..11351256e9 100644 --- a/src/libasr/string_utils.cpp +++ b/src/libasr/string_utils.cpp @@ -157,12 +157,17 @@ std::string join_paths(const std::vector &paths) { char* unescape_string(Allocator &al, LCompilers::Str &s) { std::string x; for (size_t idx=0; idx < s.size(); idx++) { - if (s[idx] == '\\' && s[idx+1] == 'n') { + if (s[idx] == '\\' && s[idx+1] == '\n') { // continuation character + idx++; + } else if (s[idx] == '\\' && s[idx+1] == 'n') { x += "\n"; idx++; } else if (s[idx] == '\\' && s[idx+1] == 't') { x += "\t"; idx++; + } else if (s[idx] == '\\' && s[idx+1] == 'r') { + x += "\r"; + idx++; } else if (s[idx] == '\\' && s[idx+1] == 'b') { x += "\b"; idx++; @@ -175,6 +180,9 @@ char* unescape_string(Allocator &al, LCompilers::Str &s) { } else if (s[idx] == '\\' && s[idx+1] == '"') { x += '"'; idx++; + } else if (s[idx] == '\\' && s[idx+1] == '\'') { + x += '\''; + idx++; } else { x += s[idx]; } From 736f5369c076c0d44839049a7aa228dfeb15255b Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sat, 6 May 2023 14:21:43 +0530 Subject: [PATCH 17/72] Escape \t and \r in C, CPP --- src/libasr/codegen/asr_to_c_cpp.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libasr/codegen/asr_to_c_cpp.h b/src/libasr/codegen/asr_to_c_cpp.h index 1ac1f2dfe2..2a9a6c346a 100644 --- a/src/libasr/codegen/asr_to_c_cpp.h +++ b/src/libasr/codegen/asr_to_c_cpp.h @@ -938,7 +938,11 @@ R"(#include for (size_t idx = 0; idx < s.size(); idx++) { if (s[idx] == '\n') { src += "\\n"; - } else if (s[idx] == '\\') { + } else if (s[idx] == '\t') { + src += "\\t"; + } else if (s[idx] == '\r') { + src += "\\r"; + }else if (s[idx] == '\\') { src += "\\\\"; } else if (s[idx] == '\"') { src += "\\\""; From 8cb00d1a4560048ac1a67fbec8eecf0c9dc1f1cc Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sat, 6 May 2023 15:18:18 +0530 Subject: [PATCH 18/72] Unescape byte strings excluding raw-byte strings --- src/lpython/parser/semantics.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lpython/parser/semantics.h b/src/lpython/parser/semantics.h index b038514c8a..19800b3e56 100644 --- a/src/lpython/parser/semantics.h +++ b/src/lpython/parser/semantics.h @@ -861,8 +861,13 @@ static inline ast_t *PREFIX_STRING(Allocator &al, Location &l, char *prefix, cha } } tmp = make_JoinedStr_t(al, l, exprs.p, exprs.size()); - } else if (strcmp(prefix, "b") == 0 || strcmp(prefix, "br") == 0 - || strcmp(prefix, "rb") == 0) { + } else if (strcmp(prefix, "b") == 0) { + LCompilers::Str s_; + s_.from_str(al, std::string(s)); + std::string str = std::string(unescape_string(al, s_)); + str = "b'" + str + "'"; + tmp = make_ConstantBytes_t(al, l, LCompilers::s2c(al, str), nullptr); + } else if ( strcmp(prefix, "br") == 0 || strcmp(prefix, "rb") == 0) { std::string str = std::string(s); str = "b'" + str + "'"; tmp = make_ConstantBytes_t(al, l, LCompilers::s2c(al, str), nullptr); From ae7ac9425e02c476c44e26ed2b8e6f584aeb8cad Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sat, 6 May 2023 12:58:04 +0530 Subject: [PATCH 19/72] TEST: Add test case --- tests/parser/string3.py | 33 +++++++++++++++++++++++++++++++++ tests/tests.toml | 4 ++++ 2 files changed, 37 insertions(+) create mode 100644 tests/parser/string3.py diff --git a/tests/parser/string3.py b/tests/parser/string3.py new file mode 100644 index 0000000000..81838765f9 --- /dev/null +++ b/tests/parser/string3.py @@ -0,0 +1,33 @@ +"\n" +"\r" +"\t" +"'" +"\"" +"\\" +"\n\r\t'\"\\" +'\n' +'\r' +'\t' +'\'' +'"' +'\\' +'\n\r\t\'"\\' + +"hi\n" +"hi\r\n\t" +"1234\n\t\\jdlasf\t" +'Hi this is a "test case".' + +""" +This is \n +abcd123 +This is \r +efgh +""" + +"""\ +This is \n +""" + +"hi\ + dsjfklad" diff --git a/tests/tests.toml b/tests/tests.toml index d8c2232c27..71d61d9eb1 100644 --- a/tests/tests.toml +++ b/tests/tests.toml @@ -597,6 +597,10 @@ ast_new = true filename = "parser/string2.py" ast_new = true +[[test]] +filename = "parser/string3.py" +ast_new = true + [[test]] filename = "parser/global1.py" ast = true From ad5a1dbe595f898a889fdb7eb3bdb6578947b028 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sat, 6 May 2023 12:59:44 +0530 Subject: [PATCH 20/72] TEST: Update reference tests --- .../asr-test_end_sep_keywords-49ea13f.json | 2 +- .../asr-test_end_sep_keywords-49ea13f.stdout | 4 +- tests/reference/ast_new-string3-27e8bd2.json | 13 ++ .../reference/ast_new-string3-27e8bd2.stdout | 129 ++++++++++++++++++ 4 files changed, 145 insertions(+), 3 deletions(-) create mode 100644 tests/reference/ast_new-string3-27e8bd2.json create mode 100644 tests/reference/ast_new-string3-27e8bd2.stdout diff --git a/tests/reference/asr-test_end_sep_keywords-49ea13f.json b/tests/reference/asr-test_end_sep_keywords-49ea13f.json index 7c0b328092..bfbc0a03de 100644 --- a/tests/reference/asr-test_end_sep_keywords-49ea13f.json +++ b/tests/reference/asr-test_end_sep_keywords-49ea13f.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_end_sep_keywords-49ea13f.stdout", - "stdout_hash": "abd3d56db58711bac46b8548acd917a01d4d1671dbd2898906f04c19", + "stdout_hash": "fdc9aacfe26de399fedb9c7de6d585f7068fe51c2ea5bce7f3d42827", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_end_sep_keywords-49ea13f.stdout b/tests/reference/asr-test_end_sep_keywords-49ea13f.stdout index 164a959030..098950f380 100644 --- a/tests/reference/asr-test_end_sep_keywords-49ea13f.stdout +++ b/tests/reference/asr-test_end_sep_keywords-49ea13f.stdout @@ -123,7 +123,7 @@ () (StringConstant "xyz\n" - (Character 1 5 () []) + (Character 1 4 () []) ) ) (Print @@ -146,7 +146,7 @@ ) (StringConstant "xyz\n" - (Character 1 5 () []) + (Character 1 4 () []) ) )] () diff --git a/tests/reference/ast_new-string3-27e8bd2.json b/tests/reference/ast_new-string3-27e8bd2.json new file mode 100644 index 0000000000..181d5568b8 --- /dev/null +++ b/tests/reference/ast_new-string3-27e8bd2.json @@ -0,0 +1,13 @@ +{ + "basename": "ast_new-string3-27e8bd2", + "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "infile": "tests/parser/string3.py", + "infile_hash": "61a3cd7139d6c429a037d74fe12b8f8305cabe9b91218082851dd7ca", + "outfile": null, + "outfile_hash": null, + "stdout": "ast_new-string3-27e8bd2.stdout", + "stdout_hash": "9d8ca937b551799ff4908f347ff6685917d0bfc41977c5316af4e108", + "stderr": null, + "stderr_hash": null, + "returncode": 0 +} \ No newline at end of file diff --git a/tests/reference/ast_new-string3-27e8bd2.stdout b/tests/reference/ast_new-string3-27e8bd2.stdout new file mode 100644 index 0000000000..6d104153f6 --- /dev/null +++ b/tests/reference/ast_new-string3-27e8bd2.stdout @@ -0,0 +1,129 @@ +(Module + [(Expr + (ConstantStr + "\n" + () + ) + ) + (Expr + (ConstantStr + "\r" + () + ) + ) + (Expr + (ConstantStr + "\t" + () + ) + ) + (Expr + (ConstantStr + "'" + () + ) + ) + (Expr + (ConstantStr + "\"" + () + ) + ) + (Expr + (ConstantStr + "\\" + () + ) + ) + (Expr + (ConstantStr + "\n\r\t'\"\\" + () + ) + ) + (Expr + (ConstantStr + "\n" + () + ) + ) + (Expr + (ConstantStr + "\r" + () + ) + ) + (Expr + (ConstantStr + "\t" + () + ) + ) + (Expr + (ConstantStr + "'" + () + ) + ) + (Expr + (ConstantStr + "\"" + () + ) + ) + (Expr + (ConstantStr + "\\" + () + ) + ) + (Expr + (ConstantStr + "\n\r\t'\"\\" + () + ) + ) + (Expr + (ConstantStr + "hi\n" + () + ) + ) + (Expr + (ConstantStr + "hi\r\n\t" + () + ) + ) + (Expr + (ConstantStr + "1234\n\t\\jdlasf\t" + () + ) + ) + (Expr + (ConstantStr + "Hi this is a \"test case\"." + () + ) + ) + (Expr + (ConstantStr + "\nThis is \n\nabcd123\nThis is \r\nefgh\n" + () + ) + ) + (Expr + (ConstantStr + "This is \n\n" + () + ) + ) + (Expr + (ConstantStr + "hi dsjfklad" + () + ) + )] + [] +) From e021e7822b4404f1e2d5e68c89ae7eec8d2b14a8 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sun, 7 May 2023 09:11:09 +0530 Subject: [PATCH 21/72] CI: PIP: Update test to work with latest pkg --- integration_tests/test_pip_import_01.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integration_tests/test_pip_import_01.py b/integration_tests/test_pip_import_01.py index 4130933ff3..530abb4552 100644 --- a/integration_tests/test_pip_import_01.py +++ b/integration_tests/test_pip_import_01.py @@ -1,4 +1,5 @@ -from lpynn.perceptron import init_perceptron, print_perceptron, normalize_input_vectors, Perceptron, train_dataset +from lpynn.perceptron import init_perceptron, print_perceptron, Perceptron, train_dataset +from lpynn.utils import normalize_input_vectors from lpython import i32, f64 def main0(): From 5282b762fd6537358c25523a4d0c0a7e98aa851d Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Tue, 9 May 2023 00:17:17 +0530 Subject: [PATCH 22/72] Use pip installed lpython --- .github/workflows/CI.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4665dc1fcd..c6248e27ae 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -225,6 +225,8 @@ jobs: - name: PIP install required packages shell: bash -l {0} run: | + # Package lpynn has lpython_emulation as dependency + # Hence, it should by default install lpython_emulation python -m pip install lpynn numpy - name: PIP show installed packages @@ -235,7 +237,6 @@ jobs: - name: Test PIP Packages with Python shell: bash -l {0} run: | - export PYTHONPATH=./src/runtime/lpython python integration_tests/test_pip_import_01.py - name: Test PIP Packages with LPython From 9cc155c320ceff2bd961b9132b7604bf90a2c6d0 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Tue, 9 May 2023 07:40:57 +0530 Subject: [PATCH 23/72] Pin specific version --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c6248e27ae..b146ec38d0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -227,7 +227,7 @@ jobs: run: | # Package lpynn has lpython_emulation as dependency # Hence, it should by default install lpython_emulation - python -m pip install lpynn numpy + python -m pip install lpython_emulation==0.0.1.8 lpynn==0.0.1.3 numpy==1.24.3 - name: PIP show installed packages shell: bash -l {0} From 8110bcb0723a8daeb95b3fb9afc7e5751904d0f0 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Tue, 9 May 2023 21:47:18 +0530 Subject: [PATCH 24/72] ASR: Support UnaryOp in attr bit_length() --- src/lpython/semantics/python_ast_to_asr.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index e86d156ad2..1d78ee6abd 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -6531,6 +6531,17 @@ class BodyVisitor : public CommonVisitor { } tmp = make_call_helper(al, st, current_scope, args, call_name, x.base.base.loc); return; + } else if (AST::is_a(*at->m_value)) { + AST::UnaryOp_t* uop = AST::down_cast(at->m_value); + visit_UnaryOp(*uop); + Vec eles; + eles.reserve(al, x.n_args); + for (size_t i=0; i(tmp); + handle_attribute(expr, at->m_attr, x.base.base.loc, eles); + return; } else if (AST::is_a(*at->m_value)) { if (std::string(at->m_attr) == std::string("bit_length")) { //bit_length() attribute: From 1cb36e843ef7a6e1653a4d41227afaf31f971269 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Tue, 9 May 2023 22:00:25 +0530 Subject: [PATCH 25/72] TEST: Add test --- integration_tests/test_bit_length.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/integration_tests/test_bit_length.py b/integration_tests/test_bit_length.py index 52b17eb70f..8c64a4682d 100644 --- a/integration_tests/test_bit_length.py +++ b/integration_tests/test_bit_length.py @@ -24,8 +24,25 @@ def ff3(): x = -i16(one << i16(13)) assert i32(x.bit_length()) == 14 +def ff4(): + print((-100).bit_length()) + print((-4).bit_length()) + + assert (-100).bit_length() == 7 + assert (-4).bit_length() == 3 + +def ff5(): + a: i32 + a = 100 + print((-a).bit_length()) + print((-(-(-(-a)))).bit_length()) + + assert (-a).bit_length() == 7 + assert (-(-(-(-a)))).bit_length() == 7 ff() ff1() ff2() ff3() +ff4() +ff5() From 450b560df8f236ffa1e2da14001f62af13e157e7 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Wed, 10 May 2023 00:04:50 +0530 Subject: [PATCH 26/72] C_CPP: Fix codegen for multiple unaryop --- src/libasr/codegen/asr_to_c_cpp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libasr/codegen/asr_to_c_cpp.h b/src/libasr/codegen/asr_to_c_cpp.h index 2a9a6c346a..6a919dff14 100644 --- a/src/libasr/codegen/asr_to_c_cpp.h +++ b/src/libasr/codegen/asr_to_c_cpp.h @@ -1604,7 +1604,7 @@ R"(#include self().visit_expr(*x.m_arg); int expr_precedence = last_expr_precedence; last_expr_precedence = 3; - if (expr_precedence <= last_expr_precedence) { + if (expr_precedence < last_expr_precedence) { src = "-" + src; } else { src = "-(" + src + ")"; From 73bd468e24caab603aaff275422fa0d58c46134d Mon Sep 17 00:00:00 2001 From: Thirumalai-Shaktivel Date: Wed, 10 May 2023 09:32:00 +0530 Subject: [PATCH 27/72] Throw an error when jit decorator is compiled using LPython --- src/lpython/semantics/python_ast_to_asr.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index 1d78ee6abd..f0fb38b7d6 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -3500,9 +3500,13 @@ class SymbolTableVisitor : public CommonVisitor { is_inline = true; } else if (name == "static") { is_static = true; + } else if (name == "jit") { + throw SemanticError("`@lpython.jit` decorator must be " + "run from CPython, not compiled using LPython", + dec->base.loc); } else { throw SemanticError("Decorator: " + name + " is not supported", - x.base.base.loc); + dec->base.loc); } } else if (AST::is_a(*dec)) { AST::Call_t *call_d = AST::down_cast(dec); From cb7247189f929af9739cfb1cef10ef48731fbc92 Mon Sep 17 00:00:00 2001 From: Thirumalai-Shaktivel Date: Wed, 10 May 2023 09:46:58 +0530 Subject: [PATCH 28/72] Jit Baseline implementation, - Get the source code from Jit decorator and store it in a file - Create a C file using the --show-c option Co-authored-by: Harsh Singh Jadon --- src/runtime/lpython/lpython.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/runtime/lpython/lpython.py b/src/runtime/lpython/lpython.py index 1456b4b4b5..2e69b9575d 100644 --- a/src/runtime/lpython/lpython.py +++ b/src/runtime/lpython/lpython.py @@ -514,3 +514,24 @@ def ccallable(f): def ccallback(f): return f + +class jit: + def __init__(self, function): + self.fn_name = function.__name__ + # Get the source code of the function + source_code = getsource(function) + source_code = source_code[source_code.find('\n'):] + + # TODO: Create a filename based on the function name + # filename = function.__name__ + ".py" + + # Open the file for writing + with open("a.py", "w") as file: + # Write the Python source code to the file + file.write("@ccallable") + file.write(source_code) + + # ---------------------------------------------------------------------- + # TODO: Use LLVM instead of C backend + r = os.system("lpython --show-c --disable-main a.py > a.h") + assert r == 0, "Failed to create C file" From 1fd75d9b4c4364e8dfc049ecbe4836b7297b2aa8 Mon Sep 17 00:00:00 2001 From: Thirumalai-Shaktivel Date: Wed, 10 May 2023 09:58:23 +0530 Subject: [PATCH 29/72] Generate a C file with the Python wrappers using Python C/API, - Process the arguments and return variable to suit C declared types - Pass these variables as arguments for the function call - Enclose everything within the Python wrapper - Write this C template into a file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ondřej Čertík --- src/runtime/lpython/lpython.py | 173 +++++++++++++++++++++++++++++++++ 1 file changed, 173 insertions(+) diff --git a/src/runtime/lpython/lpython.py b/src/runtime/lpython/lpython.py index 2e69b9575d..88db12570b 100644 --- a/src/runtime/lpython/lpython.py +++ b/src/runtime/lpython/lpython.py @@ -517,6 +517,37 @@ def ccallback(f): class jit: def __init__(self, function): + def get_rtlib_dir(): + current_dir = os.path.dirname(os.path.abspath(__file__)) + return os.path.join(current_dir, "..") + + def get_type_info(arg): + # return_type -> (`type_format`, `variable type`, `array struct name`) + # See: https://docs.python.org/3/c-api/arg.html for more info on type_format + if arg == f64: + return ('d', "double", 'r64') + elif arg == f32: + return ('f', "float", 'r32') + elif arg == i64: + return ('l', "long int", 'i64') + elif arg == i32: + return ('i', "int", 'i32') + elif arg == bool: + return ('p', "bool", '') + elif isinstance(arg, Array): + t = get_type_info(arg._type) + if t[2] == '': + raise NotImplementedError("Type %r not implemented" % arg) + return ('O', ["PyArrayObject *", "struct "+t[2]+" *", t[1]+" *"], '') + else: + raise NotImplementedError("Type %r not implemented" % arg) + + def get_data_type(t): + if isinstance(t, list): + return t[0] + else: + return t + " " + self.fn_name = function.__name__ # Get the source code of the function source_code = getsource(function) @@ -530,6 +561,148 @@ def __init__(self, function): # Write the Python source code to the file file.write("@ccallable") file.write(source_code) + # ---------------------------------------------------------------------- + types = function.__annotations__ + self.arg_type_formats = "" + self.return_type = "" + self.return_type_format = "" + self.arg_types = {} + counter = 1 + for t in types.keys(): + if t == "return": + type = get_type_info(types[t]) + self.return_type_format = type[0] + self.return_type = type[1] + else: + type = get_type_info(types[t]) + self.arg_type_formats += type[0] + self.arg_types[counter] = type[1] + counter += 1 + # ---------------------------------------------------------------------- + # `arg_0`: used as the return variables + # arguments are declared as `arg_1`, `arg_2`, ... + variables_decl = "" + if self.return_type != "": + variables_decl = "// Declare return variables and arguments\n" + variables_decl += " " + get_data_type(self.return_type) + "arg_" \ + + str(0) + ";\n" + # ---------------------------------------------------------------------- + # `PyArray_AsCArray` is used to convert NumPy Arrays to C Arrays + # `fill_array_details` contains arrays operations to be + # performed on the arguments + # `parse_args` are used to capture the args from CPython + # `pass_args` are the args that are passed to the shared library function + fill_array_details = "" + parse_args = "" + pass_args = "" + numpy_init = "" + for i, t in self.arg_types.items(): + if i > 1: + parse_args += ", " + pass_args += ", " + if isinstance(t, list): + if numpy_init == "": + numpy_init = "// Initialize NumPy\n import_array();\n\n " + fill_array_details += f"""\n + // fill array details for args[{i-1}] + if (PyArray_NDIM(arg_{i}) != 1) {{ + PyErr_SetString(PyExc_TypeError, + "Only 1 dimension is implemented for now."); + return NULL; + }} + + {t[1]}s_array_{i} = malloc(sizeof(struct r64)); + {{ + {t[2]}array; + // Create C arrays from numpy objects: + PyArray_Descr *descr = PyArray_DescrFromType(PyArray_TYPE(arg_{i})); + npy_intp dims[1]; + if (PyArray_AsCArray((PyObject **)&arg_{i}, (void *)&array, dims, 1, descr) < 0) {{ + PyErr_SetString(PyExc_TypeError, "error converting to c array"); + return NULL; + }} + + s_array_{i}->data = array; + s_array_{i}->n_dims = 1; + s_array_{i}->dims[0].lower_bound = 0; + s_array_{i}->dims[0].length = dims[0]; + s_array_{i}->is_allocated = false; + }}""" + pass_args += "s_array_" + str(i) + else: + pass_args += "arg_" + str(i) + variables_decl += " " + get_data_type(t) + "arg_" + str(i) + ";\n" + parse_args += "&arg_" + str(i) + + if parse_args != "": + parse_args = f"""\n // Parse the arguments from Python + if (!PyArg_ParseTuple(args, "{self.arg_type_formats}", {parse_args})) {{ + return NULL; + }}""" + + # ---------------------------------------------------------------------- + # Handle the return variable if any; otherwise, return None + fill_return_details = "" + if self.return_type != "": + fill_return_details = f"""\n\n // Call the C function + arg_0 = {self.fn_name}({pass_args}); + + // Build and return the result as a Python object + return Py_BuildValue("{self.return_type_format}", arg_0);""" + else: + fill_return_details = f"""{self.fn_name}({pass_args}); + Py_RETURN_NONE;""" + + # ---------------------------------------------------------------------- + # Python wrapper for the Shared library + template = f"""// Python headers +#include + +// NumPy C/API headers +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION // remove warnings +#include + +// LPython generated C code +#include "a.h" + +// Define the Python module and method mappings +static PyObject* define_module(PyObject* self, PyObject* args) {{ + {numpy_init}{variables_decl}{parse_args}\ +{fill_array_details}{fill_return_details} +}} + +// Define the module's method table +static PyMethodDef module_methods[] = {{ + {{"{self.fn_name}", define_module, METH_VARARGS, + "Handle arguments & return variable and call the function"}}, + {{NULL, NULL, 0, NULL}} +}}; + +// Define the module initialization function +static struct PyModuleDef module_def = {{ + PyModuleDef_HEAD_INIT, + "lpython_jit_module", + "Shared library to use LPython generated functions", + -1, + module_methods +}}; + +PyMODINIT_FUNC PyInit_lpython_jit_module(void) {{ + PyObject* module; + + // Create the module object + module = PyModule_Create(&module_def); + if (!module) {{ + return NULL; + }} + + return module; +}} +""" + # ---------------------------------------------------------------------- + # Write the C source code to the file + with open("a.c", "w") as file: + file.write(template) # ---------------------------------------------------------------------- # TODO: Use LLVM instead of C backend From bf0a9108169eda71cfd2c750efed9750644e51db Mon Sep 17 00:00:00 2001 From: Thirumalai-Shaktivel Date: Wed, 10 May 2023 09:59:59 +0530 Subject: [PATCH 30/72] Compile the C template with the LPython generated C file and create a shared library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ondřej Čertík --- src/runtime/lpython/lpython.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/runtime/lpython/lpython.py b/src/runtime/lpython/lpython.py index 88db12570b..8fe1bd8fcb 100644 --- a/src/runtime/lpython/lpython.py +++ b/src/runtime/lpython/lpython.py @@ -705,6 +705,24 @@ def get_data_type(t): file.write(template) # ---------------------------------------------------------------------- + # Generate the Shared library # TODO: Use LLVM instead of C backend r = os.system("lpython --show-c --disable-main a.py > a.h") assert r == 0, "Failed to create C file" + gcc_flags = "" + if platform.system() == "Linux": + gcc_flags = " -shared -fPIC " + elif platform.system() == "Darwin": + gcc_flags = " -bundle -flat_namespace -undefined suppress " + else: + raise NotImplementedError("Platform not implemented") + python_path = "-I" + get_python_inc() + " " + numpy_path = "-I" + get_include() + rt_path_01 = "-I" + get_rtlib_dir() + "/../libasr/runtime " + rt_path_02 = "-L" + get_rtlib_dir() + " -Wl,-rpath " \ + + get_rtlib_dir() + " -llpython_runtime " + python_lib = "-L" "$CONDA_PREFIX/lib/ -lpython3.10 -lm" + r = os.system("gcc -g" + gcc_flags + python_path + numpy_path + + " a.c -o lpython_jit_module.so " + rt_path_01 + rt_path_02 + python_lib) + assert r == 0, "Failed to create the shared library" + From 3c5909d9763c91ff6e85bf3261f6d0e37c323cc8 Mon Sep 17 00:00:00 2001 From: Thirumalai-Shaktivel Date: Wed, 10 May 2023 10:00:42 +0530 Subject: [PATCH 31/72] Import the shared library and return the function call --- src/runtime/lpython/lpython.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/runtime/lpython/lpython.py b/src/runtime/lpython/lpython.py index 8fe1bd8fcb..2fb93681a9 100644 --- a/src/runtime/lpython/lpython.py +++ b/src/runtime/lpython/lpython.py @@ -1,9 +1,11 @@ -from inspect import getfullargspec, getcallargs, isclass +from inspect import getfullargspec, getcallargs, isclass, getsource import os import ctypes import platform from dataclasses import dataclass as py_dataclass, is_dataclass as py_is_dataclass from goto import with_goto +from numpy import get_include +from distutils.sysconfig import get_python_inc # TODO: this does not seem to restrict other imports __slots__ = ["i8", "i16", "i32", "i64", "f32", "f64", "c32", "c64", "CPtr", @@ -726,3 +728,8 @@ def get_data_type(t): " a.c -o lpython_jit_module.so " + rt_path_01 + rt_path_02 + python_lib) assert r == 0, "Failed to create the shared library" + def __call__(self, *args, **kwargs): + import sys; sys.path.append('.') + # import the symbol from the shared library + function = getattr(__import__("lpython_jit_module"), self.fn_name) + return function(*args, **kwargs) From a5eda0ccd8e17fdea3d69622629513934c66529f Mon Sep 17 00:00:00 2001 From: Thirumalai-Shaktivel Date: Wed, 10 May 2023 10:01:39 +0530 Subject: [PATCH 32/72] Add CPython test and register in CMakeLists --- .gitignore | 3 +++ integration_tests/CMakeLists.txt | 3 +++ integration_tests/test_jit_01.py | 16 ++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 integration_tests/test_jit_01.py diff --git a/.gitignore b/.gitignore index d9a4892a9b..44c7866bae 100644 --- a/.gitignore +++ b/.gitignore @@ -89,6 +89,9 @@ inst/bin/* *_ldd.txt *_lines.dat.txt *__tmp__generated__.c +a.c +a.h +a.py ### https://raw.github.com/github/gitignore/218a941be92679ce67d0484547e3e142b2f5f6f0/Global/macOS.gitignore diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index b3ab956052..deab64d41a 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -534,3 +534,6 @@ RUN(NAME callback_01 LABELS cpython llvm) RUN(NAME intrinsics_01 LABELS cpython llvm) # any COMPILE(NAME import_order_01 LABELS cpython llvm c) # any + +# Jit +RUN(NAME test_jit_01 LABELS cpython) diff --git a/integration_tests/test_jit_01.py b/integration_tests/test_jit_01.py new file mode 100644 index 0000000000..a92bd63e9a --- /dev/null +++ b/integration_tests/test_jit_01.py @@ -0,0 +1,16 @@ +from numpy import array +from lpython import i32, f64, jit + +@jit +def fast_sum(n: i32, x: f64[:]) -> f64: + s: f64 = 0.0 + i: i32 + for i in range(n): + s += x[i] + return s + +def test(): + x: f64[3] = array([1.0, 2.0, 3.0]) + assert fast_sum(3, x) == 6.0 + +test() From 25b45ace26cc6eb4784835e6dfe3056ca0a1bfe1 Mon Sep 17 00:00:00 2001 From: Smit-create Date: Mon, 8 May 2023 14:19:05 +0530 Subject: [PATCH 33/72] Add unsigned int types --- src/libasr/ASR.asdl | 7 +++++++ src/runtime/lpython/lpython.py | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/libasr/ASR.asdl b/src/libasr/ASR.asdl index 12ada08a10..ff2f4520b4 100644 --- a/src/libasr/ASR.asdl +++ b/src/libasr/ASR.asdl @@ -237,6 +237,10 @@ expr | IntegerUnaryMinus(expr arg, ttype type, expr? value) | IntegerCompare(expr left, cmpop op, expr right, ttype type, expr? value) | IntegerBinOp(expr left, binop op, expr right, ttype type, expr? value) + | UnsignedIntegerConstant(float re, float im, ttype type) + | UnsignedIntegerUnaryMinus(expr arg, ttype type, expr? value) + | UnsignedIntegerCompare(expr left, cmpop op, expr right, ttype type, expr? value) + | UnsignedIntegerBinOp(expr left, binop op, expr right, ttype type, expr? value) | RealConstant(float r, ttype type) | RealUnaryMinus(expr arg, ttype type, expr? value) | RealCompare(expr left, cmpop op, expr right, ttype type, expr? value) @@ -346,6 +350,7 @@ expr ttype = Integer(int kind, dimension* dims) + | UnsignedInteger(int kind, dimension* dims) | Real(int kind, dimension* dims) | Complex(int kind, dimension* dims) | Character(int kind, int len, expr? len_expr, dimension* dims) @@ -402,6 +407,8 @@ cast_kind | RealToCharacter | IntegerToCharacter | LogicalToCharacter + | UnsignedIntegerToInteger + | IntegerToUnsignedInteger dimension = (expr? start, expr? length) diff --git a/src/runtime/lpython/lpython.py b/src/runtime/lpython/lpython.py index 1456b4b4b5..b2131eea99 100644 --- a/src/runtime/lpython/lpython.py +++ b/src/runtime/lpython/lpython.py @@ -6,7 +6,7 @@ from goto import with_goto # TODO: this does not seem to restrict other imports -__slots__ = ["i8", "i16", "i32", "i64", "f32", "f64", "c32", "c64", "CPtr", +__slots__ = ["i8", "i16", "i32", "i64", "u8", "u16", "u32", "u64", "f32", "f64", "c32", "c64", "CPtr", "overload", "ccall", "TypeVar", "pointer", "c_p_pointer", "Pointer", "p_c_pointer", "vectorize", "inline", "Union", "static", "with_goto", "packed", "Const", "sizeof", "ccallable", "ccallback", "Callable"] @@ -18,6 +18,10 @@ "i16": int, "i32": int, "i64": int, + "u8": lambda x: x, + "u16": lambda x: x, + "u32": lambda x: x, + "u64": lambda x: x, "f32": float, "f64": float, "c32": complex, From 50e0739a769ab989536ea4e14e50a4028a36a158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Wed, 10 May 2023 07:46:43 -0600 Subject: [PATCH 34/72] Add a test for unsigned integers --- integration_tests/CMakeLists.txt | 1 + integration_tests/expr_01u.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 integration_tests/expr_01u.py diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index b3ab956052..d6db445b29 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -311,6 +311,7 @@ RUN(NAME const_03 LABELS cpython llvm c EXTRAFILES const_03b.c) RUN(NAME const_04 LABELS cpython llvm c) RUN(NAME expr_01 LABELS cpython llvm c wasm wasm_x64) +RUN(NAME expr_01u LABELS cpython llvm) RUN(NAME expr_02 LABELS cpython llvm c wasm wasm_x64) RUN(NAME expr_03 LABELS cpython llvm c wasm wasm_x64) RUN(NAME expr_04 LABELS cpython llvm c wasm) diff --git a/integration_tests/expr_01u.py b/integration_tests/expr_01u.py new file mode 100644 index 0000000000..169f684d60 --- /dev/null +++ b/integration_tests/expr_01u.py @@ -0,0 +1,28 @@ +from lpython import inline, u32 + +@inline +def uadd(x: u32, y: u32) -> u32: + return x + y + +@inline +def uand_op(x: u32, y: u32) -> u32: + return x & y + +def main1(): + x: u32 + y: u32 + z: u32 + x = (u32(2)+u32(3))*u32(5) + y = uadd(x, u32(2))*u32(2) + assert x == u32(25) + assert y == u32(54) + + z = uand_op(x, y) + assert z == u32(16) + + +main1() + +# Not implemented yet in LPython: +#if __name__ == "__main__": +# main() From 1bd2f9307b3834eaad9b4ee5fa7535b9944d51ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Wed, 10 May 2023 07:47:10 -0600 Subject: [PATCH 35/72] ASR: fix a typo in UnsignedIntegerConstant --- src/libasr/ASR.asdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libasr/ASR.asdl b/src/libasr/ASR.asdl index ff2f4520b4..c763448193 100644 --- a/src/libasr/ASR.asdl +++ b/src/libasr/ASR.asdl @@ -237,7 +237,7 @@ expr | IntegerUnaryMinus(expr arg, ttype type, expr? value) | IntegerCompare(expr left, cmpop op, expr right, ttype type, expr? value) | IntegerBinOp(expr left, binop op, expr right, ttype type, expr? value) - | UnsignedIntegerConstant(float re, float im, ttype type) + | UnsignedIntegerConstant(int n, ttype type) | UnsignedIntegerUnaryMinus(expr arg, ttype type, expr? value) | UnsignedIntegerCompare(expr left, cmpop op, expr right, ttype type, expr? value) | UnsignedIntegerBinOp(expr left, binop op, expr right, ttype type, expr? value) From 248725b5ae2eaf9bd95699ffe6a3617937af1a5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Wed, 10 May 2023 07:47:40 -0600 Subject: [PATCH 36/72] Frontend: Add support for unsigned integers --- src/lpython/semantics/python_ast_to_asr.cpp | 125 +++++++++++++++++++- src/runtime/lpython/lpython.py | 4 + 2 files changed, 123 insertions(+), 6 deletions(-) diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index 1d78ee6abd..979d82efc1 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -58,8 +58,10 @@ namespace CastingUtil { {std::make_pair(ASR::ttypeType::Integer, ASR::ttypeType::Complex), ASR::cast_kindType::IntegerToComplex}, {std::make_pair(ASR::ttypeType::Integer, ASR::ttypeType::Real), ASR::cast_kindType::IntegerToReal}, {std::make_pair(ASR::ttypeType::Integer, ASR::ttypeType::Logical), ASR::cast_kindType::IntegerToLogical}, + {std::make_pair(ASR::ttypeType::Integer, ASR::ttypeType::UnsignedInteger), ASR::cast_kindType::IntegerToUnsignedInteger}, {std::make_pair(ASR::ttypeType::Logical, ASR::ttypeType::Real), ASR::cast_kindType::LogicalToReal}, {std::make_pair(ASR::ttypeType::Logical, ASR::ttypeType::Integer), ASR::cast_kindType::LogicalToInteger}, + {std::make_pair(ASR::ttypeType::UnsignedInteger, ASR::ttypeType::Integer), ASR::cast_kindType::UnsignedIntegerToInteger}, }; // Data structure which contains casting rules for equal intrinsic @@ -907,6 +909,18 @@ class CommonVisitor : public AST::BaseVisitor { } else if (var_annotation == "i64") { type = ASRUtils::TYPE(ASR::make_Integer_t(al, loc, 8, dims.p, dims.size())); + } else if (var_annotation == "u8") { + type = ASRUtils::TYPE(ASR::make_UnsignedInteger_t(al, loc, + 1, dims.p, dims.size())); + } else if (var_annotation == "u16") { + type = ASRUtils::TYPE(ASR::make_UnsignedInteger_t(al, loc, + 2, dims.p, dims.size())); + } else if (var_annotation == "u32") { + type = ASRUtils::TYPE(ASR::make_UnsignedInteger_t(al, loc, + 4, dims.p, dims.size())); + } else if (var_annotation == "u64") { + type = ASRUtils::TYPE(ASR::make_UnsignedInteger_t(al, loc, + 8, dims.p, dims.size())); } else if (var_annotation == "f32") { type = ASRUtils::TYPE(ASR::make_Real_t(al, loc, 4, dims.p, dims.size())); @@ -1916,6 +1930,12 @@ class CommonVisitor : public AST::BaseVisitor { if( ASR::is_a(*dest_type) ) { dest_type = ASRUtils::get_contained_type(dest_type); } + } else if(ASRUtils::is_unsigned_integer(*left_type) + && ASRUtils::is_unsigned_integer(*right_type)) { + dest_type = ASRUtils::expr_type(left); + if( ASR::is_a(*dest_type) ) { + dest_type = ASRUtils::get_contained_type(dest_type); + } } else if ((right_is_int || left_is_int) && op == ASR::binopType::Mul) { // string repeat int64_t left_int = 0, right_int = 0, dest_len = 0; @@ -2088,6 +2108,60 @@ class CommonVisitor : public AST::BaseVisitor { tmp = ASR::make_IntegerBinOp_t(al, loc, left, op, right, dest_type, value); + } else if (ASRUtils::is_unsigned_integer(*dest_type)) { + ASR::dimension_t *m_dims_left = nullptr, *m_dims_right = nullptr; + int n_dims_left = ASRUtils::extract_dimensions_from_ttype(left_type, m_dims_left); + int n_dims_right = ASRUtils::extract_dimensions_from_ttype(right_type, m_dims_right); + if( !(n_dims_left == 0 && n_dims_right == 0) ) { + if( n_dims_left != 0 && n_dims_right != 0 ) { + LCOMPILERS_ASSERT(n_dims_left == n_dims_right); + dest_type = left_type; + } else { + if( n_dims_left > 0 ) { + dest_type = left_type; + } else { + dest_type = right_type; + } + } + } + + if (ASRUtils::expr_value(left) != nullptr && ASRUtils::expr_value(right) != nullptr) { + int64_t left_value = ASR::down_cast( + ASRUtils::expr_value(left))->m_n; + int64_t right_value = ASR::down_cast( + ASRUtils::expr_value(right))->m_n; + int64_t result; + switch (op) { + case (ASR::binopType::Add): { result = left_value + right_value; break; } + case (ASR::binopType::Sub): { result = left_value - right_value; break; } + case (ASR::binopType::Mul): { result = left_value * right_value; break; } + case (ASR::binopType::Div): { result = left_value / right_value; break; } + case (ASR::binopType::Pow): { result = std::pow(left_value, right_value); break; } + case (ASR::binopType::BitAnd): { result = left_value & right_value; break; } + case (ASR::binopType::BitOr): { result = left_value | right_value; break; } + case (ASR::binopType::BitXor): { result = left_value ^ right_value; break; } + case (ASR::binopType::BitLShift): { + if (right_value < 0) { + throw SemanticError("Negative shift count not allowed.", loc); + } + result = left_value << right_value; + break; + } + case (ASR::binopType::BitRShift): { + if (right_value < 0) { + throw SemanticError("Negative shift count not allowed.", loc); + } + result = left_value >> right_value; + break; + } + default: { LCOMPILERS_ASSERT(false); } // should never happen + } + value = ASR::down_cast(ASR::make_UnsignedIntegerConstant_t( + al, loc, result, dest_type)); + } + + tmp = ASR::make_UnsignedIntegerBinOp_t(al, loc, left, op, right, dest_type, value); + } else if (ASRUtils::is_real(*dest_type)) { if (op == ASR::binopType::BitAnd || op == ASR::binopType::BitOr || op == ASR::binopType::BitXor || @@ -5464,7 +5538,6 @@ class BodyVisitor : public CommonVisitor { dest_type = ASRUtils::get_contained_type(dest_type); } if (ASRUtils::is_integer(*dest_type)) { - if (ASRUtils::expr_value(left) != nullptr && ASRUtils::expr_value(right) != nullptr) { int64_t left_value = -1; ASRUtils::extract_value(ASRUtils::expr_value(left), left_value); @@ -5486,9 +5559,30 @@ class BodyVisitor : public CommonVisitor { value = ASR::down_cast(ASR::make_LogicalConstant_t( al, x.base.base.loc, result, type)); } - tmp = ASR::make_IntegerCompare_t(al, x.base.base.loc, left, asr_op, right, type, value); - + } else if (ASRUtils::is_unsigned_integer(*dest_type)) { + if (ASRUtils::expr_value(left) != nullptr && ASRUtils::expr_value(right) != nullptr) { + int64_t left_value = -1; + ASRUtils::extract_value(ASRUtils::expr_value(left), left_value); + int64_t right_value = -1; + ASRUtils::extract_value(ASRUtils::expr_value(right), right_value); + bool result; + switch (asr_op) { + case (ASR::cmpopType::Eq): { result = left_value == right_value; break; } + case (ASR::cmpopType::Gt): { result = left_value > right_value; break; } + case (ASR::cmpopType::GtE): { result = left_value >= right_value; break; } + case (ASR::cmpopType::Lt): { result = left_value < right_value; break; } + case (ASR::cmpopType::LtE): { result = left_value <= right_value; break; } + case (ASR::cmpopType::NotEq): { result = left_value != right_value; break; } + default: { + throw SemanticError("Comparison operator not implemented", + x.base.base.loc); + } + } + value = ASR::down_cast(ASR::make_LogicalConstant_t( + al, x.base.base.loc, result, type)); + } + tmp = ASR::make_UnsignedIntegerCompare_t(al, x.base.base.loc, left, asr_op, right, type, value); } else if (ASRUtils::is_real(*dest_type)) { if (ASRUtils::expr_value(left) != nullptr && ASRUtils::expr_value(right) != nullptr) { @@ -6742,9 +6836,20 @@ class BodyVisitor : public CommonVisitor { tmp = ASR::make_SizeOfType_t(al, x.base.base.loc, arg_type, size_type, nullptr); return ; - } else if( call_name == "f64" || call_name == "f32" || - call_name == "i64" || call_name == "i32" || call_name == "c32" || - call_name == "c64" || call_name == "i8" || call_name == "i16" ) { + } else if( + call_name == "f64" || + call_name == "f32" || + call_name == "i64" || + call_name == "i32" || + call_name == "i16" || + call_name == "i8" || + call_name == "u64" || + call_name == "u32" || + call_name == "u16" || + call_name == "u8" || + call_name == "c32" || + call_name == "c64" + ) { parse_args() ASR::ttype_t* target_type = nullptr; if( call_name == "i8" ) { @@ -6755,6 +6860,14 @@ class BodyVisitor : public CommonVisitor { target_type = ASRUtils::TYPE(ASR::make_Integer_t(al, x.base.base.loc, 4, nullptr, 0)); } else if( call_name == "i64" ) { target_type = ASRUtils::TYPE(ASR::make_Integer_t(al, x.base.base.loc, 8, nullptr, 0)); + } else if( call_name == "u8" ) { + target_type = ASRUtils::TYPE(ASR::make_UnsignedInteger_t(al, x.base.base.loc, 1, nullptr, 0)); + } else if( call_name == "u16" ) { + target_type = ASRUtils::TYPE(ASR::make_UnsignedInteger_t(al, x.base.base.loc, 2, nullptr, 0)); + } else if( call_name == "u32" ) { + target_type = ASRUtils::TYPE(ASR::make_UnsignedInteger_t(al, x.base.base.loc, 4, nullptr, 0)); + } else if( call_name == "u64" ) { + target_type = ASRUtils::TYPE(ASR::make_UnsignedInteger_t(al, x.base.base.loc, 8, nullptr, 0)); } else if( call_name == "f32" ) { target_type = ASRUtils::TYPE(ASR::make_Real_t(al, x.base.base.loc, 4, nullptr, 0)); } else if( call_name == "f64" ) { diff --git a/src/runtime/lpython/lpython.py b/src/runtime/lpython/lpython.py index b2131eea99..0b43d3c2c0 100644 --- a/src/runtime/lpython/lpython.py +++ b/src/runtime/lpython/lpython.py @@ -69,6 +69,10 @@ def __init__(self, type, dims): i16 = Type("i16") i32 = Type("i32") i64 = Type("i64") +u8 = Type("u8") +u16 = Type("u16") +u32 = Type("u32") +u64 = Type("u64") f32 = Type("f32") f64 = Type("f64") c32 = Type("c32") From 1ca113f8cf608c5f12115ca7338bf64e94697ef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Wed, 10 May 2023 07:48:14 -0600 Subject: [PATCH 37/72] Backend: add support for unsigned integers --- src/libasr/asr_utils.cpp | 4 + src/libasr/asr_utils.h | 61 +++++++- src/libasr/codegen/asr_to_llvm.cpp | 178 +++++++++++++++++++++- src/libasr/pass/inline_function_calls.cpp | 4 + 4 files changed, 242 insertions(+), 5 deletions(-) diff --git a/src/libasr/asr_utils.cpp b/src/libasr/asr_utils.cpp index 96b9b34ebb..cd77523da5 100644 --- a/src/libasr/asr_utils.cpp +++ b/src/libasr/asr_utils.cpp @@ -974,6 +974,10 @@ ASR::asr_t* make_Cast_t_value(Allocator &al, const Location &a_loc, int64_t int_value = ASR::down_cast( ASRUtils::expr_value(a_arg))->m_n; value = ASR::down_cast(ASR::make_IntegerConstant_t(al, a_loc, int_value, a_type)); + } else if (a_kind == ASR::cast_kindType::IntegerToUnsignedInteger) { + int64_t int_value = ASR::down_cast( + ASRUtils::expr_value(a_arg))->m_n; + value = ASR::down_cast(ASR::make_UnsignedIntegerConstant_t(al, a_loc, int_value, a_type)); } else if (a_kind == ASR::cast_kindType::IntegerToLogical) { // TODO: implement } else if (a_kind == ASR::cast_kindType::ComplexToComplex) { diff --git a/src/libasr/asr_utils.h b/src/libasr/asr_utils.h index f04f918fc5..93eaebb6c3 100644 --- a/src/libasr/asr_utils.h +++ b/src/libasr/asr_utils.h @@ -842,6 +842,11 @@ static inline bool extract_value(ASR::expr_t* value_expr, T& value) { value = (T) const_int->m_n; break; } + case ASR::exprType::UnsignedIntegerConstant: { + ASR::UnsignedIntegerConstant_t* const_int = ASR::down_cast(value_expr); + value = (T) const_int->m_n; + break; + } case ASR::exprType::RealConstant: { ASR::RealConstant_t* const_real = ASR::down_cast(value_expr); value = (T) const_real->m_r; @@ -924,6 +929,16 @@ static inline std::string get_type_code(const ASR::ttype_t *t, bool use_undersco is_dimensional = integer->n_dims > 0; break; } + case ASR::ttypeType::UnsignedInteger: { + ASR::UnsignedInteger_t *integer = ASR::down_cast(t); + res = "u" + std::to_string(integer->m_kind * 8); + if( encode_dimensions_ ) { + encode_dimensions(integer->n_dims, res, use_underscore_sep); + return res; + } + is_dimensional = integer->n_dims > 0; + break; + } case ASR::ttypeType::Real: { ASR::Real_t *real = ASR::down_cast(t); res = "r" + std::to_string(real->m_kind * 8); @@ -1090,7 +1105,7 @@ static inline std::string type_to_str_python(const ASR::ttype_t *t, { switch (t->type) { case ASR::ttypeType::Integer: { - ASR::Integer_t *i = (ASR::Integer_t*)t; + ASR::Integer_t *i = ASR::down_cast(t); std::string res = ""; switch (i->m_kind) { case 1: { res = "i8"; break; } @@ -1104,6 +1119,21 @@ static inline std::string type_to_str_python(const ASR::ttype_t *t, } return res; } + case ASR::ttypeType::UnsignedInteger: { + ASR::UnsignedInteger_t *i = ASR::down_cast(t); + std::string res = ""; + switch (i->m_kind) { + case 1: { res = "u8"; break; } + case 2: { res = "u16"; break; } + case 4: { res = "u32"; break; } + case 8: { res = "u64"; break; } + default: { throw LCompilersException("UnsignedInteger kind not supported"); } + } + if (i->n_dims == 1 && for_error_message) { + res = type_python_1dim_helper(res, i->m_dims); + } + return res; + } case ASR::ttypeType::Real: { ASR::Real_t *r = (ASR::Real_t*)t; std::string res = ""; @@ -1374,6 +1404,9 @@ static inline int extract_kind_from_ttype_t(const ASR::ttype_t* type) { case ASR::ttypeType::Integer : { return ASR::down_cast(type)->m_kind; } + case ASR::ttypeType::UnsignedInteger : { + return ASR::down_cast(type)->m_kind; + } case ASR::ttypeType::Real : { return ASR::down_cast(type)->m_kind; } @@ -1406,6 +1439,10 @@ static inline bool is_integer(ASR::ttype_t &x) { return ASR::is_a(*type_get_past_pointer(&x)); } +static inline bool is_unsigned_integer(ASR::ttype_t &x) { + return ASR::is_a(*type_get_past_pointer(&x)); +} + static inline bool is_real(ASR::ttype_t &x) { return ASR::is_a(*type_get_past_pointer(&x)); } @@ -1485,6 +1522,12 @@ inline int extract_dimensions_from_ttype(ASR::ttype_t *x, m_dims = Integer_type->m_dims; break; } + case ASR::ttypeType::UnsignedInteger: { + ASR::UnsignedInteger_t* Integer_type = ASR::down_cast(x); + n_dims = Integer_type->n_dims; + m_dims = Integer_type->m_dims; + break; + } case ASR::ttypeType::Real: { ASR::Real_t* Real_type = ASR::down_cast(x); n_dims = Real_type->n_dims; @@ -2122,6 +2165,22 @@ inline bool types_equal(ASR::ttype_t *a, ASR::ttype_t *b, } break; } + case (ASR::ttypeType::UnsignedInteger) : { + ASR::UnsignedInteger_t *a2 = ASR::down_cast(a); + ASR::UnsignedInteger_t *b2 = ASR::down_cast(b); + if (a2->m_kind == b2->m_kind) { + if( check_for_dimensions ) { + return ASRUtils::dimensions_equal( + a2->m_dims, a2->n_dims, + b2->m_dims, b2->n_dims); + } else { + return true; + } + } else { + return false; + } + break; + } case ASR::ttypeType::CPtr: { return true; } diff --git a/src/libasr/codegen/asr_to_llvm.cpp b/src/libasr/codegen/asr_to_llvm.cpp index 6adb70dbc5..ae7d1d4c2d 100644 --- a/src/libasr/codegen/asr_to_llvm.cpp +++ b/src/libasr/codegen/asr_to_llvm.cpp @@ -2867,6 +2867,36 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor } break; } + case (ASR::ttypeType::UnsignedInteger) : { + ASR::UnsignedInteger_t* v_type = down_cast(asr_type); + m_dims = v_type->m_dims; + n_dims = v_type->n_dims; + a_kind = v_type->m_kind; + if( n_dims > 0 ) { + if( m_abi == ASR::abiType::BindC ) { + if( ASRUtils::is_fixed_size_array(v_type->m_dims, v_type->n_dims) ) { + llvm_type = llvm::ArrayType::get(get_el_type(asr_type), ASRUtils::get_fixed_size_of_array( + v_type->m_dims, v_type->n_dims)); + } else { + llvm_type = get_el_type(asr_type)->getPointerTo(); + } + } else { + is_array_type = true; + llvm::Type* el_type = get_el_type(asr_type); + if( m_storage == ASR::storage_typeType::Allocatable ) { + is_malloc_array_type = true; + llvm_type = arr_descr->get_malloc_array_type(asr_type, el_type); + } else { + llvm_type = arr_descr->get_array_type(asr_type, el_type); + } + } + } else { + // LLVM does not distinguish signed and unsigned integer types + // Only integer operations can be signed/unsigned + llvm_type = getIntType(a_kind); + } + break; + } case (ASR::ttypeType::Real) : { ASR::Real_t* v_type = down_cast(asr_type); m_dims = v_type->m_dims; @@ -3459,6 +3489,34 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor } break; } + case (ASR::ttypeType::UnsignedInteger) : { + ASR::UnsignedInteger_t* v_type = down_cast(asr_type); + n_dims = v_type->n_dims; + a_kind = v_type->m_kind; + if( n_dims > 0 ) { + if (m_abi == ASR::abiType::BindC || + (!ASRUtils::is_dimension_empty(v_type->m_dims, v_type->n_dims))) { + // Bind(C) arrays are represened as a pointer + type = getIntType(a_kind, true); + } else { + is_array_type = true; + llvm::Type* el_type = get_el_type(asr_type); + if( m_storage == ASR::storage_typeType::Allocatable ) { + type = arr_descr->get_malloc_array_type(asr_type, el_type, get_pointer); + } else { + type = arr_descr->get_array_type(asr_type, el_type, get_pointer); + } + } + } else { + if (arg_m_abi == ASR::abiType::BindC + && arg_m_value_attr) { + type = getIntType(a_kind, false); + } else { + type = getIntType(a_kind, true); + } + } + break; + } case (ASR::ttypeType::Pointer) : { ASR::ttype_t *t2 = ASRUtils::type_get_past_pointer(asr_type); bool is_pointer_ = ASR::is_a(*t2); @@ -3904,6 +3962,11 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor return_type = getIntType(a_kind); break; } + case (ASR::ttypeType::UnsignedInteger) : { + int a_kind = down_cast(return_var_type0)->m_kind; + return_type = getIntType(a_kind); + break; + } case (ASR::ttypeType::Real) : { int a_kind = down_cast(return_var_type0)->m_kind; return_type = getFPType(a_kind); @@ -5019,6 +5082,47 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor } } + void visit_UnsignedIntegerCompare(const ASR::UnsignedIntegerCompare_t &x) { + if (x.m_value) { + this->visit_expr_wrapper(x.m_value, true); + return; + } + this->visit_expr_wrapper(x.m_left, true); + llvm::Value *left = tmp; + this->visit_expr_wrapper(x.m_right, true); + llvm::Value *right = tmp; + switch (x.m_op) { + case (ASR::cmpopType::Eq) : { + tmp = builder->CreateICmpEQ(left, right); + break; + } + case (ASR::cmpopType::Gt) : { + tmp = builder->CreateICmpUGT(left, right); + break; + } + case (ASR::cmpopType::GtE) : { + tmp = builder->CreateICmpUGE(left, right); + break; + } + case (ASR::cmpopType::Lt) : { + tmp = builder->CreateICmpULT(left, right); + break; + } + case (ASR::cmpopType::LtE) : { + tmp = builder->CreateICmpULE(left, right); + break; + } + case (ASR::cmpopType::NotEq) : { + tmp = builder->CreateICmpNE(left, right); + break; + } + default : { + throw CodeGenError("Comparison operator not implemented", + x.base.base.loc); + } + } + } + void visit_RealCompare(const ASR::RealCompare_t &x) { if (x.m_value) { this->visit_expr_wrapper(x.m_value, true); @@ -5498,7 +5602,8 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor tmp = lfortran_str_slice(str, left, right, step, left_present, right_present); } - void visit_IntegerBinOp(const ASR::IntegerBinOp_t &x) { + template + void handle_SU_IntegerBinOp(const T &x) { if (x.m_value) { this->visit_expr_wrapper(x.m_value, true); return; @@ -5507,7 +5612,8 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor llvm::Value *left_val = tmp; this->visit_expr_wrapper(x.m_right, true); llvm::Value *right_val = tmp; - LCOMPILERS_ASSERT(ASRUtils::is_integer(*x.m_type)) + LCOMPILERS_ASSERT(ASRUtils::is_integer(*x.m_type) || + ASRUtils::is_unsigned_integer(*x.m_type)) switch (x.m_op) { case ASR::binopType::Add: { tmp = builder->CreateAdd(left_val, right_val); @@ -5571,6 +5677,14 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor } } + void visit_IntegerBinOp(const ASR::IntegerBinOp_t &x) { + handle_SU_IntegerBinOp(x); + } + + void visit_UnsignedIntegerBinOp(const ASR::UnsignedIntegerBinOp_t &x) { + handle_SU_IntegerBinOp(x); + } + void visit_RealBinOp(const ASR::RealBinOp_t &x) { if (x.m_value) { this->visit_expr_wrapper(x.m_value, true); @@ -5776,11 +5890,11 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor tmp = lfortran_complex_bin_op(zero_c, c, f_name, type); } - void visit_IntegerConstant(const ASR::IntegerConstant_t &x) { + template + void handle_SU_IntegerConstant(const T &x) { int64_t val = x.m_n; int a_kind = ASRUtils::extract_kind_from_ttype_t(x.m_type); switch( a_kind ) { - case 1: { tmp = llvm::ConstantInt::get(context, llvm::APInt(8, val, true)); break ; @@ -5805,6 +5919,14 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor } } + void visit_IntegerConstant(const ASR::IntegerConstant_t &x) { + handle_SU_IntegerConstant(x); + } + + void visit_UnsignedIntegerConstant(const ASR::UnsignedIntegerConstant_t &x) { + handle_SU_IntegerConstant(x); + } + void visit_RealConstant(const ASR::RealConstant_t &x) { double val = x.m_r; int a_kind = ((ASR::Real_t*)(&(x.m_type->base)))->m_kind; @@ -6385,6 +6507,24 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor } break; } + case (ASR::cast_kindType::IntegerToUnsignedInteger) : { + int arg_kind = -1, dest_kind = -1; + extract_kinds(x, arg_kind, dest_kind); + if( arg_kind > 0 && dest_kind > 0 && + arg_kind != dest_kind ) + { + if (dest_kind > arg_kind) { + tmp = builder->CreateSExt(tmp, getIntType(dest_kind)); + } else { + tmp = builder->CreateTrunc(tmp, getIntType(dest_kind)); + } + } + break; + } + case (ASR::cast_kindType::UnsignedIntegerToInteger) : { + // tmp = tmp + break; + } case (ASR::cast_kindType::ComplexToComplex) : { llvm::Type *target_type; int arg_kind = -1, dest_kind = -1; @@ -6698,6 +6838,31 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor } } args.push_back(tmp); + } else if (ASRUtils::is_unsigned_integer(*t)) { + switch( a_kind ) { + case 1 : { + fmt.push_back("%hhi"); + break; + } + case 2 : { + fmt.push_back("%hi"); + break; + } + case 4 : { + fmt.push_back("%d"); + break; + } + case 8 : { + fmt.push_back("%lld"); + break; + } + default: { + throw CodeGenError(R"""(Printing support is available only + for 8, 16, 32, and 64 bit unsigned integer kinds.)""", + x.base.base.loc); + } + } + args.push_back(tmp); } else if (ASRUtils::is_real(*t)) { llvm::Value *d; switch( a_kind ) { @@ -7093,6 +7258,11 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor target_type = getIntType(a_kind); break; } + case (ASR::ttypeType::UnsignedInteger) : { + int a_kind = down_cast(arg_type)->m_kind; + target_type = getIntType(a_kind); + break; + } case (ASR::ttypeType::Real) : { int a_kind = down_cast(arg_type)->m_kind; target_type = getFPType(a_kind); diff --git a/src/libasr/pass/inline_function_calls.cpp b/src/libasr/pass/inline_function_calls.cpp index a013f3894d..ef7d2f9ad4 100644 --- a/src/libasr/pass/inline_function_calls.cpp +++ b/src/libasr/pass/inline_function_calls.cpp @@ -425,6 +425,10 @@ class InlineFunctionCallVisitor : public PassUtils::PassVisitor Date: Wed, 10 May 2023 09:44:20 -0600 Subject: [PATCH 38/72] Add unsigned integer support to C backend --- integration_tests/CMakeLists.txt | 2 +- src/libasr/codegen/asr_to_c.cpp | 38 +++++++++++++++++++++++++++++++ src/libasr/codegen/asr_to_c_cpp.h | 22 ++++++++++++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index d6db445b29..256e27fd0e 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -311,7 +311,7 @@ RUN(NAME const_03 LABELS cpython llvm c EXTRAFILES const_03b.c) RUN(NAME const_04 LABELS cpython llvm c) RUN(NAME expr_01 LABELS cpython llvm c wasm wasm_x64) -RUN(NAME expr_01u LABELS cpython llvm) +RUN(NAME expr_01u LABELS cpython llvm c) RUN(NAME expr_02 LABELS cpython llvm c wasm wasm_x64) RUN(NAME expr_03 LABELS cpython llvm c wasm wasm_x64) RUN(NAME expr_04 LABELS cpython llvm c wasm) diff --git a/src/libasr/codegen/asr_to_c.cpp b/src/libasr/codegen/asr_to_c.cpp index 0be0354feb..07f34bb157 100644 --- a/src/libasr/codegen/asr_to_c.cpp +++ b/src/libasr/codegen/asr_to_c.cpp @@ -316,6 +316,44 @@ class ASRToCVisitor : public BaseCCPPVisitor dims = convert_dims_c(t->n_dims, t->m_dims, v_m_type, is_fixed_size); sub = format_type_c(dims, type_name, v_m_name, use_ref, dummy); } + } else if (ASRUtils::is_unsigned_integer(*v_m_type)) { + headers.insert("inttypes.h"); + ASR::UnsignedInteger_t *t = ASR::down_cast(v_m_type); + std::string type_name = "uint" + std::to_string(t->m_kind * 8) + "_t"; + if( is_array ) { + bool is_fixed_size = true; + dims = convert_dims_c(t->n_dims, t->m_dims, v_m_type, is_fixed_size, true); + bool is_struct_type_member = ASR::is_a( + *ASR::down_cast(v.m_parent_symtab->asr_owner)); + if( is_fixed_size && is_struct_type_member ) { + if( !force_declare ) { + force_declare_name = std::string(v.m_name); + } + sub = type_name + " " + force_declare_name + dims; + } else { + std::string encoded_type_name = "u" + std::to_string(t->m_kind * 8); + if( !force_declare ) { + force_declare_name = std::string(v.m_name); + } + generate_array_decl(sub, force_declare_name, type_name, dims, + encoded_type_name, t->m_dims, t->n_dims, + use_ref, dummy, + (v.m_intent != ASRUtils::intent_in && + v.m_intent != ASRUtils::intent_inout && + v.m_intent != ASRUtils::intent_out && + !is_struct_type_member) || force_declare, + is_fixed_size, false, v.m_abi); + } + } else { + bool is_fixed_size = true; + std::string v_m_name = v.m_name; + if( declare_as_constant ) { + type_name = "const " + type_name; + v_m_name = const_name; + } + dims = convert_dims_c(t->n_dims, t->m_dims, v_m_type, is_fixed_size); + sub = format_type_c(dims, type_name, v_m_name, use_ref, dummy); + } } else if (ASRUtils::is_real(*v_m_type)) { ASR::Real_t *t = ASR::down_cast(v_m_type); std::string type_name = "float"; diff --git a/src/libasr/codegen/asr_to_c_cpp.h b/src/libasr/codegen/asr_to_c_cpp.h index 6a919dff14..1073547744 100644 --- a/src/libasr/codegen/asr_to_c_cpp.h +++ b/src/libasr/codegen/asr_to_c_cpp.h @@ -394,6 +394,14 @@ R"(#include case (4) : sub = "int32_t "; break; case (8) : sub = "int64_t "; break; } + } else if (ASRUtils::is_unsigned_integer(*return_var->m_type)) { + int kind = ASR::down_cast(return_var->m_type)->m_kind; + switch (kind) { + case (1) : sub = "uint8_t "; break; + case (2) : sub = "uint16_t "; break; + case (4) : sub = "uint32_t "; break; + case (8) : sub = "uint64_t "; break; + } } else if (ASRUtils::is_real(*return_var->m_type)) { bool is_float = ASR::down_cast(return_var->m_type)->m_kind == 4; if (is_float) { @@ -1382,6 +1390,12 @@ R"(#include // src = src; break; } + case (ASR::cast_kindType::IntegerToUnsignedInteger) : { + int dest_kind = ASRUtils::extract_kind_from_ttype_t(x.m_type); + src = "(uint" + std::to_string(dest_kind * 8) + "_t)(" + src + ")"; + last_expr_precedence = 2; + break; + } case (ASR::cast_kindType::ComplexToComplex) : { break; } @@ -1522,6 +1536,10 @@ R"(#include handle_Compare(x); } + void visit_UnsignedIntegerCompare(const ASR::UnsignedIntegerCompare_t &x) { + handle_Compare(x); + } + void visit_RealCompare(const ASR::RealCompare_t &x) { handle_Compare(x); } @@ -1672,6 +1690,10 @@ R"(#include handle_BinOp(x); } + void visit_UnsignedIntegerBinOp(const ASR::UnsignedIntegerBinOp_t &x) { + handle_BinOp(x); + } + void visit_RealBinOp(const ASR::RealBinOp_t &x) { handle_BinOp(x); } From eb5a906b02d72a3bd461f9593d15addf06ce4544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Wed, 10 May 2023 10:06:55 -0600 Subject: [PATCH 39/72] Add a test for all unsigned types --- integration_tests/CMakeLists.txt | 5 +- integration_tests/expr_02u.py | 78 ++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 integration_tests/expr_02u.py diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index 256e27fd0e..d147f7933e 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -311,7 +311,6 @@ RUN(NAME const_03 LABELS cpython llvm c EXTRAFILES const_03b.c) RUN(NAME const_04 LABELS cpython llvm c) RUN(NAME expr_01 LABELS cpython llvm c wasm wasm_x64) -RUN(NAME expr_01u LABELS cpython llvm c) RUN(NAME expr_02 LABELS cpython llvm c wasm wasm_x64) RUN(NAME expr_03 LABELS cpython llvm c wasm wasm_x64) RUN(NAME expr_04 LABELS cpython llvm c wasm) @@ -327,6 +326,10 @@ RUN(NAME expr_13 LABELS llvm c EXTRAFILES expr_13b.c) RUN(NAME expr_14 LABELS cpython llvm c) RUN(NAME expr_15 LABELS cpython llvm c) + +RUN(NAME expr_01u LABELS cpython llvm c) +RUN(NAME expr_02u LABELS cpython llvm c) + RUN(NAME loop_01 LABELS cpython llvm c) RUN(NAME loop_02 LABELS cpython llvm c wasm wasm_x86 wasm_x64) RUN(NAME loop_03 LABELS cpython llvm c wasm wasm_x64) diff --git a/integration_tests/expr_02u.py b/integration_tests/expr_02u.py new file mode 100644 index 0000000000..962c449082 --- /dev/null +++ b/integration_tests/expr_02u.py @@ -0,0 +1,78 @@ +from lpython import u8, u16, u32, u64 + +def add_u8(x: u8, y: u8) -> u8: + return x + y + +def add_u16(x: u16, y: u16) -> u16: + return x + y + +def add_u32(x: u32, y: u32) -> u32: + return x + y + +def add_u64(x: u64, y: u64) -> u64: + return x + y + +def and_u8(x: u8, y: u8) -> u8: + return x & y + +def and_u16(x: u16, y: u16) -> u16: + return x & y + +def and_u32(x: u32, y: u32) -> u32: + return x & y + +def and_u64(x: u64, y: u64) -> u64: + return x & y + +def main_u8(): + x: u8 + y: u8 + z: u8 + x = (u8(2)+u8(3))*u8(5) + y = add_u8(x, u8(2))*u8(2) + z = and_u8(x, y) + assert x == u8(25) + assert y == u8(54) + assert z == u8(16) + +def main_u16(): + x: u16 + y: u16 + z: u16 + x = (u16(2)+u16(3))*u16(5) + y = add_u16(x, u16(2))*u16(2) + z = and_u16(x, y) + assert x == u16(25) + assert y == u16(54) + assert z == u16(16) + +def main_u32(): + x: u32 + y: u32 + z: u32 + x = (u32(2)+u32(3))*u32(5) + y = add_u32(x, u32(2))*u32(2) + z = and_u32(x, y) + assert x == u32(25) + assert y == u32(54) + assert z == u32(16) + +def main_u64(): + x: u64 + y: u64 + z: u64 + x = (u64(2)+u64(3))*u64(5) + y = add_u64(x, u64(2))*u64(2) + z = and_u64(x, y) + assert x == u64(25) + assert y == u64(54) + assert z == u64(16) + +main_u8() +main_u16() +main_u32() +main_u64() + +# Not implemented yet in LPython: +#if __name__ == "__main__": +# main() From 9b5ec2e0fbb164dd31baad4cf766a21829a5e560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Wed, 10 May 2023 14:55:52 -0600 Subject: [PATCH 40/72] Implement --get-rtl-dir --- src/bin/lpython.cpp | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/bin/lpython.cpp b/src/bin/lpython.cpp index 598d82da9d..45eb202650 100644 --- a/src/bin/lpython.cpp +++ b/src/bin/lpython.cpp @@ -809,9 +809,14 @@ int compile_python_to_object_file( #endif -void do_print_rtlib_header_dir() { - std::string rtlib_header_dir = LCompilers::LPython::get_runtime_library_header_dir(); - std::cout << rtlib_header_dir << std::endl; +void do_print_rtl_header_dir() { + std::string rtl_header_dir = LCompilers::LPython::get_runtime_library_header_dir(); + std::cout << rtl_header_dir << std::endl; +} + +void do_print_rtl_dir() { + std::string rtl_dir = LCompilers::LPython::get_runtime_library_dir(); + std::cout << rtl_dir << std::endl; } int compile_to_binary_wasm( @@ -1436,7 +1441,8 @@ int main(int argc, char *argv[]) std::string arg_backend = "llvm"; std::string arg_kernel_f; bool print_targets = false; - bool print_rtlib_header_dir = false; + bool print_rtl_header_dir = false; + bool print_rtl_dir = false; std::string arg_fmt_file; // int arg_fmt_indent = 4; @@ -1507,7 +1513,8 @@ int main(int argc, char *argv[]) app.add_flag("--fast", compiler_options.fast, "Best performance (disable strict standard compliance)"); app.add_option("--target", compiler_options.target, "Generate code for the given target")->capture_default_str(); app.add_flag("--print-targets", print_targets, "Print the registered targets"); - app.add_flag("--get-rtlib-header-dir", print_rtlib_header_dir, "Print the path to the runtime library header file"); + app.add_flag("--get-rtl-header-dir", print_rtl_header_dir, "Print the path to the runtime library header file"); + app.add_flag("--get-rtl-dir", print_rtl_dir, "Print the path to the runtime library file"); app.add_flag("--verbose", compiler_options.verbose, "Print debugging statements"); // LSP specific options @@ -1585,8 +1592,13 @@ int main(int argc, char *argv[]) #endif } - if (print_rtlib_header_dir) { - do_print_rtlib_header_dir(); + if (print_rtl_header_dir) { + do_print_rtl_header_dir(); + return 0; + } + + if (print_rtl_dir) { + do_print_rtl_dir(); return 0; } From 556267897339126701c34d2931607522ccde94b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Wed, 10 May 2023 17:16:06 -0600 Subject: [PATCH 41/72] Implement unsigned arrays support Now most array usage should work with unsigned integers. Added a test. --- integration_tests/CMakeLists.txt | 1 + integration_tests/expr_03u.py | 159 +++++++++++++++++++ src/libasr/asr_utils.h | 21 +++ src/libasr/codegen/asr_to_llvm.cpp | 4 + src/libasr/codegen/c_utils.h | 4 + src/libasr/pass/array_op.cpp | 21 ++- src/libasr/pass/pass_utils.cpp | 17 ++ src/lpython/semantics/python_ast_to_asr.cpp | 15 ++ src/lpython/semantics/python_comptime_eval.h | 4 +- 9 files changed, 244 insertions(+), 2 deletions(-) create mode 100644 integration_tests/expr_03u.py diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index e4543e15a5..3bfaa37676 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -329,6 +329,7 @@ RUN(NAME expr_15 LABELS cpython llvm c) RUN(NAME expr_01u LABELS cpython llvm c) RUN(NAME expr_02u LABELS cpython llvm c) +RUN(NAME expr_03u LABELS cpython llvm c) RUN(NAME loop_01 LABELS cpython llvm c) RUN(NAME loop_02 LABELS cpython llvm c wasm wasm_x86 wasm_x64) diff --git a/integration_tests/expr_03u.py b/integration_tests/expr_03u.py new file mode 100644 index 0000000000..7ab7b16de3 --- /dev/null +++ b/integration_tests/expr_03u.py @@ -0,0 +1,159 @@ +from lpython import u8, u16, u32, u64, i8, i32, TypeVar +from numpy import (empty, uint8, uint16, uint32, uint64, int8, int16, int32, + int64, size) + +n = TypeVar("n") +def add_i8(n: i32, x: i8[n], y: i8[n]) -> i8[n]: + return x + y + +def add_i8_loop(n: i32, x: i8[n], y: i8[n]) -> i8[n]: + z: i8[n] = empty(n, dtype=int8) + i: i32 + for i in range(n): + z[i] = x[i] + y[i] + return z + +def add_u8(n: i32, x: u8[n], y: u8[n]) -> u8[n]: + return x + y + +def add_u8_loop(n: i32, x: u8[n], y: u8[n]) -> u8[n]: + z: u8[n] = empty(n, dtype=uint8) + i: i32 + for i in range(n): + z[i] = x[i] + y[i] + return z + +def add_u16(n: i32, x: u16[n], y: u16[n]) -> u16[n]: + return x + y + +def add_u16_loop(n: i32, x: u16[n], y: u16[n]) -> u16[n]: + z: u16[n] = empty(n, dtype=uint16) + i: i32 + for i in range(n): + z[i] = x[i] + y[i] + return z + +def add_u32(n: i32, x: u32[n], y: u32[n]) -> u32[n]: + return x + y + +def add_u32_loop(n: i32, x: u32[n], y: u32[n]) -> u32[n]: + z: u32[n] = empty(n, dtype=uint32) + i: i32 + for i in range(n): + z[i] = x[i] + y[i] + return z + +def add_u64(n: i32, x: u64[n], y: u64[n]) -> u64[n]: + return x + y + +def add_u64_loop(n: i32, x: u64[n], y: u64[n]) -> u64[n]: + z: u64[n] = empty(n, dtype=uint64) + i: i32 + for i in range(n): + z[i] = x[i] + y[i] + return z + +def main_i8(): + x: i8[3] = empty(3, dtype=int8) + y: i8[3] = empty(3, dtype=int8) + z: i8[3] = empty(3, dtype=int8) + x[0] = i8(1) + x[1] = i8(2) + x[2] = i8(3) + y[0] = i8(2) + y[1] = i8(3) + y[2] = i8(4) + z = add_i8(size(x), x, y) + assert z[0] == i8(3) + assert z[1] == i8(5) + assert z[2] == i8(7) + z = add_i8_loop(size(x), x, y) + assert z[0] == i8(3) + assert z[1] == i8(5) + assert z[2] == i8(7) + +def main_u8(): + x: u8[3] = empty(3, dtype=uint8) + y: u8[3] = empty(3, dtype=uint8) + z: u8[3] = empty(3, dtype=uint8) + x[0] = u8(1) + x[1] = u8(2) + x[2] = u8(3) + y[0] = u8(2) + y[1] = u8(3) + y[2] = u8(4) + z = add_u8(size(x), x, y) + assert z[0] == u8(3) + assert z[1] == u8(5) + assert z[2] == u8(7) + z = add_u8_loop(size(x), x, y) + assert z[0] == u8(3) + assert z[1] == u8(5) + assert z[2] == u8(7) + +def main_u16(): + x: u16[3] = empty(3, dtype=uint16) + y: u16[3] = empty(3, dtype=uint16) + z: u16[3] = empty(3, dtype=uint16) + x[0] = u16(1) + x[1] = u16(2) + x[2] = u16(3) + y[0] = u16(2) + y[1] = u16(3) + y[2] = u16(4) + z = add_u16(size(x), x, y) + assert z[0] == u16(3) + assert z[1] == u16(5) + assert z[2] == u16(7) + z = add_u16_loop(size(x), x, y) + assert z[0] == u16(3) + assert z[1] == u16(5) + assert z[2] == u16(7) + +def main_u32(): + x: u32[3] = empty(3, dtype=uint32) + y: u32[3] = empty(3, dtype=uint32) + z: u32[3] = empty(3, dtype=uint32) + x[0] = u32(1) + x[1] = u32(2) + x[2] = u32(3) + y[0] = u32(2) + y[1] = u32(3) + y[2] = u32(4) + z = add_u32(size(x), x, y) + assert z[0] == u32(3) + assert z[1] == u32(5) + assert z[2] == u32(7) + z = add_u32_loop(size(x), x, y) + assert z[0] == u32(3) + assert z[1] == u32(5) + assert z[2] == u32(7) + +def main_u64(): + x: u64[3] = empty(3, dtype=uint64) + y: u64[3] = empty(3, dtype=uint64) + z: u64[3] = empty(3, dtype=uint64) + x[0] = u64(1) + x[1] = u64(2) + x[2] = u64(3) + y[0] = u64(2) + y[1] = u64(3) + y[2] = u64(4) + z = add_u64(size(x), x, y) + assert z[0] == u64(3) + assert z[1] == u64(5) + assert z[2] == u64(7) + z = add_u64_loop(size(x), x, y) + assert z[0] == u64(3) + assert z[1] == u64(5) + assert z[2] == u64(7) + +main_i8() +main_u8() +main_u16() +main_u32() +main_u64() + +# Not implemented yet in LPython: +#if __name__ == "__main__": +# main() diff --git a/src/libasr/asr_utils.h b/src/libasr/asr_utils.h index 93eaebb6c3..3fb215d1c8 100644 --- a/src/libasr/asr_utils.h +++ b/src/libasr/asr_utils.h @@ -618,6 +618,8 @@ static inline bool is_value_constant(ASR::expr_t *a_value) { } if (ASR::is_a(*a_value)) { // OK + } else if (ASR::is_a(*a_value)) { + // OK } else if (ASR::is_a(*a_value)) { // OK } else if (ASR::is_a(*a_value)) { @@ -1674,6 +1676,12 @@ inline bool ttype_set_dimensions(ASR::ttype_t *x, Integer_type->m_dims = m_dims; return true; } + case ASR::ttypeType::UnsignedInteger: { + ASR::UnsignedInteger_t* Integer_type = ASR::down_cast(x); + Integer_type->n_dims = n_dims; + Integer_type->m_dims = m_dims; + return true; + } case ASR::ttypeType::Real: { ASR::Real_t* Real_type = ASR::down_cast(x); Real_type->n_dims = n_dims; @@ -1737,6 +1745,7 @@ static inline bool is_aggregate_type(ASR::ttype_t* asr_type) { } return ASRUtils::is_array(asr_type) || !(ASR::is_a(*asr_type) || + ASR::is_a(*asr_type) || ASR::is_a(*asr_type) || ASR::is_a(*asr_type) || ASR::is_a(*asr_type)); @@ -1752,6 +1761,13 @@ static inline ASR::ttype_t* duplicate_type(Allocator& al, const ASR::ttype_t* t, return ASRUtils::TYPE(ASR::make_Integer_t(al, t->base.loc, tnew->m_kind, dimsp, dimsn)); } + case ASR::ttypeType::UnsignedInteger: { + ASR::UnsignedInteger_t* tnew = ASR::down_cast(t); + ASR::dimension_t* dimsp = dims ? dims->p : tnew->m_dims; + size_t dimsn = dims ? dims->n : tnew->n_dims; + return ASRUtils::TYPE(ASR::make_UnsignedInteger_t(al, t->base.loc, + tnew->m_kind, dimsp, dimsn)); + } case ASR::ttypeType::Real: { ASR::Real_t* tnew = ASR::down_cast(t); ASR::dimension_t* dimsp = dims ? dims->p : tnew->m_dims; @@ -1841,6 +1857,11 @@ static inline ASR::ttype_t* duplicate_type_without_dims(Allocator& al, const ASR return ASRUtils::TYPE(ASR::make_Integer_t(al, loc, tnew->m_kind, nullptr, 0)); } + case ASR::ttypeType::UnsignedInteger: { + ASR::UnsignedInteger_t* tnew = ASR::down_cast(t); + return ASRUtils::TYPE(ASR::make_UnsignedInteger_t(al, loc, + tnew->m_kind, nullptr, 0)); + } case ASR::ttypeType::Real: { ASR::Real_t* tnew = ASR::down_cast(t); return ASRUtils::TYPE(ASR::make_Real_t(al, loc, diff --git a/src/libasr/codegen/asr_to_llvm.cpp b/src/libasr/codegen/asr_to_llvm.cpp index ae7d1d4c2d..a5d82b7e63 100644 --- a/src/libasr/codegen/asr_to_llvm.cpp +++ b/src/libasr/codegen/asr_to_llvm.cpp @@ -477,6 +477,10 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor el_type = getIntType(a_kind); break; } + case ASR::ttypeType::UnsignedInteger: { + el_type = getIntType(a_kind); + break; + } case ASR::ttypeType::Real: { el_type = getFPType(a_kind); break; diff --git a/src/libasr/codegen/c_utils.h b/src/libasr/codegen/c_utils.h index 6f2557bf81..3fcf47e797 100644 --- a/src/libasr/codegen/c_utils.h +++ b/src/libasr/codegen/c_utils.h @@ -257,6 +257,10 @@ namespace CUtils { type_src = "int" + std::to_string(kind * 8) + "_t"; break; } + case ASR::ttypeType::UnsignedInteger: { + type_src = "uint" + std::to_string(kind * 8) + "_t"; + break; + } case ASR::ttypeType::Logical: { type_src = "bool"; break; diff --git a/src/libasr/pass/array_op.cpp b/src/libasr/pass/array_op.cpp index 74c0c3e7b7..3a0951d6e8 100644 --- a/src/libasr/pass/array_op.cpp +++ b/src/libasr/pass/array_op.cpp @@ -310,6 +310,11 @@ class ReplaceArrayOp: public ASR::BaseExprReplacer { al, loc, left, (ASR::binopType)x->m_op, right, x->m_type, nullptr)); + case ASR::exprType::UnsignedIntegerBinOp: + return ASRUtils::EXPR(ASR::make_UnsignedIntegerBinOp_t( + al, loc, left, (ASR::binopType)x->m_op, + right, x->m_type, nullptr)); + case ASR::exprType::RealBinOp: return ASRUtils::EXPR(ASR::make_RealBinOp_t( al, loc, left, (ASR::binopType)x->m_op, @@ -330,6 +335,11 @@ class ReplaceArrayOp: public ASR::BaseExprReplacer { al, loc, left, (ASR::cmpopType)x->m_op, right, x->m_type, nullptr)); + case ASR::exprType::UnsignedIntegerCompare: + return ASRUtils::EXPR(ASR::make_UnsignedIntegerCompare_t( + al, loc, left, (ASR::cmpopType)x->m_op, + right, x->m_type, nullptr)); + case ASR::exprType::RealCompare: return ASRUtils::EXPR(ASR::make_RealCompare_t( al, loc, left, (ASR::cmpopType)x->m_op, @@ -355,7 +365,8 @@ class ReplaceArrayOp: public ASR::BaseExprReplacer { case ASR::exprType::RealCompare: case ASR::exprType::ComplexCompare: case ASR::exprType::LogicalCompare: - case ASR::exprType::IntegerCompare: { + case ASR::exprType::IntegerCompare: + case ASR::exprType::UnsignedIntegerCompare: { ASR::ttype_t* arr_expr_type = ASRUtils::expr_type(arr_expr); ASR::dimension_t* m_dims; size_t n_dims = ASRUtils::extract_dimensions_from_ttype(arr_expr_type, m_dims); @@ -647,6 +658,10 @@ class ReplaceArrayOp: public ASR::BaseExprReplacer { replace_ArrayOpCommon(x, "_integer_bin_op_res"); } + void replace_UnsignedIntegerBinOp(ASR::UnsignedIntegerBinOp_t* x) { + replace_ArrayOpCommon(x, "_unsigned_integer_bin_op_res"); + } + void replace_ComplexBinOp(ASR::ComplexBinOp_t* x) { replace_ArrayOpCommon(x, "_complex_bin_op_res"); } @@ -659,6 +674,10 @@ class ReplaceArrayOp: public ASR::BaseExprReplacer { replace_ArrayOpCommon(x, "_integer_comp_op_res"); } + void replace_UnsignedIntegerCompare(ASR::UnsignedIntegerCompare_t* x) { + replace_ArrayOpCommon(x, "_unsigned_integer_comp_op_res"); + } + void replace_RealCompare(ASR::RealCompare_t* x) { replace_ArrayOpCommon(x, "_real_comp_op_res"); } diff --git a/src/libasr/pass/pass_utils.cpp b/src/libasr/pass/pass_utils.cpp index 52016f8b3f..f83bf92801 100644 --- a/src/libasr/pass/pass_utils.cpp +++ b/src/libasr/pass/pass_utils.cpp @@ -18,6 +18,12 @@ namespace LCompilers { m_dims = x_type_ref->m_dims; break; } + case ASR::ttypeType::UnsignedInteger: { + ASR::UnsignedInteger_t* x_type_ref = ASR::down_cast(t2); + n_dims = x_type_ref->n_dims; + m_dims = x_type_ref->m_dims; + break; + } case ASR::ttypeType::Real: { ASR::Real_t* x_type_ref = ASR::down_cast(t2); n_dims = x_type_ref->n_dims; @@ -69,6 +75,17 @@ namespace LCompilers { } break; } + case ASR::ttypeType::UnsignedInteger: { + ASR::UnsignedInteger_t* x_type_ref = ASR::down_cast(t2); + if( create_new ) { + new_type = ASRUtils::TYPE(ASR::make_UnsignedInteger_t(*al, x_type->base.loc, x_type_ref->m_kind, + m_dims, n_dims)); + } else { + x_type_ref->n_dims = n_dims; + x_type_ref->m_dims = m_dims; + } + break; + } case ASR::ttypeType::Real: { ASR::Real_t* x_type_ref = ASR::down_cast(t2); if( create_new ) { diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index 549b339594..df6cf54bb6 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -733,6 +733,21 @@ class CommonVisitor : public AST::BaseVisitor { } return ASRUtils::TYPE(ASR::make_Integer_t(al, loc, t->m_kind, new_dims.p, new_dims.size())); } + case ASR::ttypeType::UnsignedInteger: { + ASR::UnsignedInteger_t *t = ASR::down_cast(return_type); + fill_expr_in_ttype_t(func_calls, t->m_dims, t->n_dims); + fix_exprs_ttype_t(func_calls, args, f); + Vec new_dims; + new_dims.reserve(al, t->n_dims); + for( size_t i = 0; i < func_calls.size(); i += 2 ) { + ASR::dimension_t new_dim; + new_dim.loc = func_calls[i]->base.loc; + new_dim.m_start = func_calls[i]; + new_dim.m_length = func_calls[i + 1]; + new_dims.push_back(al, new_dim); + } + return ASRUtils::TYPE(ASR::make_UnsignedInteger_t(al, loc, t->m_kind, new_dims.p, new_dims.size())); + } case ASR::ttypeType::Real: { ASR::Real_t *t = ASR::down_cast(return_type); fill_expr_in_ttype_t(func_calls, t->m_dims, t->n_dims); diff --git a/src/lpython/semantics/python_comptime_eval.h b/src/lpython/semantics/python_comptime_eval.h index 21aa0794de..32a58ac47b 100644 --- a/src/lpython/semantics/python_comptime_eval.h +++ b/src/lpython/semantics/python_comptime_eval.h @@ -25,7 +25,9 @@ struct ProceduresDatabase { "float32", "float64", "reshape", "array", "int16", "complex64", "complex128", - "int8", "exp", "exp2"}}, + "int8", "exp", "exp2", + "uint8", "uint16", "uint32", "uint64", + "size"}}, {"math", {"sin", "cos", "tan", "asin", "acos", "atan", "exp", "exp2", "expm1"}}, From d1535f4d5b341b7916638a226d7e91a0ff047dbe Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Thu, 11 May 2023 05:39:01 +0530 Subject: [PATCH 42/72] ASR: Support array.size attribute --- src/lpython/semantics/python_ast_to_asr.cpp | 10 ++++++++-- src/lpython/semantics/python_attribute_eval.h | 14 +++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index df6cf54bb6..c1c47e2434 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -5137,7 +5137,13 @@ class BodyVisitor : public CommonVisitor { void visit_AttributeUtil(ASR::ttype_t* type, char* attr_char, ASR::symbol_t *t, const Location& loc) { - if (ASRUtils::is_complex(*type)) { + if (ASRUtils::is_array(type)) { + std::string attr = attr_char; + ASR::expr_t *se = ASR::down_cast(ASR::make_Var_t(al, loc, t)); + Vec args; + args.reserve(al, 0); + handle_attribute(se, attr, loc, args); + } else if (ASRUtils::is_complex(*type)) { std::string attr = attr_char; if (attr == "imag") { ASR::expr_t *val = ASR::down_cast(ASR::make_Var_t(al, loc, t)); @@ -6705,7 +6711,7 @@ class BodyVisitor : public CommonVisitor { ASRUtils::IntrinsicFunctionRegistry::get_create_function(call_name); Vec args_; args_.reserve(al, x.n_args); visit_expr_list(x.m_args, x.n_args, args_); - if (ASRUtils::is_array(ASRUtils::expr_type(args_[0])) && + if (ASRUtils::is_array(ASRUtils::expr_type(args_[0])) && imported_functions[call_name] == "math" ) { throw SemanticError("Function '" + call_name + "' does not accept vector values", x.base.base.loc); diff --git a/src/lpython/semantics/python_attribute_eval.h b/src/lpython/semantics/python_attribute_eval.h index 14348ce91f..80d8181400 100644 --- a/src/lpython/semantics/python_attribute_eval.h +++ b/src/lpython/semantics/python_attribute_eval.h @@ -20,6 +20,7 @@ struct AttributeHandler { AttributeHandler() { attribute_map = { {"int@bit_length", &eval_int_bit_length}, + {"array@size", &eval_array_size}, {"list@append", &eval_list_append}, {"list@remove", &eval_list_remove}, {"list@count", &eval_list_count}, @@ -42,6 +43,8 @@ struct AttributeHandler { return "set"; } else if (ASR::is_a(*t)) { return "dict"; + } else if (ASRUtils::is_array(t)) { + return "array"; } else if (ASR::is_a(*t)) { return "int"; } @@ -55,7 +58,7 @@ struct AttributeHandler { if (class_name == "") { throw SemanticError("Type name is not implemented yet.", loc); } - std::string key = get_type_name(type) + "@" + attr_name; + std::string key = class_name + "@" + attr_name; auto search = attribute_map.find(key); if (search != attribute_map.end()) { attribute_eval_callback cb = search->second; @@ -77,6 +80,15 @@ struct AttributeHandler { return ASR::make_IntegerBitLen_t(al, loc, s, int_type, nullptr); } + static ASR::asr_t* eval_array_size(ASR::expr_t *s, Allocator &al, const Location &loc, + Vec &args, diag::Diagnostics &/*diag*/) { + if (args.size() != 0) { + throw SemanticError("array.size() takes no arguments", loc); + } + ASR::ttype_t *int_type = ASRUtils::TYPE(ASR::make_Integer_t(al, loc, 4, nullptr, 0)); + return ASR::make_ArraySize_t(al, loc, s, nullptr, int_type, nullptr); + } + static ASR::asr_t* eval_list_append(ASR::expr_t *s, Allocator &al, const Location &loc, Vec &args, diag::Diagnostics &diag) { if (args.size() != 1) { From 46d283d8c61f5b80eda509cc38c94a8d45f267f1 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Thu, 11 May 2023 06:09:15 +0530 Subject: [PATCH 43/72] ASR: Support numpy size() --- src/lpython/semantics/python_ast_to_asr.cpp | 28 ++++++++++----------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index c1c47e2434..c954ef6405 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -6743,21 +6743,19 @@ class BodyVisitor : public CommonVisitor { // This will all be removed once we port it to intrinsic functions // Intrinsic functions if (call_name == "size") { - // TODO: size should be part of ASR. That way - // ASR itself does not need a runtime library - // a runtime library thus becomes optional --- can either be - // implemented using ASR, or the backend can link it at runtime - ASR::ttype_t *a_type = ASRUtils::TYPE(ASR::make_Integer_t(al, x.base.base.loc, - 4, nullptr, 0)); - /* - ASR::symbol_t *a_name = nullptr; - throw SemanticError("TODO: add the size() function and look it up", - x.base.base.loc); - tmp = ASR::make_FunctionCall_t(al, x.base.base.loc, a_name, - nullptr, args.p, args.size(), nullptr, 0, a_type, nullptr, nullptr); - */ - - tmp = ASR::make_IntegerConstant_t(al, x.base.base.loc, 1234, a_type); + parse_args(); + if( args.size() < 1 || args.size() > 2 ) { + throw SemanticError("array accepts only 1 (arr) or 2 (arr, axis) arguments, got " + + std::to_string(args.size()) + " arguments instead.", + x.base.base.loc); + } + ASR::expr_t *var = args[0].m_value; + ASR::expr_t *dim = nullptr; + if (args.size() == 2) { + dim = args[1].m_value; + } + ASR::ttype_t *int_type = ASRUtils::TYPE(ASR::make_Integer_t(al, x.base.base.loc, 4, nullptr, 0)); + tmp = ASR::make_ArraySize_t(al, x.base.base.loc, var, dim, int_type, nullptr); return; } else if (call_name == "empty") { // TODO: check that the `empty` arguments are compatible From 6c6043bf14f7682036a2f7c521ccf10251f0e7cd Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Thu, 11 May 2023 05:48:39 +0530 Subject: [PATCH 44/72] TEST: Add test for array.size --- integration_tests/CMakeLists.txt | 1 + integration_tests/array_size_01.py | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 integration_tests/array_size_01.py diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index 3bfaa37676..39d72d6154 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -280,6 +280,7 @@ RUN(NAME variable_decl_02 LABELS cpython llvm c) RUN(NAME variable_decl_03 LABELS cpython llvm c) RUN(NAME array_expr_01 LABELS cpython llvm c) RUN(NAME array_expr_02 LABELS cpython llvm c) +RUN(NAME array_size_01 LABELS cpython llvm c) RUN(NAME array_01 LABELS cpython llvm wasm c) RUN(NAME array_02 LABELS cpython wasm c) RUN(NAME bindc_01 LABELS cpython llvm c) diff --git a/integration_tests/array_size_01.py b/integration_tests/array_size_01.py new file mode 100644 index 0000000000..bfa33f9eac --- /dev/null +++ b/integration_tests/array_size_01.py @@ -0,0 +1,23 @@ +from lpython import i32, f64, c32, c64 +from numpy import empty + +def main0(): + x: i32[4, 5, 2] = empty([4, 5, 2]) + y: f64[24, 100, 2, 5] = empty([24, 100, 2, 5]) + print(x.size) + print(y.size) + + assert x.size == 40 + assert y.size == 24000 + +def main1(): + a: c32[12] = empty([12]) + b: c64[15, 15, 10] = empty([15, 15, 10]) + print(a.size) + print(b.size) + + assert a.size == 12 + assert b.size == 2250 + +main0() +main1() From c900f7d6c9c162df0fdab35c452f122fed793a20 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Thu, 11 May 2023 06:26:38 +0530 Subject: [PATCH 45/72] TEST: Update reference tests --- .../reference/asr-doconcurrentloop_01-7b9a7d3.json | 2 +- .../asr-doconcurrentloop_01-7b9a7d3.stdout | 14 ++++++++++++-- .../reference/cpp-doconcurrentloop_01-4e9f274.json | 2 +- .../cpp-doconcurrentloop_01-4e9f274.stdout | 4 ++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/tests/reference/asr-doconcurrentloop_01-7b9a7d3.json b/tests/reference/asr-doconcurrentloop_01-7b9a7d3.json index 264a2b31c2..2172b53c7b 100644 --- a/tests/reference/asr-doconcurrentloop_01-7b9a7d3.json +++ b/tests/reference/asr-doconcurrentloop_01-7b9a7d3.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-doconcurrentloop_01-7b9a7d3.stdout", - "stdout_hash": "dffb1f7233f48b1711345ac6d1649bfdc6d8244f5596e9a2a9144904", + "stdout_hash": "9519c801f6f3612439fef115f1c30385234060565a7dd07e125685a4", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-doconcurrentloop_01-7b9a7d3.stdout b/tests/reference/asr-doconcurrentloop_01-7b9a7d3.stdout index a9da9d9d91..81ce8cdc3c 100644 --- a/tests/reference/asr-doconcurrentloop_01-7b9a7d3.stdout +++ b/tests/reference/asr-doconcurrentloop_01-7b9a7d3.stdout @@ -179,7 +179,12 @@ ) (= (Var 3 nsize) - (IntegerConstant 1234 (Integer 4 [])) + (ArraySize + (Var 3 a) + () + (Integer 4 []) + () + ) () ) (DoConcurrentLoop @@ -394,7 +399,12 @@ (Var 2 c)] [(= (Var 2 N) - (IntegerConstant 1234 (Integer 4 [])) + (ArraySize + (Var 2 a) + () + (Integer 4 []) + () + ) () ) (DoConcurrentLoop diff --git a/tests/reference/cpp-doconcurrentloop_01-4e9f274.json b/tests/reference/cpp-doconcurrentloop_01-4e9f274.json index 54fae042ca..90dec8ce2a 100644 --- a/tests/reference/cpp-doconcurrentloop_01-4e9f274.json +++ b/tests/reference/cpp-doconcurrentloop_01-4e9f274.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "cpp-doconcurrentloop_01-4e9f274.stdout", - "stdout_hash": "ee58f996458bdf91f906f012b009681a568ad314c5907d9a698e41b8", + "stdout_hash": "79dc6e24e5f0c768ebbadd5b3bd466b53e1b89608b2d1e1a4a0d4caf", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/cpp-doconcurrentloop_01-4e9f274.stdout b/tests/reference/cpp-doconcurrentloop_01-4e9f274.stdout index 1c630b6cb0..d8612b3a9e 100644 --- a/tests/reference/cpp-doconcurrentloop_01-4e9f274.stdout +++ b/tests/reference/cpp-doconcurrentloop_01-4e9f274.stdout @@ -48,7 +48,7 @@ void triad(T0* a, T1* b, float scalar, T2* c) { int32_t N; int32_t i; - N = 1234; + N = a->data->extent(0); Kokkos::parallel_for(Kokkos::RangePolicy(0, N - 1+1), KOKKOS_LAMBDA(const long i) { c->data->operator[](i - c->dims[0].lower_bound) = a->data->operator[](i - a->dims[0].lower_bound) + scalar*b->data->operator[](i - b->dims[0].lower_bound); }); @@ -75,7 +75,7 @@ void main0() int32_t nsize; float scalar; scalar = 1.00000000000000000e+01; - nsize = 1234; + nsize = a->data->extent(0); Kokkos::parallel_for(Kokkos::RangePolicy(0, nsize - 1+1), KOKKOS_LAMBDA(const long i) { a->data->operator[](i - a->dims[0].lower_bound) = 5.00000000000000000e+00; b->data->operator[](i - b->dims[0].lower_bound) = 5.00000000000000000e+00; From a0441aac7c4c9250fed7f870fbd268492184a227 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Thu, 11 May 2023 13:23:10 +0530 Subject: [PATCH 46/72] Add support for AST/R Visualization --- .gitignore | 1 + src/bin/lpython.cpp | 50 +++++++++++--- src/libasr/utils.h | 2 + src/libasr/utils2.cpp | 12 ++++ src/lpython/utils.cpp | 153 ++++++++++++++++++++++++++++++++++++++++++ src/lpython/utils.h | 2 + 6 files changed, 210 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 44c7866bae..e237284a56 100644 --- a/.gitignore +++ b/.gitignore @@ -89,6 +89,7 @@ inst/bin/* *_ldd.txt *_lines.dat.txt *__tmp__generated__.c +visualize*.html a.c a.h a.py diff --git a/src/bin/lpython.cpp b/src/bin/lpython.cpp index 45eb202650..9211aaedce 100644 --- a/src/bin/lpython.cpp +++ b/src/bin/lpython.cpp @@ -76,6 +76,29 @@ std::string get_kokkos_dir() throw LCompilers::LCompilersException("LFORTRAN_KOKKOS_DIR is not defined"); } +int visualize_json(std::string &astr_data_json, LCompilers::Platform os) { + using namespace LCompilers; + std::string file_loc = LCompilers::LPython::generate_visualize_html(astr_data_json); + std::string open_cmd = ""; + switch (os) { + case Linux: open_cmd = "xdg-open"; break; + case Windows: open_cmd = "start"; break; + case macOS_Intel: + case macOS_ARM: open_cmd = "open"; break; + default: + std::cerr << "Unsupported Platform " << pf2s(os) < r = LCompilers::LPython::pickle_json(*ast, lm); + return visualize_json(r.result, compiler_options.platform); } else { std::cout << LCompilers::LPython::pickle_python(*ast, compiler_options.use_colors, compiler_options.indent) << std::endl; @@ -211,6 +246,9 @@ int emit_asr(const std::string &infile, compiler_options.use_colors, with_intrinsic_modules) << std::endl; } else if (compiler_options.json) { std::cout << LCompilers::LPython::pickle_json(*asr, lm, with_intrinsic_modules) << std::endl; + } else if (compiler_options.visualize) { + std::string astr_data_json = LCompilers::LPython::pickle_json(*asr, lm, with_intrinsic_modules); + return visualize_json(astr_data_json, compiler_options.platform); } else { std::cout << LCompilers::LPython::pickle(*asr, compiler_options.use_colors, compiler_options.indent, with_intrinsic_modules) << std::endl; @@ -1499,6 +1537,7 @@ int main(int argc, char *argv[]) app.add_flag("--indent", compiler_options.indent, "Indented print ASR/AST"); app.add_flag("--tree", compiler_options.tree, "Tree structure print ASR/AST"); app.add_flag("--json", compiler_options.json, "Print ASR/AST Json format"); + app.add_flag("--visualize", compiler_options.visualize, "Print ASR/AST Visualization"); app.add_option("--pass", arg_pass, "Apply the ASR pass and show ASR (implies --show-asr)"); app.add_option("--skip-pass", skip_pass, "Skip an ASR pass in default pipeline"); app.add_flag("--disable-main", compiler_options.disable_main, "Do not generate any code for the `main` function"); @@ -1566,16 +1605,7 @@ int main(int argc, char *argv[]) if (arg_version) { std::string version = LFORTRAN_VERSION; std::cout << "LPython version: " << version << std::endl; - std::cout << "Platform: "; - switch (compiler_options.platform) { - case (LCompilers::Platform::Linux) : std::cout << "Linux"; break; - case (LCompilers::Platform::macOS_Intel) : std::cout << "macOS Intel"; break; - case (LCompilers::Platform::macOS_ARM) : std::cout << "macOS ARM"; break; - case (LCompilers::Platform::Windows) : std::cout << "Windows"; break; - case (LCompilers::Platform::FreeBSD) : std::cout << "FreeBSD"; break; - case (LCompilers::Platform::OpenBSD) : std::cout << "OpenBSD"; break; - } - std::cout << std::endl; + std::cout << "Platform: " << pf2s(compiler_options.platform) << std::endl; #ifdef HAVE_LFORTRAN_LLVM std::cout << "Default target: " << LCompilers::LLVMEvaluator::get_default_target_triple() << std::endl; #endif diff --git a/src/libasr/utils.h b/src/libasr/utils.h index e31cbe2d11..f480e612cc 100644 --- a/src/libasr/utils.h +++ b/src/libasr/utils.h @@ -17,6 +17,7 @@ enum Platform { OpenBSD, }; +std::string pf2s(Platform); Platform get_platform(); struct CompilerOptions { @@ -37,6 +38,7 @@ struct CompilerOptions { bool indent = false; bool json = false; bool tree = false; + bool visualize = false; bool fast = false; bool openmp = false; bool generate_object_code = false; diff --git a/src/libasr/utils2.cpp b/src/libasr/utils2.cpp index dc5e570072..62cabe162d 100644 --- a/src/libasr/utils2.cpp +++ b/src/libasr/utils2.cpp @@ -46,6 +46,18 @@ bool present(char** const v, size_t n, const std::string name) { return false; } +std::string pf2s(Platform p) { + switch (p) { + case (Platform::Linux) : return "Linux"; + case (Platform::macOS_Intel) : return "macOS Intel"; + case (Platform::macOS_ARM) : return "macOS ARM"; + case (Platform::Windows) : return "Windows"; + case (Platform::FreeBSD) : return "FreeBSD"; + case (Platform::OpenBSD) : return "OpenBSD"; + } + return "Unsupported Platform"; +} + Platform get_platform() { #if defined(_WIN32) diff --git a/src/lpython/utils.cpp b/src/lpython/utils.cpp index d3c07855de..e8562458f1 100644 --- a/src/lpython/utils.cpp +++ b/src/lpython/utils.cpp @@ -131,4 +131,157 @@ int32_t get_exit_status(int32_t err) { return (((err) >> 8) & 0x000000ff); } +std::string generate_visualize_html(std::string &astr_data_json) { + std::hash hasher; + std::ofstream out; + std::string file_name = "visualize" + std::to_string(hasher(astr_data_json)) + ".html"; + out.open(file_name); + out << R"( + + + LCompilers AST/R Visualization + + + + + + + \n"; + out << R"( + + + + + +)"; + return file_name; +} + } diff --git a/src/lpython/utils.h b/src/lpython/utils.h index 912f3f620e..f6b9f88f9b 100644 --- a/src/lpython/utils.h +++ b/src/lpython/utils.h @@ -15,6 +15,8 @@ bool path_exists(std::string path); // Decodes the exit status code of the process (in Unix) int32_t get_exit_status(int32_t err); +std::string generate_visualize_html(std::string &astr_data_json); + } // LFortran #endif // LFORTRAN_UTILS_H From d2420d7b68b045f4d844492f55af6b3c519f4d02 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Thu, 11 May 2023 13:33:19 +0530 Subject: [PATCH 47/72] Add --no-indent flag Indent by default --- share/lpython/lfortran-completion.bash | 2 +- src/bin/lpython.cpp | 4 +++- src/libasr/utils.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/share/lpython/lfortran-completion.bash b/share/lpython/lfortran-completion.bash index ca63ca03bd..69bb236096 100644 --- a/share/lpython/lfortran-completion.bash +++ b/share/lpython/lfortran-completion.bash @@ -1,6 +1,6 @@ #/usr/bin/env bash complete \ - -W "-h --help -S -c -o -v -E -I --version --cpp --fixed-form --show-prescan --show-tokens --show-ast --show-asr --with-intrinsic-modules --show-ast-f90 --no-color --indent --pass --show-llvm --show-cpp --show-stacktrace --time-report --static --backend --openmp fmt kernel mod pywrap" \ + -W "-h --help -S -c -o -v -E -I --version --cpp --fixed-form --show-prescan --show-tokens --show-ast --show-asr --with-intrinsic-modules --show-ast-f90 --no-color --pass --show-llvm --show-cpp --show-stacktrace --time-report --static --backend --openmp fmt kernel mod pywrap" \ -df \ lfortran diff --git a/src/bin/lpython.cpp b/src/bin/lpython.cpp index 9211aaedce..45b3b53621 100644 --- a/src/bin/lpython.cpp +++ b/src/bin/lpython.cpp @@ -1471,6 +1471,7 @@ int main(int argc, char *argv[]) std::string arg_pass; std::string skip_pass; bool arg_no_color = false; + bool arg_no_indent = false; bool show_llvm = false; bool show_asm = false; bool show_wat = false; @@ -1534,7 +1535,7 @@ int main(int argc, char *argv[]) app.add_flag("--show-stacktrace", compiler_options.show_stacktrace, "Show internal stacktrace on compiler errors"); app.add_flag("--with-intrinsic-mods", with_intrinsic_modules, "Show intrinsic modules in ASR"); app.add_flag("--no-color", arg_no_color, "Turn off colored AST/ASR"); - app.add_flag("--indent", compiler_options.indent, "Indented print ASR/AST"); + app.add_flag("--no-indent", arg_no_indent, "Turn off Indented print ASR/AST"); app.add_flag("--tree", compiler_options.tree, "Tree structure print ASR/AST"); app.add_flag("--json", compiler_options.json, "Print ASR/AST Json format"); app.add_flag("--visualize", compiler_options.visualize, "Print ASR/AST Visualization"); @@ -1633,6 +1634,7 @@ int main(int argc, char *argv[]) } compiler_options.use_colors = !arg_no_color; + compiler_options.indent = !arg_no_indent; // if (fmt) { // return format(arg_fmt_file, arg_fmt_inplace, !arg_fmt_no_color, diff --git a/src/libasr/utils.h b/src/libasr/utils.h index f480e612cc..167314ffe9 100644 --- a/src/libasr/utils.h +++ b/src/libasr/utils.h @@ -35,7 +35,7 @@ struct CompilerOptions { bool symtab_only = false; bool show_stacktrace = false; bool use_colors = true; - bool indent = false; + bool indent = true; bool json = false; bool tree = false; bool visualize = false; From bbcec157d115107e7f9631f386870f95924d578c Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Thu, 11 May 2023 13:29:19 +0530 Subject: [PATCH 48/72] Revert "TEST: Indent all AST and ASR tests" This reverts commit 9938e6c011ab0c51b99c261f19f88202735759d2. --- run_tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/run_tests.py b/run_tests.py index 1d78d8fcb4..3aeebe8854 100755 --- a/run_tests.py +++ b/run_tests.py @@ -58,7 +58,7 @@ def is_included(backend): run_test( filename, "ast", - "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "lpython --show-ast --no-color {infile} -o {outfile}", filename, update_reference, extra_args) @@ -67,7 +67,7 @@ def is_included(backend): run_test( filename, "ast_new", - "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", filename, update_reference, extra_args) @@ -76,7 +76,7 @@ def is_included(backend): run_test( filename, "asr", - "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "lpython --show-asr --no-color {infile} -o {outfile}", filename, update_reference, extra_args) @@ -92,7 +92,7 @@ def is_included(backend): if pass_ is not None: cmd = "lpython --pass=" + pass_ + \ - " --show-asr --indent --no-color {infile} -o {outfile}" + " --show-asr --no-color {infile} -o {outfile}" run_test(filename, "pass_{}".format(pass_), cmd, filename, update_reference, extra_args) From 8d1c9c332171367601a58211cfe769c52a35199b Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Thu, 11 May 2023 20:09:01 +0530 Subject: [PATCH 49/72] TEST: Update reference tests --- ...1_decl-f955627.json => asr-array_01_decl-39cf894.json} | 6 +++--- ...cl-f955627.stdout => asr-array_01_decl-39cf894.stdout} | 0 ...2_decl-8860c8a.json => asr-array_02_decl-e8f6874.json} | 6 +++--- ...cl-8860c8a.stdout => asr-array_02_decl-e8f6874.stdout} | 0 ...{asr-assert1-a8db80c.json => asr-assert1-1ce92ea.json} | 6 +++--- ...-assert1-a8db80c.stdout => asr-assert1-1ce92ea.stdout} | 0 ...{asr-assign1-ec7ab8d.json => asr-assign1-886f049.json} | 6 +++--- ...-assign1-ec7ab8d.stdout => asr-assign1-886f049.stdout} | 0 ...{asr-assign2-4778d3a.json => asr-assign2-8d1a2ee.json} | 6 +++--- ...-assign2-4778d3a.stdout => asr-assign2-8d1a2ee.stdout} | 0 ...sr-bindc_01-edd8cc4.json => asr-bindc_01-6d521a9.json} | 6 +++--- ...indc_01-edd8cc4.stdout => asr-bindc_01-6d521a9.stdout} | 0 ...sr-bindc_01-f8048b2.json => asr-bindc_01-f761165.json} | 6 +++--- ...indc_01-f8048b2.stderr => asr-bindc_01-f761165.stderr} | 0 ...sr-bindc_02-2406ab7.json => asr-bindc_02-5092d8e.json} | 6 +++--- ...indc_02-2406ab7.stderr => asr-bindc_02-5092d8e.stderr} | 0 ...sr-bindc_02-8c7fec3.json => asr-bindc_02-bc1a7ea.json} | 6 +++--- ...indc_02-8c7fec3.stdout => asr-bindc_02-bc1a7ea.stdout} | 0 ...sr-bindc_03-67595e1.json => asr-bindc_03-95dbba7.json} | 6 +++--- ...indc_03-67595e1.stderr => asr-bindc_03-95dbba7.stderr} | 0 ..._interop1-c0a6335.json => asr-c_interop1-cf2e9b4.json} | 6 +++--- ...erop1-c0a6335.stdout => asr-c_interop1-cf2e9b4.stdout} | 0 ...lback_01-64f7a94.json => asr-callback_01-df40fd5.json} | 6 +++--- ...k_01-64f7a94.stdout => asr-callback_01-df40fd5.stdout} | 0 .../{asr-cast-d93d15f.json => asr-cast-435c233.json} | 6 +++--- .../{asr-cast-d93d15f.stdout => asr-cast-435c233.stdout} | 0 ...sr-complex1-7ce1c89.json => asr-complex1-f26c460.json} | 6 +++--- ...omplex1-7ce1c89.stdout => asr-complex1-f26c460.stdout} | 0 ...sr-const_01-6df049a.json => asr-const_01-af8289b.json} | 6 +++--- ...onst_01-6df049a.stderr => asr-const_01-af8289b.stderr} | 0 ...sr-const_02-8dbfab6.json => asr-const_02-fce29b7.json} | 6 +++--- ...onst_02-8dbfab6.stderr => asr-const_02-fce29b7.stderr} | 0 ...onstants1-20d32ff.json => asr-constants1-5828e8a.json} | 6 +++--- ...ants1-20d32ff.stdout => asr-constants1-5828e8a.stdout} | 0 ...{asr-cptr_01-0dc5185.json => asr-cptr_01-4e660f1.json} | 6 +++--- ...-cptr_01-0dc5185.stderr => asr-cptr_01-4e660f1.stderr} | 0 ...tionary1-789a50b.json => asr-dictionary1-a105a36.json} | 6 +++--- ...ary1-789a50b.stdout => asr-dictionary1-a105a36.stdout} | 0 ...-7b9a7d3.json => asr-doconcurrentloop_01-3fdc189.json} | 6 +++--- ...a7d3.stdout => asr-doconcurrentloop_01-3fdc189.stdout} | 0 ...ntal_01-b6a1371.json => asr-elemental_01-b58df26.json} | 6 +++--- ..._01-b6a1371.stdout => asr-elemental_01-b58df26.stdout} | 0 ...{asr-enum_01-55993b7.json => asr-enum_01-30e1b4a.json} | 6 +++--- ...-enum_01-55993b7.stderr => asr-enum_01-30e1b4a.stderr} | 0 ...{asr-enum_02-6bb05f8.json => asr-enum_02-54656c5.json} | 6 +++--- ...-enum_02-6bb05f8.stderr => asr-enum_02-54656c5.stderr} | 0 .../{asr-expr1-dde511e.json => asr-expr1-8df2d66.json} | 6 +++--- ...{asr-expr1-dde511e.stdout => asr-expr1-8df2d66.stdout} | 0 .../{asr-expr10-31c163f.json => asr-expr10-efcbb1b.json} | 6 +++--- ...sr-expr10-31c163f.stdout => asr-expr10-efcbb1b.stdout} | 0 .../{asr-expr11-1134d3f.json => asr-expr11-9b91d35.json} | 6 +++--- ...sr-expr11-1134d3f.stdout => asr-expr11-9b91d35.stdout} | 0 .../{asr-expr12-2a30333.json => asr-expr12-5c5b71e.json} | 6 +++--- ...sr-expr12-2a30333.stdout => asr-expr12-5c5b71e.stdout} | 0 .../{asr-expr13-10040d8.json => asr-expr13-81bdb5a.json} | 6 +++--- ...sr-expr13-10040d8.stdout => asr-expr13-81bdb5a.stdout} | 0 .../{asr-expr16-f828d62.json => asr-expr16-a3dc453.json} | 6 +++--- ...sr-expr16-f828d62.stderr => asr-expr16-a3dc453.stderr} | 0 .../{asr-expr2-5311701.json => asr-expr2-2e78a12.json} | 6 +++--- ...{asr-expr2-5311701.stdout => asr-expr2-2e78a12.stdout} | 0 .../{asr-expr4-cf512ef.json => asr-expr4-cef6743.json} | 6 +++--- ...{asr-expr4-cf512ef.stdout => asr-expr4-cef6743.stdout} | 0 .../{asr-expr5-375548a.json => asr-expr5-645ffcc.json} | 6 +++--- ...{asr-expr5-375548a.stdout => asr-expr5-645ffcc.stdout} | 0 .../{asr-expr6-bfb3384.json => asr-expr6-368e5ed.json} | 6 +++--- ...{asr-expr6-bfb3384.stdout => asr-expr6-368e5ed.stdout} | 0 .../{asr-expr7-2ef3822.json => asr-expr7-480ba2f.json} | 8 ++++---- ...{asr-expr7-2ef3822.stderr => asr-expr7-480ba2f.stderr} | 0 ...{asr-expr7-2ef3822.stdout => asr-expr7-480ba2f.stdout} | 0 .../{asr-expr8-2a4630a.json => asr-expr8-6beda60.json} | 6 +++--- ...{asr-expr8-2a4630a.stdout => asr-expr8-6beda60.stdout} | 0 .../{asr-expr9-c6fe691.json => asr-expr9-814e4bc.json} | 6 +++--- ...{asr-expr9-c6fe691.stdout => asr-expr9-814e4bc.stdout} | 0 ...{asr-expr_01-03055c0.json => asr-expr_01-211000e.json} | 6 +++--- ...-expr_01-03055c0.stdout => asr-expr_01-211000e.stdout} | 0 ...{asr-expr_01-eafd41c.json => asr-expr_01-a0d4829.json} | 6 +++--- ...-expr_01-eafd41c.stdout => asr-expr_01-a0d4829.stdout} | 0 ...{asr-expr_05-45e5844.json => asr-expr_05-3a37324.json} | 6 +++--- ...-expr_05-45e5844.stdout => asr-expr_05-3a37324.stdout} | 0 ...{asr-expr_07-ccf2455.json => asr-expr_07-7742668.json} | 6 +++--- ...-expr_07-ccf2455.stdout => asr-expr_07-7742668.stdout} | 0 ...{asr-expr_09-0e8c1e6.json => asr-expr_09-f3e89c8.json} | 6 +++--- ...-expr_09-0e8c1e6.stdout => asr-expr_09-f3e89c8.stdout} | 0 ...{asr-expr_10-e2e0267.json => asr-expr_10-d39708c.json} | 6 +++--- ...-expr_10-e2e0267.stdout => asr-expr_10-d39708c.stdout} | 0 ...{asr-expr_12-7aa0c4c.json => asr-expr_12-6769be0.json} | 6 +++--- ...-expr_12-7aa0c4c.stdout => asr-expr_12-6769be0.stdout} | 0 ...{asr-expr_14-6023c49.json => asr-expr_14-f2bd343.json} | 6 +++--- ...-expr_14-6023c49.stdout => asr-expr_14-f2bd343.stdout} | 0 ...{asr-func_01-95c4d66.json => asr-func_01-d87aa4a.json} | 6 +++--- ...-func_01-95c4d66.stderr => asr-func_01-d87aa4a.stderr} | 0 ...ne_01-56dbc9a.json => asr-func_inline_01-56af272.json} | 6 +++--- ...1-56dbc9a.stdout => asr-func_inline_01-56af272.stdout} | 0 ...erics_01-4ff9de7.json => asr-generics_01-d616074.json} | 6 +++--- ...s_01-4ff9de7.stdout => asr-generics_01-d616074.stdout} | 0 ...erics_02-79b33a1.json => asr-generics_02-e2ea5c9.json} | 6 +++--- ...s_02-79b33a1.stdout => asr-generics_02-e2ea5c9.stdout} | 0 ...01-8e0b4d1.json => asr-generics_array_01-682b1b2.json} | 6 +++--- ...e0b4d1.stdout => asr-generics_array_01-682b1b2.stdout} | 0 ...02-e149533.json => asr-generics_array_02-22c8dc1.json} | 6 +++--- ...149533.stdout => asr-generics_array_02-22c8dc1.stdout} | 0 ...03-a1b8457.json => asr-generics_array_03-fb3706c.json} | 6 +++--- ...1b8457.stdout => asr-generics_array_03-fb3706c.stdout} | 0 ...01-0f48f9c.json => asr-generics_error_01-1e05cd6.json} | 6 +++--- ...f48f9c.stderr => asr-generics_error_01-1e05cd6.stderr} | 0 ...02-ff6918a.json => asr-generics_error_02-d614928.json} | 6 +++--- ...f6918a.stderr => asr-generics_error_02-d614928.stderr} | 0 ...03-8818c90.json => asr-generics_error_03-208d10d.json} | 6 +++--- ...818c90.stderr => asr-generics_error_03-208d10d.stderr} | 0 ..._01-4ec4007.json => asr-generics_list_01-39c4044.json} | 6 +++--- ...4ec4007.stdout => asr-generics_list_01-39c4044.stdout} | 0 ...scope1-b335bb9.json => asr-global_scope1-354e217.json} | 6 +++--- ...e1-b335bb9.stdout => asr-global_scope1-354e217.stdout} | 0 ...ms_01-12ee218.json => asr-global_syms_01-273906f.json} | 6 +++--- ...1-12ee218.stdout => asr-global_syms_01-273906f.stdout} | 0 ...rror-ada0f8b.json => asr-kwargs_01_error-ab9530d.json} | 6 +++--- ...-ada0f8b.stderr => asr-kwargs_01_error-ab9530d.stderr} | 0 ...rror-5c8b0e6.json => asr-kwargs_02_error-7c91f8f.json} | 6 +++--- ...-5c8b0e6.stderr => asr-kwargs_02_error-7c91f8f.stderr} | 0 ...rror-0eb2867.json => asr-kwargs_03_error-a68cc46.json} | 6 +++--- ...-0eb2867.stderr => asr-kwargs_03_error-a68cc46.stderr} | 0 .../{asr-list1-f15817d.json => asr-list1-770ba33.json} | 6 +++--- ...{asr-list1-f15817d.stdout => asr-list1-770ba33.stdout} | 0 .../{asr-loop1-ce84aac.json => asr-loop1-10d3109.json} | 6 +++--- ...{asr-loop1-ce84aac.stdout => asr-loop1-10d3109.stdout} | 0 .../{asr-loop2-5e07e8f.json => asr-loop2-e874469.json} | 6 +++--- ...{asr-loop2-5e07e8f.stdout => asr-loop2-e874469.stdout} | 0 .../{asr-loop3-e2afee9.json => asr-loop3-a579196.json} | 6 +++--- ...{asr-loop3-e2afee9.stdout => asr-loop3-a579196.stdout} | 0 .../{asr-loop4-b39f53b.json => asr-loop4-3d3216e.json} | 6 +++--- ...{asr-loop4-b39f53b.stdout => asr-loop4-3d3216e.stdout} | 0 ...{asr-loop_01-b50c123.json => asr-loop_01-e7aa06a.json} | 6 +++--- ...-loop_01-b50c123.stderr => asr-loop_01-e7aa06a.stderr} | 0 ...{asr-loop_02-3961316.json => asr-loop_02-5741651.json} | 6 +++--- ...-loop_02-3961316.stderr => asr-loop_02-5741651.stderr} | 0 ...{asr-loop_03-e7ccaee.json => asr-loop_03-401ab45.json} | 6 +++--- ...-loop_03-e7ccaee.stderr => asr-loop_03-401ab45.stderr} | 0 ...odules_02-5371fe0.json => asr-modules_02-ec92e6f.json} | 6 +++--- ...es_02-5371fe0.stdout => asr-modules_02-ec92e6f.stdout} | 0 ...sr-print_02-f237d46.json => asr-print_02-afbe092.json} | 6 +++--- ...rint_02-f237d46.stdout => asr-print_02-afbe092.stdout} | 0 .../{asr-set1-7de4081.json => asr-set1-b7b913a.json} | 6 +++--- .../{asr-set1-7de4081.stdout => asr-set1-b7b913a.stdout} | 0 ...tructs_01-3bbe189.json => asr-structs_01-0893e35.json} | 6 +++--- ...ts_01-3bbe189.stderr => asr-structs_01-0893e35.stderr} | 0 ...tructs_01-c473a5f.json => asr-structs_01-be14d49.json} | 6 +++--- ...ts_01-c473a5f.stdout => asr-structs_01-be14d49.stdout} | 0 ...tructs_02-a0958ac.json => asr-structs_02-2ab459a.json} | 6 +++--- ...ts_02-a0958ac.stdout => asr-structs_02-2ab459a.stdout} | 0 ...tructs_03-14c22b7.json => asr-structs_03-0cef911.json} | 6 +++--- ...ts_03-14c22b7.stdout => asr-structs_03-0cef911.stdout} | 0 ...tructs_04-7e4824e.json => asr-structs_04-387747b.json} | 6 +++--- ...ts_04-7e4824e.stdout => asr-structs_04-387747b.stdout} | 0 ...tructs_05-2ccee30.json => asr-structs_05-fa98307.json} | 6 +++--- ...ts_05-2ccee30.stdout => asr-structs_05-fa98307.stdout} | 0 ...ubscript1-22a7138.json => asr-subscript1-1acfc19.json} | 6 +++--- ...ript1-22a7138.stdout => asr-subscript1-1acfc19.stdout} | 0 ...json => asr-test_annassign_type_mismatch-7dac7be.json} | 6 +++--- ...rr => asr-test_annassign_type_mismatch-7dac7be.stderr} | 0 ...son => asr-test_annassign_type_mismatch2-fc883f7.json} | 6 +++--- ...r => asr-test_annassign_type_mismatch2-fc883f7.stderr} | 0 ...4d.json => asr-test_append_type_mismatch-030e9c7.json} | 6 +++--- ...tderr => asr-test_append_type_mismatch-030e9c7.stderr} | 0 ...assign1-705c153.json => asr-test_assign1-a94d41e.json} | 6 +++--- ...gn1-705c153.stderr => asr-test_assign1-a94d41e.stderr} | 0 ...assign2-3a6f5d9.json => asr-test_assign2-fa29029.json} | 6 +++--- ...gn2-3a6f5d9.stderr => asr-test_assign2-fa29029.stderr} | 0 ...assign3-aa790e4.json => asr-test_assign3-cc6fc9d.json} | 6 +++--- ...gn3-aa790e4.stderr => asr-test_assign3-cc6fc9d.stderr} | 0 ...assign4-f9f0a92.json => asr-test_assign4-a2136e0.json} | 6 +++--- ...gn4-f9f0a92.stderr => asr-test_assign4-a2136e0.stderr} | 0 ...assign5-b4a6609.json => asr-test_assign5-694a98f.json} | 6 +++--- ...gn5-b4a6609.stderr => asr-test_assign5-694a98f.stderr} | 0 ...assign6-d95baf9.json => asr-test_assign6-05cd64f.json} | 6 +++--- ...gn6-d95baf9.stderr => asr-test_assign6-05cd64f.stderr} | 0 ...assign7-48a6bf7.json => asr-test_assign7-beebac3.json} | 6 +++--- ...gn7-48a6bf7.stderr => asr-test_assign7-beebac3.stderr} | 0 ...assign8-714719d.json => asr-test_assign8-4b26e63.json} | 6 +++--- ...gn8-714719d.stderr => asr-test_assign8-4b26e63.stderr} | 0 ...t_binop1-6562ae2.json => asr-test_binop1-50b63f6.json} | 6 +++--- ...nop1-6562ae2.stderr => asr-test_binop1-50b63f6.stderr} | 0 ...t_binop2-1fa2e86.json => asr-test_binop2-e5749af.json} | 6 +++--- ...nop2-1fa2e86.stderr => asr-test_binop2-e5749af.stderr} | 0 ...t_binop3-018a4a8.json => asr-test_binop3-a67201d.json} | 6 +++--- ...nop3-018a4a8.stderr => asr-test_binop3-a67201d.stderr} | 0 ...ngth-5111036.json => asr-test_bit_length-da3a264.json} | 6 +++--- ...-5111036.stderr => asr-test_bit_length-da3a264.stderr} | 0 ...a983.json => asr-test_bitwise_on_complex-dd9568b.json} | 6 +++--- ....stderr => asr-test_bitwise_on_complex-dd9568b.stderr} | 0 ...cc2638.json => asr-test_bitwise_on_float-2e09b30.json} | 6 +++--- ...38.stderr => asr-test_bitwise_on_float-2e09b30.stderr} | 0 ...inop-3075d22.json => asr-test_bool_binop-f856ef0.json} | 6 +++--- ...-3075d22.stdout => asr-test_bool_binop-f856ef0.stdout} | 0 ...builtin-4f04bbc.json => asr-test_builtin-aa64615.json} | 6 +++--- ...tin-4f04bbc.stdout => asr-test_builtin-aa64615.stdout} | 0 ...abs-06a7e49.json => asr-test_builtin_abs-c74d2c9.json} | 6 +++--- ...06a7e49.stdout => asr-test_builtin_abs-c74d2c9.stdout} | 0 ...bin-0ca34fe.json => asr-test_builtin_bin-52ba9fa.json} | 6 +++--- ...0ca34fe.stdout => asr-test_builtin_bin-52ba9fa.stdout} | 0 ...ol-fe3fe33.json => asr-test_builtin_bool-330223a.json} | 6 +++--- ...e3fe33.stdout => asr-test_builtin_bool-330223a.stdout} | 0 ...t-97f9316.json => asr-test_builtin_float-20601dd.json} | 6 +++--- ...f9316.stdout => asr-test_builtin_float-20601dd.stdout} | 0 ...hex-d4abc3e.json => asr-test_builtin_hex-64bd268.json} | 6 +++--- ...d4abc3e.stdout => asr-test_builtin_hex-64bd268.stdout} | 0 ...int-990d1de.json => asr-test_builtin_int-8f88fdc.json} | 6 +++--- ...990d1de.stdout => asr-test_builtin_int-8f88fdc.stdout} | 0 ...len-922cf65.json => asr-test_builtin_len-55b0dec.json} | 6 +++--- ...922cf65.stdout => asr-test_builtin_len-55b0dec.stdout} | 0 ...oct-490a98b.json => asr-test_builtin_oct-20b9066.json} | 6 +++--- ...490a98b.stdout => asr-test_builtin_oct-20b9066.stdout} | 0 ...pow-cea529e.json => asr-test_builtin_pow-f02fcda.json} | 8 ++++---- ...cea529e.stderr => asr-test_builtin_pow-f02fcda.stderr} | 0 ...cea529e.stdout => asr-test_builtin_pow-f02fcda.stdout} | 0 ...d-cca5cba.json => asr-test_builtin_round-7417a21.json} | 6 +++--- ...a5cba.stdout => asr-test_builtin_round-7417a21.stdout} | 0 ...str-fcdedc2.json => asr-test_builtin_str-580e920.json} | 6 +++--- ...fcdedc2.stdout => asr-test_builtin_str-580e920.stdout} | 0 ...01-8bee4ec.json => asr-test_c_interop_01-e374f43.json} | 6 +++--- ...bee4ec.stdout => asr-test_c_interop_01-e374f43.stdout} | 0 ...sr-test_chr-ccb53f3.json => asr-test_chr-91f4987.json} | 6 +++--- ...est_chr-ccb53f3.stderr => asr-test_chr-91f4987.stderr} | 0 ...x_01-c199562.json => asr-test_complex_01-a6def58.json} | 6 +++--- ...-c199562.stdout => asr-test_complex_01-a6def58.stdout} | 0 ...x_02-6516823.json => asr-test_complex_02-782ba2d.json} | 6 +++--- ...-6516823.stdout => asr-test_complex_02-782ba2d.stdout} | 0 ...est_dict1-921a975.json => asr-test_dict1-a45a075.json} | 6 +++--- ...dict1-921a975.stderr => asr-test_dict1-a45a075.stderr} | 0 ...t_dict10-023b367.json => asr-test_dict10-8c0beff.json} | 6 +++--- ...ct10-023b367.stderr => asr-test_dict10-8c0beff.stderr} | 0 ...t_dict11-9742ea4.json => asr-test_dict11-2ab4e6c.json} | 6 +++--- ...ct11-9742ea4.stderr => asr-test_dict11-2ab4e6c.stderr} | 0 ...t_dict12-90fba58.json => asr-test_dict12-7c74d08.json} | 6 +++--- ...ct12-90fba58.stderr => asr-test_dict12-7c74d08.stderr} | 0 ...t_dict13-6c4f052.json => asr-test_dict13-683b290.json} | 6 +++--- ...ct13-6c4f052.stderr => asr-test_dict13-683b290.stderr} | 0 ...est_dict2-8ea5254.json => asr-test_dict2-4587f02.json} | 6 +++--- ...dict2-8ea5254.stderr => asr-test_dict2-4587f02.stderr} | 0 ...est_dict3-0af4b18.json => asr-test_dict3-d28f38f.json} | 6 +++--- ...dict3-0af4b18.stderr => asr-test_dict3-d28f38f.stderr} | 0 ...est_dict4-1958cb9.json => asr-test_dict4-39489fa.json} | 6 +++--- ...dict4-1958cb9.stderr => asr-test_dict4-39489fa.stderr} | 0 ...est_dict5-d96e08d.json => asr-test_dict5-c436d37.json} | 6 +++--- ...dict5-d96e08d.stderr => asr-test_dict5-c436d37.stderr} | 0 ...est_dict6-39d2ea1.json => asr-test_dict6-95e3b14.json} | 6 +++--- ...dict6-39d2ea1.stderr => asr-test_dict6-95e3b14.stderr} | 0 ...est_dict7-586e3f8.json => asr-test_dict7-1415e14.json} | 6 +++--- ...dict7-586e3f8.stderr => asr-test_dict7-1415e14.stderr} | 0 ...est_dict8-5acc52f.json => asr-test_dict8-d960ce0.json} | 6 +++--- ...dict8-5acc52f.stderr => asr-test_dict8-d960ce0.stderr} | 0 ...est_dict9-ab506c8.json => asr-test_dict9-907bda7.json} | 6 +++--- ...dict9-ab506c8.stderr => asr-test_dict9-907bda7.stderr} | 0 ...9ea13f.json => asr-test_end_sep_keywords-2226a67.json} | 6 +++--- ...3f.stdout => asr-test_end_sep_keywords-2226a67.stdout} | 0 ...-test_for2-a5520fb.json => asr-test_for2-e5d893f.json} | 6 +++--- ...t_for2-a5520fb.stderr => asr-test_for2-e5d893f.stderr} | 0 ..._args-c91fd7c.json => asr-test_func_args-a898a72.json} | 6 +++--- ...s-c91fd7c.stderr => asr-test_func_args-a898a72.stderr} | 0 ...-test_goto-5606c27.json => asr-test_goto-ba9fd22.json} | 6 +++--- ...t_goto-5606c27.stderr => asr-test_goto-ba9fd22.stderr} | 0 ...rt_01-0a03bad.json => asr-test_import_01-b859c43.json} | 6 +++--- ...1-0a03bad.stderr => asr-test_import_01-b859c43.stderr} | 0 ...rt_02-8c2554e.json => asr-test_import_02-55b47fa.json} | 6 +++--- ...2-8c2554e.stderr => asr-test_import_02-55b47fa.stderr} | 0 ...-0d0eafa.json => asr-test_integer_bitnot-08e2e96.json} | 6 +++--- ...eafa.stdout => asr-test_integer_bitnot-08e2e96.stdout} | 0 ...-test_len1-bbcb922.json => asr-test_len1-839a615.json} | 6 +++--- ...t_len1-bbcb922.stderr => asr-test_len1-839a615.stderr} | 0 ...est_list1-ec1c16a.json => asr-test_list1-73fd538.json} | 6 +++--- ...list1-ec1c16a.stderr => asr-test_list1-73fd538.stderr} | 0 ...est_list2-ce0a21f.json => asr-test_list2-10ffdd7.json} | 6 +++--- ...list2-ce0a21f.stderr => asr-test_list2-10ffdd7.stderr} | 0 ...est_list3-baadc44.json => asr-test_list3-5f4d2a8.json} | 6 +++--- ...list3-baadc44.stderr => asr-test_list3-5f4d2a8.stderr} | 0 ...est_list4-fe9dbdf.json => asr-test_list4-d18a7e3.json} | 6 +++--- ...list4-fe9dbdf.stderr => asr-test_list4-d18a7e3.stderr} | 0 ...cat-672d5b5.json => asr-test_list_concat-41d186f.json} | 6 +++--- ...672d5b5.stderr => asr-test_list_concat-41d186f.stderr} | 0 ...ount-436eb28.json => asr-test_list_count-4b42498.json} | 6 +++--- ...-436eb28.stderr => asr-test_list_count-4b42498.stderr} | 0 ...max_min-e73decc.json => asr-test_max_min-3c2fc51.json} | 6 +++--- ...min-e73decc.stdout => asr-test_max_min-3c2fc51.stdout} | 0 ...mpy_03-6dd742e.json => asr-test_numpy_03-e600a49.json} | 6 +++--- ...03-6dd742e.stdout => asr-test_numpy_03-e600a49.stdout} | 0 ...mpy_04-3376b7a.json => asr-test_numpy_04-ecbb614.json} | 6 +++--- ...04-3376b7a.stdout => asr-test_numpy_04-ecbb614.stdout} | 0 ...sr-test_ord-b77f9d5.json => asr-test_ord-316ce61.json} | 6 +++--- ...est_ord-b77f9d5.stderr => asr-test_ord-316ce61.stderr} | 0 ...s-215f516.json => asr-test_pointer_types-1bf0d01.json} | 6 +++--- ...5f516.stderr => asr-test_pointer_types-1bf0d01.stderr} | 0 ...sr-test_pow-6f6a69d.json => asr-test_pow-3f5d550.json} | 8 ++++---- ...est_pow-6f6a69d.stderr => asr-test_pow-3f5d550.stderr} | 0 ...est_pow-6f6a69d.stdout => asr-test_pow-3f5d550.stdout} | 0 ...-test_pow1-50a544f.json => asr-test_pow1-581ef42.json} | 6 +++--- ...t_pow1-50a544f.stderr => asr-test_pow1-581ef42.stderr} | 0 ...-test_pow2-6000a83.json => asr-test_pow2-0dcbd7d.json} | 6 +++--- ...t_pow2-6000a83.stderr => asr-test_pow2-0dcbd7d.stderr} | 0 ...-test_pow3-94879f9.json => asr-test_pow3-79749ed.json} | 6 +++--- ...t_pow3-94879f9.stderr => asr-test_pow3-79749ed.stderr} | 0 ...-test_pow4-792b406.json => asr-test_pow4-ef60978.json} | 6 +++--- ...t_pow4-792b406.stderr => asr-test_pow4-ef60978.stderr} | 0 ...t_print1-71e5114.json => asr-test_print1-f1f36f1.json} | 6 +++--- ...int1-71e5114.stderr => asr-test_print1-f1f36f1.stderr} | 0 ...t_print2-b5fcabf.json => asr-test_print2-64acb15.json} | 6 +++--- ...int2-b5fcabf.stderr => asr-test_print2-64acb15.stderr} | 0 ...return1-8e8f3ae.json => asr-test_return1-2603c9e.json} | 6 +++--- ...rn1-8e8f3ae.stderr => asr-test_return1-2603c9e.stderr} | 0 ...return2-c5799e7.json => asr-test_return2-add829b.json} | 6 +++--- ...rn2-c5799e7.stderr => asr-test_return2-add829b.stderr} | 0 ...-test_set1-8fde53c.json => asr-test_set1-11379c7.json} | 6 +++--- ...t_set1-8fde53c.stderr => asr-test_set1-11379c7.stderr} | 0 ...-test_set2-1ded45b.json => asr-test_set2-d91a6f0.json} | 6 +++--- ...t_set2-1ded45b.stderr => asr-test_set2-d91a6f0.stderr} | 0 ...-test_set3-bbd0ed1.json => asr-test_set3-f9bbffb.json} | 6 +++--- ...t_set3-bbd0ed1.stderr => asr-test_set3-f9bbffb.stderr} | 0 ...ng-cd60f9d.json => asr-test_set_indexing-a1c21b8.json} | 6 +++--- ...d60f9d.stderr => asr-test_set_indexing-a1c21b8.stderr} | 0 ...-c5a2a24.json => asr-test_str_capitalize-9f8dfa9.json} | 6 +++--- ...2a24.stderr => asr-test_str_capitalize-9f8dfa9.stderr} | 0 ...ng-433fbfd.json => asr-test_str_indexing-b200a4e.json} | 6 +++--- ...33fbfd.stderr => asr-test_str_indexing-b200a4e.stderr} | 0 ...ing-e93553b.json => asr-test_str_slicing-eca1381.json} | 6 +++--- ...e93553b.stderr => asr-test_str_slicing-eca1381.stderr} | 0 ...g2-b542789.json => asr-test_str_slicing2-2f07e9a.json} | 6 +++--- ...542789.stderr => asr-test_str_slicing2-2f07e9a.stderr} | 0 ...g3-04a6b27.json => asr-test_str_slicing3-fe6a03c.json} | 6 +++--- ...4a6b27.stderr => asr-test_str_slicing3-fe6a03c.stderr} | 0 ..._int-fc70075.json => asr-test_str_to_int-61553e7.json} | 6 +++--- ...-fc70075.stderr => asr-test_str_to_int-61553e7.stderr} | 0 ...t_tuple1-05c8313.json => asr-test_tuple1-7abe88f.json} | 6 +++--- ...ple1-05c8313.stderr => asr-test_tuple1-7abe88f.stderr} | 0 ...t_tuple2-2d7dd26.json => asr-test_tuple2-b046610.json} | 6 +++--- ...ple2-2d7dd26.stderr => asr-test_tuple2-b046610.stderr} | 0 ...t_tuple3-431e112.json => asr-test_tuple3-19fa47f.json} | 6 +++--- ...ple3-431e112.stderr => asr-test_tuple3-19fa47f.stderr} | 0 ...b45109.json => asr-test_type_mismatch_01-09e8af3.json} | 6 +++--- ...09.stderr => asr-test_type_mismatch_01-09e8af3.stderr} | 0 ...f16a93.json => asr-test_unsupported_type-0d813dd.json} | 6 +++--- ...93.stderr => asr-test_unsupported_type-0d813dd.stderr} | 0 ...n-96c56ec.json => asr-test_zero_division-3dd84e8.json} | 6 +++--- ...c56ec.stderr => asr-test_zero_division-3dd84e8.stderr} | 0 ...-8edba44.json => asr-test_zero_division2-d84989f.json} | 6 +++--- ...ba44.stderr => asr-test_zero_division2-d84989f.stderr} | 0 ...-55ea2f5.json => asr-test_zero_division3-29efb9e.json} | 6 +++--- ...a2f5.stderr => asr-test_zero_division3-29efb9e.stderr} | 0 ...-67f7c69.json => asr-test_zero_division4-bf4af64.json} | 6 +++--- ...7c69.stderr => asr-test_zero_division4-bf4af64.stderr} | 0 .../{asr-tuple1-ce358d9.json => asr-tuple1-09972ab.json} | 6 +++--- ...sr-tuple1-ce358d9.stdout => asr-tuple1-09972ab.stdout} | 0 ...smatch-865037b.json => asr-type_mismatch-61052c7.json} | 6 +++--- ...ch-865037b.stderr => asr-type_mismatch-61052c7.stderr} | 0 .../{asr-vec_01-9b22f33.json => asr-vec_01-66ac423.json} | 6 +++--- ...sr-vec_01-9b22f33.stdout => asr-vec_01-66ac423.stdout} | 0 ...{ast-assert1-ca86e1f.json => ast-assert1-b0154ee.json} | 6 +++--- ...-assert1-ca86e1f.stdout => ast-assert1-b0154ee.stdout} | 0 ...{ast-assign1-f667542.json => ast-assign1-2a4c9ed.json} | 6 +++--- ...-assign1-f667542.stdout => ast-assign1-2a4c9ed.stdout} | 0 ...st-complex1-b52cd7b.json => ast-complex1-800b4bb.json} | 6 +++--- ...omplex1-b52cd7b.stdout => ast-complex1-800b4bb.stdout} | 0 ...onstants1-66d568d.json => ast-constants1-91cb6ff.json} | 6 +++--- ...ants1-66d568d.stdout => ast-constants1-91cb6ff.stdout} | 0 ...tionary1-817b071.json => ast-dictionary1-1a7e00a.json} | 6 +++--- ...ary1-817b071.stdout => ast-dictionary1-1a7e00a.stdout} | 0 ...-5646034.json => ast-doconcurrentloop_01-ed7017b.json} | 6 +++--- ...6034.stdout => ast-doconcurrentloop_01-ed7017b.stdout} | 0 ...-ellipsis1-dcbe16f.json => ast-ellipsis1-4f6c4dd.json} | 6 +++--- ...ipsis1-dcbe16f.stdout => ast-ellipsis1-4f6c4dd.stdout} | 0 .../{ast-expr1-20cdacc.json => ast-expr1-1e8f7b1.json} | 6 +++--- ...{ast-expr1-20cdacc.stdout => ast-expr1-1e8f7b1.stdout} | 0 .../{ast-expr10-49c656f.json => ast-expr10-a8d646d.json} | 6 +++--- ...st-expr10-49c656f.stdout => ast-expr10-a8d646d.stdout} | 0 .../{ast-expr11-df775f8.json => ast-expr11-1d29f78.json} | 6 +++--- ...st-expr11-df775f8.stdout => ast-expr11-1d29f78.stdout} | 0 .../{ast-expr12-49f1f8d.json => ast-expr12-adaecda.json} | 6 +++--- ...st-expr12-49f1f8d.stdout => ast-expr12-adaecda.stdout} | 0 .../{ast-expr13-b25242b.json => ast-expr13-c35ace1.json} | 6 +++--- ...st-expr13-b25242b.stdout => ast-expr13-c35ace1.stdout} | 0 .../{ast-expr2-58df65e.json => ast-expr2-6642d4a.json} | 6 +++--- ...{ast-expr2-58df65e.stdout => ast-expr2-6642d4a.stdout} | 0 .../{ast-expr4-78d463e.json => ast-expr4-49316cb.json} | 6 +++--- ...{ast-expr4-78d463e.stdout => ast-expr4-49316cb.stdout} | 0 .../{ast-expr5-5e64a6e.json => ast-expr5-bbc6e71.json} | 6 +++--- ...{ast-expr5-5e64a6e.stdout => ast-expr5-bbc6e71.stdout} | 0 .../{ast-expr6-9ba0998.json => ast-expr6-0b12a67.json} | 6 +++--- ...{ast-expr6-9ba0998.stdout => ast-expr6-0b12a67.stdout} | 0 .../{ast-expr7-bf4cb65.json => ast-expr7-fe52776.json} | 6 +++--- ...{ast-expr7-bf4cb65.stdout => ast-expr7-fe52776.stdout} | 0 .../{ast-expr8-beffee3.json => ast-expr8-7db6b28.json} | 6 +++--- ...{ast-expr8-beffee3.stdout => ast-expr8-7db6b28.stdout} | 0 .../{ast-expr9-187e786.json => ast-expr9-d184496.json} | 6 +++--- ...{ast-expr9-187e786.stdout => ast-expr9-d184496.stdout} | 0 ...{ast-expr_01-2d63276.json => ast-expr_01-d0927f9.json} | 6 +++--- ...-expr_01-2d63276.stdout => ast-expr_01-d0927f9.stdout} | 0 ...{ast-global1-36fd19b.json => ast-global1-b2690cf.json} | 6 +++--- ...-global1-36fd19b.stdout => ast-global1-b2690cf.stdout} | 0 ...scope1-7809fe0.json => ast-global_scope1-1d68a6c.json} | 6 +++--- ...e1-7809fe0.stdout => ast-global_scope1-1d68a6c.stdout} | 0 .../{ast-list1-2e4b88a.json => ast-list1-9ce2da0.json} | 6 +++--- ...{ast-list1-2e4b88a.stdout => ast-list1-9ce2da0.stdout} | 0 .../{ast-loop1-d1c242e.json => ast-loop1-194a137.json} | 6 +++--- ...{ast-loop1-d1c242e.stdout => ast-loop1-194a137.stdout} | 0 .../{ast-loop2-44a8219.json => ast-loop2-63bf329.json} | 6 +++--- ...{ast-loop2-44a8219.stdout => ast-loop2-63bf329.stdout} | 0 .../{ast-loop3-c545eab.json => ast-loop3-f7e0393.json} | 6 +++--- ...{ast-loop3-c545eab.stdout => ast-loop3-f7e0393.stdout} | 0 .../{ast-set1-8938049.json => ast-set1-ebd6ee0.json} | 6 +++--- .../{ast-set1-8938049.stdout => ast-set1-ebd6ee0.stdout} | 0 ...ubscript1-76dcb5a.json => ast-subscript1-bd5584b.json} | 6 +++--- ...ript1-76dcb5a.stdout => ast-subscript1-bd5584b.stdout} | 0 .../{ast-tuple1-0b7b893.json => ast-tuple1-2fb5396.json} | 6 +++--- ...st-tuple1-0b7b893.stdout => ast-tuple1-2fb5396.stdout} | 0 ...ew-async1-3f88bf1.json => ast_new-async1-b3d07ed.json} | 6 +++--- ...sync1-3f88bf1.stdout => ast_new-async1-b3d07ed.stdout} | 0 ...-boolOp1-6a81afc.json => ast_new-boolOp1-478328f.json} | 6 +++--- ...lOp1-6a81afc.stdout => ast_new-boolOp1-478328f.stdout} | 0 ..._def1-9fd9de1.json => ast_new-class_def1-fe69291.json} | 6 +++--- ...1-9fd9de1.stdout => ast_new-class_def1-fe69291.stdout} | 0 ..._def2-505b454.json => ast_new-class_def2-c6db986.json} | 6 +++--- ...2-505b454.stdout => ast_new-class_def2-c6db986.stdout} | 0 ...omment2-08e9f9a.json => ast_new-comment2-f0984d5.json} | 6 +++--- ...nt2-08e9f9a.stdout => ast_new-comment2-f0984d5.stdout} | 0 ...1-575f5b3.json => ast_new-comprehension1-69cf2af.json} | 6 +++--- ...5f5b3.stdout => ast_new-comprehension1-69cf2af.stdout} | 0 ...290d84.json => ast_new-conditional_expr1-07ccb9e.json} | 6 +++--- ...84.stdout => ast_new-conditional_expr1-07ccb9e.stdout} | 0 ...ary1-a0c7807.json => ast_new-dictionary1-445e718.json} | 6 +++--- ...-a0c7807.stdout => ast_new-dictionary1-445e718.stdout} | 0 ...ipsis2-227f104.json => ast_new-ellipsis2-3a9750b.json} | 6 +++--- ...s2-227f104.stdout => ast_new-ellipsis2-3a9750b.stdout} | 0 ...st_new-for1-0494920.json => ast_new-for1-887432e.json} | 6 +++--- ...ew-for1-0494920.stdout => ast_new-for1-887432e.stdout} | 0 ...st_new-for2-574cea6.json => ast_new-for2-af08901.json} | 6 +++--- ...ew-for2-574cea6.stdout => ast_new-for2-af08901.stdout} | 0 ...f1-ca8dc19.json => ast_new-function_def1-1a872df.json} | 6 +++--- ...a8dc19.stdout => ast_new-function_def1-1a872df.stdout} | 0 ...f2-cead6f1.json => ast_new-function_def2-52c4587.json} | 6 +++--- ...ead6f1.stdout => ast_new-function_def2-52c4587.stdout} | 0 ...f3-a3f4dcf.json => ast_new-function_def3-f66064a.json} | 6 +++--- ...3f4dcf.stdout => ast_new-function_def3-f66064a.stdout} | 0 ...-global1-4288396.json => ast_new-global1-38edfbd.json} | 6 +++--- ...bal1-4288396.stdout => ast_new-global1-38edfbd.stdout} | 0 ...{ast_new-if1-e6432ed.json => ast_new-if1-db43586.json} | 6 +++--- ..._new-if1-e6432ed.stdout => ast_new-if1-db43586.stdout} | 0 ...{ast_new-if2-33fa625.json => ast_new-if2-c3b6022.json} | 6 +++--- ..._new-if2-33fa625.stdout => ast_new-if2-c3b6022.stdout} | 0 ...-import1-6a0330c.json => ast_new-import1-f643fd3.json} | 6 +++--- ...ort1-6a0330c.stdout => ast_new-import1-f643fd3.stdout} | 0 ...-lambda1-58822d0.json => ast_new-lambda1-260d046.json} | 6 +++--- ...bda1-58822d0.stdout => ast_new-lambda1-260d046.stdout} | 0 ...-lambda2-d6a1f95.json => ast_new-lambda2-d84336e.json} | 6 +++--- ...bda2-d6a1f95.stdout => ast_new-lambda2-d84336e.stdout} | 0 ...tmt1-9f49edb.json => ast_new-match_stmt1-9e84d24.json} | 6 +++--- ...-9f49edb.stdout => ast_new-match_stmt1-9e84d24.stdout} | 0 ...ew-slice1-0471787.json => ast_new-slice1-9c440e3.json} | 6 +++--- ...lice1-0471787.stdout => ast_new-slice1-9c440e3.stdout} | 0 ...nts1-1685ab2.json => ast_new-statements1-e081093.json} | 6 +++--- ...-1685ab2.stdout => ast_new-statements1-e081093.stdout} | 0 ...nts2-d9ec152.json => ast_new-statements2-c4cdc5f.json} | 6 +++--- ...-d9ec152.stdout => ast_new-statements2-c4cdc5f.stdout} | 0 ...-string1-f14340e.json => ast_new-string1-96b90b3.json} | 6 +++--- ...ing1-f14340e.stdout => ast_new-string1-96b90b3.stdout} | 0 ...-string2-b6abe54.json => ast_new-string2-44323ea.json} | 6 +++--- ...ing2-b6abe54.stdout => ast_new-string2-44323ea.stdout} | 0 ...-string3-27e8bd2.json => ast_new-string3-37f35a0.json} | 6 +++--- ...ing3-27e8bd2.stdout => ast_new-string3-37f35a0.stdout} | 0 ...st_new-try1-be44da5.json => ast_new-try1-a9a22cf.json} | 6 +++--- ...ew-try1-be44da5.stdout => ast_new-try1-a9a22cf.stdout} | 0 ...ew-tuple1-3e447de.json => ast_new-tuple1-29c08af.json} | 6 +++--- ...uple1-3e447de.stdout => ast_new-tuple1-29c08af.stdout} | 0 ...t1-a1dfe37.json => ast_new-type_comment1-710ea6c.json} | 6 +++--- ...1dfe37.stdout => ast_new-type_comment1-710ea6c.stdout} | 0 ...-unicode-1c0cbec.json => ast_new-unicode-d3199dc.json} | 6 +++--- ...code-1c0cbec.stdout => ast_new-unicode-d3199dc.stdout} | 0 ...ew-while1-1c5ee87.json => ast_new-while1-a4c6382.json} | 6 +++--- ...hile1-1c5ee87.stdout => ast_new-while1-a4c6382.stdout} | 0 ..._new-with1-cf2a022.json => ast_new-with1-6c88c0f.json} | 6 +++--- ...-with1-cf2a022.stdout => ast_new-with1-6c88c0f.stdout} | 0 ..._new-yield-b585d08.json => ast_new-yield-4c41668.json} | 6 +++--- ...-yield-b585d08.stdout => ast_new-yield-4c41668.stdout} | 0 ...ass_inline_function_calls-func_inline_01-8b6a5da.json} | 6 +++--- ...s_inline_function_calls-func_inline_01-8b6a5da.stdout} | 0 ...f30b1.json => pass_loop_vectorise-vec_01-be9985e.json} | 6 +++--- ...1.stdout => pass_loop_vectorise-vec_01-be9985e.stdout} | 0 ...c.json => pass_print_list_tuple-print_02-09600eb.json} | 6 +++--- ...dout => pass_print_list_tuple-print_02-09600eb.stdout} | 0 485 files changed, 726 insertions(+), 726 deletions(-) rename tests/reference/{asr-array_01_decl-f955627.json => asr-array_01_decl-39cf894.json} (66%) rename tests/reference/{asr-array_01_decl-f955627.stdout => asr-array_01_decl-39cf894.stdout} (100%) rename tests/reference/{asr-array_02_decl-8860c8a.json => asr-array_02_decl-e8f6874.json} (66%) rename tests/reference/{asr-array_02_decl-8860c8a.stdout => asr-array_02_decl-e8f6874.stdout} (100%) rename tests/reference/{asr-assert1-a8db80c.json => asr-assert1-1ce92ea.json} (66%) rename tests/reference/{asr-assert1-a8db80c.stdout => asr-assert1-1ce92ea.stdout} (100%) rename tests/reference/{asr-assign1-ec7ab8d.json => asr-assign1-886f049.json} (66%) rename tests/reference/{asr-assign1-ec7ab8d.stdout => asr-assign1-886f049.stdout} (100%) rename tests/reference/{asr-assign2-4778d3a.json => asr-assign2-8d1a2ee.json} (66%) rename tests/reference/{asr-assign2-4778d3a.stdout => asr-assign2-8d1a2ee.stdout} (100%) rename tests/reference/{asr-bindc_01-edd8cc4.json => asr-bindc_01-6d521a9.json} (67%) rename tests/reference/{asr-bindc_01-edd8cc4.stdout => asr-bindc_01-6d521a9.stdout} (100%) rename tests/reference/{asr-bindc_01-f8048b2.json => asr-bindc_01-f761165.json} (66%) rename tests/reference/{asr-bindc_01-f8048b2.stderr => asr-bindc_01-f761165.stderr} (100%) rename tests/reference/{asr-bindc_02-2406ab7.json => asr-bindc_02-5092d8e.json} (66%) rename tests/reference/{asr-bindc_02-2406ab7.stderr => asr-bindc_02-5092d8e.stderr} (100%) rename tests/reference/{asr-bindc_02-8c7fec3.json => asr-bindc_02-bc1a7ea.json} (67%) rename tests/reference/{asr-bindc_02-8c7fec3.stdout => asr-bindc_02-bc1a7ea.stdout} (100%) rename tests/reference/{asr-bindc_03-67595e1.json => asr-bindc_03-95dbba7.json} (66%) rename tests/reference/{asr-bindc_03-67595e1.stderr => asr-bindc_03-95dbba7.stderr} (100%) rename tests/reference/{asr-c_interop1-c0a6335.json => asr-c_interop1-cf2e9b4.json} (65%) rename tests/reference/{asr-c_interop1-c0a6335.stdout => asr-c_interop1-cf2e9b4.stdout} (100%) rename tests/reference/{asr-callback_01-64f7a94.json => asr-callback_01-df40fd5.json} (66%) rename tests/reference/{asr-callback_01-64f7a94.stdout => asr-callback_01-df40fd5.stdout} (100%) rename tests/reference/{asr-cast-d93d15f.json => asr-cast-435c233.json} (66%) rename tests/reference/{asr-cast-d93d15f.stdout => asr-cast-435c233.stdout} (100%) rename tests/reference/{asr-complex1-7ce1c89.json => asr-complex1-f26c460.json} (65%) rename tests/reference/{asr-complex1-7ce1c89.stdout => asr-complex1-f26c460.stdout} (100%) rename tests/reference/{asr-const_01-6df049a.json => asr-const_01-af8289b.json} (66%) rename tests/reference/{asr-const_01-6df049a.stderr => asr-const_01-af8289b.stderr} (100%) rename tests/reference/{asr-const_02-8dbfab6.json => asr-const_02-fce29b7.json} (66%) rename tests/reference/{asr-const_02-8dbfab6.stderr => asr-const_02-fce29b7.stderr} (100%) rename tests/reference/{asr-constants1-20d32ff.json => asr-constants1-5828e8a.json} (65%) rename tests/reference/{asr-constants1-20d32ff.stdout => asr-constants1-5828e8a.stdout} (100%) rename tests/reference/{asr-cptr_01-0dc5185.json => asr-cptr_01-4e660f1.json} (66%) rename tests/reference/{asr-cptr_01-0dc5185.stderr => asr-cptr_01-4e660f1.stderr} (100%) rename tests/reference/{asr-dictionary1-789a50b.json => asr-dictionary1-a105a36.json} (65%) rename tests/reference/{asr-dictionary1-789a50b.stdout => asr-dictionary1-a105a36.stdout} (100%) rename tests/reference/{asr-doconcurrentloop_01-7b9a7d3.json => asr-doconcurrentloop_01-3fdc189.json} (63%) rename tests/reference/{asr-doconcurrentloop_01-7b9a7d3.stdout => asr-doconcurrentloop_01-3fdc189.stdout} (100%) rename tests/reference/{asr-elemental_01-b6a1371.json => asr-elemental_01-b58df26.json} (66%) rename tests/reference/{asr-elemental_01-b6a1371.stdout => asr-elemental_01-b58df26.stdout} (100%) rename tests/reference/{asr-enum_01-55993b7.json => asr-enum_01-30e1b4a.json} (66%) rename tests/reference/{asr-enum_01-55993b7.stderr => asr-enum_01-30e1b4a.stderr} (100%) rename tests/reference/{asr-enum_02-6bb05f8.json => asr-enum_02-54656c5.json} (66%) rename tests/reference/{asr-enum_02-6bb05f8.stderr => asr-enum_02-54656c5.stderr} (100%) rename tests/reference/{asr-expr1-dde511e.json => asr-expr1-8df2d66.json} (66%) rename tests/reference/{asr-expr1-dde511e.stdout => asr-expr1-8df2d66.stdout} (100%) rename tests/reference/{asr-expr10-31c163f.json => asr-expr10-efcbb1b.json} (66%) rename tests/reference/{asr-expr10-31c163f.stdout => asr-expr10-efcbb1b.stdout} (100%) rename tests/reference/{asr-expr11-1134d3f.json => asr-expr11-9b91d35.json} (66%) rename tests/reference/{asr-expr11-1134d3f.stdout => asr-expr11-9b91d35.stdout} (100%) rename tests/reference/{asr-expr12-2a30333.json => asr-expr12-5c5b71e.json} (66%) rename tests/reference/{asr-expr12-2a30333.stdout => asr-expr12-5c5b71e.stdout} (100%) rename tests/reference/{asr-expr13-10040d8.json => asr-expr13-81bdb5a.json} (66%) rename tests/reference/{asr-expr13-10040d8.stdout => asr-expr13-81bdb5a.stdout} (100%) rename tests/reference/{asr-expr16-f828d62.json => asr-expr16-a3dc453.json} (66%) rename tests/reference/{asr-expr16-f828d62.stderr => asr-expr16-a3dc453.stderr} (100%) rename tests/reference/{asr-expr2-5311701.json => asr-expr2-2e78a12.json} (66%) rename tests/reference/{asr-expr2-5311701.stdout => asr-expr2-2e78a12.stdout} (100%) rename tests/reference/{asr-expr4-cf512ef.json => asr-expr4-cef6743.json} (66%) rename tests/reference/{asr-expr4-cf512ef.stdout => asr-expr4-cef6743.stdout} (100%) rename tests/reference/{asr-expr5-375548a.json => asr-expr5-645ffcc.json} (66%) rename tests/reference/{asr-expr5-375548a.stdout => asr-expr5-645ffcc.stdout} (100%) rename tests/reference/{asr-expr6-bfb3384.json => asr-expr6-368e5ed.json} (66%) rename tests/reference/{asr-expr6-bfb3384.stdout => asr-expr6-368e5ed.stdout} (100%) rename tests/reference/{asr-expr7-2ef3822.json => asr-expr7-480ba2f.json} (63%) rename tests/reference/{asr-expr7-2ef3822.stderr => asr-expr7-480ba2f.stderr} (100%) rename tests/reference/{asr-expr7-2ef3822.stdout => asr-expr7-480ba2f.stdout} (100%) rename tests/reference/{asr-expr8-2a4630a.json => asr-expr8-6beda60.json} (66%) rename tests/reference/{asr-expr8-2a4630a.stdout => asr-expr8-6beda60.stdout} (100%) rename tests/reference/{asr-expr9-c6fe691.json => asr-expr9-814e4bc.json} (66%) rename tests/reference/{asr-expr9-c6fe691.stdout => asr-expr9-814e4bc.stdout} (100%) rename tests/reference/{asr-expr_01-03055c0.json => asr-expr_01-211000e.json} (66%) rename tests/reference/{asr-expr_01-03055c0.stdout => asr-expr_01-211000e.stdout} (100%) rename tests/reference/{asr-expr_01-eafd41c.json => asr-expr_01-a0d4829.json} (67%) rename tests/reference/{asr-expr_01-eafd41c.stdout => asr-expr_01-a0d4829.stdout} (100%) rename tests/reference/{asr-expr_05-45e5844.json => asr-expr_05-3a37324.json} (67%) rename tests/reference/{asr-expr_05-45e5844.stdout => asr-expr_05-3a37324.stdout} (100%) rename tests/reference/{asr-expr_07-ccf2455.json => asr-expr_07-7742668.json} (67%) rename tests/reference/{asr-expr_07-ccf2455.stdout => asr-expr_07-7742668.stdout} (100%) rename tests/reference/{asr-expr_09-0e8c1e6.json => asr-expr_09-f3e89c8.json} (67%) rename tests/reference/{asr-expr_09-0e8c1e6.stdout => asr-expr_09-f3e89c8.stdout} (100%) rename tests/reference/{asr-expr_10-e2e0267.json => asr-expr_10-d39708c.json} (67%) rename tests/reference/{asr-expr_10-e2e0267.stdout => asr-expr_10-d39708c.stdout} (100%) rename tests/reference/{asr-expr_12-7aa0c4c.json => asr-expr_12-6769be0.json} (67%) rename tests/reference/{asr-expr_12-7aa0c4c.stdout => asr-expr_12-6769be0.stdout} (100%) rename tests/reference/{asr-expr_14-6023c49.json => asr-expr_14-f2bd343.json} (67%) rename tests/reference/{asr-expr_14-6023c49.stdout => asr-expr_14-f2bd343.stdout} (100%) rename tests/reference/{asr-func_01-95c4d66.json => asr-func_01-d87aa4a.json} (66%) rename tests/reference/{asr-func_01-95c4d66.stderr => asr-func_01-d87aa4a.stderr} (100%) rename tests/reference/{asr-func_inline_01-56dbc9a.json => asr-func_inline_01-56af272.json} (66%) rename tests/reference/{asr-func_inline_01-56dbc9a.stdout => asr-func_inline_01-56af272.stdout} (100%) rename tests/reference/{asr-generics_01-4ff9de7.json => asr-generics_01-d616074.json} (66%) rename tests/reference/{asr-generics_01-4ff9de7.stdout => asr-generics_01-d616074.stdout} (100%) rename tests/reference/{asr-generics_02-79b33a1.json => asr-generics_02-e2ea5c9.json} (66%) rename tests/reference/{asr-generics_02-79b33a1.stdout => asr-generics_02-e2ea5c9.stdout} (100%) rename tests/reference/{asr-generics_array_01-8e0b4d1.json => asr-generics_array_01-682b1b2.json} (65%) rename tests/reference/{asr-generics_array_01-8e0b4d1.stdout => asr-generics_array_01-682b1b2.stdout} (100%) rename tests/reference/{asr-generics_array_02-e149533.json => asr-generics_array_02-22c8dc1.json} (65%) rename tests/reference/{asr-generics_array_02-e149533.stdout => asr-generics_array_02-22c8dc1.stdout} (100%) rename tests/reference/{asr-generics_array_03-a1b8457.json => asr-generics_array_03-fb3706c.json} (65%) rename tests/reference/{asr-generics_array_03-a1b8457.stdout => asr-generics_array_03-fb3706c.stdout} (100%) rename tests/reference/{asr-generics_error_01-0f48f9c.json => asr-generics_error_01-1e05cd6.json} (64%) rename tests/reference/{asr-generics_error_01-0f48f9c.stderr => asr-generics_error_01-1e05cd6.stderr} (100%) rename tests/reference/{asr-generics_error_02-ff6918a.json => asr-generics_error_02-d614928.json} (64%) rename tests/reference/{asr-generics_error_02-ff6918a.stderr => asr-generics_error_02-d614928.stderr} (100%) rename tests/reference/{asr-generics_error_03-8818c90.json => asr-generics_error_03-208d10d.json} (64%) rename tests/reference/{asr-generics_error_03-8818c90.stderr => asr-generics_error_03-208d10d.stderr} (100%) rename tests/reference/{asr-generics_list_01-4ec4007.json => asr-generics_list_01-39c4044.json} (65%) rename tests/reference/{asr-generics_list_01-4ec4007.stdout => asr-generics_list_01-39c4044.stdout} (100%) rename tests/reference/{asr-global_scope1-b335bb9.json => asr-global_scope1-354e217.json} (64%) rename tests/reference/{asr-global_scope1-b335bb9.stdout => asr-global_scope1-354e217.stdout} (100%) rename tests/reference/{asr-global_syms_01-12ee218.json => asr-global_syms_01-273906f.json} (66%) rename tests/reference/{asr-global_syms_01-12ee218.stdout => asr-global_syms_01-273906f.stdout} (100%) rename tests/reference/{asr-kwargs_01_error-ada0f8b.json => asr-kwargs_01_error-ab9530d.json} (64%) rename tests/reference/{asr-kwargs_01_error-ada0f8b.stderr => asr-kwargs_01_error-ab9530d.stderr} (100%) rename tests/reference/{asr-kwargs_02_error-5c8b0e6.json => asr-kwargs_02_error-7c91f8f.json} (64%) rename tests/reference/{asr-kwargs_02_error-5c8b0e6.stderr => asr-kwargs_02_error-7c91f8f.stderr} (100%) rename tests/reference/{asr-kwargs_03_error-0eb2867.json => asr-kwargs_03_error-a68cc46.json} (64%) rename tests/reference/{asr-kwargs_03_error-0eb2867.stderr => asr-kwargs_03_error-a68cc46.stderr} (100%) rename tests/reference/{asr-list1-f15817d.json => asr-list1-770ba33.json} (66%) rename tests/reference/{asr-list1-f15817d.stdout => asr-list1-770ba33.stdout} (100%) rename tests/reference/{asr-loop1-ce84aac.json => asr-loop1-10d3109.json} (66%) rename tests/reference/{asr-loop1-ce84aac.stdout => asr-loop1-10d3109.stdout} (100%) rename tests/reference/{asr-loop2-5e07e8f.json => asr-loop2-e874469.json} (66%) rename tests/reference/{asr-loop2-5e07e8f.stdout => asr-loop2-e874469.stdout} (100%) rename tests/reference/{asr-loop3-e2afee9.json => asr-loop3-a579196.json} (66%) rename tests/reference/{asr-loop3-e2afee9.stdout => asr-loop3-a579196.stdout} (100%) rename tests/reference/{asr-loop4-b39f53b.json => asr-loop4-3d3216e.json} (66%) rename tests/reference/{asr-loop4-b39f53b.stdout => asr-loop4-3d3216e.stdout} (100%) rename tests/reference/{asr-loop_01-b50c123.json => asr-loop_01-e7aa06a.json} (66%) rename tests/reference/{asr-loop_01-b50c123.stderr => asr-loop_01-e7aa06a.stderr} (100%) rename tests/reference/{asr-loop_02-3961316.json => asr-loop_02-5741651.json} (66%) rename tests/reference/{asr-loop_02-3961316.stderr => asr-loop_02-5741651.stderr} (100%) rename tests/reference/{asr-loop_03-e7ccaee.json => asr-loop_03-401ab45.json} (66%) rename tests/reference/{asr-loop_03-e7ccaee.stderr => asr-loop_03-401ab45.stderr} (100%) rename tests/reference/{asr-modules_02-5371fe0.json => asr-modules_02-ec92e6f.json} (66%) rename tests/reference/{asr-modules_02-5371fe0.stdout => asr-modules_02-ec92e6f.stdout} (100%) rename tests/reference/{asr-print_02-f237d46.json => asr-print_02-afbe092.json} (67%) rename tests/reference/{asr-print_02-f237d46.stdout => asr-print_02-afbe092.stdout} (100%) rename tests/reference/{asr-set1-7de4081.json => asr-set1-b7b913a.json} (66%) rename tests/reference/{asr-set1-7de4081.stdout => asr-set1-b7b913a.stdout} (100%) rename tests/reference/{asr-structs_01-3bbe189.json => asr-structs_01-0893e35.json} (65%) rename tests/reference/{asr-structs_01-3bbe189.stderr => asr-structs_01-0893e35.stderr} (100%) rename tests/reference/{asr-structs_01-c473a5f.json => asr-structs_01-be14d49.json} (66%) rename tests/reference/{asr-structs_01-c473a5f.stdout => asr-structs_01-be14d49.stdout} (100%) rename tests/reference/{asr-structs_02-a0958ac.json => asr-structs_02-2ab459a.json} (66%) rename tests/reference/{asr-structs_02-a0958ac.stdout => asr-structs_02-2ab459a.stdout} (100%) rename tests/reference/{asr-structs_03-14c22b7.json => asr-structs_03-0cef911.json} (66%) rename tests/reference/{asr-structs_03-14c22b7.stdout => asr-structs_03-0cef911.stdout} (100%) rename tests/reference/{asr-structs_04-7e4824e.json => asr-structs_04-387747b.json} (66%) rename tests/reference/{asr-structs_04-7e4824e.stdout => asr-structs_04-387747b.stdout} (100%) rename tests/reference/{asr-structs_05-2ccee30.json => asr-structs_05-fa98307.json} (66%) rename tests/reference/{asr-structs_05-2ccee30.stdout => asr-structs_05-fa98307.stdout} (100%) rename tests/reference/{asr-subscript1-22a7138.json => asr-subscript1-1acfc19.json} (65%) rename tests/reference/{asr-subscript1-22a7138.stdout => asr-subscript1-1acfc19.stdout} (100%) rename tests/reference/{asr-test_annassign_type_mismatch-5cf2620.json => asr-test_annassign_type_mismatch-7dac7be.json} (62%) rename tests/reference/{asr-test_annassign_type_mismatch-5cf2620.stderr => asr-test_annassign_type_mismatch-7dac7be.stderr} (100%) rename tests/reference/{asr-test_annassign_type_mismatch2-c68cbf2.json => asr-test_annassign_type_mismatch2-fc883f7.json} (62%) rename tests/reference/{asr-test_annassign_type_mismatch2-c68cbf2.stderr => asr-test_annassign_type_mismatch2-fc883f7.stderr} (100%) rename tests/reference/{asr-test_append_type_mismatch-523164d.json => asr-test_append_type_mismatch-030e9c7.json} (63%) rename tests/reference/{asr-test_append_type_mismatch-523164d.stderr => asr-test_append_type_mismatch-030e9c7.stderr} (100%) rename tests/reference/{asr-test_assign1-705c153.json => asr-test_assign1-a94d41e.json} (65%) rename tests/reference/{asr-test_assign1-705c153.stderr => asr-test_assign1-a94d41e.stderr} (100%) rename tests/reference/{asr-test_assign2-3a6f5d9.json => asr-test_assign2-fa29029.json} (65%) rename tests/reference/{asr-test_assign2-3a6f5d9.stderr => asr-test_assign2-fa29029.stderr} (100%) rename tests/reference/{asr-test_assign3-aa790e4.json => asr-test_assign3-cc6fc9d.json} (65%) rename tests/reference/{asr-test_assign3-aa790e4.stderr => asr-test_assign3-cc6fc9d.stderr} (100%) rename tests/reference/{asr-test_assign4-f9f0a92.json => asr-test_assign4-a2136e0.json} (65%) rename tests/reference/{asr-test_assign4-f9f0a92.stderr => asr-test_assign4-a2136e0.stderr} (100%) rename tests/reference/{asr-test_assign5-b4a6609.json => asr-test_assign5-694a98f.json} (65%) rename tests/reference/{asr-test_assign5-b4a6609.stderr => asr-test_assign5-694a98f.stderr} (100%) rename tests/reference/{asr-test_assign6-d95baf9.json => asr-test_assign6-05cd64f.json} (65%) rename tests/reference/{asr-test_assign6-d95baf9.stderr => asr-test_assign6-05cd64f.stderr} (100%) rename tests/reference/{asr-test_assign7-48a6bf7.json => asr-test_assign7-beebac3.json} (65%) rename tests/reference/{asr-test_assign7-48a6bf7.stderr => asr-test_assign7-beebac3.stderr} (100%) rename tests/reference/{asr-test_assign8-714719d.json => asr-test_assign8-4b26e63.json} (65%) rename tests/reference/{asr-test_assign8-714719d.stderr => asr-test_assign8-4b26e63.stderr} (100%) rename tests/reference/{asr-test_binop1-6562ae2.json => asr-test_binop1-50b63f6.json} (65%) rename tests/reference/{asr-test_binop1-6562ae2.stderr => asr-test_binop1-50b63f6.stderr} (100%) rename tests/reference/{asr-test_binop2-1fa2e86.json => asr-test_binop2-e5749af.json} (65%) rename tests/reference/{asr-test_binop2-1fa2e86.stderr => asr-test_binop2-e5749af.stderr} (100%) rename tests/reference/{asr-test_binop3-018a4a8.json => asr-test_binop3-a67201d.json} (65%) rename tests/reference/{asr-test_binop3-018a4a8.stderr => asr-test_binop3-a67201d.stderr} (100%) rename tests/reference/{asr-test_bit_length-5111036.json => asr-test_bit_length-da3a264.json} (64%) rename tests/reference/{asr-test_bit_length-5111036.stderr => asr-test_bit_length-da3a264.stderr} (100%) rename tests/reference/{asr-test_bitwise_on_complex-eb6a983.json => asr-test_bitwise_on_complex-dd9568b.json} (63%) rename tests/reference/{asr-test_bitwise_on_complex-eb6a983.stderr => asr-test_bitwise_on_complex-dd9568b.stderr} (100%) rename tests/reference/{asr-test_bitwise_on_float-7cc2638.json => asr-test_bitwise_on_float-2e09b30.json} (63%) rename tests/reference/{asr-test_bitwise_on_float-7cc2638.stderr => asr-test_bitwise_on_float-2e09b30.stderr} (100%) rename tests/reference/{asr-test_bool_binop-3075d22.json => asr-test_bool_binop-f856ef0.json} (65%) rename tests/reference/{asr-test_bool_binop-3075d22.stdout => asr-test_bool_binop-f856ef0.stdout} (100%) rename tests/reference/{asr-test_builtin-4f04bbc.json => asr-test_builtin-aa64615.json} (66%) rename tests/reference/{asr-test_builtin-4f04bbc.stdout => asr-test_builtin-aa64615.stdout} (100%) rename tests/reference/{asr-test_builtin_abs-06a7e49.json => asr-test_builtin_abs-c74d2c9.json} (65%) rename tests/reference/{asr-test_builtin_abs-06a7e49.stdout => asr-test_builtin_abs-c74d2c9.stdout} (100%) rename tests/reference/{asr-test_builtin_bin-0ca34fe.json => asr-test_builtin_bin-52ba9fa.json} (65%) rename tests/reference/{asr-test_builtin_bin-0ca34fe.stdout => asr-test_builtin_bin-52ba9fa.stdout} (100%) rename tests/reference/{asr-test_builtin_bool-fe3fe33.json => asr-test_builtin_bool-330223a.json} (65%) rename tests/reference/{asr-test_builtin_bool-fe3fe33.stdout => asr-test_builtin_bool-330223a.stdout} (100%) rename tests/reference/{asr-test_builtin_float-97f9316.json => asr-test_builtin_float-20601dd.json} (65%) rename tests/reference/{asr-test_builtin_float-97f9316.stdout => asr-test_builtin_float-20601dd.stdout} (100%) rename tests/reference/{asr-test_builtin_hex-d4abc3e.json => asr-test_builtin_hex-64bd268.json} (65%) rename tests/reference/{asr-test_builtin_hex-d4abc3e.stdout => asr-test_builtin_hex-64bd268.stdout} (100%) rename tests/reference/{asr-test_builtin_int-990d1de.json => asr-test_builtin_int-8f88fdc.json} (65%) rename tests/reference/{asr-test_builtin_int-990d1de.stdout => asr-test_builtin_int-8f88fdc.stdout} (100%) rename tests/reference/{asr-test_builtin_len-922cf65.json => asr-test_builtin_len-55b0dec.json} (65%) rename tests/reference/{asr-test_builtin_len-922cf65.stdout => asr-test_builtin_len-55b0dec.stdout} (100%) rename tests/reference/{asr-test_builtin_oct-490a98b.json => asr-test_builtin_oct-20b9066.json} (65%) rename tests/reference/{asr-test_builtin_oct-490a98b.stdout => asr-test_builtin_oct-20b9066.stdout} (100%) rename tests/reference/{asr-test_builtin_pow-cea529e.json => asr-test_builtin_pow-f02fcda.json} (61%) rename tests/reference/{asr-test_builtin_pow-cea529e.stderr => asr-test_builtin_pow-f02fcda.stderr} (100%) rename tests/reference/{asr-test_builtin_pow-cea529e.stdout => asr-test_builtin_pow-f02fcda.stdout} (100%) rename tests/reference/{asr-test_builtin_round-cca5cba.json => asr-test_builtin_round-7417a21.json} (65%) rename tests/reference/{asr-test_builtin_round-cca5cba.stdout => asr-test_builtin_round-7417a21.stdout} (100%) rename tests/reference/{asr-test_builtin_str-fcdedc2.json => asr-test_builtin_str-580e920.json} (65%) rename tests/reference/{asr-test_builtin_str-fcdedc2.stdout => asr-test_builtin_str-580e920.stdout} (100%) rename tests/reference/{asr-test_c_interop_01-8bee4ec.json => asr-test_c_interop_01-e374f43.json} (65%) rename tests/reference/{asr-test_c_interop_01-8bee4ec.stdout => asr-test_c_interop_01-e374f43.stdout} (100%) rename tests/reference/{asr-test_chr-ccb53f3.json => asr-test_chr-91f4987.json} (66%) rename tests/reference/{asr-test_chr-ccb53f3.stderr => asr-test_chr-91f4987.stderr} (100%) rename tests/reference/{asr-test_complex_01-c199562.json => asr-test_complex_01-a6def58.json} (65%) rename tests/reference/{asr-test_complex_01-c199562.stdout => asr-test_complex_01-a6def58.stdout} (100%) rename tests/reference/{asr-test_complex_02-6516823.json => asr-test_complex_02-782ba2d.json} (65%) rename tests/reference/{asr-test_complex_02-6516823.stdout => asr-test_complex_02-782ba2d.stdout} (100%) rename tests/reference/{asr-test_dict1-921a975.json => asr-test_dict1-a45a075.json} (65%) rename tests/reference/{asr-test_dict1-921a975.stderr => asr-test_dict1-a45a075.stderr} (100%) rename tests/reference/{asr-test_dict10-023b367.json => asr-test_dict10-8c0beff.json} (65%) rename tests/reference/{asr-test_dict10-023b367.stderr => asr-test_dict10-8c0beff.stderr} (100%) rename tests/reference/{asr-test_dict11-9742ea4.json => asr-test_dict11-2ab4e6c.json} (65%) rename tests/reference/{asr-test_dict11-9742ea4.stderr => asr-test_dict11-2ab4e6c.stderr} (100%) rename tests/reference/{asr-test_dict12-90fba58.json => asr-test_dict12-7c74d08.json} (65%) rename tests/reference/{asr-test_dict12-90fba58.stderr => asr-test_dict12-7c74d08.stderr} (100%) rename tests/reference/{asr-test_dict13-6c4f052.json => asr-test_dict13-683b290.json} (65%) rename tests/reference/{asr-test_dict13-6c4f052.stderr => asr-test_dict13-683b290.stderr} (100%) rename tests/reference/{asr-test_dict2-8ea5254.json => asr-test_dict2-4587f02.json} (65%) rename tests/reference/{asr-test_dict2-8ea5254.stderr => asr-test_dict2-4587f02.stderr} (100%) rename tests/reference/{asr-test_dict3-0af4b18.json => asr-test_dict3-d28f38f.json} (65%) rename tests/reference/{asr-test_dict3-0af4b18.stderr => asr-test_dict3-d28f38f.stderr} (100%) rename tests/reference/{asr-test_dict4-1958cb9.json => asr-test_dict4-39489fa.json} (65%) rename tests/reference/{asr-test_dict4-1958cb9.stderr => asr-test_dict4-39489fa.stderr} (100%) rename tests/reference/{asr-test_dict5-d96e08d.json => asr-test_dict5-c436d37.json} (65%) rename tests/reference/{asr-test_dict5-d96e08d.stderr => asr-test_dict5-c436d37.stderr} (100%) rename tests/reference/{asr-test_dict6-39d2ea1.json => asr-test_dict6-95e3b14.json} (65%) rename tests/reference/{asr-test_dict6-39d2ea1.stderr => asr-test_dict6-95e3b14.stderr} (100%) rename tests/reference/{asr-test_dict7-586e3f8.json => asr-test_dict7-1415e14.json} (65%) rename tests/reference/{asr-test_dict7-586e3f8.stderr => asr-test_dict7-1415e14.stderr} (100%) rename tests/reference/{asr-test_dict8-5acc52f.json => asr-test_dict8-d960ce0.json} (65%) rename tests/reference/{asr-test_dict8-5acc52f.stderr => asr-test_dict8-d960ce0.stderr} (100%) rename tests/reference/{asr-test_dict9-ab506c8.json => asr-test_dict9-907bda7.json} (65%) rename tests/reference/{asr-test_dict9-ab506c8.stderr => asr-test_dict9-907bda7.stderr} (100%) rename tests/reference/{asr-test_end_sep_keywords-49ea13f.json => asr-test_end_sep_keywords-2226a67.json} (63%) rename tests/reference/{asr-test_end_sep_keywords-49ea13f.stdout => asr-test_end_sep_keywords-2226a67.stdout} (100%) rename tests/reference/{asr-test_for2-a5520fb.json => asr-test_for2-e5d893f.json} (66%) rename tests/reference/{asr-test_for2-a5520fb.stderr => asr-test_for2-e5d893f.stderr} (100%) rename tests/reference/{asr-test_func_args-c91fd7c.json => asr-test_func_args-a898a72.json} (65%) rename tests/reference/{asr-test_func_args-c91fd7c.stderr => asr-test_func_args-a898a72.stderr} (100%) rename tests/reference/{asr-test_goto-5606c27.json => asr-test_goto-ba9fd22.json} (66%) rename tests/reference/{asr-test_goto-5606c27.stderr => asr-test_goto-ba9fd22.stderr} (100%) rename tests/reference/{asr-test_import_01-0a03bad.json => asr-test_import_01-b859c43.json} (65%) rename tests/reference/{asr-test_import_01-0a03bad.stderr => asr-test_import_01-b859c43.stderr} (100%) rename tests/reference/{asr-test_import_02-8c2554e.json => asr-test_import_02-55b47fa.json} (65%) rename tests/reference/{asr-test_import_02-8c2554e.stderr => asr-test_import_02-55b47fa.stderr} (100%) rename tests/reference/{asr-test_integer_bitnot-0d0eafa.json => asr-test_integer_bitnot-08e2e96.json} (65%) rename tests/reference/{asr-test_integer_bitnot-0d0eafa.stdout => asr-test_integer_bitnot-08e2e96.stdout} (100%) rename tests/reference/{asr-test_len1-bbcb922.json => asr-test_len1-839a615.json} (66%) rename tests/reference/{asr-test_len1-bbcb922.stderr => asr-test_len1-839a615.stderr} (100%) rename tests/reference/{asr-test_list1-ec1c16a.json => asr-test_list1-73fd538.json} (65%) rename tests/reference/{asr-test_list1-ec1c16a.stderr => asr-test_list1-73fd538.stderr} (100%) rename tests/reference/{asr-test_list2-ce0a21f.json => asr-test_list2-10ffdd7.json} (65%) rename tests/reference/{asr-test_list2-ce0a21f.stderr => asr-test_list2-10ffdd7.stderr} (100%) rename tests/reference/{asr-test_list3-baadc44.json => asr-test_list3-5f4d2a8.json} (65%) rename tests/reference/{asr-test_list3-baadc44.stderr => asr-test_list3-5f4d2a8.stderr} (100%) rename tests/reference/{asr-test_list4-fe9dbdf.json => asr-test_list4-d18a7e3.json} (65%) rename tests/reference/{asr-test_list4-fe9dbdf.stderr => asr-test_list4-d18a7e3.stderr} (100%) rename tests/reference/{asr-test_list_concat-672d5b5.json => asr-test_list_concat-41d186f.json} (64%) rename tests/reference/{asr-test_list_concat-672d5b5.stderr => asr-test_list_concat-41d186f.stderr} (100%) rename tests/reference/{asr-test_list_count-436eb28.json => asr-test_list_count-4b42498.json} (64%) rename tests/reference/{asr-test_list_count-436eb28.stderr => asr-test_list_count-4b42498.stderr} (100%) rename tests/reference/{asr-test_max_min-e73decc.json => asr-test_max_min-3c2fc51.json} (66%) rename tests/reference/{asr-test_max_min-e73decc.stdout => asr-test_max_min-3c2fc51.stdout} (100%) rename tests/reference/{asr-test_numpy_03-6dd742e.json => asr-test_numpy_03-e600a49.json} (66%) rename tests/reference/{asr-test_numpy_03-6dd742e.stdout => asr-test_numpy_03-e600a49.stdout} (100%) rename tests/reference/{asr-test_numpy_04-3376b7a.json => asr-test_numpy_04-ecbb614.json} (66%) rename tests/reference/{asr-test_numpy_04-3376b7a.stdout => asr-test_numpy_04-ecbb614.stdout} (100%) rename tests/reference/{asr-test_ord-b77f9d5.json => asr-test_ord-316ce61.json} (66%) rename tests/reference/{asr-test_ord-b77f9d5.stderr => asr-test_ord-316ce61.stderr} (100%) rename tests/reference/{asr-test_pointer_types-215f516.json => asr-test_pointer_types-1bf0d01.json} (64%) rename tests/reference/{asr-test_pointer_types-215f516.stderr => asr-test_pointer_types-1bf0d01.stderr} (100%) rename tests/reference/{asr-test_pow-6f6a69d.json => asr-test_pow-3f5d550.json} (62%) rename tests/reference/{asr-test_pow-6f6a69d.stderr => asr-test_pow-3f5d550.stderr} (100%) rename tests/reference/{asr-test_pow-6f6a69d.stdout => asr-test_pow-3f5d550.stdout} (100%) rename tests/reference/{asr-test_pow1-50a544f.json => asr-test_pow1-581ef42.json} (66%) rename tests/reference/{asr-test_pow1-50a544f.stderr => asr-test_pow1-581ef42.stderr} (100%) rename tests/reference/{asr-test_pow2-6000a83.json => asr-test_pow2-0dcbd7d.json} (66%) rename tests/reference/{asr-test_pow2-6000a83.stderr => asr-test_pow2-0dcbd7d.stderr} (100%) rename tests/reference/{asr-test_pow3-94879f9.json => asr-test_pow3-79749ed.json} (66%) rename tests/reference/{asr-test_pow3-94879f9.stderr => asr-test_pow3-79749ed.stderr} (100%) rename tests/reference/{asr-test_pow4-792b406.json => asr-test_pow4-ef60978.json} (66%) rename tests/reference/{asr-test_pow4-792b406.stderr => asr-test_pow4-ef60978.stderr} (100%) rename tests/reference/{asr-test_print1-71e5114.json => asr-test_print1-f1f36f1.json} (65%) rename tests/reference/{asr-test_print1-71e5114.stderr => asr-test_print1-f1f36f1.stderr} (100%) rename tests/reference/{asr-test_print2-b5fcabf.json => asr-test_print2-64acb15.json} (65%) rename tests/reference/{asr-test_print2-b5fcabf.stderr => asr-test_print2-64acb15.stderr} (100%) rename tests/reference/{asr-test_return1-8e8f3ae.json => asr-test_return1-2603c9e.json} (65%) rename tests/reference/{asr-test_return1-8e8f3ae.stderr => asr-test_return1-2603c9e.stderr} (100%) rename tests/reference/{asr-test_return2-c5799e7.json => asr-test_return2-add829b.json} (65%) rename tests/reference/{asr-test_return2-c5799e7.stderr => asr-test_return2-add829b.stderr} (100%) rename tests/reference/{asr-test_set1-8fde53c.json => asr-test_set1-11379c7.json} (66%) rename tests/reference/{asr-test_set1-8fde53c.stderr => asr-test_set1-11379c7.stderr} (100%) rename tests/reference/{asr-test_set2-1ded45b.json => asr-test_set2-d91a6f0.json} (66%) rename tests/reference/{asr-test_set2-1ded45b.stderr => asr-test_set2-d91a6f0.stderr} (100%) rename tests/reference/{asr-test_set3-bbd0ed1.json => asr-test_set3-f9bbffb.json} (66%) rename tests/reference/{asr-test_set3-bbd0ed1.stderr => asr-test_set3-f9bbffb.stderr} (100%) rename tests/reference/{asr-test_set_indexing-cd60f9d.json => asr-test_set_indexing-a1c21b8.json} (64%) rename tests/reference/{asr-test_set_indexing-cd60f9d.stderr => asr-test_set_indexing-a1c21b8.stderr} (100%) rename tests/reference/{asr-test_str_capitalize-c5a2a24.json => asr-test_str_capitalize-9f8dfa9.json} (64%) rename tests/reference/{asr-test_str_capitalize-c5a2a24.stderr => asr-test_str_capitalize-9f8dfa9.stderr} (100%) rename tests/reference/{asr-test_str_indexing-433fbfd.json => asr-test_str_indexing-b200a4e.json} (64%) rename tests/reference/{asr-test_str_indexing-433fbfd.stderr => asr-test_str_indexing-b200a4e.stderr} (100%) rename tests/reference/{asr-test_str_slicing-e93553b.json => asr-test_str_slicing-eca1381.json} (64%) rename tests/reference/{asr-test_str_slicing-e93553b.stderr => asr-test_str_slicing-eca1381.stderr} (100%) rename tests/reference/{asr-test_str_slicing2-b542789.json => asr-test_str_slicing2-2f07e9a.json} (64%) rename tests/reference/{asr-test_str_slicing2-b542789.stderr => asr-test_str_slicing2-2f07e9a.stderr} (100%) rename tests/reference/{asr-test_str_slicing3-04a6b27.json => asr-test_str_slicing3-fe6a03c.json} (64%) rename tests/reference/{asr-test_str_slicing3-04a6b27.stderr => asr-test_str_slicing3-fe6a03c.stderr} (100%) rename tests/reference/{asr-test_str_to_int-fc70075.json => asr-test_str_to_int-61553e7.json} (64%) rename tests/reference/{asr-test_str_to_int-fc70075.stderr => asr-test_str_to_int-61553e7.stderr} (100%) rename tests/reference/{asr-test_tuple1-05c8313.json => asr-test_tuple1-7abe88f.json} (65%) rename tests/reference/{asr-test_tuple1-05c8313.stderr => asr-test_tuple1-7abe88f.stderr} (100%) rename tests/reference/{asr-test_tuple2-2d7dd26.json => asr-test_tuple2-b046610.json} (65%) rename tests/reference/{asr-test_tuple2-2d7dd26.stderr => asr-test_tuple2-b046610.stderr} (100%) rename tests/reference/{asr-test_tuple3-431e112.json => asr-test_tuple3-19fa47f.json} (65%) rename tests/reference/{asr-test_tuple3-431e112.stderr => asr-test_tuple3-19fa47f.stderr} (100%) rename tests/reference/{asr-test_type_mismatch_01-5b45109.json => asr-test_type_mismatch_01-09e8af3.json} (63%) rename tests/reference/{asr-test_type_mismatch_01-5b45109.stderr => asr-test_type_mismatch_01-09e8af3.stderr} (100%) rename tests/reference/{asr-test_unsupported_type-1f16a93.json => asr-test_unsupported_type-0d813dd.json} (63%) rename tests/reference/{asr-test_unsupported_type-1f16a93.stderr => asr-test_unsupported_type-0d813dd.stderr} (100%) rename tests/reference/{asr-test_zero_division-96c56ec.json => asr-test_zero_division-3dd84e8.json} (64%) rename tests/reference/{asr-test_zero_division-96c56ec.stderr => asr-test_zero_division-3dd84e8.stderr} (100%) rename tests/reference/{asr-test_zero_division2-8edba44.json => asr-test_zero_division2-d84989f.json} (64%) rename tests/reference/{asr-test_zero_division2-8edba44.stderr => asr-test_zero_division2-d84989f.stderr} (100%) rename tests/reference/{asr-test_zero_division3-55ea2f5.json => asr-test_zero_division3-29efb9e.json} (64%) rename tests/reference/{asr-test_zero_division3-55ea2f5.stderr => asr-test_zero_division3-29efb9e.stderr} (100%) rename tests/reference/{asr-test_zero_division4-67f7c69.json => asr-test_zero_division4-bf4af64.json} (64%) rename tests/reference/{asr-test_zero_division4-67f7c69.stderr => asr-test_zero_division4-bf4af64.stderr} (100%) rename tests/reference/{asr-tuple1-ce358d9.json => asr-tuple1-09972ab.json} (66%) rename tests/reference/{asr-tuple1-ce358d9.stdout => asr-tuple1-09972ab.stdout} (100%) rename tests/reference/{asr-type_mismatch-865037b.json => asr-type_mismatch-61052c7.json} (65%) rename tests/reference/{asr-type_mismatch-865037b.stderr => asr-type_mismatch-61052c7.stderr} (100%) rename tests/reference/{asr-vec_01-9b22f33.json => asr-vec_01-66ac423.json} (67%) rename tests/reference/{asr-vec_01-9b22f33.stdout => asr-vec_01-66ac423.stdout} (100%) rename tests/reference/{ast-assert1-ca86e1f.json => ast-assert1-b0154ee.json} (66%) rename tests/reference/{ast-assert1-ca86e1f.stdout => ast-assert1-b0154ee.stdout} (100%) rename tests/reference/{ast-assign1-f667542.json => ast-assign1-2a4c9ed.json} (66%) rename tests/reference/{ast-assign1-f667542.stdout => ast-assign1-2a4c9ed.stdout} (100%) rename tests/reference/{ast-complex1-b52cd7b.json => ast-complex1-800b4bb.json} (65%) rename tests/reference/{ast-complex1-b52cd7b.stdout => ast-complex1-800b4bb.stdout} (100%) rename tests/reference/{ast-constants1-66d568d.json => ast-constants1-91cb6ff.json} (65%) rename tests/reference/{ast-constants1-66d568d.stdout => ast-constants1-91cb6ff.stdout} (100%) rename tests/reference/{ast-dictionary1-817b071.json => ast-dictionary1-1a7e00a.json} (65%) rename tests/reference/{ast-dictionary1-817b071.stdout => ast-dictionary1-1a7e00a.stdout} (100%) rename tests/reference/{ast-doconcurrentloop_01-5646034.json => ast-doconcurrentloop_01-ed7017b.json} (63%) rename tests/reference/{ast-doconcurrentloop_01-5646034.stdout => ast-doconcurrentloop_01-ed7017b.stdout} (100%) rename tests/reference/{ast-ellipsis1-dcbe16f.json => ast-ellipsis1-4f6c4dd.json} (66%) rename tests/reference/{ast-ellipsis1-dcbe16f.stdout => ast-ellipsis1-4f6c4dd.stdout} (100%) rename tests/reference/{ast-expr1-20cdacc.json => ast-expr1-1e8f7b1.json} (66%) rename tests/reference/{ast-expr1-20cdacc.stdout => ast-expr1-1e8f7b1.stdout} (100%) rename tests/reference/{ast-expr10-49c656f.json => ast-expr10-a8d646d.json} (66%) rename tests/reference/{ast-expr10-49c656f.stdout => ast-expr10-a8d646d.stdout} (100%) rename tests/reference/{ast-expr11-df775f8.json => ast-expr11-1d29f78.json} (66%) rename tests/reference/{ast-expr11-df775f8.stdout => ast-expr11-1d29f78.stdout} (100%) rename tests/reference/{ast-expr12-49f1f8d.json => ast-expr12-adaecda.json} (66%) rename tests/reference/{ast-expr12-49f1f8d.stdout => ast-expr12-adaecda.stdout} (100%) rename tests/reference/{ast-expr13-b25242b.json => ast-expr13-c35ace1.json} (66%) rename tests/reference/{ast-expr13-b25242b.stdout => ast-expr13-c35ace1.stdout} (100%) rename tests/reference/{ast-expr2-58df65e.json => ast-expr2-6642d4a.json} (66%) rename tests/reference/{ast-expr2-58df65e.stdout => ast-expr2-6642d4a.stdout} (100%) rename tests/reference/{ast-expr4-78d463e.json => ast-expr4-49316cb.json} (66%) rename tests/reference/{ast-expr4-78d463e.stdout => ast-expr4-49316cb.stdout} (100%) rename tests/reference/{ast-expr5-5e64a6e.json => ast-expr5-bbc6e71.json} (66%) rename tests/reference/{ast-expr5-5e64a6e.stdout => ast-expr5-bbc6e71.stdout} (100%) rename tests/reference/{ast-expr6-9ba0998.json => ast-expr6-0b12a67.json} (66%) rename tests/reference/{ast-expr6-9ba0998.stdout => ast-expr6-0b12a67.stdout} (100%) rename tests/reference/{ast-expr7-bf4cb65.json => ast-expr7-fe52776.json} (66%) rename tests/reference/{ast-expr7-bf4cb65.stdout => ast-expr7-fe52776.stdout} (100%) rename tests/reference/{ast-expr8-beffee3.json => ast-expr8-7db6b28.json} (66%) rename tests/reference/{ast-expr8-beffee3.stdout => ast-expr8-7db6b28.stdout} (100%) rename tests/reference/{ast-expr9-187e786.json => ast-expr9-d184496.json} (66%) rename tests/reference/{ast-expr9-187e786.stdout => ast-expr9-d184496.stdout} (100%) rename tests/reference/{ast-expr_01-2d63276.json => ast-expr_01-d0927f9.json} (66%) rename tests/reference/{ast-expr_01-2d63276.stdout => ast-expr_01-d0927f9.stdout} (100%) rename tests/reference/{ast-global1-36fd19b.json => ast-global1-b2690cf.json} (66%) rename tests/reference/{ast-global1-36fd19b.stdout => ast-global1-b2690cf.stdout} (100%) rename tests/reference/{ast-global_scope1-7809fe0.json => ast-global_scope1-1d68a6c.json} (64%) rename tests/reference/{ast-global_scope1-7809fe0.stdout => ast-global_scope1-1d68a6c.stdout} (100%) rename tests/reference/{ast-list1-2e4b88a.json => ast-list1-9ce2da0.json} (66%) rename tests/reference/{ast-list1-2e4b88a.stdout => ast-list1-9ce2da0.stdout} (100%) rename tests/reference/{ast-loop1-d1c242e.json => ast-loop1-194a137.json} (66%) rename tests/reference/{ast-loop1-d1c242e.stdout => ast-loop1-194a137.stdout} (100%) rename tests/reference/{ast-loop2-44a8219.json => ast-loop2-63bf329.json} (66%) rename tests/reference/{ast-loop2-44a8219.stdout => ast-loop2-63bf329.stdout} (100%) rename tests/reference/{ast-loop3-c545eab.json => ast-loop3-f7e0393.json} (66%) rename tests/reference/{ast-loop3-c545eab.stdout => ast-loop3-f7e0393.stdout} (100%) rename tests/reference/{ast-set1-8938049.json => ast-set1-ebd6ee0.json} (66%) rename tests/reference/{ast-set1-8938049.stdout => ast-set1-ebd6ee0.stdout} (100%) rename tests/reference/{ast-subscript1-76dcb5a.json => ast-subscript1-bd5584b.json} (65%) rename tests/reference/{ast-subscript1-76dcb5a.stdout => ast-subscript1-bd5584b.stdout} (100%) rename tests/reference/{ast-tuple1-0b7b893.json => ast-tuple1-2fb5396.json} (66%) rename tests/reference/{ast-tuple1-0b7b893.stdout => ast-tuple1-2fb5396.stdout} (100%) rename tests/reference/{ast_new-async1-3f88bf1.json => ast_new-async1-b3d07ed.json} (63%) rename tests/reference/{ast_new-async1-3f88bf1.stdout => ast_new-async1-b3d07ed.stdout} (100%) rename tests/reference/{ast_new-boolOp1-6a81afc.json => ast_new-boolOp1-478328f.json} (63%) rename tests/reference/{ast_new-boolOp1-6a81afc.stdout => ast_new-boolOp1-478328f.stdout} (100%) rename tests/reference/{ast_new-class_def1-9fd9de1.json => ast_new-class_def1-fe69291.json} (63%) rename tests/reference/{ast_new-class_def1-9fd9de1.stdout => ast_new-class_def1-fe69291.stdout} (100%) rename tests/reference/{ast_new-class_def2-505b454.json => ast_new-class_def2-c6db986.json} (63%) rename tests/reference/{ast_new-class_def2-505b454.stdout => ast_new-class_def2-c6db986.stdout} (100%) rename tests/reference/{ast_new-comment2-08e9f9a.json => ast_new-comment2-f0984d5.json} (63%) rename tests/reference/{ast_new-comment2-08e9f9a.stdout => ast_new-comment2-f0984d5.stdout} (100%) rename tests/reference/{ast_new-comprehension1-575f5b3.json => ast_new-comprehension1-69cf2af.json} (62%) rename tests/reference/{ast_new-comprehension1-575f5b3.stdout => ast_new-comprehension1-69cf2af.stdout} (100%) rename tests/reference/{ast_new-conditional_expr1-b290d84.json => ast_new-conditional_expr1-07ccb9e.json} (61%) rename tests/reference/{ast_new-conditional_expr1-b290d84.stdout => ast_new-conditional_expr1-07ccb9e.stdout} (100%) rename tests/reference/{ast_new-dictionary1-a0c7807.json => ast_new-dictionary1-445e718.json} (62%) rename tests/reference/{ast_new-dictionary1-a0c7807.stdout => ast_new-dictionary1-445e718.stdout} (100%) rename tests/reference/{ast_new-ellipsis2-227f104.json => ast_new-ellipsis2-3a9750b.json} (63%) rename tests/reference/{ast_new-ellipsis2-227f104.stdout => ast_new-ellipsis2-3a9750b.stdout} (100%) rename tests/reference/{ast_new-for1-0494920.json => ast_new-for1-887432e.json} (64%) rename tests/reference/{ast_new-for1-0494920.stdout => ast_new-for1-887432e.stdout} (100%) rename tests/reference/{ast_new-for2-574cea6.json => ast_new-for2-af08901.json} (64%) rename tests/reference/{ast_new-for2-574cea6.stdout => ast_new-for2-af08901.stdout} (100%) rename tests/reference/{ast_new-function_def1-ca8dc19.json => ast_new-function_def1-1a872df.json} (62%) rename tests/reference/{ast_new-function_def1-ca8dc19.stdout => ast_new-function_def1-1a872df.stdout} (100%) rename tests/reference/{ast_new-function_def2-cead6f1.json => ast_new-function_def2-52c4587.json} (62%) rename tests/reference/{ast_new-function_def2-cead6f1.stdout => ast_new-function_def2-52c4587.stdout} (100%) rename tests/reference/{ast_new-function_def3-a3f4dcf.json => ast_new-function_def3-f66064a.json} (62%) rename tests/reference/{ast_new-function_def3-a3f4dcf.stdout => ast_new-function_def3-f66064a.stdout} (100%) rename tests/reference/{ast_new-global1-4288396.json => ast_new-global1-38edfbd.json} (63%) rename tests/reference/{ast_new-global1-4288396.stdout => ast_new-global1-38edfbd.stdout} (100%) rename tests/reference/{ast_new-if1-e6432ed.json => ast_new-if1-db43586.json} (64%) rename tests/reference/{ast_new-if1-e6432ed.stdout => ast_new-if1-db43586.stdout} (100%) rename tests/reference/{ast_new-if2-33fa625.json => ast_new-if2-c3b6022.json} (64%) rename tests/reference/{ast_new-if2-33fa625.stdout => ast_new-if2-c3b6022.stdout} (100%) rename tests/reference/{ast_new-import1-6a0330c.json => ast_new-import1-f643fd3.json} (63%) rename tests/reference/{ast_new-import1-6a0330c.stdout => ast_new-import1-f643fd3.stdout} (100%) rename tests/reference/{ast_new-lambda1-58822d0.json => ast_new-lambda1-260d046.json} (63%) rename tests/reference/{ast_new-lambda1-58822d0.stdout => ast_new-lambda1-260d046.stdout} (100%) rename tests/reference/{ast_new-lambda2-d6a1f95.json => ast_new-lambda2-d84336e.json} (63%) rename tests/reference/{ast_new-lambda2-d6a1f95.stdout => ast_new-lambda2-d84336e.stdout} (100%) rename tests/reference/{ast_new-match_stmt1-9f49edb.json => ast_new-match_stmt1-9e84d24.json} (62%) rename tests/reference/{ast_new-match_stmt1-9f49edb.stdout => ast_new-match_stmt1-9e84d24.stdout} (100%) rename tests/reference/{ast_new-slice1-0471787.json => ast_new-slice1-9c440e3.json} (63%) rename tests/reference/{ast_new-slice1-0471787.stdout => ast_new-slice1-9c440e3.stdout} (100%) rename tests/reference/{ast_new-statements1-1685ab2.json => ast_new-statements1-e081093.json} (62%) rename tests/reference/{ast_new-statements1-1685ab2.stdout => ast_new-statements1-e081093.stdout} (100%) rename tests/reference/{ast_new-statements2-d9ec152.json => ast_new-statements2-c4cdc5f.json} (62%) rename tests/reference/{ast_new-statements2-d9ec152.stdout => ast_new-statements2-c4cdc5f.stdout} (100%) rename tests/reference/{ast_new-string1-f14340e.json => ast_new-string1-96b90b3.json} (63%) rename tests/reference/{ast_new-string1-f14340e.stdout => ast_new-string1-96b90b3.stdout} (100%) rename tests/reference/{ast_new-string2-b6abe54.json => ast_new-string2-44323ea.json} (63%) rename tests/reference/{ast_new-string2-b6abe54.stdout => ast_new-string2-44323ea.stdout} (100%) rename tests/reference/{ast_new-string3-27e8bd2.json => ast_new-string3-37f35a0.json} (63%) rename tests/reference/{ast_new-string3-27e8bd2.stdout => ast_new-string3-37f35a0.stdout} (100%) rename tests/reference/{ast_new-try1-be44da5.json => ast_new-try1-a9a22cf.json} (64%) rename tests/reference/{ast_new-try1-be44da5.stdout => ast_new-try1-a9a22cf.stdout} (100%) rename tests/reference/{ast_new-tuple1-3e447de.json => ast_new-tuple1-29c08af.json} (63%) rename tests/reference/{ast_new-tuple1-3e447de.stdout => ast_new-tuple1-29c08af.stdout} (100%) rename tests/reference/{ast_new-type_comment1-a1dfe37.json => ast_new-type_comment1-710ea6c.json} (62%) rename tests/reference/{ast_new-type_comment1-a1dfe37.stdout => ast_new-type_comment1-710ea6c.stdout} (100%) rename tests/reference/{ast_new-unicode-1c0cbec.json => ast_new-unicode-d3199dc.json} (63%) rename tests/reference/{ast_new-unicode-1c0cbec.stdout => ast_new-unicode-d3199dc.stdout} (100%) rename tests/reference/{ast_new-while1-1c5ee87.json => ast_new-while1-a4c6382.json} (63%) rename tests/reference/{ast_new-while1-1c5ee87.stdout => ast_new-while1-a4c6382.stdout} (100%) rename tests/reference/{ast_new-with1-cf2a022.json => ast_new-with1-6c88c0f.json} (64%) rename tests/reference/{ast_new-with1-cf2a022.stdout => ast_new-with1-6c88c0f.stdout} (100%) rename tests/reference/{ast_new-yield-b585d08.json => ast_new-yield-4c41668.json} (64%) rename tests/reference/{ast_new-yield-b585d08.stdout => ast_new-yield-4c41668.stdout} (100%) rename tests/reference/{pass_inline_function_calls-func_inline_01-6cf8821.json => pass_inline_function_calls-func_inline_01-8b6a5da.json} (59%) rename tests/reference/{pass_inline_function_calls-func_inline_01-6cf8821.stdout => pass_inline_function_calls-func_inline_01-8b6a5da.stdout} (100%) rename tests/reference/{pass_loop_vectorise-vec_01-fdf30b1.json => pass_loop_vectorise-vec_01-be9985e.json} (60%) rename tests/reference/{pass_loop_vectorise-vec_01-fdf30b1.stdout => pass_loop_vectorise-vec_01-be9985e.stdout} (100%) rename tests/reference/{pass_print_list_tuple-print_02-1bcc4ec.json => pass_print_list_tuple-print_02-09600eb.json} (59%) rename tests/reference/{pass_print_list_tuple-print_02-1bcc4ec.stdout => pass_print_list_tuple-print_02-09600eb.stdout} (100%) diff --git a/tests/reference/asr-array_01_decl-f955627.json b/tests/reference/asr-array_01_decl-39cf894.json similarity index 66% rename from tests/reference/asr-array_01_decl-f955627.json rename to tests/reference/asr-array_01_decl-39cf894.json index 0ed1b33196..35687eb362 100644 --- a/tests/reference/asr-array_01_decl-f955627.json +++ b/tests/reference/asr-array_01_decl-39cf894.json @@ -1,11 +1,11 @@ { - "basename": "asr-array_01_decl-f955627", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-array_01_decl-39cf894", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/array_01_decl.py", "infile_hash": "3dff59bab7475d254ce0470065c11e797e52a5b2a3d7546acc0e6705", "outfile": null, "outfile_hash": null, - "stdout": "asr-array_01_decl-f955627.stdout", + "stdout": "asr-array_01_decl-39cf894.stdout", "stdout_hash": "ae255051c7b45506791318e252b42358043c41c3f3c13848d11e91b8", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-array_01_decl-f955627.stdout b/tests/reference/asr-array_01_decl-39cf894.stdout similarity index 100% rename from tests/reference/asr-array_01_decl-f955627.stdout rename to tests/reference/asr-array_01_decl-39cf894.stdout diff --git a/tests/reference/asr-array_02_decl-8860c8a.json b/tests/reference/asr-array_02_decl-e8f6874.json similarity index 66% rename from tests/reference/asr-array_02_decl-8860c8a.json rename to tests/reference/asr-array_02_decl-e8f6874.json index 3fb0bab0f6..4d25138b3a 100644 --- a/tests/reference/asr-array_02_decl-8860c8a.json +++ b/tests/reference/asr-array_02_decl-e8f6874.json @@ -1,11 +1,11 @@ { - "basename": "asr-array_02_decl-8860c8a", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-array_02_decl-e8f6874", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/array_02_decl.py", "infile_hash": "8daa77dd2d5fe6c6f5f3ce867746c5e13290305ef7e1723ac9669285", "outfile": null, "outfile_hash": null, - "stdout": "asr-array_02_decl-8860c8a.stdout", + "stdout": "asr-array_02_decl-e8f6874.stdout", "stdout_hash": "c836b9c2ff4199c1e0f360b2587181ea9999ee1ff9bbf42750a7094e", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-array_02_decl-8860c8a.stdout b/tests/reference/asr-array_02_decl-e8f6874.stdout similarity index 100% rename from tests/reference/asr-array_02_decl-8860c8a.stdout rename to tests/reference/asr-array_02_decl-e8f6874.stdout diff --git a/tests/reference/asr-assert1-a8db80c.json b/tests/reference/asr-assert1-1ce92ea.json similarity index 66% rename from tests/reference/asr-assert1-a8db80c.json rename to tests/reference/asr-assert1-1ce92ea.json index d5407e7069..4bed842706 100644 --- a/tests/reference/asr-assert1-a8db80c.json +++ b/tests/reference/asr-assert1-1ce92ea.json @@ -1,11 +1,11 @@ { - "basename": "asr-assert1-a8db80c", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-assert1-1ce92ea", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/assert1.py", "infile_hash": "0ff84ea5ccd3d0815cbb66e1c3d3acd61dee7257c98aa1a27ceeef3b", "outfile": null, "outfile_hash": null, - "stdout": "asr-assert1-a8db80c.stdout", + "stdout": "asr-assert1-1ce92ea.stdout", "stdout_hash": "e35a9f3ceef4590de10016f5f591bbd2ccd4c6d84630135deb1dbbca", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-assert1-a8db80c.stdout b/tests/reference/asr-assert1-1ce92ea.stdout similarity index 100% rename from tests/reference/asr-assert1-a8db80c.stdout rename to tests/reference/asr-assert1-1ce92ea.stdout diff --git a/tests/reference/asr-assign1-ec7ab8d.json b/tests/reference/asr-assign1-886f049.json similarity index 66% rename from tests/reference/asr-assign1-ec7ab8d.json rename to tests/reference/asr-assign1-886f049.json index 092a5c6b89..d9726b9a10 100644 --- a/tests/reference/asr-assign1-ec7ab8d.json +++ b/tests/reference/asr-assign1-886f049.json @@ -1,11 +1,11 @@ { - "basename": "asr-assign1-ec7ab8d", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-assign1-886f049", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/assign1.py", "infile_hash": "3b82a73e457bd65e85828b72d56596ca927e7c661e333691f154912b", "outfile": null, "outfile_hash": null, - "stdout": "asr-assign1-ec7ab8d.stdout", + "stdout": "asr-assign1-886f049.stdout", "stdout_hash": "c285dd3b104db49f2646c0ee37957bec93b6989e429dbf5a30a13553", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-assign1-ec7ab8d.stdout b/tests/reference/asr-assign1-886f049.stdout similarity index 100% rename from tests/reference/asr-assign1-ec7ab8d.stdout rename to tests/reference/asr-assign1-886f049.stdout diff --git a/tests/reference/asr-assign2-4778d3a.json b/tests/reference/asr-assign2-8d1a2ee.json similarity index 66% rename from tests/reference/asr-assign2-4778d3a.json rename to tests/reference/asr-assign2-8d1a2ee.json index 3007b29256..d793fd300e 100644 --- a/tests/reference/asr-assign2-4778d3a.json +++ b/tests/reference/asr-assign2-8d1a2ee.json @@ -1,11 +1,11 @@ { - "basename": "asr-assign2-4778d3a", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-assign2-8d1a2ee", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/assign2.py", "infile_hash": "9b182950a8d1abbd951007b692fff95382e90ada103c7f14c4497b06", "outfile": null, "outfile_hash": null, - "stdout": "asr-assign2-4778d3a.stdout", + "stdout": "asr-assign2-8d1a2ee.stdout", "stdout_hash": "c8e957c49ef1c4d0abc06621479b12c13aa35f8e7efe0ed9f7381cf5", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-assign2-4778d3a.stdout b/tests/reference/asr-assign2-8d1a2ee.stdout similarity index 100% rename from tests/reference/asr-assign2-4778d3a.stdout rename to tests/reference/asr-assign2-8d1a2ee.stdout diff --git a/tests/reference/asr-bindc_01-edd8cc4.json b/tests/reference/asr-bindc_01-6d521a9.json similarity index 67% rename from tests/reference/asr-bindc_01-edd8cc4.json rename to tests/reference/asr-bindc_01-6d521a9.json index c69c0e1b29..3a204189c1 100644 --- a/tests/reference/asr-bindc_01-edd8cc4.json +++ b/tests/reference/asr-bindc_01-6d521a9.json @@ -1,11 +1,11 @@ { - "basename": "asr-bindc_01-edd8cc4", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-bindc_01-6d521a9", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/bindc_01.py", "infile_hash": "f628ce81b32f2730f936232bb235f39d4372912bc332f3c97e983ad7", "outfile": null, "outfile_hash": null, - "stdout": "asr-bindc_01-edd8cc4.stdout", + "stdout": "asr-bindc_01-6d521a9.stdout", "stdout_hash": "c1c5afabc9ecb18c731ad21825ee23c181c1965e4acf5fd2776b2008", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-bindc_01-edd8cc4.stdout b/tests/reference/asr-bindc_01-6d521a9.stdout similarity index 100% rename from tests/reference/asr-bindc_01-edd8cc4.stdout rename to tests/reference/asr-bindc_01-6d521a9.stdout diff --git a/tests/reference/asr-bindc_01-f8048b2.json b/tests/reference/asr-bindc_01-f761165.json similarity index 66% rename from tests/reference/asr-bindc_01-f8048b2.json rename to tests/reference/asr-bindc_01-f761165.json index 80e52a15b2..24d385098d 100644 --- a/tests/reference/asr-bindc_01-f8048b2.json +++ b/tests/reference/asr-bindc_01-f761165.json @@ -1,13 +1,13 @@ { - "basename": "asr-bindc_01-f8048b2", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-bindc_01-f761165", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/bindc_01.py", "infile_hash": "5f60d96ef8d39100cf775974c5af355ebc1d1f3e67d442564faf7f07", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-bindc_01-f8048b2.stderr", + "stderr": "asr-bindc_01-f761165.stderr", "stderr_hash": "b2d416fa6afa00923a130cb76dbd580798a9ee0841e34980c531b050", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-bindc_01-f8048b2.stderr b/tests/reference/asr-bindc_01-f761165.stderr similarity index 100% rename from tests/reference/asr-bindc_01-f8048b2.stderr rename to tests/reference/asr-bindc_01-f761165.stderr diff --git a/tests/reference/asr-bindc_02-2406ab7.json b/tests/reference/asr-bindc_02-5092d8e.json similarity index 66% rename from tests/reference/asr-bindc_02-2406ab7.json rename to tests/reference/asr-bindc_02-5092d8e.json index af806f03d1..6b3c472b5c 100644 --- a/tests/reference/asr-bindc_02-2406ab7.json +++ b/tests/reference/asr-bindc_02-5092d8e.json @@ -1,13 +1,13 @@ { - "basename": "asr-bindc_02-2406ab7", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-bindc_02-5092d8e", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/bindc_02.py", "infile_hash": "c1e886c2295631b0c4647c418c68d0edf53d5ab4ce3439b058a657ee", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-bindc_02-2406ab7.stderr", + "stderr": "asr-bindc_02-5092d8e.stderr", "stderr_hash": "315076027d80c91db75f4ec44ea5cf8d5fd37a499a367f627b6f6553", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-bindc_02-2406ab7.stderr b/tests/reference/asr-bindc_02-5092d8e.stderr similarity index 100% rename from tests/reference/asr-bindc_02-2406ab7.stderr rename to tests/reference/asr-bindc_02-5092d8e.stderr diff --git a/tests/reference/asr-bindc_02-8c7fec3.json b/tests/reference/asr-bindc_02-bc1a7ea.json similarity index 67% rename from tests/reference/asr-bindc_02-8c7fec3.json rename to tests/reference/asr-bindc_02-bc1a7ea.json index 01ec727b49..2f06275b89 100644 --- a/tests/reference/asr-bindc_02-8c7fec3.json +++ b/tests/reference/asr-bindc_02-bc1a7ea.json @@ -1,11 +1,11 @@ { - "basename": "asr-bindc_02-8c7fec3", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-bindc_02-bc1a7ea", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/bindc_02.py", "infile_hash": "f01761bc86ab282ba20778efe62f227b36929c0232cf5343588b5a85", "outfile": null, "outfile_hash": null, - "stdout": "asr-bindc_02-8c7fec3.stdout", + "stdout": "asr-bindc_02-bc1a7ea.stdout", "stdout_hash": "a48a2ddd1469559be941968442243d048382d13bccf878ab3dd788d7", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-bindc_02-8c7fec3.stdout b/tests/reference/asr-bindc_02-bc1a7ea.stdout similarity index 100% rename from tests/reference/asr-bindc_02-8c7fec3.stdout rename to tests/reference/asr-bindc_02-bc1a7ea.stdout diff --git a/tests/reference/asr-bindc_03-67595e1.json b/tests/reference/asr-bindc_03-95dbba7.json similarity index 66% rename from tests/reference/asr-bindc_03-67595e1.json rename to tests/reference/asr-bindc_03-95dbba7.json index cf95b05a9c..ed546c040f 100644 --- a/tests/reference/asr-bindc_03-67595e1.json +++ b/tests/reference/asr-bindc_03-95dbba7.json @@ -1,13 +1,13 @@ { - "basename": "asr-bindc_03-67595e1", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-bindc_03-95dbba7", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/bindc_03.py", "infile_hash": "966305cef9890644f613e81f7405e694af6fa13e1b06f0e3e08782bb", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-bindc_03-67595e1.stderr", + "stderr": "asr-bindc_03-95dbba7.stderr", "stderr_hash": "bd49feaada7484eafec316056295c58526a05d426d1a28f1bb5d8b93", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-bindc_03-67595e1.stderr b/tests/reference/asr-bindc_03-95dbba7.stderr similarity index 100% rename from tests/reference/asr-bindc_03-67595e1.stderr rename to tests/reference/asr-bindc_03-95dbba7.stderr diff --git a/tests/reference/asr-c_interop1-c0a6335.json b/tests/reference/asr-c_interop1-cf2e9b4.json similarity index 65% rename from tests/reference/asr-c_interop1-c0a6335.json rename to tests/reference/asr-c_interop1-cf2e9b4.json index 3b8105db01..e0a4f5c1c7 100644 --- a/tests/reference/asr-c_interop1-c0a6335.json +++ b/tests/reference/asr-c_interop1-cf2e9b4.json @@ -1,11 +1,11 @@ { - "basename": "asr-c_interop1-c0a6335", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-c_interop1-cf2e9b4", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/c_interop1.py", "infile_hash": "aeb797508318740ae58a14cf663910a8fa077c574eaf79b9f54656ef", "outfile": null, "outfile_hash": null, - "stdout": "asr-c_interop1-c0a6335.stdout", + "stdout": "asr-c_interop1-cf2e9b4.stdout", "stdout_hash": "fc1f7877e7d0c39d1ab72effdfe1927a71b1369e0cc8e0fc4c7ec3aa", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-c_interop1-c0a6335.stdout b/tests/reference/asr-c_interop1-cf2e9b4.stdout similarity index 100% rename from tests/reference/asr-c_interop1-c0a6335.stdout rename to tests/reference/asr-c_interop1-cf2e9b4.stdout diff --git a/tests/reference/asr-callback_01-64f7a94.json b/tests/reference/asr-callback_01-df40fd5.json similarity index 66% rename from tests/reference/asr-callback_01-64f7a94.json rename to tests/reference/asr-callback_01-df40fd5.json index 1667db0c06..3c0bfb127a 100644 --- a/tests/reference/asr-callback_01-64f7a94.json +++ b/tests/reference/asr-callback_01-df40fd5.json @@ -1,11 +1,11 @@ { - "basename": "asr-callback_01-64f7a94", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-callback_01-df40fd5", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/callback_01.py", "infile_hash": "c3ab71a93f40edda000ae863149c38c388bb43a8329ebae9320a7ab4", "outfile": null, "outfile_hash": null, - "stdout": "asr-callback_01-64f7a94.stdout", + "stdout": "asr-callback_01-df40fd5.stdout", "stdout_hash": "fa7fd9ccb4bd6051dc7338ed3b96290d3a23011b216a7877b0dd003c", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-callback_01-64f7a94.stdout b/tests/reference/asr-callback_01-df40fd5.stdout similarity index 100% rename from tests/reference/asr-callback_01-64f7a94.stdout rename to tests/reference/asr-callback_01-df40fd5.stdout diff --git a/tests/reference/asr-cast-d93d15f.json b/tests/reference/asr-cast-435c233.json similarity index 66% rename from tests/reference/asr-cast-d93d15f.json rename to tests/reference/asr-cast-435c233.json index d0cfe5744f..26bf3490a9 100644 --- a/tests/reference/asr-cast-d93d15f.json +++ b/tests/reference/asr-cast-435c233.json @@ -1,11 +1,11 @@ { - "basename": "asr-cast-d93d15f", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-cast-435c233", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/cast.py", "infile_hash": "6e4219b25f4aa2035b57c9658dbb133f2dff55db0d9c128b19214f62", "outfile": null, "outfile_hash": null, - "stdout": "asr-cast-d93d15f.stdout", + "stdout": "asr-cast-435c233.stdout", "stdout_hash": "4c5a0450e53005d1f60449cf4199eccae0e006c86a5e7bf269633b0b", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-cast-d93d15f.stdout b/tests/reference/asr-cast-435c233.stdout similarity index 100% rename from tests/reference/asr-cast-d93d15f.stdout rename to tests/reference/asr-cast-435c233.stdout diff --git a/tests/reference/asr-complex1-7ce1c89.json b/tests/reference/asr-complex1-f26c460.json similarity index 65% rename from tests/reference/asr-complex1-7ce1c89.json rename to tests/reference/asr-complex1-f26c460.json index d4302219c6..f66f2c3fab 100644 --- a/tests/reference/asr-complex1-7ce1c89.json +++ b/tests/reference/asr-complex1-f26c460.json @@ -1,11 +1,11 @@ { - "basename": "asr-complex1-7ce1c89", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-complex1-f26c460", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/complex1.py", "infile_hash": "60b45de7b88ec768d70a3122b36545e9604a86504ed6e5d9d813c719", "outfile": null, "outfile_hash": null, - "stdout": "asr-complex1-7ce1c89.stdout", + "stdout": "asr-complex1-f26c460.stdout", "stdout_hash": "0ffcbf230f41019c959fae5eec527462afe761b45e2bafe219b44066", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-complex1-7ce1c89.stdout b/tests/reference/asr-complex1-f26c460.stdout similarity index 100% rename from tests/reference/asr-complex1-7ce1c89.stdout rename to tests/reference/asr-complex1-f26c460.stdout diff --git a/tests/reference/asr-const_01-6df049a.json b/tests/reference/asr-const_01-af8289b.json similarity index 66% rename from tests/reference/asr-const_01-6df049a.json rename to tests/reference/asr-const_01-af8289b.json index a8390c8cc8..c54ff59cdd 100644 --- a/tests/reference/asr-const_01-6df049a.json +++ b/tests/reference/asr-const_01-af8289b.json @@ -1,13 +1,13 @@ { - "basename": "asr-const_01-6df049a", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-const_01-af8289b", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/const_01.py", "infile_hash": "c147e6905815b0476dd2ec10669bb4c7fd65d604910e00b8b9eade30", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-const_01-6df049a.stderr", + "stderr": "asr-const_01-af8289b.stderr", "stderr_hash": "f47e74e916315ec82f38680f66c9cf5ef3c958bcdfa87b9efe09b264", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-const_01-6df049a.stderr b/tests/reference/asr-const_01-af8289b.stderr similarity index 100% rename from tests/reference/asr-const_01-6df049a.stderr rename to tests/reference/asr-const_01-af8289b.stderr diff --git a/tests/reference/asr-const_02-8dbfab6.json b/tests/reference/asr-const_02-fce29b7.json similarity index 66% rename from tests/reference/asr-const_02-8dbfab6.json rename to tests/reference/asr-const_02-fce29b7.json index f66bf53857..af31951d5b 100644 --- a/tests/reference/asr-const_02-8dbfab6.json +++ b/tests/reference/asr-const_02-fce29b7.json @@ -1,13 +1,13 @@ { - "basename": "asr-const_02-8dbfab6", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-const_02-fce29b7", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/const_02.py", "infile_hash": "9548b6585315578b1844bea16afc1ebe3b17df7b548574c871226e47", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-const_02-8dbfab6.stderr", + "stderr": "asr-const_02-fce29b7.stderr", "stderr_hash": "b8b90da28518edbe487dbe6f52f1f25f004042fe463e8fba7b96d174", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-const_02-8dbfab6.stderr b/tests/reference/asr-const_02-fce29b7.stderr similarity index 100% rename from tests/reference/asr-const_02-8dbfab6.stderr rename to tests/reference/asr-const_02-fce29b7.stderr diff --git a/tests/reference/asr-constants1-20d32ff.json b/tests/reference/asr-constants1-5828e8a.json similarity index 65% rename from tests/reference/asr-constants1-20d32ff.json rename to tests/reference/asr-constants1-5828e8a.json index 7f10dbaad6..2a31eb964a 100644 --- a/tests/reference/asr-constants1-20d32ff.json +++ b/tests/reference/asr-constants1-5828e8a.json @@ -1,11 +1,11 @@ { - "basename": "asr-constants1-20d32ff", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-constants1-5828e8a", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/constants1.py", "infile_hash": "5dca391c30a1477fb903e17c1d47dad3b9b816088384ba61ff372db1", "outfile": null, "outfile_hash": null, - "stdout": "asr-constants1-20d32ff.stdout", + "stdout": "asr-constants1-5828e8a.stdout", "stdout_hash": "2f8730e5a2cc7985c49098522dfc4377ec957657c83f2b64809e34d9", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-constants1-20d32ff.stdout b/tests/reference/asr-constants1-5828e8a.stdout similarity index 100% rename from tests/reference/asr-constants1-20d32ff.stdout rename to tests/reference/asr-constants1-5828e8a.stdout diff --git a/tests/reference/asr-cptr_01-0dc5185.json b/tests/reference/asr-cptr_01-4e660f1.json similarity index 66% rename from tests/reference/asr-cptr_01-0dc5185.json rename to tests/reference/asr-cptr_01-4e660f1.json index 60216d9b51..c554aa6d5b 100644 --- a/tests/reference/asr-cptr_01-0dc5185.json +++ b/tests/reference/asr-cptr_01-4e660f1.json @@ -1,13 +1,13 @@ { - "basename": "asr-cptr_01-0dc5185", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-cptr_01-4e660f1", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/cptr_01.py", "infile_hash": "92647f6c175f3599be307df700902b5f7fe69826f22fd5f082713ee4", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-cptr_01-0dc5185.stderr", + "stderr": "asr-cptr_01-4e660f1.stderr", "stderr_hash": "0477f93b29ff4932b3471a59731a173fb19d6e44273236829eeaffbe", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-cptr_01-0dc5185.stderr b/tests/reference/asr-cptr_01-4e660f1.stderr similarity index 100% rename from tests/reference/asr-cptr_01-0dc5185.stderr rename to tests/reference/asr-cptr_01-4e660f1.stderr diff --git a/tests/reference/asr-dictionary1-789a50b.json b/tests/reference/asr-dictionary1-a105a36.json similarity index 65% rename from tests/reference/asr-dictionary1-789a50b.json rename to tests/reference/asr-dictionary1-a105a36.json index 91b090383b..2525a9a1f3 100644 --- a/tests/reference/asr-dictionary1-789a50b.json +++ b/tests/reference/asr-dictionary1-a105a36.json @@ -1,11 +1,11 @@ { - "basename": "asr-dictionary1-789a50b", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-dictionary1-a105a36", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/dictionary1.py", "infile_hash": "2d9f15b746aa8185afb3f2dc6415c20a7edccc8e711df1b323178d94", "outfile": null, "outfile_hash": null, - "stdout": "asr-dictionary1-789a50b.stdout", + "stdout": "asr-dictionary1-a105a36.stdout", "stdout_hash": "f2c0ff3f39155d49867fa2d0805245359d7fb94c136bdc8c97c5e02e", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-dictionary1-789a50b.stdout b/tests/reference/asr-dictionary1-a105a36.stdout similarity index 100% rename from tests/reference/asr-dictionary1-789a50b.stdout rename to tests/reference/asr-dictionary1-a105a36.stdout diff --git a/tests/reference/asr-doconcurrentloop_01-7b9a7d3.json b/tests/reference/asr-doconcurrentloop_01-3fdc189.json similarity index 63% rename from tests/reference/asr-doconcurrentloop_01-7b9a7d3.json rename to tests/reference/asr-doconcurrentloop_01-3fdc189.json index 2172b53c7b..fa2b686c5e 100644 --- a/tests/reference/asr-doconcurrentloop_01-7b9a7d3.json +++ b/tests/reference/asr-doconcurrentloop_01-3fdc189.json @@ -1,11 +1,11 @@ { - "basename": "asr-doconcurrentloop_01-7b9a7d3", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-doconcurrentloop_01-3fdc189", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/doconcurrentloop_01.py", "infile_hash": "2fe3769863a595a01e46a88bf55c944e61a0d141d5c75816ffa74d96", "outfile": null, "outfile_hash": null, - "stdout": "asr-doconcurrentloop_01-7b9a7d3.stdout", + "stdout": "asr-doconcurrentloop_01-3fdc189.stdout", "stdout_hash": "9519c801f6f3612439fef115f1c30385234060565a7dd07e125685a4", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-doconcurrentloop_01-7b9a7d3.stdout b/tests/reference/asr-doconcurrentloop_01-3fdc189.stdout similarity index 100% rename from tests/reference/asr-doconcurrentloop_01-7b9a7d3.stdout rename to tests/reference/asr-doconcurrentloop_01-3fdc189.stdout diff --git a/tests/reference/asr-elemental_01-b6a1371.json b/tests/reference/asr-elemental_01-b58df26.json similarity index 66% rename from tests/reference/asr-elemental_01-b6a1371.json rename to tests/reference/asr-elemental_01-b58df26.json index 0af7360066..4285f5abb7 100644 --- a/tests/reference/asr-elemental_01-b6a1371.json +++ b/tests/reference/asr-elemental_01-b58df26.json @@ -1,11 +1,11 @@ { - "basename": "asr-elemental_01-b6a1371", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-elemental_01-b58df26", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/elemental_01.py", "infile_hash": "52f31862d51b5fa967b8eafbaf9335d38a6ba9a480d9ea4cda212ace", "outfile": null, "outfile_hash": null, - "stdout": "asr-elemental_01-b6a1371.stdout", + "stdout": "asr-elemental_01-b58df26.stdout", "stdout_hash": "45273c1af8a8a7d43bd8cfb8f54864eb88ad0a757e096f6cc07a8fc5", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-elemental_01-b6a1371.stdout b/tests/reference/asr-elemental_01-b58df26.stdout similarity index 100% rename from tests/reference/asr-elemental_01-b6a1371.stdout rename to tests/reference/asr-elemental_01-b58df26.stdout diff --git a/tests/reference/asr-enum_01-55993b7.json b/tests/reference/asr-enum_01-30e1b4a.json similarity index 66% rename from tests/reference/asr-enum_01-55993b7.json rename to tests/reference/asr-enum_01-30e1b4a.json index 2534177f3d..f21587576e 100644 --- a/tests/reference/asr-enum_01-55993b7.json +++ b/tests/reference/asr-enum_01-30e1b4a.json @@ -1,13 +1,13 @@ { - "basename": "asr-enum_01-55993b7", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-enum_01-30e1b4a", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/enum_01.py", "infile_hash": "5f229c1dc30fb06044461359242b2a63d9b93c4086669b391cef7426", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-enum_01-55993b7.stderr", + "stderr": "asr-enum_01-30e1b4a.stderr", "stderr_hash": "ee3775d6e144fa8c18d4beeae5a5790e317f7c4d26212100d03f29d4", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-enum_01-55993b7.stderr b/tests/reference/asr-enum_01-30e1b4a.stderr similarity index 100% rename from tests/reference/asr-enum_01-55993b7.stderr rename to tests/reference/asr-enum_01-30e1b4a.stderr diff --git a/tests/reference/asr-enum_02-6bb05f8.json b/tests/reference/asr-enum_02-54656c5.json similarity index 66% rename from tests/reference/asr-enum_02-6bb05f8.json rename to tests/reference/asr-enum_02-54656c5.json index f644ee71d2..a989cef176 100644 --- a/tests/reference/asr-enum_02-6bb05f8.json +++ b/tests/reference/asr-enum_02-54656c5.json @@ -1,13 +1,13 @@ { - "basename": "asr-enum_02-6bb05f8", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-enum_02-54656c5", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/enum_02.py", "infile_hash": "8ef155d733622824b261f286d72fb1be235bc6e73586a7acc02906d3", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-enum_02-6bb05f8.stderr", + "stderr": "asr-enum_02-54656c5.stderr", "stderr_hash": "88c95223e82c39f9d40d9f62923d1bffdf3a9f0a47565bad19b37dee", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-enum_02-6bb05f8.stderr b/tests/reference/asr-enum_02-54656c5.stderr similarity index 100% rename from tests/reference/asr-enum_02-6bb05f8.stderr rename to tests/reference/asr-enum_02-54656c5.stderr diff --git a/tests/reference/asr-expr1-dde511e.json b/tests/reference/asr-expr1-8df2d66.json similarity index 66% rename from tests/reference/asr-expr1-dde511e.json rename to tests/reference/asr-expr1-8df2d66.json index 6dc9cb8a72..d4a3b0867c 100644 --- a/tests/reference/asr-expr1-dde511e.json +++ b/tests/reference/asr-expr1-8df2d66.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr1-dde511e", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr1-8df2d66", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr1.py", "infile_hash": "a0c9e93e40f29b7d4541f8c513de490a892abf78a34700478d1827dd", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr1-dde511e.stdout", + "stdout": "asr-expr1-8df2d66.stdout", "stdout_hash": "a0d48d08b6fbd7e69effa643c64395bfd4a38549a51a1782b3285f42", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr1-dde511e.stdout b/tests/reference/asr-expr1-8df2d66.stdout similarity index 100% rename from tests/reference/asr-expr1-dde511e.stdout rename to tests/reference/asr-expr1-8df2d66.stdout diff --git a/tests/reference/asr-expr10-31c163f.json b/tests/reference/asr-expr10-efcbb1b.json similarity index 66% rename from tests/reference/asr-expr10-31c163f.json rename to tests/reference/asr-expr10-efcbb1b.json index 74c96d77b7..6fec9f653b 100644 --- a/tests/reference/asr-expr10-31c163f.json +++ b/tests/reference/asr-expr10-efcbb1b.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr10-31c163f", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr10-efcbb1b", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr10.py", "infile_hash": "7eb1dd6ad27fcc091e18c4447fb7a56c659565bbdb57f567b68f4a58", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr10-31c163f.stdout", + "stdout": "asr-expr10-efcbb1b.stdout", "stdout_hash": "fdfc1de03b90b0fe21d35498543fd9491e1b15ac9ba7c1362a235a4c", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr10-31c163f.stdout b/tests/reference/asr-expr10-efcbb1b.stdout similarity index 100% rename from tests/reference/asr-expr10-31c163f.stdout rename to tests/reference/asr-expr10-efcbb1b.stdout diff --git a/tests/reference/asr-expr11-1134d3f.json b/tests/reference/asr-expr11-9b91d35.json similarity index 66% rename from tests/reference/asr-expr11-1134d3f.json rename to tests/reference/asr-expr11-9b91d35.json index 0b5c8f2a14..29bc661683 100644 --- a/tests/reference/asr-expr11-1134d3f.json +++ b/tests/reference/asr-expr11-9b91d35.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr11-1134d3f", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr11-9b91d35", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr11.py", "infile_hash": "940f2d32759315dfb8d54ea50819f2bfef9737e486615703609fd47a", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr11-1134d3f.stdout", + "stdout": "asr-expr11-9b91d35.stdout", "stdout_hash": "301c0b92329a759e65eb75d9427da08c502f50b1a6eabdb381383b07", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr11-1134d3f.stdout b/tests/reference/asr-expr11-9b91d35.stdout similarity index 100% rename from tests/reference/asr-expr11-1134d3f.stdout rename to tests/reference/asr-expr11-9b91d35.stdout diff --git a/tests/reference/asr-expr12-2a30333.json b/tests/reference/asr-expr12-5c5b71e.json similarity index 66% rename from tests/reference/asr-expr12-2a30333.json rename to tests/reference/asr-expr12-5c5b71e.json index bed7bf550e..f1ad859565 100644 --- a/tests/reference/asr-expr12-2a30333.json +++ b/tests/reference/asr-expr12-5c5b71e.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr12-2a30333", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr12-5c5b71e", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr12.py", "infile_hash": "bad9ac6e0956fddb636f4e806f4a97c27396adc2416640bd291d2dc8", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr12-2a30333.stdout", + "stdout": "asr-expr12-5c5b71e.stdout", "stdout_hash": "de81cca8185e5e22e96ae60be9b01e6c2640febef0cda8522fde2106", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr12-2a30333.stdout b/tests/reference/asr-expr12-5c5b71e.stdout similarity index 100% rename from tests/reference/asr-expr12-2a30333.stdout rename to tests/reference/asr-expr12-5c5b71e.stdout diff --git a/tests/reference/asr-expr13-10040d8.json b/tests/reference/asr-expr13-81bdb5a.json similarity index 66% rename from tests/reference/asr-expr13-10040d8.json rename to tests/reference/asr-expr13-81bdb5a.json index f44697ef80..a5369d617f 100644 --- a/tests/reference/asr-expr13-10040d8.json +++ b/tests/reference/asr-expr13-81bdb5a.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr13-10040d8", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr13-81bdb5a", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr13.py", "infile_hash": "fae72924c71183c45d328b379dfa81aa4971b5e1a9ea668db546078f", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr13-10040d8.stdout", + "stdout": "asr-expr13-81bdb5a.stdout", "stdout_hash": "f65463baa7c69cad52da70da15f7d74b3f3e2005ffcd1f521775cf22", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr13-10040d8.stdout b/tests/reference/asr-expr13-81bdb5a.stdout similarity index 100% rename from tests/reference/asr-expr13-10040d8.stdout rename to tests/reference/asr-expr13-81bdb5a.stdout diff --git a/tests/reference/asr-expr16-f828d62.json b/tests/reference/asr-expr16-a3dc453.json similarity index 66% rename from tests/reference/asr-expr16-f828d62.json rename to tests/reference/asr-expr16-a3dc453.json index 09b7c0e719..14ce11462e 100644 --- a/tests/reference/asr-expr16-f828d62.json +++ b/tests/reference/asr-expr16-a3dc453.json @@ -1,13 +1,13 @@ { - "basename": "asr-expr16-f828d62", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr16-a3dc453", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr16.py", "infile_hash": "c87ce02d4b227d695bad17d79c7359c0d8ffd64b5c5c231bce5528e4", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-expr16-f828d62.stderr", + "stderr": "asr-expr16-a3dc453.stderr", "stderr_hash": "67cb0d8b08c9910cfdf81faffe003dec601823ff0fd07990a478baf4", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-expr16-f828d62.stderr b/tests/reference/asr-expr16-a3dc453.stderr similarity index 100% rename from tests/reference/asr-expr16-f828d62.stderr rename to tests/reference/asr-expr16-a3dc453.stderr diff --git a/tests/reference/asr-expr2-5311701.json b/tests/reference/asr-expr2-2e78a12.json similarity index 66% rename from tests/reference/asr-expr2-5311701.json rename to tests/reference/asr-expr2-2e78a12.json index 1615499303..a573d0ebe0 100644 --- a/tests/reference/asr-expr2-5311701.json +++ b/tests/reference/asr-expr2-2e78a12.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr2-5311701", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr2-2e78a12", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr2.py", "infile_hash": "52d7d4d33553138f2cf55b9900047e5310c54d62e54b3ca1fa394024", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr2-5311701.stdout", + "stdout": "asr-expr2-2e78a12.stdout", "stdout_hash": "4294e8e1f17dc4816bac630bffcf4951ef32bd0293e4b74e0d9d28ab", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr2-5311701.stdout b/tests/reference/asr-expr2-2e78a12.stdout similarity index 100% rename from tests/reference/asr-expr2-5311701.stdout rename to tests/reference/asr-expr2-2e78a12.stdout diff --git a/tests/reference/asr-expr4-cf512ef.json b/tests/reference/asr-expr4-cef6743.json similarity index 66% rename from tests/reference/asr-expr4-cf512ef.json rename to tests/reference/asr-expr4-cef6743.json index d03a283198..41de94c27e 100644 --- a/tests/reference/asr-expr4-cf512ef.json +++ b/tests/reference/asr-expr4-cef6743.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr4-cf512ef", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr4-cef6743", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr4.py", "infile_hash": "5cba7a5d589f54fc31463e48903d5b46604fb64e3e64ba215339047c", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr4-cf512ef.stdout", + "stdout": "asr-expr4-cef6743.stdout", "stdout_hash": "b43a39648a33109f3fc19131dc073321e4f208b9611fea5974b4c6b5", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr4-cf512ef.stdout b/tests/reference/asr-expr4-cef6743.stdout similarity index 100% rename from tests/reference/asr-expr4-cf512ef.stdout rename to tests/reference/asr-expr4-cef6743.stdout diff --git a/tests/reference/asr-expr5-375548a.json b/tests/reference/asr-expr5-645ffcc.json similarity index 66% rename from tests/reference/asr-expr5-375548a.json rename to tests/reference/asr-expr5-645ffcc.json index 6358fed73e..7b06094c70 100644 --- a/tests/reference/asr-expr5-375548a.json +++ b/tests/reference/asr-expr5-645ffcc.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr5-375548a", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr5-645ffcc", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr5.py", "infile_hash": "7bbb5f9dacb13556f99de8f2969f9089235fea372fc2f43fc9c4bb18", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr5-375548a.stdout", + "stdout": "asr-expr5-645ffcc.stdout", "stdout_hash": "e20ee2b754f2c579bf2d79c0d296e107535d0796a9989f7e0ee915e7", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr5-375548a.stdout b/tests/reference/asr-expr5-645ffcc.stdout similarity index 100% rename from tests/reference/asr-expr5-375548a.stdout rename to tests/reference/asr-expr5-645ffcc.stdout diff --git a/tests/reference/asr-expr6-bfb3384.json b/tests/reference/asr-expr6-368e5ed.json similarity index 66% rename from tests/reference/asr-expr6-bfb3384.json rename to tests/reference/asr-expr6-368e5ed.json index 85d7a37c9b..4a8ec5c48b 100644 --- a/tests/reference/asr-expr6-bfb3384.json +++ b/tests/reference/asr-expr6-368e5ed.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr6-bfb3384", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr6-368e5ed", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr6.py", "infile_hash": "1f3b5a7d997851264e679d58353346835eb450c608f6da7d2f5e5cd2", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr6-bfb3384.stdout", + "stdout": "asr-expr6-368e5ed.stdout", "stdout_hash": "917442d20a0927a7d9270ec5ff6d1fdd053badd56f5d86a5be3adc0b", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr6-bfb3384.stdout b/tests/reference/asr-expr6-368e5ed.stdout similarity index 100% rename from tests/reference/asr-expr6-bfb3384.stdout rename to tests/reference/asr-expr6-368e5ed.stdout diff --git a/tests/reference/asr-expr7-2ef3822.json b/tests/reference/asr-expr7-480ba2f.json similarity index 63% rename from tests/reference/asr-expr7-2ef3822.json rename to tests/reference/asr-expr7-480ba2f.json index f4d3d4599a..521f92fe03 100644 --- a/tests/reference/asr-expr7-2ef3822.json +++ b/tests/reference/asr-expr7-480ba2f.json @@ -1,13 +1,13 @@ { - "basename": "asr-expr7-2ef3822", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr7-480ba2f", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr7.py", "infile_hash": "7ef1383d1798621ee35adb7296bfe66dcdc08a21ac8dc86b9ce42878", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr7-2ef3822.stdout", + "stdout": "asr-expr7-480ba2f.stdout", "stdout_hash": "13b19816ffae71aa75643421306582a0eb74910b16f37cae4e49ca25", - "stderr": "asr-expr7-2ef3822.stderr", + "stderr": "asr-expr7-480ba2f.stderr", "stderr_hash": "6e9790ac88db1a9ead8f64a91ba8a6605de67167037908a74b77be0c", "returncode": 0 } \ No newline at end of file diff --git a/tests/reference/asr-expr7-2ef3822.stderr b/tests/reference/asr-expr7-480ba2f.stderr similarity index 100% rename from tests/reference/asr-expr7-2ef3822.stderr rename to tests/reference/asr-expr7-480ba2f.stderr diff --git a/tests/reference/asr-expr7-2ef3822.stdout b/tests/reference/asr-expr7-480ba2f.stdout similarity index 100% rename from tests/reference/asr-expr7-2ef3822.stdout rename to tests/reference/asr-expr7-480ba2f.stdout diff --git a/tests/reference/asr-expr8-2a4630a.json b/tests/reference/asr-expr8-6beda60.json similarity index 66% rename from tests/reference/asr-expr8-2a4630a.json rename to tests/reference/asr-expr8-6beda60.json index ccd3d6d55a..fe7c8037b5 100644 --- a/tests/reference/asr-expr8-2a4630a.json +++ b/tests/reference/asr-expr8-6beda60.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr8-2a4630a", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr8-6beda60", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr8.py", "infile_hash": "6966e19cf343700cbc11ec1bf6a495e43c685c6fa065669875aa61ce", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr8-2a4630a.stdout", + "stdout": "asr-expr8-6beda60.stdout", "stdout_hash": "eedbfdc249a88abcaa389500d41678160b48d82a8d9bf423202b5763", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr8-2a4630a.stdout b/tests/reference/asr-expr8-6beda60.stdout similarity index 100% rename from tests/reference/asr-expr8-2a4630a.stdout rename to tests/reference/asr-expr8-6beda60.stdout diff --git a/tests/reference/asr-expr9-c6fe691.json b/tests/reference/asr-expr9-814e4bc.json similarity index 66% rename from tests/reference/asr-expr9-c6fe691.json rename to tests/reference/asr-expr9-814e4bc.json index 776afb8250..69e37a05c0 100644 --- a/tests/reference/asr-expr9-c6fe691.json +++ b/tests/reference/asr-expr9-814e4bc.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr9-c6fe691", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr9-814e4bc", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr9.py", "infile_hash": "1f02a7486b298ae9e74a163875a76f8fa7cc25d7f50547133dbbdfab", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr9-c6fe691.stdout", + "stdout": "asr-expr9-814e4bc.stdout", "stdout_hash": "fd9a9323419a77d41f2b3b06c607be0aab4dc626a070dda593b2117c", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr9-c6fe691.stdout b/tests/reference/asr-expr9-814e4bc.stdout similarity index 100% rename from tests/reference/asr-expr9-c6fe691.stdout rename to tests/reference/asr-expr9-814e4bc.stdout diff --git a/tests/reference/asr-expr_01-03055c0.json b/tests/reference/asr-expr_01-211000e.json similarity index 66% rename from tests/reference/asr-expr_01-03055c0.json rename to tests/reference/asr-expr_01-211000e.json index 705ecc604b..9a9bc805f7 100644 --- a/tests/reference/asr-expr_01-03055c0.json +++ b/tests/reference/asr-expr_01-211000e.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr_01-03055c0", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr_01-211000e", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr_01.py", "infile_hash": "4284fe3a1b4dd3e5d1de1357a79e9a25b426ca245b4cc91cf99e8547", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr_01-03055c0.stdout", + "stdout": "asr-expr_01-211000e.stdout", "stdout_hash": "5c595b0c9db243c8d24caf1c2fb929932427e43ec6afa45056524d72", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr_01-03055c0.stdout b/tests/reference/asr-expr_01-211000e.stdout similarity index 100% rename from tests/reference/asr-expr_01-03055c0.stdout rename to tests/reference/asr-expr_01-211000e.stdout diff --git a/tests/reference/asr-expr_01-eafd41c.json b/tests/reference/asr-expr_01-a0d4829.json similarity index 67% rename from tests/reference/asr-expr_01-eafd41c.json rename to tests/reference/asr-expr_01-a0d4829.json index df31f2613d..931a2c4a0d 100644 --- a/tests/reference/asr-expr_01-eafd41c.json +++ b/tests/reference/asr-expr_01-a0d4829.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr_01-eafd41c", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr_01-a0d4829", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/expr_01.py", "infile_hash": "230a65e2cddb76f58d56747325caf24b8a1f6277810186581948c514", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr_01-eafd41c.stdout", + "stdout": "asr-expr_01-a0d4829.stdout", "stdout_hash": "30596f7818cb4a2c2cf2bc488139a63db3b634cca75bbf1a5512c0ac", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr_01-eafd41c.stdout b/tests/reference/asr-expr_01-a0d4829.stdout similarity index 100% rename from tests/reference/asr-expr_01-eafd41c.stdout rename to tests/reference/asr-expr_01-a0d4829.stdout diff --git a/tests/reference/asr-expr_05-45e5844.json b/tests/reference/asr-expr_05-3a37324.json similarity index 67% rename from tests/reference/asr-expr_05-45e5844.json rename to tests/reference/asr-expr_05-3a37324.json index 3fc4f399e5..64089ff4c9 100644 --- a/tests/reference/asr-expr_05-45e5844.json +++ b/tests/reference/asr-expr_05-3a37324.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr_05-45e5844", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr_05-3a37324", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/expr_05.py", "infile_hash": "d3f97cefd69f6ba4e8f9ee28dfd474f48d8acfbdc5801ca842af764d", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr_05-45e5844.stdout", + "stdout": "asr-expr_05-3a37324.stdout", "stdout_hash": "f6792b50ccce080b2a0c1b40b78266c810b00d2e0b8a16c704a95306", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr_05-45e5844.stdout b/tests/reference/asr-expr_05-3a37324.stdout similarity index 100% rename from tests/reference/asr-expr_05-45e5844.stdout rename to tests/reference/asr-expr_05-3a37324.stdout diff --git a/tests/reference/asr-expr_07-ccf2455.json b/tests/reference/asr-expr_07-7742668.json similarity index 67% rename from tests/reference/asr-expr_07-ccf2455.json rename to tests/reference/asr-expr_07-7742668.json index 9901d34d2e..17123ba522 100644 --- a/tests/reference/asr-expr_07-ccf2455.json +++ b/tests/reference/asr-expr_07-7742668.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr_07-ccf2455", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr_07-7742668", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/expr_07.py", "infile_hash": "5c3cc1f1662783acd989ceafcb0eb3259e0194dad005c5bd4e502710", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr_07-ccf2455.stdout", + "stdout": "asr-expr_07-7742668.stdout", "stdout_hash": "b65c99283b644e5e3e66c1166b189c7f670d8be8613d85691e170489", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr_07-ccf2455.stdout b/tests/reference/asr-expr_07-7742668.stdout similarity index 100% rename from tests/reference/asr-expr_07-ccf2455.stdout rename to tests/reference/asr-expr_07-7742668.stdout diff --git a/tests/reference/asr-expr_09-0e8c1e6.json b/tests/reference/asr-expr_09-f3e89c8.json similarity index 67% rename from tests/reference/asr-expr_09-0e8c1e6.json rename to tests/reference/asr-expr_09-f3e89c8.json index 9c2315e00a..07b72b2d04 100644 --- a/tests/reference/asr-expr_09-0e8c1e6.json +++ b/tests/reference/asr-expr_09-f3e89c8.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr_09-0e8c1e6", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr_09-f3e89c8", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/expr_09.py", "infile_hash": "5786bfd0706e0850ec51d9f6cface5c7df4c30f3b4715f2e76cc553b", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr_09-0e8c1e6.stdout", + "stdout": "asr-expr_09-f3e89c8.stdout", "stdout_hash": "8a021da0679b6e9cbbdf670fb65fce20913c41c3bba095a45cc6af15", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr_09-0e8c1e6.stdout b/tests/reference/asr-expr_09-f3e89c8.stdout similarity index 100% rename from tests/reference/asr-expr_09-0e8c1e6.stdout rename to tests/reference/asr-expr_09-f3e89c8.stdout diff --git a/tests/reference/asr-expr_10-e2e0267.json b/tests/reference/asr-expr_10-d39708c.json similarity index 67% rename from tests/reference/asr-expr_10-e2e0267.json rename to tests/reference/asr-expr_10-d39708c.json index 65765e54bc..87cc4b72d8 100644 --- a/tests/reference/asr-expr_10-e2e0267.json +++ b/tests/reference/asr-expr_10-d39708c.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr_10-e2e0267", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr_10-d39708c", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/expr_10.py", "infile_hash": "a371877a6249c5d8af75ad5afdd4c6f762841733ed517dafcdfd6b10", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr_10-e2e0267.stdout", + "stdout": "asr-expr_10-d39708c.stdout", "stdout_hash": "de7f42b81824ef053dbe91750115dbad646219afe0e8f85563265f27", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr_10-e2e0267.stdout b/tests/reference/asr-expr_10-d39708c.stdout similarity index 100% rename from tests/reference/asr-expr_10-e2e0267.stdout rename to tests/reference/asr-expr_10-d39708c.stdout diff --git a/tests/reference/asr-expr_12-7aa0c4c.json b/tests/reference/asr-expr_12-6769be0.json similarity index 67% rename from tests/reference/asr-expr_12-7aa0c4c.json rename to tests/reference/asr-expr_12-6769be0.json index 15013ecb46..edc0d9e315 100644 --- a/tests/reference/asr-expr_12-7aa0c4c.json +++ b/tests/reference/asr-expr_12-6769be0.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr_12-7aa0c4c", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr_12-6769be0", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/expr_12.py", "infile_hash": "00534ea8d2143408735ea96d7a26888e53563758c1b14569daf0f962", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr_12-7aa0c4c.stdout", + "stdout": "asr-expr_12-6769be0.stdout", "stdout_hash": "cc8dfe3e55bde50837df2d4f8cd1ae2805d2e001a8c821911a434198", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr_12-7aa0c4c.stdout b/tests/reference/asr-expr_12-6769be0.stdout similarity index 100% rename from tests/reference/asr-expr_12-7aa0c4c.stdout rename to tests/reference/asr-expr_12-6769be0.stdout diff --git a/tests/reference/asr-expr_14-6023c49.json b/tests/reference/asr-expr_14-f2bd343.json similarity index 67% rename from tests/reference/asr-expr_14-6023c49.json rename to tests/reference/asr-expr_14-f2bd343.json index 00f6449093..404963243e 100644 --- a/tests/reference/asr-expr_14-6023c49.json +++ b/tests/reference/asr-expr_14-f2bd343.json @@ -1,11 +1,11 @@ { - "basename": "asr-expr_14-6023c49", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-expr_14-f2bd343", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/expr_14.py", "infile_hash": "bf5d0d167082af64149be967dc182b9e2e8cb35091fa410ae4afee6f", "outfile": null, "outfile_hash": null, - "stdout": "asr-expr_14-6023c49.stdout", + "stdout": "asr-expr_14-f2bd343.stdout", "stdout_hash": "7c229a1f673f2309955f73002c5075151abdd4db9833fed4b727654f", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-expr_14-6023c49.stdout b/tests/reference/asr-expr_14-f2bd343.stdout similarity index 100% rename from tests/reference/asr-expr_14-6023c49.stdout rename to tests/reference/asr-expr_14-f2bd343.stdout diff --git a/tests/reference/asr-func_01-95c4d66.json b/tests/reference/asr-func_01-d87aa4a.json similarity index 66% rename from tests/reference/asr-func_01-95c4d66.json rename to tests/reference/asr-func_01-d87aa4a.json index 056384adfc..2ac3164ce4 100644 --- a/tests/reference/asr-func_01-95c4d66.json +++ b/tests/reference/asr-func_01-d87aa4a.json @@ -1,13 +1,13 @@ { - "basename": "asr-func_01-95c4d66", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-func_01-d87aa4a", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/func_01.py", "infile_hash": "feb3ed4318642084eaa53e796f3f055c2faa47af50bcb1d90c03910c", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-func_01-95c4d66.stderr", + "stderr": "asr-func_01-d87aa4a.stderr", "stderr_hash": "2a773033fab41aadd3ddf3732cfb473ba5da6c9649453516286dacf1", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-func_01-95c4d66.stderr b/tests/reference/asr-func_01-d87aa4a.stderr similarity index 100% rename from tests/reference/asr-func_01-95c4d66.stderr rename to tests/reference/asr-func_01-d87aa4a.stderr diff --git a/tests/reference/asr-func_inline_01-56dbc9a.json b/tests/reference/asr-func_inline_01-56af272.json similarity index 66% rename from tests/reference/asr-func_inline_01-56dbc9a.json rename to tests/reference/asr-func_inline_01-56af272.json index fb45844d84..c9dcf3cd20 100644 --- a/tests/reference/asr-func_inline_01-56dbc9a.json +++ b/tests/reference/asr-func_inline_01-56af272.json @@ -1,11 +1,11 @@ { - "basename": "asr-func_inline_01-56dbc9a", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-func_inline_01-56af272", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/func_inline_01.py", "infile_hash": "65a2e9a9bc7ad68a5e104549eed00cafd02b643a1d91ab2e175b2198", "outfile": null, "outfile_hash": null, - "stdout": "asr-func_inline_01-56dbc9a.stdout", + "stdout": "asr-func_inline_01-56af272.stdout", "stdout_hash": "c2e008cb8df44ec87e28eb8035f87c263b4ed84e91ef005539fd82c7", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-func_inline_01-56dbc9a.stdout b/tests/reference/asr-func_inline_01-56af272.stdout similarity index 100% rename from tests/reference/asr-func_inline_01-56dbc9a.stdout rename to tests/reference/asr-func_inline_01-56af272.stdout diff --git a/tests/reference/asr-generics_01-4ff9de7.json b/tests/reference/asr-generics_01-d616074.json similarity index 66% rename from tests/reference/asr-generics_01-4ff9de7.json rename to tests/reference/asr-generics_01-d616074.json index 60c38613f7..5215319c31 100644 --- a/tests/reference/asr-generics_01-4ff9de7.json +++ b/tests/reference/asr-generics_01-d616074.json @@ -1,11 +1,11 @@ { - "basename": "asr-generics_01-4ff9de7", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-generics_01-d616074", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/generics_01.py", "infile_hash": "3062320cca6688cea4b76b4c18dbaf5d1dcc1de193459ee598e84935", "outfile": null, "outfile_hash": null, - "stdout": "asr-generics_01-4ff9de7.stdout", + "stdout": "asr-generics_01-d616074.stdout", "stdout_hash": "88497e65279c4be354853ab4bb888200182c6e3d950ff58f08fd5012", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-generics_01-4ff9de7.stdout b/tests/reference/asr-generics_01-d616074.stdout similarity index 100% rename from tests/reference/asr-generics_01-4ff9de7.stdout rename to tests/reference/asr-generics_01-d616074.stdout diff --git a/tests/reference/asr-generics_02-79b33a1.json b/tests/reference/asr-generics_02-e2ea5c9.json similarity index 66% rename from tests/reference/asr-generics_02-79b33a1.json rename to tests/reference/asr-generics_02-e2ea5c9.json index 3b5c04b38f..4d1c303db4 100644 --- a/tests/reference/asr-generics_02-79b33a1.json +++ b/tests/reference/asr-generics_02-e2ea5c9.json @@ -1,11 +1,11 @@ { - "basename": "asr-generics_02-79b33a1", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-generics_02-e2ea5c9", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/generics_02.py", "infile_hash": "1103ff0edcb14e988eaa30252064dd77c7012884226c63f35f7aab01", "outfile": null, "outfile_hash": null, - "stdout": "asr-generics_02-79b33a1.stdout", + "stdout": "asr-generics_02-e2ea5c9.stdout", "stdout_hash": "e1448166e4027e61053bec1c27e7887537ea0be09fbee1149526ad70", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-generics_02-79b33a1.stdout b/tests/reference/asr-generics_02-e2ea5c9.stdout similarity index 100% rename from tests/reference/asr-generics_02-79b33a1.stdout rename to tests/reference/asr-generics_02-e2ea5c9.stdout diff --git a/tests/reference/asr-generics_array_01-8e0b4d1.json b/tests/reference/asr-generics_array_01-682b1b2.json similarity index 65% rename from tests/reference/asr-generics_array_01-8e0b4d1.json rename to tests/reference/asr-generics_array_01-682b1b2.json index 987bbd170e..c01192fb6e 100644 --- a/tests/reference/asr-generics_array_01-8e0b4d1.json +++ b/tests/reference/asr-generics_array_01-682b1b2.json @@ -1,11 +1,11 @@ { - "basename": "asr-generics_array_01-8e0b4d1", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-generics_array_01-682b1b2", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/generics_array_01.py", "infile_hash": "c6df2de74d7c7d6c34034bba81ec72f26fb3fbab9f6651f0caced593", "outfile": null, "outfile_hash": null, - "stdout": "asr-generics_array_01-8e0b4d1.stdout", + "stdout": "asr-generics_array_01-682b1b2.stdout", "stdout_hash": "c491d801e460cc6e2754f994e84c963baf465878f6ce24a6e12244f3", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-generics_array_01-8e0b4d1.stdout b/tests/reference/asr-generics_array_01-682b1b2.stdout similarity index 100% rename from tests/reference/asr-generics_array_01-8e0b4d1.stdout rename to tests/reference/asr-generics_array_01-682b1b2.stdout diff --git a/tests/reference/asr-generics_array_02-e149533.json b/tests/reference/asr-generics_array_02-22c8dc1.json similarity index 65% rename from tests/reference/asr-generics_array_02-e149533.json rename to tests/reference/asr-generics_array_02-22c8dc1.json index ca2910653d..0ec8ce8e51 100644 --- a/tests/reference/asr-generics_array_02-e149533.json +++ b/tests/reference/asr-generics_array_02-22c8dc1.json @@ -1,11 +1,11 @@ { - "basename": "asr-generics_array_02-e149533", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-generics_array_02-22c8dc1", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/generics_array_02.py", "infile_hash": "573a1e2d702f2a144956a57e367291c359b68f385b9163131a95334a", "outfile": null, "outfile_hash": null, - "stdout": "asr-generics_array_02-e149533.stdout", + "stdout": "asr-generics_array_02-22c8dc1.stdout", "stdout_hash": "d01aeb4173b91ff9be89bd429f60bdd56f0e9a665bdccb7030a40435", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-generics_array_02-e149533.stdout b/tests/reference/asr-generics_array_02-22c8dc1.stdout similarity index 100% rename from tests/reference/asr-generics_array_02-e149533.stdout rename to tests/reference/asr-generics_array_02-22c8dc1.stdout diff --git a/tests/reference/asr-generics_array_03-a1b8457.json b/tests/reference/asr-generics_array_03-fb3706c.json similarity index 65% rename from tests/reference/asr-generics_array_03-a1b8457.json rename to tests/reference/asr-generics_array_03-fb3706c.json index beba6973fd..5e0fb46879 100644 --- a/tests/reference/asr-generics_array_03-a1b8457.json +++ b/tests/reference/asr-generics_array_03-fb3706c.json @@ -1,11 +1,11 @@ { - "basename": "asr-generics_array_03-a1b8457", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-generics_array_03-fb3706c", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/generics_array_03.py", "infile_hash": "61d9cb73bacec6dfec919e6d25a549e749e1e73d895b0b48d6cdcaaf", "outfile": null, "outfile_hash": null, - "stdout": "asr-generics_array_03-a1b8457.stdout", + "stdout": "asr-generics_array_03-fb3706c.stdout", "stdout_hash": "e429fe5be2194f2cf728ddf064f2b57afdb893b5d9edd775d6219f19", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-generics_array_03-a1b8457.stdout b/tests/reference/asr-generics_array_03-fb3706c.stdout similarity index 100% rename from tests/reference/asr-generics_array_03-a1b8457.stdout rename to tests/reference/asr-generics_array_03-fb3706c.stdout diff --git a/tests/reference/asr-generics_error_01-0f48f9c.json b/tests/reference/asr-generics_error_01-1e05cd6.json similarity index 64% rename from tests/reference/asr-generics_error_01-0f48f9c.json rename to tests/reference/asr-generics_error_01-1e05cd6.json index 9a5e324dd4..80dcd03351 100644 --- a/tests/reference/asr-generics_error_01-0f48f9c.json +++ b/tests/reference/asr-generics_error_01-1e05cd6.json @@ -1,13 +1,13 @@ { - "basename": "asr-generics_error_01-0f48f9c", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-generics_error_01-1e05cd6", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/generics_error_01.py", "infile_hash": "2c26a040a0d03561f54a6af9cdd9db262fa0e9db7a6db2b115f6c4eb", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-generics_error_01-0f48f9c.stderr", + "stderr": "asr-generics_error_01-1e05cd6.stderr", "stderr_hash": "45a4d8fba734f967b36ed69d703fe503111c67dc6c8887013477c791", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-generics_error_01-0f48f9c.stderr b/tests/reference/asr-generics_error_01-1e05cd6.stderr similarity index 100% rename from tests/reference/asr-generics_error_01-0f48f9c.stderr rename to tests/reference/asr-generics_error_01-1e05cd6.stderr diff --git a/tests/reference/asr-generics_error_02-ff6918a.json b/tests/reference/asr-generics_error_02-d614928.json similarity index 64% rename from tests/reference/asr-generics_error_02-ff6918a.json rename to tests/reference/asr-generics_error_02-d614928.json index efecf38b72..950f37b435 100644 --- a/tests/reference/asr-generics_error_02-ff6918a.json +++ b/tests/reference/asr-generics_error_02-d614928.json @@ -1,13 +1,13 @@ { - "basename": "asr-generics_error_02-ff6918a", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-generics_error_02-d614928", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/generics_error_02.py", "infile_hash": "0cd9c07bbe28138a3cca57b750b625c528773ac79c36b15e5dc5830a", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-generics_error_02-ff6918a.stderr", + "stderr": "asr-generics_error_02-d614928.stderr", "stderr_hash": "2b82c797067dc1c722d416f8f13d837cfec47a0d4adb11c64f5b7e02", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-generics_error_02-ff6918a.stderr b/tests/reference/asr-generics_error_02-d614928.stderr similarity index 100% rename from tests/reference/asr-generics_error_02-ff6918a.stderr rename to tests/reference/asr-generics_error_02-d614928.stderr diff --git a/tests/reference/asr-generics_error_03-8818c90.json b/tests/reference/asr-generics_error_03-208d10d.json similarity index 64% rename from tests/reference/asr-generics_error_03-8818c90.json rename to tests/reference/asr-generics_error_03-208d10d.json index aaad2a6181..a5e6b0f007 100644 --- a/tests/reference/asr-generics_error_03-8818c90.json +++ b/tests/reference/asr-generics_error_03-208d10d.json @@ -1,13 +1,13 @@ { - "basename": "asr-generics_error_03-8818c90", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-generics_error_03-208d10d", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/generics_error_03.py", "infile_hash": "d09e6306de96ad3575262220417ea0af090d29b26c6fceb01e73fd6d", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-generics_error_03-8818c90.stderr", + "stderr": "asr-generics_error_03-208d10d.stderr", "stderr_hash": "e4803340775b153d9eafeae36cff39a9469260a0e139f0fc41e9317d", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-generics_error_03-8818c90.stderr b/tests/reference/asr-generics_error_03-208d10d.stderr similarity index 100% rename from tests/reference/asr-generics_error_03-8818c90.stderr rename to tests/reference/asr-generics_error_03-208d10d.stderr diff --git a/tests/reference/asr-generics_list_01-4ec4007.json b/tests/reference/asr-generics_list_01-39c4044.json similarity index 65% rename from tests/reference/asr-generics_list_01-4ec4007.json rename to tests/reference/asr-generics_list_01-39c4044.json index 9d7615be94..8c158c3e65 100644 --- a/tests/reference/asr-generics_list_01-4ec4007.json +++ b/tests/reference/asr-generics_list_01-39c4044.json @@ -1,11 +1,11 @@ { - "basename": "asr-generics_list_01-4ec4007", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-generics_list_01-39c4044", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/generics_list_01.py", "infile_hash": "fee10ba2a43151e515695ea4179e42231e1fd80d7c75637747511144", "outfile": null, "outfile_hash": null, - "stdout": "asr-generics_list_01-4ec4007.stdout", + "stdout": "asr-generics_list_01-39c4044.stdout", "stdout_hash": "eae7b9f511d9c29a3b88a863a7c952cd2b07f087e87c57ea5dedfd9d", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-generics_list_01-4ec4007.stdout b/tests/reference/asr-generics_list_01-39c4044.stdout similarity index 100% rename from tests/reference/asr-generics_list_01-4ec4007.stdout rename to tests/reference/asr-generics_list_01-39c4044.stdout diff --git a/tests/reference/asr-global_scope1-b335bb9.json b/tests/reference/asr-global_scope1-354e217.json similarity index 64% rename from tests/reference/asr-global_scope1-b335bb9.json rename to tests/reference/asr-global_scope1-354e217.json index 61f379d690..57bebe2771 100644 --- a/tests/reference/asr-global_scope1-b335bb9.json +++ b/tests/reference/asr-global_scope1-354e217.json @@ -1,11 +1,11 @@ { - "basename": "asr-global_scope1-b335bb9", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-global_scope1-354e217", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/global_scope1.py", "infile_hash": "e7b33a2680429ee47d15af5af7c31ac24cc802d18d5566b568fc8ef4", "outfile": null, "outfile_hash": null, - "stdout": "asr-global_scope1-b335bb9.stdout", + "stdout": "asr-global_scope1-354e217.stdout", "stdout_hash": "7fa200b1b41e3be3a3510984f0b849fa067a90a3e30cb13f35b655ee", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-global_scope1-b335bb9.stdout b/tests/reference/asr-global_scope1-354e217.stdout similarity index 100% rename from tests/reference/asr-global_scope1-b335bb9.stdout rename to tests/reference/asr-global_scope1-354e217.stdout diff --git a/tests/reference/asr-global_syms_01-12ee218.json b/tests/reference/asr-global_syms_01-273906f.json similarity index 66% rename from tests/reference/asr-global_syms_01-12ee218.json rename to tests/reference/asr-global_syms_01-273906f.json index 74e888c1af..22bd573ffb 100644 --- a/tests/reference/asr-global_syms_01-12ee218.json +++ b/tests/reference/asr-global_syms_01-273906f.json @@ -1,11 +1,11 @@ { - "basename": "asr-global_syms_01-12ee218", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-global_syms_01-273906f", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/global_syms_01.py", "infile_hash": "a561c85e452a7be71b45f7b5277fd3ab7ff79fcc596f059f00c9dd45", "outfile": null, "outfile_hash": null, - "stdout": "asr-global_syms_01-12ee218.stdout", + "stdout": "asr-global_syms_01-273906f.stdout", "stdout_hash": "c503d5588918babcc5debc392181ee456a9eab3734eb616598e27be4", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-global_syms_01-12ee218.stdout b/tests/reference/asr-global_syms_01-273906f.stdout similarity index 100% rename from tests/reference/asr-global_syms_01-12ee218.stdout rename to tests/reference/asr-global_syms_01-273906f.stdout diff --git a/tests/reference/asr-kwargs_01_error-ada0f8b.json b/tests/reference/asr-kwargs_01_error-ab9530d.json similarity index 64% rename from tests/reference/asr-kwargs_01_error-ada0f8b.json rename to tests/reference/asr-kwargs_01_error-ab9530d.json index b14ae7ee43..6f05aa772d 100644 --- a/tests/reference/asr-kwargs_01_error-ada0f8b.json +++ b/tests/reference/asr-kwargs_01_error-ab9530d.json @@ -1,13 +1,13 @@ { - "basename": "asr-kwargs_01_error-ada0f8b", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-kwargs_01_error-ab9530d", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/kwargs_01_error.py", "infile_hash": "101436b7097d29f2b8dc97561054d2ffe33d11ae5a54336813c7dada", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-kwargs_01_error-ada0f8b.stderr", + "stderr": "asr-kwargs_01_error-ab9530d.stderr", "stderr_hash": "9acb6dea7d63917291858cf2cac49e5270e11ea1dd547f66303224c1", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-kwargs_01_error-ada0f8b.stderr b/tests/reference/asr-kwargs_01_error-ab9530d.stderr similarity index 100% rename from tests/reference/asr-kwargs_01_error-ada0f8b.stderr rename to tests/reference/asr-kwargs_01_error-ab9530d.stderr diff --git a/tests/reference/asr-kwargs_02_error-5c8b0e6.json b/tests/reference/asr-kwargs_02_error-7c91f8f.json similarity index 64% rename from tests/reference/asr-kwargs_02_error-5c8b0e6.json rename to tests/reference/asr-kwargs_02_error-7c91f8f.json index 0fa08e91a8..228d941171 100644 --- a/tests/reference/asr-kwargs_02_error-5c8b0e6.json +++ b/tests/reference/asr-kwargs_02_error-7c91f8f.json @@ -1,13 +1,13 @@ { - "basename": "asr-kwargs_02_error-5c8b0e6", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-kwargs_02_error-7c91f8f", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/kwargs_02_error.py", "infile_hash": "9f131c35f01a18365764a32dee072403fcc283705320ef6703627e5c", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-kwargs_02_error-5c8b0e6.stderr", + "stderr": "asr-kwargs_02_error-7c91f8f.stderr", "stderr_hash": "120e6e6838e464af15ff96aa99dcdda21923a3bb5f0c3d6d7cc8348b", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-kwargs_02_error-5c8b0e6.stderr b/tests/reference/asr-kwargs_02_error-7c91f8f.stderr similarity index 100% rename from tests/reference/asr-kwargs_02_error-5c8b0e6.stderr rename to tests/reference/asr-kwargs_02_error-7c91f8f.stderr diff --git a/tests/reference/asr-kwargs_03_error-0eb2867.json b/tests/reference/asr-kwargs_03_error-a68cc46.json similarity index 64% rename from tests/reference/asr-kwargs_03_error-0eb2867.json rename to tests/reference/asr-kwargs_03_error-a68cc46.json index 032c3b91b8..2b3ac444fa 100644 --- a/tests/reference/asr-kwargs_03_error-0eb2867.json +++ b/tests/reference/asr-kwargs_03_error-a68cc46.json @@ -1,13 +1,13 @@ { - "basename": "asr-kwargs_03_error-0eb2867", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-kwargs_03_error-a68cc46", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/kwargs_03_error.py", "infile_hash": "1cee111472c1f8b7eea276f308ac7a1fea12438606c658bd0757973c", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-kwargs_03_error-0eb2867.stderr", + "stderr": "asr-kwargs_03_error-a68cc46.stderr", "stderr_hash": "83b858c0d4e17fe2f03b1e47652414c4478d709def5d3fbaa71aad71", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-kwargs_03_error-0eb2867.stderr b/tests/reference/asr-kwargs_03_error-a68cc46.stderr similarity index 100% rename from tests/reference/asr-kwargs_03_error-0eb2867.stderr rename to tests/reference/asr-kwargs_03_error-a68cc46.stderr diff --git a/tests/reference/asr-list1-f15817d.json b/tests/reference/asr-list1-770ba33.json similarity index 66% rename from tests/reference/asr-list1-f15817d.json rename to tests/reference/asr-list1-770ba33.json index 660e6cb234..8f2fb5ecdf 100644 --- a/tests/reference/asr-list1-f15817d.json +++ b/tests/reference/asr-list1-770ba33.json @@ -1,11 +1,11 @@ { - "basename": "asr-list1-f15817d", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-list1-770ba33", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/list1.py", "infile_hash": "9d6b3f1a83a585d5a7a5e50ff5e1ddd15705fce268208d0cc2749514", "outfile": null, "outfile_hash": null, - "stdout": "asr-list1-f15817d.stdout", + "stdout": "asr-list1-770ba33.stdout", "stdout_hash": "e9bff5455c84c4ee25f79b9d6b559dd9fb602c9db060d7c784631628", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-list1-f15817d.stdout b/tests/reference/asr-list1-770ba33.stdout similarity index 100% rename from tests/reference/asr-list1-f15817d.stdout rename to tests/reference/asr-list1-770ba33.stdout diff --git a/tests/reference/asr-loop1-ce84aac.json b/tests/reference/asr-loop1-10d3109.json similarity index 66% rename from tests/reference/asr-loop1-ce84aac.json rename to tests/reference/asr-loop1-10d3109.json index 58dece9782..9e1352c034 100644 --- a/tests/reference/asr-loop1-ce84aac.json +++ b/tests/reference/asr-loop1-10d3109.json @@ -1,11 +1,11 @@ { - "basename": "asr-loop1-ce84aac", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-loop1-10d3109", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/loop1.py", "infile_hash": "324b018f29f7dffbd326e77b7ff9b6a9286837d573ed28f9d86e0311", "outfile": null, "outfile_hash": null, - "stdout": "asr-loop1-ce84aac.stdout", + "stdout": "asr-loop1-10d3109.stdout", "stdout_hash": "2218e39137c7299902d8e0b5c6694c3b8d45f276ab44968ed5af6072", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-loop1-ce84aac.stdout b/tests/reference/asr-loop1-10d3109.stdout similarity index 100% rename from tests/reference/asr-loop1-ce84aac.stdout rename to tests/reference/asr-loop1-10d3109.stdout diff --git a/tests/reference/asr-loop2-5e07e8f.json b/tests/reference/asr-loop2-e874469.json similarity index 66% rename from tests/reference/asr-loop2-5e07e8f.json rename to tests/reference/asr-loop2-e874469.json index 2dbe409116..f985b98ecb 100644 --- a/tests/reference/asr-loop2-5e07e8f.json +++ b/tests/reference/asr-loop2-e874469.json @@ -1,11 +1,11 @@ { - "basename": "asr-loop2-5e07e8f", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-loop2-e874469", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/loop2.py", "infile_hash": "7946c522ceb16f99810780d4aba7fa2593695a4b49fb35ea1f131f53", "outfile": null, "outfile_hash": null, - "stdout": "asr-loop2-5e07e8f.stdout", + "stdout": "asr-loop2-e874469.stdout", "stdout_hash": "321ef394ac2085c8381889eb50d65696a6eb76194caa064e46cee1a6", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-loop2-5e07e8f.stdout b/tests/reference/asr-loop2-e874469.stdout similarity index 100% rename from tests/reference/asr-loop2-5e07e8f.stdout rename to tests/reference/asr-loop2-e874469.stdout diff --git a/tests/reference/asr-loop3-e2afee9.json b/tests/reference/asr-loop3-a579196.json similarity index 66% rename from tests/reference/asr-loop3-e2afee9.json rename to tests/reference/asr-loop3-a579196.json index 0c0312ee60..0a2891cc79 100644 --- a/tests/reference/asr-loop3-e2afee9.json +++ b/tests/reference/asr-loop3-a579196.json @@ -1,11 +1,11 @@ { - "basename": "asr-loop3-e2afee9", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-loop3-a579196", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/loop3.py", "infile_hash": "498c7c40ca352ed21dde33c128aff4d59d3c329e770e3a2ff3eb3fad", "outfile": null, "outfile_hash": null, - "stdout": "asr-loop3-e2afee9.stdout", + "stdout": "asr-loop3-a579196.stdout", "stdout_hash": "d79e903a96ae8804b81863c1ae2dcad531187438339bde0767819be9", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-loop3-e2afee9.stdout b/tests/reference/asr-loop3-a579196.stdout similarity index 100% rename from tests/reference/asr-loop3-e2afee9.stdout rename to tests/reference/asr-loop3-a579196.stdout diff --git a/tests/reference/asr-loop4-b39f53b.json b/tests/reference/asr-loop4-3d3216e.json similarity index 66% rename from tests/reference/asr-loop4-b39f53b.json rename to tests/reference/asr-loop4-3d3216e.json index 935124a29d..aaa647616c 100644 --- a/tests/reference/asr-loop4-b39f53b.json +++ b/tests/reference/asr-loop4-3d3216e.json @@ -1,11 +1,11 @@ { - "basename": "asr-loop4-b39f53b", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-loop4-3d3216e", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/loop4.py", "infile_hash": "660eb1a895c81609d791240171fc34b6f0fea02c43de8f86420b06b7", "outfile": null, "outfile_hash": null, - "stdout": "asr-loop4-b39f53b.stdout", + "stdout": "asr-loop4-3d3216e.stdout", "stdout_hash": "d4b94940f7d1cb751fe3dba926a5c7e49e929c42c4f3c2ea683d642f", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-loop4-b39f53b.stdout b/tests/reference/asr-loop4-3d3216e.stdout similarity index 100% rename from tests/reference/asr-loop4-b39f53b.stdout rename to tests/reference/asr-loop4-3d3216e.stdout diff --git a/tests/reference/asr-loop_01-b50c123.json b/tests/reference/asr-loop_01-e7aa06a.json similarity index 66% rename from tests/reference/asr-loop_01-b50c123.json rename to tests/reference/asr-loop_01-e7aa06a.json index b0dbaec9fb..943ce68e64 100644 --- a/tests/reference/asr-loop_01-b50c123.json +++ b/tests/reference/asr-loop_01-e7aa06a.json @@ -1,13 +1,13 @@ { - "basename": "asr-loop_01-b50c123", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-loop_01-e7aa06a", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/loop_01.py", "infile_hash": "fd8dbfec9ebfe2be47e713f169a8bba58de81c0d1b8988dcc86523b2", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-loop_01-b50c123.stderr", + "stderr": "asr-loop_01-e7aa06a.stderr", "stderr_hash": "256fe74af3480ca97b87c1b6f770cee10753e5f097d5a2d79135e736", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-loop_01-b50c123.stderr b/tests/reference/asr-loop_01-e7aa06a.stderr similarity index 100% rename from tests/reference/asr-loop_01-b50c123.stderr rename to tests/reference/asr-loop_01-e7aa06a.stderr diff --git a/tests/reference/asr-loop_02-3961316.json b/tests/reference/asr-loop_02-5741651.json similarity index 66% rename from tests/reference/asr-loop_02-3961316.json rename to tests/reference/asr-loop_02-5741651.json index 79cc40162d..236ad8ba7a 100644 --- a/tests/reference/asr-loop_02-3961316.json +++ b/tests/reference/asr-loop_02-5741651.json @@ -1,13 +1,13 @@ { - "basename": "asr-loop_02-3961316", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-loop_02-5741651", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/loop_02.py", "infile_hash": "7d28fdea517343528470d43c64f2759fd202ee66764d2d4ddbe5ea27", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-loop_02-3961316.stderr", + "stderr": "asr-loop_02-5741651.stderr", "stderr_hash": "a8262496250102a77a9e5718d40aaf1067fb21a18fb047885aa643ac", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-loop_02-3961316.stderr b/tests/reference/asr-loop_02-5741651.stderr similarity index 100% rename from tests/reference/asr-loop_02-3961316.stderr rename to tests/reference/asr-loop_02-5741651.stderr diff --git a/tests/reference/asr-loop_03-e7ccaee.json b/tests/reference/asr-loop_03-401ab45.json similarity index 66% rename from tests/reference/asr-loop_03-e7ccaee.json rename to tests/reference/asr-loop_03-401ab45.json index 0518da8ced..16313f16a7 100644 --- a/tests/reference/asr-loop_03-e7ccaee.json +++ b/tests/reference/asr-loop_03-401ab45.json @@ -1,13 +1,13 @@ { - "basename": "asr-loop_03-e7ccaee", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-loop_03-401ab45", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/loop_03.py", "infile_hash": "0dce15506e10f77faf350e3e7bf5dc4f39a6723c74f33eeb1f6342bc", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-loop_03-e7ccaee.stderr", + "stderr": "asr-loop_03-401ab45.stderr", "stderr_hash": "cc8945240941626554f3ebeecadc96aa4ee6ea80415352dfefce2786", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-loop_03-e7ccaee.stderr b/tests/reference/asr-loop_03-401ab45.stderr similarity index 100% rename from tests/reference/asr-loop_03-e7ccaee.stderr rename to tests/reference/asr-loop_03-401ab45.stderr diff --git a/tests/reference/asr-modules_02-5371fe0.json b/tests/reference/asr-modules_02-ec92e6f.json similarity index 66% rename from tests/reference/asr-modules_02-5371fe0.json rename to tests/reference/asr-modules_02-ec92e6f.json index 14ee87afeb..d20bc11ba0 100644 --- a/tests/reference/asr-modules_02-5371fe0.json +++ b/tests/reference/asr-modules_02-ec92e6f.json @@ -1,11 +1,11 @@ { - "basename": "asr-modules_02-5371fe0", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-modules_02-ec92e6f", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_02.py", "infile_hash": "dcb00ac27cbbcdec61d81f1df9e852ba81a2197e7804ec89cab76e44", "outfile": null, "outfile_hash": null, - "stdout": "asr-modules_02-5371fe0.stdout", + "stdout": "asr-modules_02-ec92e6f.stdout", "stdout_hash": "d7b97506f6a01bfc3b0d5c8cce2bfcb289ae77972881fdfca1735ab0", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-modules_02-5371fe0.stdout b/tests/reference/asr-modules_02-ec92e6f.stdout similarity index 100% rename from tests/reference/asr-modules_02-5371fe0.stdout rename to tests/reference/asr-modules_02-ec92e6f.stdout diff --git a/tests/reference/asr-print_02-f237d46.json b/tests/reference/asr-print_02-afbe092.json similarity index 67% rename from tests/reference/asr-print_02-f237d46.json rename to tests/reference/asr-print_02-afbe092.json index 1c195ad965..33227d9ab3 100644 --- a/tests/reference/asr-print_02-f237d46.json +++ b/tests/reference/asr-print_02-afbe092.json @@ -1,11 +1,11 @@ { - "basename": "asr-print_02-f237d46", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-print_02-afbe092", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/print_02.py", "infile_hash": "c4513f1b2ab1a2f33a0784fe80b4d32b506c05799b0c920c4f5b0411", "outfile": null, "outfile_hash": null, - "stdout": "asr-print_02-f237d46.stdout", + "stdout": "asr-print_02-afbe092.stdout", "stdout_hash": "ae7c43690716cf3e26c5811926a0eaf147e1b2a257c749b564bf3dd6", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-print_02-f237d46.stdout b/tests/reference/asr-print_02-afbe092.stdout similarity index 100% rename from tests/reference/asr-print_02-f237d46.stdout rename to tests/reference/asr-print_02-afbe092.stdout diff --git a/tests/reference/asr-set1-7de4081.json b/tests/reference/asr-set1-b7b913a.json similarity index 66% rename from tests/reference/asr-set1-7de4081.json rename to tests/reference/asr-set1-b7b913a.json index 72a84c8855..bd1a04862e 100644 --- a/tests/reference/asr-set1-7de4081.json +++ b/tests/reference/asr-set1-b7b913a.json @@ -1,11 +1,11 @@ { - "basename": "asr-set1-7de4081", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-set1-b7b913a", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/set1.py", "infile_hash": "63b5dc6a1f9c17099f1b10c8c45fcac1e50319ca8efbf7c283060abb", "outfile": null, "outfile_hash": null, - "stdout": "asr-set1-7de4081.stdout", + "stdout": "asr-set1-b7b913a.stdout", "stdout_hash": "9d61d7c399bc81558e15e3ced4f525fedb099643562fc308ae43f74b", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-set1-7de4081.stdout b/tests/reference/asr-set1-b7b913a.stdout similarity index 100% rename from tests/reference/asr-set1-7de4081.stdout rename to tests/reference/asr-set1-b7b913a.stdout diff --git a/tests/reference/asr-structs_01-3bbe189.json b/tests/reference/asr-structs_01-0893e35.json similarity index 65% rename from tests/reference/asr-structs_01-3bbe189.json rename to tests/reference/asr-structs_01-0893e35.json index cb5d74e8f4..b415cd4e5b 100644 --- a/tests/reference/asr-structs_01-3bbe189.json +++ b/tests/reference/asr-structs_01-0893e35.json @@ -1,13 +1,13 @@ { - "basename": "asr-structs_01-3bbe189", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-structs_01-0893e35", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/structs_01.py", "infile_hash": "9342dd6345fb71bbbfb1c41e643530c58493758d08774f838b1c85e0", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-structs_01-3bbe189.stderr", + "stderr": "asr-structs_01-0893e35.stderr", "stderr_hash": "6f58b337cbc9cb1832e2ecba47fdad4b64e4484b913e29f61c64dbea", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-structs_01-3bbe189.stderr b/tests/reference/asr-structs_01-0893e35.stderr similarity index 100% rename from tests/reference/asr-structs_01-3bbe189.stderr rename to tests/reference/asr-structs_01-0893e35.stderr diff --git a/tests/reference/asr-structs_01-c473a5f.json b/tests/reference/asr-structs_01-be14d49.json similarity index 66% rename from tests/reference/asr-structs_01-c473a5f.json rename to tests/reference/asr-structs_01-be14d49.json index 8446687ed0..b15e93631e 100644 --- a/tests/reference/asr-structs_01-c473a5f.json +++ b/tests/reference/asr-structs_01-be14d49.json @@ -1,11 +1,11 @@ { - "basename": "asr-structs_01-c473a5f", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-structs_01-be14d49", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/structs_01.py", "infile_hash": "a17eed6995c1af36b3968cb80367bda33fb855a60793b6bdc770aad2", "outfile": null, "outfile_hash": null, - "stdout": "asr-structs_01-c473a5f.stdout", + "stdout": "asr-structs_01-be14d49.stdout", "stdout_hash": "846684c920aa9bae3979390a15d8d43dc5de56c8a7316c593bf4b7ac", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-structs_01-c473a5f.stdout b/tests/reference/asr-structs_01-be14d49.stdout similarity index 100% rename from tests/reference/asr-structs_01-c473a5f.stdout rename to tests/reference/asr-structs_01-be14d49.stdout diff --git a/tests/reference/asr-structs_02-a0958ac.json b/tests/reference/asr-structs_02-2ab459a.json similarity index 66% rename from tests/reference/asr-structs_02-a0958ac.json rename to tests/reference/asr-structs_02-2ab459a.json index ca91dade07..9fc29f74ff 100644 --- a/tests/reference/asr-structs_02-a0958ac.json +++ b/tests/reference/asr-structs_02-2ab459a.json @@ -1,11 +1,11 @@ { - "basename": "asr-structs_02-a0958ac", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-structs_02-2ab459a", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/structs_02.py", "infile_hash": "f101938e4f5608477de4e57be8f04196e51b97aab3ade62833cecf91", "outfile": null, "outfile_hash": null, - "stdout": "asr-structs_02-a0958ac.stdout", + "stdout": "asr-structs_02-2ab459a.stdout", "stdout_hash": "f56302bba116e03b67d1812db40060ab8017dd5ce79b2bdff7baf644", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-structs_02-a0958ac.stdout b/tests/reference/asr-structs_02-2ab459a.stdout similarity index 100% rename from tests/reference/asr-structs_02-a0958ac.stdout rename to tests/reference/asr-structs_02-2ab459a.stdout diff --git a/tests/reference/asr-structs_03-14c22b7.json b/tests/reference/asr-structs_03-0cef911.json similarity index 66% rename from tests/reference/asr-structs_03-14c22b7.json rename to tests/reference/asr-structs_03-0cef911.json index e6eeaed2d9..baa405bf9d 100644 --- a/tests/reference/asr-structs_03-14c22b7.json +++ b/tests/reference/asr-structs_03-0cef911.json @@ -1,11 +1,11 @@ { - "basename": "asr-structs_03-14c22b7", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-structs_03-0cef911", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/structs_03.py", "infile_hash": "dbd0eac675f958a27a7a4e4a7de3b04402073ecd2d483df75f51eb80", "outfile": null, "outfile_hash": null, - "stdout": "asr-structs_03-14c22b7.stdout", + "stdout": "asr-structs_03-0cef911.stdout", "stdout_hash": "91368823ce5e08889f546f41ec63bb9a54c0b8d471c49f92689f2a6c", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-structs_03-14c22b7.stdout b/tests/reference/asr-structs_03-0cef911.stdout similarity index 100% rename from tests/reference/asr-structs_03-14c22b7.stdout rename to tests/reference/asr-structs_03-0cef911.stdout diff --git a/tests/reference/asr-structs_04-7e4824e.json b/tests/reference/asr-structs_04-387747b.json similarity index 66% rename from tests/reference/asr-structs_04-7e4824e.json rename to tests/reference/asr-structs_04-387747b.json index fa903c1a6d..82ee8c0110 100644 --- a/tests/reference/asr-structs_04-7e4824e.json +++ b/tests/reference/asr-structs_04-387747b.json @@ -1,11 +1,11 @@ { - "basename": "asr-structs_04-7e4824e", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-structs_04-387747b", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/structs_04.py", "infile_hash": "b57d1dd265f7a7906398ff70e0d5713433a7c3354590d727b3e6306d", "outfile": null, "outfile_hash": null, - "stdout": "asr-structs_04-7e4824e.stdout", + "stdout": "asr-structs_04-387747b.stdout", "stdout_hash": "596c5faeae119e44e06dc8f6501c1b84360bceed027db7b76498eb1f", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-structs_04-7e4824e.stdout b/tests/reference/asr-structs_04-387747b.stdout similarity index 100% rename from tests/reference/asr-structs_04-7e4824e.stdout rename to tests/reference/asr-structs_04-387747b.stdout diff --git a/tests/reference/asr-structs_05-2ccee30.json b/tests/reference/asr-structs_05-fa98307.json similarity index 66% rename from tests/reference/asr-structs_05-2ccee30.json rename to tests/reference/asr-structs_05-fa98307.json index 6a10038fe2..d795618fd4 100644 --- a/tests/reference/asr-structs_05-2ccee30.json +++ b/tests/reference/asr-structs_05-fa98307.json @@ -1,11 +1,11 @@ { - "basename": "asr-structs_05-2ccee30", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-structs_05-fa98307", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/structs_05.py", "infile_hash": "5c9d6218394744f26160b09fb545064c82ef9172e10b474d6be5fca2", "outfile": null, "outfile_hash": null, - "stdout": "asr-structs_05-2ccee30.stdout", + "stdout": "asr-structs_05-fa98307.stdout", "stdout_hash": "eed215681e7afcff6553f61228ae7482df849e1b24c3a022f80c6da0", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-structs_05-2ccee30.stdout b/tests/reference/asr-structs_05-fa98307.stdout similarity index 100% rename from tests/reference/asr-structs_05-2ccee30.stdout rename to tests/reference/asr-structs_05-fa98307.stdout diff --git a/tests/reference/asr-subscript1-22a7138.json b/tests/reference/asr-subscript1-1acfc19.json similarity index 65% rename from tests/reference/asr-subscript1-22a7138.json rename to tests/reference/asr-subscript1-1acfc19.json index cfd33a7c0a..5470449a6d 100644 --- a/tests/reference/asr-subscript1-22a7138.json +++ b/tests/reference/asr-subscript1-1acfc19.json @@ -1,11 +1,11 @@ { - "basename": "asr-subscript1-22a7138", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-subscript1-1acfc19", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/subscript1.py", "infile_hash": "5d229893d3e13ea4463e8ed47eb3798be0b8c28f5ef6b6c773e87b80", "outfile": null, "outfile_hash": null, - "stdout": "asr-subscript1-22a7138.stdout", + "stdout": "asr-subscript1-1acfc19.stdout", "stdout_hash": "5f7608fce73798c40090c36aef0e679799a6a9fbe4275e2b77e4edbc", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-subscript1-22a7138.stdout b/tests/reference/asr-subscript1-1acfc19.stdout similarity index 100% rename from tests/reference/asr-subscript1-22a7138.stdout rename to tests/reference/asr-subscript1-1acfc19.stdout diff --git a/tests/reference/asr-test_annassign_type_mismatch-5cf2620.json b/tests/reference/asr-test_annassign_type_mismatch-7dac7be.json similarity index 62% rename from tests/reference/asr-test_annassign_type_mismatch-5cf2620.json rename to tests/reference/asr-test_annassign_type_mismatch-7dac7be.json index 8d9aeaad27..76dc427cbb 100644 --- a/tests/reference/asr-test_annassign_type_mismatch-5cf2620.json +++ b/tests/reference/asr-test_annassign_type_mismatch-7dac7be.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_annassign_type_mismatch-5cf2620", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_annassign_type_mismatch-7dac7be", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_annassign_type_mismatch.py", "infile_hash": "ada18a04b70771754e17e884cfa2ec7bd5651d88850ae034049ec7b9", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_annassign_type_mismatch-5cf2620.stderr", + "stderr": "asr-test_annassign_type_mismatch-7dac7be.stderr", "stderr_hash": "a794ce35be79f7fcbb0889e04091555055f3c1c537bcf14840d33e60", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_annassign_type_mismatch-5cf2620.stderr b/tests/reference/asr-test_annassign_type_mismatch-7dac7be.stderr similarity index 100% rename from tests/reference/asr-test_annassign_type_mismatch-5cf2620.stderr rename to tests/reference/asr-test_annassign_type_mismatch-7dac7be.stderr diff --git a/tests/reference/asr-test_annassign_type_mismatch2-c68cbf2.json b/tests/reference/asr-test_annassign_type_mismatch2-fc883f7.json similarity index 62% rename from tests/reference/asr-test_annassign_type_mismatch2-c68cbf2.json rename to tests/reference/asr-test_annassign_type_mismatch2-fc883f7.json index e572afd8c1..c12f4b6535 100644 --- a/tests/reference/asr-test_annassign_type_mismatch2-c68cbf2.json +++ b/tests/reference/asr-test_annassign_type_mismatch2-fc883f7.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_annassign_type_mismatch2-c68cbf2", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_annassign_type_mismatch2-fc883f7", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_annassign_type_mismatch2.py", "infile_hash": "40a5b3f96c7d228110c29dbb56eb03390c8741550408295a2e82d7b0", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_annassign_type_mismatch2-c68cbf2.stderr", + "stderr": "asr-test_annassign_type_mismatch2-fc883f7.stderr", "stderr_hash": "3c2bbba713689c37ed22127cdd7a37ab6b1bce03d01380803884849d", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_annassign_type_mismatch2-c68cbf2.stderr b/tests/reference/asr-test_annassign_type_mismatch2-fc883f7.stderr similarity index 100% rename from tests/reference/asr-test_annassign_type_mismatch2-c68cbf2.stderr rename to tests/reference/asr-test_annassign_type_mismatch2-fc883f7.stderr diff --git a/tests/reference/asr-test_append_type_mismatch-523164d.json b/tests/reference/asr-test_append_type_mismatch-030e9c7.json similarity index 63% rename from tests/reference/asr-test_append_type_mismatch-523164d.json rename to tests/reference/asr-test_append_type_mismatch-030e9c7.json index a29c60124c..e2edd78183 100644 --- a/tests/reference/asr-test_append_type_mismatch-523164d.json +++ b/tests/reference/asr-test_append_type_mismatch-030e9c7.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_append_type_mismatch-523164d", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_append_type_mismatch-030e9c7", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_append_type_mismatch.py", "infile_hash": "d545fce3cd501b0c1bbf3f4a705a68a6f66356e4e6f9806dd0c4c9da", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_append_type_mismatch-523164d.stderr", + "stderr": "asr-test_append_type_mismatch-030e9c7.stderr", "stderr_hash": "6610c87a3c164e9cc8884eaf66397658c311199814689ebd4793c92a", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_append_type_mismatch-523164d.stderr b/tests/reference/asr-test_append_type_mismatch-030e9c7.stderr similarity index 100% rename from tests/reference/asr-test_append_type_mismatch-523164d.stderr rename to tests/reference/asr-test_append_type_mismatch-030e9c7.stderr diff --git a/tests/reference/asr-test_assign1-705c153.json b/tests/reference/asr-test_assign1-a94d41e.json similarity index 65% rename from tests/reference/asr-test_assign1-705c153.json rename to tests/reference/asr-test_assign1-a94d41e.json index 11b5ec9174..35e6aa7403 100644 --- a/tests/reference/asr-test_assign1-705c153.json +++ b/tests/reference/asr-test_assign1-a94d41e.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_assign1-705c153", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_assign1-a94d41e", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_assign1.py", "infile_hash": "597bccf2544fb5784bec1648830e4c4ae337bf6280768569125ee0b1", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_assign1-705c153.stderr", + "stderr": "asr-test_assign1-a94d41e.stderr", "stderr_hash": "cb4455d360373e13730d3a9fd5e2c551bd0f6640d066ceafd8841f9b", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_assign1-705c153.stderr b/tests/reference/asr-test_assign1-a94d41e.stderr similarity index 100% rename from tests/reference/asr-test_assign1-705c153.stderr rename to tests/reference/asr-test_assign1-a94d41e.stderr diff --git a/tests/reference/asr-test_assign2-3a6f5d9.json b/tests/reference/asr-test_assign2-fa29029.json similarity index 65% rename from tests/reference/asr-test_assign2-3a6f5d9.json rename to tests/reference/asr-test_assign2-fa29029.json index d380986473..4603aee52e 100644 --- a/tests/reference/asr-test_assign2-3a6f5d9.json +++ b/tests/reference/asr-test_assign2-fa29029.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_assign2-3a6f5d9", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_assign2-fa29029", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_assign2.py", "infile_hash": "8bc6b05310146f174ce0e1810d03b78ca671a0fabf6699acda9043c8", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_assign2-3a6f5d9.stderr", + "stderr": "asr-test_assign2-fa29029.stderr", "stderr_hash": "55f02e505bda066604eb94cec8bdc5081c7ec25e219f0ea46851100a", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_assign2-3a6f5d9.stderr b/tests/reference/asr-test_assign2-fa29029.stderr similarity index 100% rename from tests/reference/asr-test_assign2-3a6f5d9.stderr rename to tests/reference/asr-test_assign2-fa29029.stderr diff --git a/tests/reference/asr-test_assign3-aa790e4.json b/tests/reference/asr-test_assign3-cc6fc9d.json similarity index 65% rename from tests/reference/asr-test_assign3-aa790e4.json rename to tests/reference/asr-test_assign3-cc6fc9d.json index 32839d93c7..5db5f77a33 100644 --- a/tests/reference/asr-test_assign3-aa790e4.json +++ b/tests/reference/asr-test_assign3-cc6fc9d.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_assign3-aa790e4", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_assign3-cc6fc9d", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_assign3.py", "infile_hash": "4280362df6bea670ff1eddb1afc62ed80438c822bc204ff8759434fe", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_assign3-aa790e4.stderr", + "stderr": "asr-test_assign3-cc6fc9d.stderr", "stderr_hash": "cff7850ce5507a70e7c730dd1ff23d16f8839dedac07d5b60a73a8b8", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_assign3-aa790e4.stderr b/tests/reference/asr-test_assign3-cc6fc9d.stderr similarity index 100% rename from tests/reference/asr-test_assign3-aa790e4.stderr rename to tests/reference/asr-test_assign3-cc6fc9d.stderr diff --git a/tests/reference/asr-test_assign4-f9f0a92.json b/tests/reference/asr-test_assign4-a2136e0.json similarity index 65% rename from tests/reference/asr-test_assign4-f9f0a92.json rename to tests/reference/asr-test_assign4-a2136e0.json index 1bd7959568..e09dfa9249 100644 --- a/tests/reference/asr-test_assign4-f9f0a92.json +++ b/tests/reference/asr-test_assign4-a2136e0.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_assign4-f9f0a92", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_assign4-a2136e0", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_assign4.py", "infile_hash": "9e1e5ce063f88194008db998896cebd0fabe6dcb4cbda27c17de27da", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_assign4-f9f0a92.stderr", + "stderr": "asr-test_assign4-a2136e0.stderr", "stderr_hash": "a871819fb4bd2139f16a7407208ea210276e5b12c9f13ae442132483", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_assign4-f9f0a92.stderr b/tests/reference/asr-test_assign4-a2136e0.stderr similarity index 100% rename from tests/reference/asr-test_assign4-f9f0a92.stderr rename to tests/reference/asr-test_assign4-a2136e0.stderr diff --git a/tests/reference/asr-test_assign5-b4a6609.json b/tests/reference/asr-test_assign5-694a98f.json similarity index 65% rename from tests/reference/asr-test_assign5-b4a6609.json rename to tests/reference/asr-test_assign5-694a98f.json index 827c528dc3..312c85ffed 100644 --- a/tests/reference/asr-test_assign5-b4a6609.json +++ b/tests/reference/asr-test_assign5-694a98f.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_assign5-b4a6609", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_assign5-694a98f", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_assign5.py", "infile_hash": "41144111ae3dad56feed42b1b148334a8faef310fbbabde10f3af8df", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_assign5-b4a6609.stderr", + "stderr": "asr-test_assign5-694a98f.stderr", "stderr_hash": "172b2f13e9b7670cbdd718452713fb15ed4bcd19f6193d328e459fbe", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_assign5-b4a6609.stderr b/tests/reference/asr-test_assign5-694a98f.stderr similarity index 100% rename from tests/reference/asr-test_assign5-b4a6609.stderr rename to tests/reference/asr-test_assign5-694a98f.stderr diff --git a/tests/reference/asr-test_assign6-d95baf9.json b/tests/reference/asr-test_assign6-05cd64f.json similarity index 65% rename from tests/reference/asr-test_assign6-d95baf9.json rename to tests/reference/asr-test_assign6-05cd64f.json index 66e088505a..765658fda0 100644 --- a/tests/reference/asr-test_assign6-d95baf9.json +++ b/tests/reference/asr-test_assign6-05cd64f.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_assign6-d95baf9", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_assign6-05cd64f", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_assign6.py", "infile_hash": "6837d07201b8680dbb63908d3ad27e4e9bfb1f1ff77b4bd6a77eddcf", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_assign6-d95baf9.stderr", + "stderr": "asr-test_assign6-05cd64f.stderr", "stderr_hash": "294865737572b9ab043b8ebab73fe949fa2bb73e9790c6a04d87dc50", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_assign6-d95baf9.stderr b/tests/reference/asr-test_assign6-05cd64f.stderr similarity index 100% rename from tests/reference/asr-test_assign6-d95baf9.stderr rename to tests/reference/asr-test_assign6-05cd64f.stderr diff --git a/tests/reference/asr-test_assign7-48a6bf7.json b/tests/reference/asr-test_assign7-beebac3.json similarity index 65% rename from tests/reference/asr-test_assign7-48a6bf7.json rename to tests/reference/asr-test_assign7-beebac3.json index c5c076cac1..7ddee4fb5a 100644 --- a/tests/reference/asr-test_assign7-48a6bf7.json +++ b/tests/reference/asr-test_assign7-beebac3.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_assign7-48a6bf7", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_assign7-beebac3", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_assign7.py", "infile_hash": "e54f67638add63131760d5eadda7e3944b34addacffa27d6fb45e128", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_assign7-48a6bf7.stderr", + "stderr": "asr-test_assign7-beebac3.stderr", "stderr_hash": "d12f04efad566740bd562fbe9c00a058210a9adf0f5297475fc41fe6", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_assign7-48a6bf7.stderr b/tests/reference/asr-test_assign7-beebac3.stderr similarity index 100% rename from tests/reference/asr-test_assign7-48a6bf7.stderr rename to tests/reference/asr-test_assign7-beebac3.stderr diff --git a/tests/reference/asr-test_assign8-714719d.json b/tests/reference/asr-test_assign8-4b26e63.json similarity index 65% rename from tests/reference/asr-test_assign8-714719d.json rename to tests/reference/asr-test_assign8-4b26e63.json index 7cc9b4fdc3..fb449632d9 100644 --- a/tests/reference/asr-test_assign8-714719d.json +++ b/tests/reference/asr-test_assign8-4b26e63.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_assign8-714719d", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_assign8-4b26e63", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_assign8.py", "infile_hash": "e7f5e3dd10847a04fc4634a70fb7908f4360a0b71c1f6718f7beeee9", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_assign8-714719d.stderr", + "stderr": "asr-test_assign8-4b26e63.stderr", "stderr_hash": "c8ad8a6c89a23c0e2bd0cbaf7c9568625f093e526ff8ff26ae300e07", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_assign8-714719d.stderr b/tests/reference/asr-test_assign8-4b26e63.stderr similarity index 100% rename from tests/reference/asr-test_assign8-714719d.stderr rename to tests/reference/asr-test_assign8-4b26e63.stderr diff --git a/tests/reference/asr-test_binop1-6562ae2.json b/tests/reference/asr-test_binop1-50b63f6.json similarity index 65% rename from tests/reference/asr-test_binop1-6562ae2.json rename to tests/reference/asr-test_binop1-50b63f6.json index 2b1cf1ef75..343aa48bf2 100644 --- a/tests/reference/asr-test_binop1-6562ae2.json +++ b/tests/reference/asr-test_binop1-50b63f6.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_binop1-6562ae2", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_binop1-50b63f6", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_binop1.py", "infile_hash": "00f511a03b5e9def195bcd88a2412fbd88205628460356ca2523ea30", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_binop1-6562ae2.stderr", + "stderr": "asr-test_binop1-50b63f6.stderr", "stderr_hash": "6883d11d4de52f03fa684252229715e39aa52c830d186f787159faaa", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_binop1-6562ae2.stderr b/tests/reference/asr-test_binop1-50b63f6.stderr similarity index 100% rename from tests/reference/asr-test_binop1-6562ae2.stderr rename to tests/reference/asr-test_binop1-50b63f6.stderr diff --git a/tests/reference/asr-test_binop2-1fa2e86.json b/tests/reference/asr-test_binop2-e5749af.json similarity index 65% rename from tests/reference/asr-test_binop2-1fa2e86.json rename to tests/reference/asr-test_binop2-e5749af.json index 31fab446d8..8de84da8ec 100644 --- a/tests/reference/asr-test_binop2-1fa2e86.json +++ b/tests/reference/asr-test_binop2-e5749af.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_binop2-1fa2e86", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_binop2-e5749af", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_binop2.py", "infile_hash": "f59bd668e0e7e0ac665c62d89eee87d8bcaa199e9f11825f38dad655", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_binop2-1fa2e86.stderr", + "stderr": "asr-test_binop2-e5749af.stderr", "stderr_hash": "3214693e7c1f71d8343f547e7a3ab0167b4f9310540009475d2f1c79", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_binop2-1fa2e86.stderr b/tests/reference/asr-test_binop2-e5749af.stderr similarity index 100% rename from tests/reference/asr-test_binop2-1fa2e86.stderr rename to tests/reference/asr-test_binop2-e5749af.stderr diff --git a/tests/reference/asr-test_binop3-018a4a8.json b/tests/reference/asr-test_binop3-a67201d.json similarity index 65% rename from tests/reference/asr-test_binop3-018a4a8.json rename to tests/reference/asr-test_binop3-a67201d.json index 9a42bc372d..dc238a62cb 100644 --- a/tests/reference/asr-test_binop3-018a4a8.json +++ b/tests/reference/asr-test_binop3-a67201d.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_binop3-018a4a8", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_binop3-a67201d", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_binop3.py", "infile_hash": "eb43132639edd47d89802b8693880ed350800a88c7c5f94eb93a9b3b", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_binop3-018a4a8.stderr", + "stderr": "asr-test_binop3-a67201d.stderr", "stderr_hash": "ff683b1bc0695903f2d2ea7bbd1963346fcb5f84bbfd10a4da0e27d7", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_binop3-018a4a8.stderr b/tests/reference/asr-test_binop3-a67201d.stderr similarity index 100% rename from tests/reference/asr-test_binop3-018a4a8.stderr rename to tests/reference/asr-test_binop3-a67201d.stderr diff --git a/tests/reference/asr-test_bit_length-5111036.json b/tests/reference/asr-test_bit_length-da3a264.json similarity index 64% rename from tests/reference/asr-test_bit_length-5111036.json rename to tests/reference/asr-test_bit_length-da3a264.json index ef847676a5..56a237ac34 100644 --- a/tests/reference/asr-test_bit_length-5111036.json +++ b/tests/reference/asr-test_bit_length-da3a264.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_bit_length-5111036", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_bit_length-da3a264", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_bit_length.py", "infile_hash": "877db12847eccaf31564c6a969e7703f16c9e03bc9c326e72c74f1e0", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_bit_length-5111036.stderr", + "stderr": "asr-test_bit_length-da3a264.stderr", "stderr_hash": "0f371300055a9e3f6c01f73b1e276d9ae8007fd507eb0c75e1bda3ef", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_bit_length-5111036.stderr b/tests/reference/asr-test_bit_length-da3a264.stderr similarity index 100% rename from tests/reference/asr-test_bit_length-5111036.stderr rename to tests/reference/asr-test_bit_length-da3a264.stderr diff --git a/tests/reference/asr-test_bitwise_on_complex-eb6a983.json b/tests/reference/asr-test_bitwise_on_complex-dd9568b.json similarity index 63% rename from tests/reference/asr-test_bitwise_on_complex-eb6a983.json rename to tests/reference/asr-test_bitwise_on_complex-dd9568b.json index ea26cacc16..7fa9b4be57 100644 --- a/tests/reference/asr-test_bitwise_on_complex-eb6a983.json +++ b/tests/reference/asr-test_bitwise_on_complex-dd9568b.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_bitwise_on_complex-eb6a983", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_bitwise_on_complex-dd9568b", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_bitwise_on_complex.py", "infile_hash": "48f71d8eae47a14316e9e7aba182a4a03ff8cc05ae661b8e6d41dc85", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_bitwise_on_complex-eb6a983.stderr", + "stderr": "asr-test_bitwise_on_complex-dd9568b.stderr", "stderr_hash": "58f7acb7f7187308d38c7c97fcd9e34b2022c42be1b6583b95b379af", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_bitwise_on_complex-eb6a983.stderr b/tests/reference/asr-test_bitwise_on_complex-dd9568b.stderr similarity index 100% rename from tests/reference/asr-test_bitwise_on_complex-eb6a983.stderr rename to tests/reference/asr-test_bitwise_on_complex-dd9568b.stderr diff --git a/tests/reference/asr-test_bitwise_on_float-7cc2638.json b/tests/reference/asr-test_bitwise_on_float-2e09b30.json similarity index 63% rename from tests/reference/asr-test_bitwise_on_float-7cc2638.json rename to tests/reference/asr-test_bitwise_on_float-2e09b30.json index f1aa5071e6..df6b412bad 100644 --- a/tests/reference/asr-test_bitwise_on_float-7cc2638.json +++ b/tests/reference/asr-test_bitwise_on_float-2e09b30.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_bitwise_on_float-7cc2638", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_bitwise_on_float-2e09b30", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_bitwise_on_float.py", "infile_hash": "50e0d4c18ad2fe0db0aedfaa5b3db792db545aeb8ef09a4cb7c4f193", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_bitwise_on_float-7cc2638.stderr", + "stderr": "asr-test_bitwise_on_float-2e09b30.stderr", "stderr_hash": "1e77fcf2484ec7c10436c14ac2a498db59706d30d3c294b89b6b9090", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_bitwise_on_float-7cc2638.stderr b/tests/reference/asr-test_bitwise_on_float-2e09b30.stderr similarity index 100% rename from tests/reference/asr-test_bitwise_on_float-7cc2638.stderr rename to tests/reference/asr-test_bitwise_on_float-2e09b30.stderr diff --git a/tests/reference/asr-test_bool_binop-3075d22.json b/tests/reference/asr-test_bool_binop-f856ef0.json similarity index 65% rename from tests/reference/asr-test_bool_binop-3075d22.json rename to tests/reference/asr-test_bool_binop-f856ef0.json index 15a39ad2a7..465e152a22 100644 --- a/tests/reference/asr-test_bool_binop-3075d22.json +++ b/tests/reference/asr-test_bool_binop-f856ef0.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_bool_binop-3075d22", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_bool_binop-f856ef0", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_bool_binop.py", "infile_hash": "7c44fe2915b3871b3b85edf3ab129d87a75fa4b9acbb597ae801daf9", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_bool_binop-3075d22.stdout", + "stdout": "asr-test_bool_binop-f856ef0.stdout", "stdout_hash": "ac237bb869129e929f4dbb3cfe0a03b2c9b9ce43c3122b42c77f4a30", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_bool_binop-3075d22.stdout b/tests/reference/asr-test_bool_binop-f856ef0.stdout similarity index 100% rename from tests/reference/asr-test_bool_binop-3075d22.stdout rename to tests/reference/asr-test_bool_binop-f856ef0.stdout diff --git a/tests/reference/asr-test_builtin-4f04bbc.json b/tests/reference/asr-test_builtin-aa64615.json similarity index 66% rename from tests/reference/asr-test_builtin-4f04bbc.json rename to tests/reference/asr-test_builtin-aa64615.json index b73e34229e..7805793495 100644 --- a/tests/reference/asr-test_builtin-4f04bbc.json +++ b/tests/reference/asr-test_builtin-aa64615.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_builtin-4f04bbc", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_builtin-aa64615", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_builtin.py", "infile_hash": "f3376f18b9927914f7cb97578b40f14d570a48c64648c32a80daef6a", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_builtin-4f04bbc.stdout", + "stdout": "asr-test_builtin-aa64615.stdout", "stdout_hash": "8646b030fe5cd3f1760df67fa9475f4e9442dec9be29ac6bc5bae89f", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_builtin-4f04bbc.stdout b/tests/reference/asr-test_builtin-aa64615.stdout similarity index 100% rename from tests/reference/asr-test_builtin-4f04bbc.stdout rename to tests/reference/asr-test_builtin-aa64615.stdout diff --git a/tests/reference/asr-test_builtin_abs-06a7e49.json b/tests/reference/asr-test_builtin_abs-c74d2c9.json similarity index 65% rename from tests/reference/asr-test_builtin_abs-06a7e49.json rename to tests/reference/asr-test_builtin_abs-c74d2c9.json index 9a7031e794..7e6ea68dcf 100644 --- a/tests/reference/asr-test_builtin_abs-06a7e49.json +++ b/tests/reference/asr-test_builtin_abs-c74d2c9.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_builtin_abs-06a7e49", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_builtin_abs-c74d2c9", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_builtin_abs.py", "infile_hash": "8748a0c131b21523ed4b2d019a4fb74af041845397169d44b00ee041", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_builtin_abs-06a7e49.stdout", + "stdout": "asr-test_builtin_abs-c74d2c9.stdout", "stdout_hash": "4c9756b60ea8273c60cef5be907ed3d3097396a14bf0b478687099cc", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_builtin_abs-06a7e49.stdout b/tests/reference/asr-test_builtin_abs-c74d2c9.stdout similarity index 100% rename from tests/reference/asr-test_builtin_abs-06a7e49.stdout rename to tests/reference/asr-test_builtin_abs-c74d2c9.stdout diff --git a/tests/reference/asr-test_builtin_bin-0ca34fe.json b/tests/reference/asr-test_builtin_bin-52ba9fa.json similarity index 65% rename from tests/reference/asr-test_builtin_bin-0ca34fe.json rename to tests/reference/asr-test_builtin_bin-52ba9fa.json index 3c6a5060e2..3e4454873e 100644 --- a/tests/reference/asr-test_builtin_bin-0ca34fe.json +++ b/tests/reference/asr-test_builtin_bin-52ba9fa.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_builtin_bin-0ca34fe", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_builtin_bin-52ba9fa", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_builtin_bin.py", "infile_hash": "09e09eacf697c95f358b75f6491b766781bae9a5f856c2ad5848e824", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_builtin_bin-0ca34fe.stdout", + "stdout": "asr-test_builtin_bin-52ba9fa.stdout", "stdout_hash": "acedde8dac6725cfbee6d9dfeae461504681eb334655eb9c69619600", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_builtin_bin-0ca34fe.stdout b/tests/reference/asr-test_builtin_bin-52ba9fa.stdout similarity index 100% rename from tests/reference/asr-test_builtin_bin-0ca34fe.stdout rename to tests/reference/asr-test_builtin_bin-52ba9fa.stdout diff --git a/tests/reference/asr-test_builtin_bool-fe3fe33.json b/tests/reference/asr-test_builtin_bool-330223a.json similarity index 65% rename from tests/reference/asr-test_builtin_bool-fe3fe33.json rename to tests/reference/asr-test_builtin_bool-330223a.json index 5e3f6e2b54..95d49b5748 100644 --- a/tests/reference/asr-test_builtin_bool-fe3fe33.json +++ b/tests/reference/asr-test_builtin_bool-330223a.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_builtin_bool-fe3fe33", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_builtin_bool-330223a", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_builtin_bool.py", "infile_hash": "3a740faba0e36b55c179ab0fa08486dc3080332e79c8e38b8f25b4a4", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_builtin_bool-fe3fe33.stdout", + "stdout": "asr-test_builtin_bool-330223a.stdout", "stdout_hash": "61e1e7ca20a28d6a98bc86312892444fff82df7357773e3eaafe5fa6", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_builtin_bool-fe3fe33.stdout b/tests/reference/asr-test_builtin_bool-330223a.stdout similarity index 100% rename from tests/reference/asr-test_builtin_bool-fe3fe33.stdout rename to tests/reference/asr-test_builtin_bool-330223a.stdout diff --git a/tests/reference/asr-test_builtin_float-97f9316.json b/tests/reference/asr-test_builtin_float-20601dd.json similarity index 65% rename from tests/reference/asr-test_builtin_float-97f9316.json rename to tests/reference/asr-test_builtin_float-20601dd.json index 1d4641ed92..c7a2504029 100644 --- a/tests/reference/asr-test_builtin_float-97f9316.json +++ b/tests/reference/asr-test_builtin_float-20601dd.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_builtin_float-97f9316", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_builtin_float-20601dd", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_builtin_float.py", "infile_hash": "de536c0af182f8e43780193627c24f1085522e86d37316e13d337196", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_builtin_float-97f9316.stdout", + "stdout": "asr-test_builtin_float-20601dd.stdout", "stdout_hash": "d1e2d20543855f6da74b2fb7f654a6ecdd39c1dbac7fb84330c43386", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_builtin_float-97f9316.stdout b/tests/reference/asr-test_builtin_float-20601dd.stdout similarity index 100% rename from tests/reference/asr-test_builtin_float-97f9316.stdout rename to tests/reference/asr-test_builtin_float-20601dd.stdout diff --git a/tests/reference/asr-test_builtin_hex-d4abc3e.json b/tests/reference/asr-test_builtin_hex-64bd268.json similarity index 65% rename from tests/reference/asr-test_builtin_hex-d4abc3e.json rename to tests/reference/asr-test_builtin_hex-64bd268.json index 85f11f5fc8..8c82547525 100644 --- a/tests/reference/asr-test_builtin_hex-d4abc3e.json +++ b/tests/reference/asr-test_builtin_hex-64bd268.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_builtin_hex-d4abc3e", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_builtin_hex-64bd268", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_builtin_hex.py", "infile_hash": "e639f0251477f50376536d317630e3c026354859576a5f1b7b10bd7d", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_builtin_hex-d4abc3e.stdout", + "stdout": "asr-test_builtin_hex-64bd268.stdout", "stdout_hash": "9c5e1113e14f5bb7420024f8a9d74cc9529b2fe49137a184753265a0", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_builtin_hex-d4abc3e.stdout b/tests/reference/asr-test_builtin_hex-64bd268.stdout similarity index 100% rename from tests/reference/asr-test_builtin_hex-d4abc3e.stdout rename to tests/reference/asr-test_builtin_hex-64bd268.stdout diff --git a/tests/reference/asr-test_builtin_int-990d1de.json b/tests/reference/asr-test_builtin_int-8f88fdc.json similarity index 65% rename from tests/reference/asr-test_builtin_int-990d1de.json rename to tests/reference/asr-test_builtin_int-8f88fdc.json index 1885715a00..e0b0773ab1 100644 --- a/tests/reference/asr-test_builtin_int-990d1de.json +++ b/tests/reference/asr-test_builtin_int-8f88fdc.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_builtin_int-990d1de", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_builtin_int-8f88fdc", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_builtin_int.py", "infile_hash": "caea15e7c979280f796e815bd1548613d6b21322c43f4ed1306e1e93", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_builtin_int-990d1de.stdout", + "stdout": "asr-test_builtin_int-8f88fdc.stdout", "stdout_hash": "a53347fa78c3dea42906e8001768b0f4d0755d2955f30ba3f281b92d", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_builtin_int-990d1de.stdout b/tests/reference/asr-test_builtin_int-8f88fdc.stdout similarity index 100% rename from tests/reference/asr-test_builtin_int-990d1de.stdout rename to tests/reference/asr-test_builtin_int-8f88fdc.stdout diff --git a/tests/reference/asr-test_builtin_len-922cf65.json b/tests/reference/asr-test_builtin_len-55b0dec.json similarity index 65% rename from tests/reference/asr-test_builtin_len-922cf65.json rename to tests/reference/asr-test_builtin_len-55b0dec.json index bbd94546bd..b3ee23f113 100644 --- a/tests/reference/asr-test_builtin_len-922cf65.json +++ b/tests/reference/asr-test_builtin_len-55b0dec.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_builtin_len-922cf65", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_builtin_len-55b0dec", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_builtin_len.py", "infile_hash": "fd1048585d9628ca38f6f21cdcfb3b44c355bbf6df2275a133f82a6f", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_builtin_len-922cf65.stdout", + "stdout": "asr-test_builtin_len-55b0dec.stdout", "stdout_hash": "12b52d6065970fc9c51b0c544e0ca85d599e4b0ad2eefd2d46258f3f", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_builtin_len-922cf65.stdout b/tests/reference/asr-test_builtin_len-55b0dec.stdout similarity index 100% rename from tests/reference/asr-test_builtin_len-922cf65.stdout rename to tests/reference/asr-test_builtin_len-55b0dec.stdout diff --git a/tests/reference/asr-test_builtin_oct-490a98b.json b/tests/reference/asr-test_builtin_oct-20b9066.json similarity index 65% rename from tests/reference/asr-test_builtin_oct-490a98b.json rename to tests/reference/asr-test_builtin_oct-20b9066.json index dc9eb87356..8c4edc4727 100644 --- a/tests/reference/asr-test_builtin_oct-490a98b.json +++ b/tests/reference/asr-test_builtin_oct-20b9066.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_builtin_oct-490a98b", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_builtin_oct-20b9066", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_builtin_oct.py", "infile_hash": "c20249affa4787edf4ef56c881ebbcabdced311b5b908d9da6aceaeb", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_builtin_oct-490a98b.stdout", + "stdout": "asr-test_builtin_oct-20b9066.stdout", "stdout_hash": "5b05f7192412742a534ed4b9efb5901457d44d3047e52af46c426993", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_builtin_oct-490a98b.stdout b/tests/reference/asr-test_builtin_oct-20b9066.stdout similarity index 100% rename from tests/reference/asr-test_builtin_oct-490a98b.stdout rename to tests/reference/asr-test_builtin_oct-20b9066.stdout diff --git a/tests/reference/asr-test_builtin_pow-cea529e.json b/tests/reference/asr-test_builtin_pow-f02fcda.json similarity index 61% rename from tests/reference/asr-test_builtin_pow-cea529e.json rename to tests/reference/asr-test_builtin_pow-f02fcda.json index 35434fc6c8..67b6f51f8a 100644 --- a/tests/reference/asr-test_builtin_pow-cea529e.json +++ b/tests/reference/asr-test_builtin_pow-f02fcda.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_builtin_pow-cea529e", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_builtin_pow-f02fcda", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_builtin_pow.py", "infile_hash": "b7d1d5e1592f5078961eb228c756e424d394f5f0383a1577f1cced1b", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_builtin_pow-cea529e.stdout", + "stdout": "asr-test_builtin_pow-f02fcda.stdout", "stdout_hash": "15de905a7f869d30992fc058070c657ce3d4eb5f63d69dc2a3ccd38d", - "stderr": "asr-test_builtin_pow-cea529e.stderr", + "stderr": "asr-test_builtin_pow-f02fcda.stderr", "stderr_hash": "859ce76c74748f2d32c7eab92cfbba789a78d4cbf5818646b99806ea", "returncode": 0 } \ No newline at end of file diff --git a/tests/reference/asr-test_builtin_pow-cea529e.stderr b/tests/reference/asr-test_builtin_pow-f02fcda.stderr similarity index 100% rename from tests/reference/asr-test_builtin_pow-cea529e.stderr rename to tests/reference/asr-test_builtin_pow-f02fcda.stderr diff --git a/tests/reference/asr-test_builtin_pow-cea529e.stdout b/tests/reference/asr-test_builtin_pow-f02fcda.stdout similarity index 100% rename from tests/reference/asr-test_builtin_pow-cea529e.stdout rename to tests/reference/asr-test_builtin_pow-f02fcda.stdout diff --git a/tests/reference/asr-test_builtin_round-cca5cba.json b/tests/reference/asr-test_builtin_round-7417a21.json similarity index 65% rename from tests/reference/asr-test_builtin_round-cca5cba.json rename to tests/reference/asr-test_builtin_round-7417a21.json index 9daf7aa07b..df89556f9c 100644 --- a/tests/reference/asr-test_builtin_round-cca5cba.json +++ b/tests/reference/asr-test_builtin_round-7417a21.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_builtin_round-cca5cba", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_builtin_round-7417a21", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_builtin_round.py", "infile_hash": "a4ff4032a45ce084eb524069046afb6ec44f1b24a667c84c7605f2c7", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_builtin_round-cca5cba.stdout", + "stdout": "asr-test_builtin_round-7417a21.stdout", "stdout_hash": "da41ed6becf766a5436d03c345795d4acb6a3a18a88069ec6736f6e3", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_builtin_round-cca5cba.stdout b/tests/reference/asr-test_builtin_round-7417a21.stdout similarity index 100% rename from tests/reference/asr-test_builtin_round-cca5cba.stdout rename to tests/reference/asr-test_builtin_round-7417a21.stdout diff --git a/tests/reference/asr-test_builtin_str-fcdedc2.json b/tests/reference/asr-test_builtin_str-580e920.json similarity index 65% rename from tests/reference/asr-test_builtin_str-fcdedc2.json rename to tests/reference/asr-test_builtin_str-580e920.json index 0d929975ff..48f20ea587 100644 --- a/tests/reference/asr-test_builtin_str-fcdedc2.json +++ b/tests/reference/asr-test_builtin_str-580e920.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_builtin_str-fcdedc2", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_builtin_str-580e920", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_builtin_str.py", "infile_hash": "9d41e81d47e010623c74c812d0c41e5d705f7925e699eb2b68f17cfc", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_builtin_str-fcdedc2.stdout", + "stdout": "asr-test_builtin_str-580e920.stdout", "stdout_hash": "ed50cd0c06a144f79dd4fb1d51fc4a200cf40477ac36b3d1d8ce7133", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_builtin_str-fcdedc2.stdout b/tests/reference/asr-test_builtin_str-580e920.stdout similarity index 100% rename from tests/reference/asr-test_builtin_str-fcdedc2.stdout rename to tests/reference/asr-test_builtin_str-580e920.stdout diff --git a/tests/reference/asr-test_c_interop_01-8bee4ec.json b/tests/reference/asr-test_c_interop_01-e374f43.json similarity index 65% rename from tests/reference/asr-test_c_interop_01-8bee4ec.json rename to tests/reference/asr-test_c_interop_01-e374f43.json index 7579d8674f..d57572bbcb 100644 --- a/tests/reference/asr-test_c_interop_01-8bee4ec.json +++ b/tests/reference/asr-test_c_interop_01-e374f43.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_c_interop_01-8bee4ec", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_c_interop_01-e374f43", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_c_interop_01.py", "infile_hash": "f5363d49163fefe382a94462e7c305a7938ddcc44c4595f8a0c5bc3f", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_c_interop_01-8bee4ec.stdout", + "stdout": "asr-test_c_interop_01-e374f43.stdout", "stdout_hash": "b431290c19c724b119da8d2fb27444845454bb144b5e4dcb62cb1bbe", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_c_interop_01-8bee4ec.stdout b/tests/reference/asr-test_c_interop_01-e374f43.stdout similarity index 100% rename from tests/reference/asr-test_c_interop_01-8bee4ec.stdout rename to tests/reference/asr-test_c_interop_01-e374f43.stdout diff --git a/tests/reference/asr-test_chr-ccb53f3.json b/tests/reference/asr-test_chr-91f4987.json similarity index 66% rename from tests/reference/asr-test_chr-ccb53f3.json rename to tests/reference/asr-test_chr-91f4987.json index fca2e6ec22..ca5829edf9 100644 --- a/tests/reference/asr-test_chr-ccb53f3.json +++ b/tests/reference/asr-test_chr-91f4987.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_chr-ccb53f3", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_chr-91f4987", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_chr.py", "infile_hash": "6520b636dd89e03d59caf9be2e7d6ec001e758ec0a92de2286b691bc", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_chr-ccb53f3.stderr", + "stderr": "asr-test_chr-91f4987.stderr", "stderr_hash": "87fff5dabdc4a4c52a0f07fd59bcc25ba6a3b29a391b39d404b8e2bc", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_chr-ccb53f3.stderr b/tests/reference/asr-test_chr-91f4987.stderr similarity index 100% rename from tests/reference/asr-test_chr-ccb53f3.stderr rename to tests/reference/asr-test_chr-91f4987.stderr diff --git a/tests/reference/asr-test_complex_01-c199562.json b/tests/reference/asr-test_complex_01-a6def58.json similarity index 65% rename from tests/reference/asr-test_complex_01-c199562.json rename to tests/reference/asr-test_complex_01-a6def58.json index 9a1d1360ee..58980f70ee 100644 --- a/tests/reference/asr-test_complex_01-c199562.json +++ b/tests/reference/asr-test_complex_01-a6def58.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_complex_01-c199562", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_complex_01-a6def58", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_complex_01.py", "infile_hash": "e580480b37e5bbfcd01d5eb412375a8a3c1ef374b5fedfb661485763", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_complex_01-c199562.stdout", + "stdout": "asr-test_complex_01-a6def58.stdout", "stdout_hash": "ba8b86b72b4389dabb51431ed69b07973402808e1bb07ea4c08e1cc5", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_complex_01-c199562.stdout b/tests/reference/asr-test_complex_01-a6def58.stdout similarity index 100% rename from tests/reference/asr-test_complex_01-c199562.stdout rename to tests/reference/asr-test_complex_01-a6def58.stdout diff --git a/tests/reference/asr-test_complex_02-6516823.json b/tests/reference/asr-test_complex_02-782ba2d.json similarity index 65% rename from tests/reference/asr-test_complex_02-6516823.json rename to tests/reference/asr-test_complex_02-782ba2d.json index 8d4bf52161..b8ed4bdb1b 100644 --- a/tests/reference/asr-test_complex_02-6516823.json +++ b/tests/reference/asr-test_complex_02-782ba2d.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_complex_02-6516823", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_complex_02-782ba2d", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_complex_02.py", "infile_hash": "e6ee66d952deccec11d316a09f1d5b4bb4916ceb56a41a11dee03ae9", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_complex_02-6516823.stdout", + "stdout": "asr-test_complex_02-782ba2d.stdout", "stdout_hash": "1f5c58d6fc10f4835dbfa3f90b0699854accc8edf4cf1f7241c770c8", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_complex_02-6516823.stdout b/tests/reference/asr-test_complex_02-782ba2d.stdout similarity index 100% rename from tests/reference/asr-test_complex_02-6516823.stdout rename to tests/reference/asr-test_complex_02-782ba2d.stdout diff --git a/tests/reference/asr-test_dict1-921a975.json b/tests/reference/asr-test_dict1-a45a075.json similarity index 65% rename from tests/reference/asr-test_dict1-921a975.json rename to tests/reference/asr-test_dict1-a45a075.json index 726c206ae2..eeb9ffe3f7 100644 --- a/tests/reference/asr-test_dict1-921a975.json +++ b/tests/reference/asr-test_dict1-a45a075.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_dict1-921a975", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_dict1-a45a075", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_dict1.py", "infile_hash": "cfdb4968d923dac52c9637a8283f1a48ea3bdab2afde206cafaf925a", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_dict1-921a975.stderr", + "stderr": "asr-test_dict1-a45a075.stderr", "stderr_hash": "a9fbe4acc4f82141b1111e9aef3d3c50f27540d41ff3382fe46da8ea", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_dict1-921a975.stderr b/tests/reference/asr-test_dict1-a45a075.stderr similarity index 100% rename from tests/reference/asr-test_dict1-921a975.stderr rename to tests/reference/asr-test_dict1-a45a075.stderr diff --git a/tests/reference/asr-test_dict10-023b367.json b/tests/reference/asr-test_dict10-8c0beff.json similarity index 65% rename from tests/reference/asr-test_dict10-023b367.json rename to tests/reference/asr-test_dict10-8c0beff.json index b7c5dd59ea..0f7ae1272d 100644 --- a/tests/reference/asr-test_dict10-023b367.json +++ b/tests/reference/asr-test_dict10-8c0beff.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_dict10-023b367", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_dict10-8c0beff", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_dict10.py", "infile_hash": "4cd31b5d018919c4889a0316adea871ea25d0587d04bd28d1d8e6cd4", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_dict10-023b367.stderr", + "stderr": "asr-test_dict10-8c0beff.stderr", "stderr_hash": "95d5b555fbf664cf7bc7735845c89acc77393a00ad44b42fcf7c8fe8", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_dict10-023b367.stderr b/tests/reference/asr-test_dict10-8c0beff.stderr similarity index 100% rename from tests/reference/asr-test_dict10-023b367.stderr rename to tests/reference/asr-test_dict10-8c0beff.stderr diff --git a/tests/reference/asr-test_dict11-9742ea4.json b/tests/reference/asr-test_dict11-2ab4e6c.json similarity index 65% rename from tests/reference/asr-test_dict11-9742ea4.json rename to tests/reference/asr-test_dict11-2ab4e6c.json index 9a4d6c5323..89ed565509 100644 --- a/tests/reference/asr-test_dict11-9742ea4.json +++ b/tests/reference/asr-test_dict11-2ab4e6c.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_dict11-9742ea4", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_dict11-2ab4e6c", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_dict11.py", "infile_hash": "4f1af506664662506acd3ce990f1b72ff744bb873162c9fe32dd9236", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_dict11-9742ea4.stderr", + "stderr": "asr-test_dict11-2ab4e6c.stderr", "stderr_hash": "4944c96752dfe5fcfc190831966428e9568e9d4b8b03a553524df84b", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_dict11-9742ea4.stderr b/tests/reference/asr-test_dict11-2ab4e6c.stderr similarity index 100% rename from tests/reference/asr-test_dict11-9742ea4.stderr rename to tests/reference/asr-test_dict11-2ab4e6c.stderr diff --git a/tests/reference/asr-test_dict12-90fba58.json b/tests/reference/asr-test_dict12-7c74d08.json similarity index 65% rename from tests/reference/asr-test_dict12-90fba58.json rename to tests/reference/asr-test_dict12-7c74d08.json index 6bb2d35e97..9922026e7b 100644 --- a/tests/reference/asr-test_dict12-90fba58.json +++ b/tests/reference/asr-test_dict12-7c74d08.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_dict12-90fba58", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_dict12-7c74d08", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_dict12.py", "infile_hash": "4a8a3f88d0c29a68083bc142a792c35b6f13d7bdf1a635f91920baeb", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_dict12-90fba58.stderr", + "stderr": "asr-test_dict12-7c74d08.stderr", "stderr_hash": "9243262b97e5e6a555eafbbfd93440e86e66a3536cc0fb9902a7e0d2", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_dict12-90fba58.stderr b/tests/reference/asr-test_dict12-7c74d08.stderr similarity index 100% rename from tests/reference/asr-test_dict12-90fba58.stderr rename to tests/reference/asr-test_dict12-7c74d08.stderr diff --git a/tests/reference/asr-test_dict13-6c4f052.json b/tests/reference/asr-test_dict13-683b290.json similarity index 65% rename from tests/reference/asr-test_dict13-6c4f052.json rename to tests/reference/asr-test_dict13-683b290.json index 423fc9b02f..982bd80540 100644 --- a/tests/reference/asr-test_dict13-6c4f052.json +++ b/tests/reference/asr-test_dict13-683b290.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_dict13-6c4f052", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_dict13-683b290", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_dict13.py", "infile_hash": "ee757d46a81447cf45321822e379e83acbecd32578e300f27fc93d1b", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_dict13-6c4f052.stderr", + "stderr": "asr-test_dict13-683b290.stderr", "stderr_hash": "60bc3be332a1b638ade1cf40068ee4381ba4a79942a76c104c9cdebd", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_dict13-6c4f052.stderr b/tests/reference/asr-test_dict13-683b290.stderr similarity index 100% rename from tests/reference/asr-test_dict13-6c4f052.stderr rename to tests/reference/asr-test_dict13-683b290.stderr diff --git a/tests/reference/asr-test_dict2-8ea5254.json b/tests/reference/asr-test_dict2-4587f02.json similarity index 65% rename from tests/reference/asr-test_dict2-8ea5254.json rename to tests/reference/asr-test_dict2-4587f02.json index d187431e4e..296c0bbe09 100644 --- a/tests/reference/asr-test_dict2-8ea5254.json +++ b/tests/reference/asr-test_dict2-4587f02.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_dict2-8ea5254", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_dict2-4587f02", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_dict2.py", "infile_hash": "300adb7c040d5d2035f7da25a633f6f83b5adc55b572990ad4403a5b", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_dict2-8ea5254.stderr", + "stderr": "asr-test_dict2-4587f02.stderr", "stderr_hash": "00d00b6323fa903c677ea2bf60b453ed2ad4cc0f0aa1886154359dd8", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_dict2-8ea5254.stderr b/tests/reference/asr-test_dict2-4587f02.stderr similarity index 100% rename from tests/reference/asr-test_dict2-8ea5254.stderr rename to tests/reference/asr-test_dict2-4587f02.stderr diff --git a/tests/reference/asr-test_dict3-0af4b18.json b/tests/reference/asr-test_dict3-d28f38f.json similarity index 65% rename from tests/reference/asr-test_dict3-0af4b18.json rename to tests/reference/asr-test_dict3-d28f38f.json index 7c0c623397..ea944408ea 100644 --- a/tests/reference/asr-test_dict3-0af4b18.json +++ b/tests/reference/asr-test_dict3-d28f38f.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_dict3-0af4b18", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_dict3-d28f38f", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_dict3.py", "infile_hash": "c8930919a9c47244ed4c57c1235dd2000650eb61dbfb6f413ae934e0", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_dict3-0af4b18.stderr", + "stderr": "asr-test_dict3-d28f38f.stderr", "stderr_hash": "e2cc26634c1ee7aeca96c006b3bd01205200e1a6187e01fde041c3b4", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_dict3-0af4b18.stderr b/tests/reference/asr-test_dict3-d28f38f.stderr similarity index 100% rename from tests/reference/asr-test_dict3-0af4b18.stderr rename to tests/reference/asr-test_dict3-d28f38f.stderr diff --git a/tests/reference/asr-test_dict4-1958cb9.json b/tests/reference/asr-test_dict4-39489fa.json similarity index 65% rename from tests/reference/asr-test_dict4-1958cb9.json rename to tests/reference/asr-test_dict4-39489fa.json index b5da1c4bf0..dbe64e91c0 100644 --- a/tests/reference/asr-test_dict4-1958cb9.json +++ b/tests/reference/asr-test_dict4-39489fa.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_dict4-1958cb9", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_dict4-39489fa", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_dict4.py", "infile_hash": "57a17d3e7e3cc326f2a93d347e449280731ace5ae21a1fb910da5ba1", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_dict4-1958cb9.stderr", + "stderr": "asr-test_dict4-39489fa.stderr", "stderr_hash": "fee0e93265feaf634ae62eded08ec63f6c37530369217731b552de61", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_dict4-1958cb9.stderr b/tests/reference/asr-test_dict4-39489fa.stderr similarity index 100% rename from tests/reference/asr-test_dict4-1958cb9.stderr rename to tests/reference/asr-test_dict4-39489fa.stderr diff --git a/tests/reference/asr-test_dict5-d96e08d.json b/tests/reference/asr-test_dict5-c436d37.json similarity index 65% rename from tests/reference/asr-test_dict5-d96e08d.json rename to tests/reference/asr-test_dict5-c436d37.json index 26ba520a70..4c7034730c 100644 --- a/tests/reference/asr-test_dict5-d96e08d.json +++ b/tests/reference/asr-test_dict5-c436d37.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_dict5-d96e08d", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_dict5-c436d37", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_dict5.py", "infile_hash": "4b1b45fc39df2a77ce477a006b9316550569af0309b0ac99562acf30", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_dict5-d96e08d.stderr", + "stderr": "asr-test_dict5-c436d37.stderr", "stderr_hash": "85918b86a904812b9f151ec636dac3c770446a33ebac2f5910591ea7", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_dict5-d96e08d.stderr b/tests/reference/asr-test_dict5-c436d37.stderr similarity index 100% rename from tests/reference/asr-test_dict5-d96e08d.stderr rename to tests/reference/asr-test_dict5-c436d37.stderr diff --git a/tests/reference/asr-test_dict6-39d2ea1.json b/tests/reference/asr-test_dict6-95e3b14.json similarity index 65% rename from tests/reference/asr-test_dict6-39d2ea1.json rename to tests/reference/asr-test_dict6-95e3b14.json index 19eb85f88f..02c62b38c2 100644 --- a/tests/reference/asr-test_dict6-39d2ea1.json +++ b/tests/reference/asr-test_dict6-95e3b14.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_dict6-39d2ea1", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_dict6-95e3b14", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_dict6.py", "infile_hash": "96cf7e14615e027428b3f60969ef27fd9dbb07171e9088dfbede5d06", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_dict6-39d2ea1.stderr", + "stderr": "asr-test_dict6-95e3b14.stderr", "stderr_hash": "786fd07ddc3919823741b0db9a9ff0ba898b106d677657ea5f80fd2e", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_dict6-39d2ea1.stderr b/tests/reference/asr-test_dict6-95e3b14.stderr similarity index 100% rename from tests/reference/asr-test_dict6-39d2ea1.stderr rename to tests/reference/asr-test_dict6-95e3b14.stderr diff --git a/tests/reference/asr-test_dict7-586e3f8.json b/tests/reference/asr-test_dict7-1415e14.json similarity index 65% rename from tests/reference/asr-test_dict7-586e3f8.json rename to tests/reference/asr-test_dict7-1415e14.json index 6e422405d5..64eb4e7eb3 100644 --- a/tests/reference/asr-test_dict7-586e3f8.json +++ b/tests/reference/asr-test_dict7-1415e14.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_dict7-586e3f8", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_dict7-1415e14", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_dict7.py", "infile_hash": "37950c687da9eedd23b6803bade370f46cb40fb89270d032722caf33", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_dict7-586e3f8.stderr", + "stderr": "asr-test_dict7-1415e14.stderr", "stderr_hash": "a51d1d4a46839e1f4258410e979ba83a14abe8c011482e30be2336cd", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_dict7-586e3f8.stderr b/tests/reference/asr-test_dict7-1415e14.stderr similarity index 100% rename from tests/reference/asr-test_dict7-586e3f8.stderr rename to tests/reference/asr-test_dict7-1415e14.stderr diff --git a/tests/reference/asr-test_dict8-5acc52f.json b/tests/reference/asr-test_dict8-d960ce0.json similarity index 65% rename from tests/reference/asr-test_dict8-5acc52f.json rename to tests/reference/asr-test_dict8-d960ce0.json index 4a6f9bb65f..10fa72e28d 100644 --- a/tests/reference/asr-test_dict8-5acc52f.json +++ b/tests/reference/asr-test_dict8-d960ce0.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_dict8-5acc52f", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_dict8-d960ce0", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_dict8.py", "infile_hash": "a27a4c687822a5d03dba00df1201fac438fd4eb20479020de3563655", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_dict8-5acc52f.stderr", + "stderr": "asr-test_dict8-d960ce0.stderr", "stderr_hash": "86744c3a768772a885a4cafef8973f69689fb2522aae6dfe486f7dcd", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_dict8-5acc52f.stderr b/tests/reference/asr-test_dict8-d960ce0.stderr similarity index 100% rename from tests/reference/asr-test_dict8-5acc52f.stderr rename to tests/reference/asr-test_dict8-d960ce0.stderr diff --git a/tests/reference/asr-test_dict9-ab506c8.json b/tests/reference/asr-test_dict9-907bda7.json similarity index 65% rename from tests/reference/asr-test_dict9-ab506c8.json rename to tests/reference/asr-test_dict9-907bda7.json index 2f39f392cc..3883167972 100644 --- a/tests/reference/asr-test_dict9-ab506c8.json +++ b/tests/reference/asr-test_dict9-907bda7.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_dict9-ab506c8", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_dict9-907bda7", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_dict9.py", "infile_hash": "09f382db99b7d322807aa7fcb8d12673a41ea17047b8adcd5b6302b1", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_dict9-ab506c8.stderr", + "stderr": "asr-test_dict9-907bda7.stderr", "stderr_hash": "14a0981e18ecf1948417be8e93c7956f82c76fcc5e84b1d428d525c0", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_dict9-ab506c8.stderr b/tests/reference/asr-test_dict9-907bda7.stderr similarity index 100% rename from tests/reference/asr-test_dict9-ab506c8.stderr rename to tests/reference/asr-test_dict9-907bda7.stderr diff --git a/tests/reference/asr-test_end_sep_keywords-49ea13f.json b/tests/reference/asr-test_end_sep_keywords-2226a67.json similarity index 63% rename from tests/reference/asr-test_end_sep_keywords-49ea13f.json rename to tests/reference/asr-test_end_sep_keywords-2226a67.json index bfbc0a03de..f938c3e686 100644 --- a/tests/reference/asr-test_end_sep_keywords-49ea13f.json +++ b/tests/reference/asr-test_end_sep_keywords-2226a67.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_end_sep_keywords-49ea13f", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_end_sep_keywords-2226a67", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/test_end_sep_keywords.py", "infile_hash": "5ea30711228d4ebb64266988c1a706a3d64f196457b939ed3bf15ecf", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_end_sep_keywords-49ea13f.stdout", + "stdout": "asr-test_end_sep_keywords-2226a67.stdout", "stdout_hash": "fdc9aacfe26de399fedb9c7de6d585f7068fe51c2ea5bce7f3d42827", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_end_sep_keywords-49ea13f.stdout b/tests/reference/asr-test_end_sep_keywords-2226a67.stdout similarity index 100% rename from tests/reference/asr-test_end_sep_keywords-49ea13f.stdout rename to tests/reference/asr-test_end_sep_keywords-2226a67.stdout diff --git a/tests/reference/asr-test_for2-a5520fb.json b/tests/reference/asr-test_for2-e5d893f.json similarity index 66% rename from tests/reference/asr-test_for2-a5520fb.json rename to tests/reference/asr-test_for2-e5d893f.json index 2bbfdd20ad..0067f33cd4 100644 --- a/tests/reference/asr-test_for2-a5520fb.json +++ b/tests/reference/asr-test_for2-e5d893f.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_for2-a5520fb", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_for2-e5d893f", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_for2.py", "infile_hash": "8a05d06e94c344432594db8536e6fed71767f109b03afea0a0b80d87", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_for2-a5520fb.stderr", + "stderr": "asr-test_for2-e5d893f.stderr", "stderr_hash": "07152b2e843a1a3ea9ab8e5c7c620d4ecc9f29ef1408d48055028b95", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_for2-a5520fb.stderr b/tests/reference/asr-test_for2-e5d893f.stderr similarity index 100% rename from tests/reference/asr-test_for2-a5520fb.stderr rename to tests/reference/asr-test_for2-e5d893f.stderr diff --git a/tests/reference/asr-test_func_args-c91fd7c.json b/tests/reference/asr-test_func_args-a898a72.json similarity index 65% rename from tests/reference/asr-test_func_args-c91fd7c.json rename to tests/reference/asr-test_func_args-a898a72.json index 152f6fd975..52ff1af35d 100644 --- a/tests/reference/asr-test_func_args-c91fd7c.json +++ b/tests/reference/asr-test_func_args-a898a72.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_func_args-c91fd7c", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_func_args-a898a72", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_func_args.py", "infile_hash": "5fae2ad01849e5ba3fca0a85455a92199a779be76b908fed30fb6b7d", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_func_args-c91fd7c.stderr", + "stderr": "asr-test_func_args-a898a72.stderr", "stderr_hash": "b498b34cd18395e17ab982dc47abb832c01bd16ede103fad53068304", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_func_args-c91fd7c.stderr b/tests/reference/asr-test_func_args-a898a72.stderr similarity index 100% rename from tests/reference/asr-test_func_args-c91fd7c.stderr rename to tests/reference/asr-test_func_args-a898a72.stderr diff --git a/tests/reference/asr-test_goto-5606c27.json b/tests/reference/asr-test_goto-ba9fd22.json similarity index 66% rename from tests/reference/asr-test_goto-5606c27.json rename to tests/reference/asr-test_goto-ba9fd22.json index ab8dcbb649..afa1b0f060 100644 --- a/tests/reference/asr-test_goto-5606c27.json +++ b/tests/reference/asr-test_goto-ba9fd22.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_goto-5606c27", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_goto-ba9fd22", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_goto.py", "infile_hash": "02cc918eba32d981a943d61cc908d9ccbdcebaa71f61b16f49ef28ba", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_goto-5606c27.stderr", + "stderr": "asr-test_goto-ba9fd22.stderr", "stderr_hash": "a1e26c1edcd8784938199af965004496663f071968ff7d58a33be725", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_goto-5606c27.stderr b/tests/reference/asr-test_goto-ba9fd22.stderr similarity index 100% rename from tests/reference/asr-test_goto-5606c27.stderr rename to tests/reference/asr-test_goto-ba9fd22.stderr diff --git a/tests/reference/asr-test_import_01-0a03bad.json b/tests/reference/asr-test_import_01-b859c43.json similarity index 65% rename from tests/reference/asr-test_import_01-0a03bad.json rename to tests/reference/asr-test_import_01-b859c43.json index 9e568e3397..4c1f0a511b 100644 --- a/tests/reference/asr-test_import_01-0a03bad.json +++ b/tests/reference/asr-test_import_01-b859c43.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_import_01-0a03bad", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_import_01-b859c43", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_import_01.py", "infile_hash": "291b8bf62b25eaad7edd1fb6e4bd22d21c1dda6e488fa68562a98e99", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_import_01-0a03bad.stderr", + "stderr": "asr-test_import_01-b859c43.stderr", "stderr_hash": "ef59d49c8273cdd97e830cac94b3cc620fb24b07ce00c3394081c9c5", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_import_01-0a03bad.stderr b/tests/reference/asr-test_import_01-b859c43.stderr similarity index 100% rename from tests/reference/asr-test_import_01-0a03bad.stderr rename to tests/reference/asr-test_import_01-b859c43.stderr diff --git a/tests/reference/asr-test_import_02-8c2554e.json b/tests/reference/asr-test_import_02-55b47fa.json similarity index 65% rename from tests/reference/asr-test_import_02-8c2554e.json rename to tests/reference/asr-test_import_02-55b47fa.json index 2cf2ba776f..04b0cf247e 100644 --- a/tests/reference/asr-test_import_02-8c2554e.json +++ b/tests/reference/asr-test_import_02-55b47fa.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_import_02-8c2554e", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_import_02-55b47fa", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_import_02.py", "infile_hash": "a3326a7bd9f6acc935235e1c0ff9cf4c26eda5f4052af774a148856c", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_import_02-8c2554e.stderr", + "stderr": "asr-test_import_02-55b47fa.stderr", "stderr_hash": "b30859152322cc22b1593d3af229c7b28fbc8bc03eb6542fec3a3c91", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_import_02-8c2554e.stderr b/tests/reference/asr-test_import_02-55b47fa.stderr similarity index 100% rename from tests/reference/asr-test_import_02-8c2554e.stderr rename to tests/reference/asr-test_import_02-55b47fa.stderr diff --git a/tests/reference/asr-test_integer_bitnot-0d0eafa.json b/tests/reference/asr-test_integer_bitnot-08e2e96.json similarity index 65% rename from tests/reference/asr-test_integer_bitnot-0d0eafa.json rename to tests/reference/asr-test_integer_bitnot-08e2e96.json index 79cda34747..94c78ac3af 100644 --- a/tests/reference/asr-test_integer_bitnot-0d0eafa.json +++ b/tests/reference/asr-test_integer_bitnot-08e2e96.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_integer_bitnot-0d0eafa", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_integer_bitnot-08e2e96", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_integer_bitnot.py", "infile_hash": "ce63509c56eb6c68ca6d64cc2a195644f3d2fc285f3ec8865551eff5", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_integer_bitnot-0d0eafa.stdout", + "stdout": "asr-test_integer_bitnot-08e2e96.stdout", "stdout_hash": "389cf08cbdbb1386094c10f654c495a5da46fe23f6eb2a8295e07d96", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_integer_bitnot-0d0eafa.stdout b/tests/reference/asr-test_integer_bitnot-08e2e96.stdout similarity index 100% rename from tests/reference/asr-test_integer_bitnot-0d0eafa.stdout rename to tests/reference/asr-test_integer_bitnot-08e2e96.stdout diff --git a/tests/reference/asr-test_len1-bbcb922.json b/tests/reference/asr-test_len1-839a615.json similarity index 66% rename from tests/reference/asr-test_len1-bbcb922.json rename to tests/reference/asr-test_len1-839a615.json index 89ef3c6c68..ee88e63b6e 100644 --- a/tests/reference/asr-test_len1-bbcb922.json +++ b/tests/reference/asr-test_len1-839a615.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_len1-bbcb922", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_len1-839a615", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_len1.py", "infile_hash": "a233dd883c545df2d1f853fc95c6ed9a68122fcfbd822cf96804a1ca", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_len1-bbcb922.stderr", + "stderr": "asr-test_len1-839a615.stderr", "stderr_hash": "50478fbc4d3bc86e9bf6cf012d810f31885d5e654423a0384557f919", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_len1-bbcb922.stderr b/tests/reference/asr-test_len1-839a615.stderr similarity index 100% rename from tests/reference/asr-test_len1-bbcb922.stderr rename to tests/reference/asr-test_len1-839a615.stderr diff --git a/tests/reference/asr-test_list1-ec1c16a.json b/tests/reference/asr-test_list1-73fd538.json similarity index 65% rename from tests/reference/asr-test_list1-ec1c16a.json rename to tests/reference/asr-test_list1-73fd538.json index 9ff8329c2c..33b0c94fc7 100644 --- a/tests/reference/asr-test_list1-ec1c16a.json +++ b/tests/reference/asr-test_list1-73fd538.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_list1-ec1c16a", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_list1-73fd538", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_list1.py", "infile_hash": "bab0faf6c848b07f8cbce0ed060c0f067f38963ce247d150559a75b4", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_list1-ec1c16a.stderr", + "stderr": "asr-test_list1-73fd538.stderr", "stderr_hash": "8c791203aa1be4c1cb8911aaaf447a5e706cc00d17dfeba0b17c283b", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_list1-ec1c16a.stderr b/tests/reference/asr-test_list1-73fd538.stderr similarity index 100% rename from tests/reference/asr-test_list1-ec1c16a.stderr rename to tests/reference/asr-test_list1-73fd538.stderr diff --git a/tests/reference/asr-test_list2-ce0a21f.json b/tests/reference/asr-test_list2-10ffdd7.json similarity index 65% rename from tests/reference/asr-test_list2-ce0a21f.json rename to tests/reference/asr-test_list2-10ffdd7.json index 55a3321b90..0510d548d4 100644 --- a/tests/reference/asr-test_list2-ce0a21f.json +++ b/tests/reference/asr-test_list2-10ffdd7.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_list2-ce0a21f", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_list2-10ffdd7", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_list2.py", "infile_hash": "1922554710c3c0cc93710512c5634e4a06f14e5e28dc169b6eac3fe2", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_list2-ce0a21f.stderr", + "stderr": "asr-test_list2-10ffdd7.stderr", "stderr_hash": "be192bc4655f28313c415c7180d676e0383f0acb7e4de75a6b3d1a37", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_list2-ce0a21f.stderr b/tests/reference/asr-test_list2-10ffdd7.stderr similarity index 100% rename from tests/reference/asr-test_list2-ce0a21f.stderr rename to tests/reference/asr-test_list2-10ffdd7.stderr diff --git a/tests/reference/asr-test_list3-baadc44.json b/tests/reference/asr-test_list3-5f4d2a8.json similarity index 65% rename from tests/reference/asr-test_list3-baadc44.json rename to tests/reference/asr-test_list3-5f4d2a8.json index 4be5fbdf10..1975f8b077 100644 --- a/tests/reference/asr-test_list3-baadc44.json +++ b/tests/reference/asr-test_list3-5f4d2a8.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_list3-baadc44", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_list3-5f4d2a8", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_list3.py", "infile_hash": "f512b77e66fe356108135243473cf9441bc532310547070a9aeef3e9", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_list3-baadc44.stderr", + "stderr": "asr-test_list3-5f4d2a8.stderr", "stderr_hash": "b6924dd90c3e80d22ea270ba6aeaabe9a121e970c650632c44ad8f4e", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_list3-baadc44.stderr b/tests/reference/asr-test_list3-5f4d2a8.stderr similarity index 100% rename from tests/reference/asr-test_list3-baadc44.stderr rename to tests/reference/asr-test_list3-5f4d2a8.stderr diff --git a/tests/reference/asr-test_list4-fe9dbdf.json b/tests/reference/asr-test_list4-d18a7e3.json similarity index 65% rename from tests/reference/asr-test_list4-fe9dbdf.json rename to tests/reference/asr-test_list4-d18a7e3.json index f7bb94e281..9f9e535744 100644 --- a/tests/reference/asr-test_list4-fe9dbdf.json +++ b/tests/reference/asr-test_list4-d18a7e3.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_list4-fe9dbdf", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_list4-d18a7e3", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_list4.py", "infile_hash": "d93fc79d9b95b91ea6dd5190f2320d2c84f25ff9c108dff9d13086c1", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_list4-fe9dbdf.stderr", + "stderr": "asr-test_list4-d18a7e3.stderr", "stderr_hash": "c882f660abef92d6b13a83683a9491d73b8a09e27476fcff3c6d7a07", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_list4-fe9dbdf.stderr b/tests/reference/asr-test_list4-d18a7e3.stderr similarity index 100% rename from tests/reference/asr-test_list4-fe9dbdf.stderr rename to tests/reference/asr-test_list4-d18a7e3.stderr diff --git a/tests/reference/asr-test_list_concat-672d5b5.json b/tests/reference/asr-test_list_concat-41d186f.json similarity index 64% rename from tests/reference/asr-test_list_concat-672d5b5.json rename to tests/reference/asr-test_list_concat-41d186f.json index 2ff1a9ecde..ff64ae4aac 100644 --- a/tests/reference/asr-test_list_concat-672d5b5.json +++ b/tests/reference/asr-test_list_concat-41d186f.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_list_concat-672d5b5", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_list_concat-41d186f", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_list_concat.py", "infile_hash": "2dbbc047f2ededbe3c1cdebe412647006e9e7a7043514ad12857b7ec", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_list_concat-672d5b5.stderr", + "stderr": "asr-test_list_concat-41d186f.stderr", "stderr_hash": "b0a3cfa79525db1ed6aa4ed1f47b11e4852da5a59e043d32a7814ede", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_list_concat-672d5b5.stderr b/tests/reference/asr-test_list_concat-41d186f.stderr similarity index 100% rename from tests/reference/asr-test_list_concat-672d5b5.stderr rename to tests/reference/asr-test_list_concat-41d186f.stderr diff --git a/tests/reference/asr-test_list_count-436eb28.json b/tests/reference/asr-test_list_count-4b42498.json similarity index 64% rename from tests/reference/asr-test_list_count-436eb28.json rename to tests/reference/asr-test_list_count-4b42498.json index 5a9d268179..f4864b55fb 100644 --- a/tests/reference/asr-test_list_count-436eb28.json +++ b/tests/reference/asr-test_list_count-4b42498.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_list_count-436eb28", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_list_count-4b42498", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_list_count.py", "infile_hash": "01975bd7c4bba02fd811de536b218167da99b532fa955b7bf8339779", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_list_count-436eb28.stderr", + "stderr": "asr-test_list_count-4b42498.stderr", "stderr_hash": "f26efcc623b68ca43ef871eb01c8e3cbd1ae464baaa491c6e4969696", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_list_count-436eb28.stderr b/tests/reference/asr-test_list_count-4b42498.stderr similarity index 100% rename from tests/reference/asr-test_list_count-436eb28.stderr rename to tests/reference/asr-test_list_count-4b42498.stderr diff --git a/tests/reference/asr-test_max_min-e73decc.json b/tests/reference/asr-test_max_min-3c2fc51.json similarity index 66% rename from tests/reference/asr-test_max_min-e73decc.json rename to tests/reference/asr-test_max_min-3c2fc51.json index 54be00ee96..3a56aada97 100644 --- a/tests/reference/asr-test_max_min-e73decc.json +++ b/tests/reference/asr-test_max_min-3c2fc51.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_max_min-e73decc", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_max_min-3c2fc51", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_max_min.py", "infile_hash": "1aba932852adf8cc5dbff4a6ff83aa5de030dba5a5721eeace90a5d4", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_max_min-e73decc.stdout", + "stdout": "asr-test_max_min-3c2fc51.stdout", "stdout_hash": "b55821a5517a59e5fd3b731c499f49ad4173ed0f37e6292744898072", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_max_min-e73decc.stdout b/tests/reference/asr-test_max_min-3c2fc51.stdout similarity index 100% rename from tests/reference/asr-test_max_min-e73decc.stdout rename to tests/reference/asr-test_max_min-3c2fc51.stdout diff --git a/tests/reference/asr-test_numpy_03-6dd742e.json b/tests/reference/asr-test_numpy_03-e600a49.json similarity index 66% rename from tests/reference/asr-test_numpy_03-6dd742e.json rename to tests/reference/asr-test_numpy_03-e600a49.json index e3b1c7a6bd..261e347552 100644 --- a/tests/reference/asr-test_numpy_03-6dd742e.json +++ b/tests/reference/asr-test_numpy_03-e600a49.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_numpy_03-6dd742e", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_numpy_03-e600a49", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_numpy_03.py", "infile_hash": "c0ff0b1ddaee26393573088dbfd8babf9e0c95c3b2cfddbe36c2b633", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_numpy_03-6dd742e.stdout", + "stdout": "asr-test_numpy_03-e600a49.stdout", "stdout_hash": "00fc9276ccbb947926b561a3c8d00470a3bffcb39e180913855ebc6d", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_numpy_03-6dd742e.stdout b/tests/reference/asr-test_numpy_03-e600a49.stdout similarity index 100% rename from tests/reference/asr-test_numpy_03-6dd742e.stdout rename to tests/reference/asr-test_numpy_03-e600a49.stdout diff --git a/tests/reference/asr-test_numpy_04-3376b7a.json b/tests/reference/asr-test_numpy_04-ecbb614.json similarity index 66% rename from tests/reference/asr-test_numpy_04-3376b7a.json rename to tests/reference/asr-test_numpy_04-ecbb614.json index 6bac47353b..16ab7ca540 100644 --- a/tests/reference/asr-test_numpy_04-3376b7a.json +++ b/tests/reference/asr-test_numpy_04-ecbb614.json @@ -1,11 +1,11 @@ { - "basename": "asr-test_numpy_04-3376b7a", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_numpy_04-ecbb614", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_numpy_04.py", "infile_hash": "0fbd0a4280966dd9a917d3a005887954325fb1ea5468fd28dcae930f", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_numpy_04-3376b7a.stdout", + "stdout": "asr-test_numpy_04-ecbb614.stdout", "stdout_hash": "e7eeab05e18a881067e9cfd0661c57d01eb942ad7eb36fac53267c17", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-test_numpy_04-3376b7a.stdout b/tests/reference/asr-test_numpy_04-ecbb614.stdout similarity index 100% rename from tests/reference/asr-test_numpy_04-3376b7a.stdout rename to tests/reference/asr-test_numpy_04-ecbb614.stdout diff --git a/tests/reference/asr-test_ord-b77f9d5.json b/tests/reference/asr-test_ord-316ce61.json similarity index 66% rename from tests/reference/asr-test_ord-b77f9d5.json rename to tests/reference/asr-test_ord-316ce61.json index 565156d345..362e582d03 100644 --- a/tests/reference/asr-test_ord-b77f9d5.json +++ b/tests/reference/asr-test_ord-316ce61.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_ord-b77f9d5", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_ord-316ce61", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_ord.py", "infile_hash": "5ea1a821ece44ef24e91e5ba66152fd1c27bb3724d2cad2e7e2d96f2", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_ord-b77f9d5.stderr", + "stderr": "asr-test_ord-316ce61.stderr", "stderr_hash": "dda39c93777d64449510b35e893d516cd53ac299cd2b5f19b08464bd", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_ord-b77f9d5.stderr b/tests/reference/asr-test_ord-316ce61.stderr similarity index 100% rename from tests/reference/asr-test_ord-b77f9d5.stderr rename to tests/reference/asr-test_ord-316ce61.stderr diff --git a/tests/reference/asr-test_pointer_types-215f516.json b/tests/reference/asr-test_pointer_types-1bf0d01.json similarity index 64% rename from tests/reference/asr-test_pointer_types-215f516.json rename to tests/reference/asr-test_pointer_types-1bf0d01.json index a58e085af3..ef0e6001f7 100644 --- a/tests/reference/asr-test_pointer_types-215f516.json +++ b/tests/reference/asr-test_pointer_types-1bf0d01.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_pointer_types-215f516", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_pointer_types-1bf0d01", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_pointer_types.py", "infile_hash": "c5290af854c1f4a76252d27a2ae05f309ae55b9d6fc6ee533989cec7", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_pointer_types-215f516.stderr", + "stderr": "asr-test_pointer_types-1bf0d01.stderr", "stderr_hash": "4f3b9512978dfb5d22367aa7b2e4fd20768de78530bf4d83a52fa881", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_pointer_types-215f516.stderr b/tests/reference/asr-test_pointer_types-1bf0d01.stderr similarity index 100% rename from tests/reference/asr-test_pointer_types-215f516.stderr rename to tests/reference/asr-test_pointer_types-1bf0d01.stderr diff --git a/tests/reference/asr-test_pow-6f6a69d.json b/tests/reference/asr-test_pow-3f5d550.json similarity index 62% rename from tests/reference/asr-test_pow-6f6a69d.json rename to tests/reference/asr-test_pow-3f5d550.json index 1c701134e7..77458ba72a 100644 --- a/tests/reference/asr-test_pow-6f6a69d.json +++ b/tests/reference/asr-test_pow-3f5d550.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_pow-6f6a69d", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_pow-3f5d550", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_pow.py", "infile_hash": "073bf734150500a8b5e46940a9b0440e7e0fe30d0e2789ca049cef17", "outfile": null, "outfile_hash": null, - "stdout": "asr-test_pow-6f6a69d.stdout", + "stdout": "asr-test_pow-3f5d550.stdout", "stdout_hash": "714fc840b117facc907d4c2980ffe7a3292bb38750d6e03e55dd54d2", - "stderr": "asr-test_pow-6f6a69d.stderr", + "stderr": "asr-test_pow-3f5d550.stderr", "stderr_hash": "3d950301563cce75654f28bf41f6f53428ed1f5ae997774345f374a3", "returncode": 0 } \ No newline at end of file diff --git a/tests/reference/asr-test_pow-6f6a69d.stderr b/tests/reference/asr-test_pow-3f5d550.stderr similarity index 100% rename from tests/reference/asr-test_pow-6f6a69d.stderr rename to tests/reference/asr-test_pow-3f5d550.stderr diff --git a/tests/reference/asr-test_pow-6f6a69d.stdout b/tests/reference/asr-test_pow-3f5d550.stdout similarity index 100% rename from tests/reference/asr-test_pow-6f6a69d.stdout rename to tests/reference/asr-test_pow-3f5d550.stdout diff --git a/tests/reference/asr-test_pow1-50a544f.json b/tests/reference/asr-test_pow1-581ef42.json similarity index 66% rename from tests/reference/asr-test_pow1-50a544f.json rename to tests/reference/asr-test_pow1-581ef42.json index 4675875800..a5584b1bc7 100644 --- a/tests/reference/asr-test_pow1-50a544f.json +++ b/tests/reference/asr-test_pow1-581ef42.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_pow1-50a544f", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_pow1-581ef42", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_pow1.py", "infile_hash": "a7ce7888e7e99bc753e16822749aaae4ee63641675990b3e2a34de10", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_pow1-50a544f.stderr", + "stderr": "asr-test_pow1-581ef42.stderr", "stderr_hash": "7f7cc07cf6f08f2d953d6e6c1f4892e6379faaf8aa668117234293d0", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_pow1-50a544f.stderr b/tests/reference/asr-test_pow1-581ef42.stderr similarity index 100% rename from tests/reference/asr-test_pow1-50a544f.stderr rename to tests/reference/asr-test_pow1-581ef42.stderr diff --git a/tests/reference/asr-test_pow2-6000a83.json b/tests/reference/asr-test_pow2-0dcbd7d.json similarity index 66% rename from tests/reference/asr-test_pow2-6000a83.json rename to tests/reference/asr-test_pow2-0dcbd7d.json index 0720c66e46..083bc76b8d 100644 --- a/tests/reference/asr-test_pow2-6000a83.json +++ b/tests/reference/asr-test_pow2-0dcbd7d.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_pow2-6000a83", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_pow2-0dcbd7d", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_pow2.py", "infile_hash": "0df16d4f512305265cb2924e18db5753a4c422da3a7624f74f71d26f", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_pow2-6000a83.stderr", + "stderr": "asr-test_pow2-0dcbd7d.stderr", "stderr_hash": "1d1d3a4a308e068439ac40685fcad6f29750560722b910be3341ce3c", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_pow2-6000a83.stderr b/tests/reference/asr-test_pow2-0dcbd7d.stderr similarity index 100% rename from tests/reference/asr-test_pow2-6000a83.stderr rename to tests/reference/asr-test_pow2-0dcbd7d.stderr diff --git a/tests/reference/asr-test_pow3-94879f9.json b/tests/reference/asr-test_pow3-79749ed.json similarity index 66% rename from tests/reference/asr-test_pow3-94879f9.json rename to tests/reference/asr-test_pow3-79749ed.json index a062e192a0..cd0f9f0d33 100644 --- a/tests/reference/asr-test_pow3-94879f9.json +++ b/tests/reference/asr-test_pow3-79749ed.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_pow3-94879f9", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_pow3-79749ed", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_pow3.py", "infile_hash": "884bdc831e2b2d01c30a2dd841307fd5674ab65e0c3819d17e3db500", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_pow3-94879f9.stderr", + "stderr": "asr-test_pow3-79749ed.stderr", "stderr_hash": "4a6600740ad466d250f39b76130ab5ab796312b1ee89c2d72847500f", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_pow3-94879f9.stderr b/tests/reference/asr-test_pow3-79749ed.stderr similarity index 100% rename from tests/reference/asr-test_pow3-94879f9.stderr rename to tests/reference/asr-test_pow3-79749ed.stderr diff --git a/tests/reference/asr-test_pow4-792b406.json b/tests/reference/asr-test_pow4-ef60978.json similarity index 66% rename from tests/reference/asr-test_pow4-792b406.json rename to tests/reference/asr-test_pow4-ef60978.json index e8bda3842b..2e98c401ce 100644 --- a/tests/reference/asr-test_pow4-792b406.json +++ b/tests/reference/asr-test_pow4-ef60978.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_pow4-792b406", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_pow4-ef60978", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_pow4.py", "infile_hash": "af9b11ec50a82de28afac31faa4a78bdbeb5f317537fc37860b139cd", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_pow4-792b406.stderr", + "stderr": "asr-test_pow4-ef60978.stderr", "stderr_hash": "ddc8a81609479bf82d256c9cb8d4d54526bd6656632a0d1e2f1ada2c", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_pow4-792b406.stderr b/tests/reference/asr-test_pow4-ef60978.stderr similarity index 100% rename from tests/reference/asr-test_pow4-792b406.stderr rename to tests/reference/asr-test_pow4-ef60978.stderr diff --git a/tests/reference/asr-test_print1-71e5114.json b/tests/reference/asr-test_print1-f1f36f1.json similarity index 65% rename from tests/reference/asr-test_print1-71e5114.json rename to tests/reference/asr-test_print1-f1f36f1.json index a81b43f1f2..0c4988e3a3 100644 --- a/tests/reference/asr-test_print1-71e5114.json +++ b/tests/reference/asr-test_print1-f1f36f1.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_print1-71e5114", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_print1-f1f36f1", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_print1.py", "infile_hash": "824e91278f3717dbe58ef4c18f8df06f9c7d4644ca6f3a65cccdc9e0", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_print1-71e5114.stderr", + "stderr": "asr-test_print1-f1f36f1.stderr", "stderr_hash": "da6324bcc282ecb93fe6784b206f8a9d8f04ae56341339b13de71bd4", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_print1-71e5114.stderr b/tests/reference/asr-test_print1-f1f36f1.stderr similarity index 100% rename from tests/reference/asr-test_print1-71e5114.stderr rename to tests/reference/asr-test_print1-f1f36f1.stderr diff --git a/tests/reference/asr-test_print2-b5fcabf.json b/tests/reference/asr-test_print2-64acb15.json similarity index 65% rename from tests/reference/asr-test_print2-b5fcabf.json rename to tests/reference/asr-test_print2-64acb15.json index f51872ffa8..050b4cc698 100644 --- a/tests/reference/asr-test_print2-b5fcabf.json +++ b/tests/reference/asr-test_print2-64acb15.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_print2-b5fcabf", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_print2-64acb15", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_print2.py", "infile_hash": "af07d17d5b3f16db024a3e893923988349c8f6c8bf1a6c5507d56a6d", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_print2-b5fcabf.stderr", + "stderr": "asr-test_print2-64acb15.stderr", "stderr_hash": "e92bba85b957e7034c5172981b3b27ed7b3f0ac62167d82175890bc9", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_print2-b5fcabf.stderr b/tests/reference/asr-test_print2-64acb15.stderr similarity index 100% rename from tests/reference/asr-test_print2-b5fcabf.stderr rename to tests/reference/asr-test_print2-64acb15.stderr diff --git a/tests/reference/asr-test_return1-8e8f3ae.json b/tests/reference/asr-test_return1-2603c9e.json similarity index 65% rename from tests/reference/asr-test_return1-8e8f3ae.json rename to tests/reference/asr-test_return1-2603c9e.json index 3d6f655b0f..cc65ed1a6a 100644 --- a/tests/reference/asr-test_return1-8e8f3ae.json +++ b/tests/reference/asr-test_return1-2603c9e.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_return1-8e8f3ae", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_return1-2603c9e", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_return1.py", "infile_hash": "ec68add4e9e8059a274ba97c4349b3a8f1a43a381eb6ab330995681e", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_return1-8e8f3ae.stderr", + "stderr": "asr-test_return1-2603c9e.stderr", "stderr_hash": "6449cc5e148acf72281e7ef604decd32889ceb27b87052fe8ff8eb50", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_return1-8e8f3ae.stderr b/tests/reference/asr-test_return1-2603c9e.stderr similarity index 100% rename from tests/reference/asr-test_return1-8e8f3ae.stderr rename to tests/reference/asr-test_return1-2603c9e.stderr diff --git a/tests/reference/asr-test_return2-c5799e7.json b/tests/reference/asr-test_return2-add829b.json similarity index 65% rename from tests/reference/asr-test_return2-c5799e7.json rename to tests/reference/asr-test_return2-add829b.json index 8b467e7017..abdb4461f7 100644 --- a/tests/reference/asr-test_return2-c5799e7.json +++ b/tests/reference/asr-test_return2-add829b.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_return2-c5799e7", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_return2-add829b", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_return2.py", "infile_hash": "6423d00b6ef8b232c393994d190121f76befdc32a2e5da21d655458b", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_return2-c5799e7.stderr", + "stderr": "asr-test_return2-add829b.stderr", "stderr_hash": "493f7a8431e00a1bfeb1756b0718b0a40458883c8b9eb379f0c5b536", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_return2-c5799e7.stderr b/tests/reference/asr-test_return2-add829b.stderr similarity index 100% rename from tests/reference/asr-test_return2-c5799e7.stderr rename to tests/reference/asr-test_return2-add829b.stderr diff --git a/tests/reference/asr-test_set1-8fde53c.json b/tests/reference/asr-test_set1-11379c7.json similarity index 66% rename from tests/reference/asr-test_set1-8fde53c.json rename to tests/reference/asr-test_set1-11379c7.json index d2cbe19cb1..09cc2515af 100644 --- a/tests/reference/asr-test_set1-8fde53c.json +++ b/tests/reference/asr-test_set1-11379c7.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_set1-8fde53c", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_set1-11379c7", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_set1.py", "infile_hash": "54179c34d3818cd0b57d582c930226ce5443a43386ae981aab02e50b", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_set1-8fde53c.stderr", + "stderr": "asr-test_set1-11379c7.stderr", "stderr_hash": "9dcd4fd9b8878cabe6559827531844364da8311d7c8f5f846b38620d", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_set1-8fde53c.stderr b/tests/reference/asr-test_set1-11379c7.stderr similarity index 100% rename from tests/reference/asr-test_set1-8fde53c.stderr rename to tests/reference/asr-test_set1-11379c7.stderr diff --git a/tests/reference/asr-test_set2-1ded45b.json b/tests/reference/asr-test_set2-d91a6f0.json similarity index 66% rename from tests/reference/asr-test_set2-1ded45b.json rename to tests/reference/asr-test_set2-d91a6f0.json index 06349add19..8d33226ef5 100644 --- a/tests/reference/asr-test_set2-1ded45b.json +++ b/tests/reference/asr-test_set2-d91a6f0.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_set2-1ded45b", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_set2-d91a6f0", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_set2.py", "infile_hash": "2d561d934090bedc052b2ef17bc3ac9b59ed94298fd39cbea2c9ba15", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_set2-1ded45b.stderr", + "stderr": "asr-test_set2-d91a6f0.stderr", "stderr_hash": "5459ddb5148c630f9374c827aad9c37d25967248002dc0dff5314530", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_set2-1ded45b.stderr b/tests/reference/asr-test_set2-d91a6f0.stderr similarity index 100% rename from tests/reference/asr-test_set2-1ded45b.stderr rename to tests/reference/asr-test_set2-d91a6f0.stderr diff --git a/tests/reference/asr-test_set3-bbd0ed1.json b/tests/reference/asr-test_set3-f9bbffb.json similarity index 66% rename from tests/reference/asr-test_set3-bbd0ed1.json rename to tests/reference/asr-test_set3-f9bbffb.json index 0b9d030f59..877113068e 100644 --- a/tests/reference/asr-test_set3-bbd0ed1.json +++ b/tests/reference/asr-test_set3-f9bbffb.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_set3-bbd0ed1", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_set3-f9bbffb", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_set3.py", "infile_hash": "c4e83ae667bdaa458fd271a51e15d6c5f9a666f006e31de27a897571", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_set3-bbd0ed1.stderr", + "stderr": "asr-test_set3-f9bbffb.stderr", "stderr_hash": "1ec6cfef0827e97a905c5927de43b74452777394b1f5110e94e5cf97", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_set3-bbd0ed1.stderr b/tests/reference/asr-test_set3-f9bbffb.stderr similarity index 100% rename from tests/reference/asr-test_set3-bbd0ed1.stderr rename to tests/reference/asr-test_set3-f9bbffb.stderr diff --git a/tests/reference/asr-test_set_indexing-cd60f9d.json b/tests/reference/asr-test_set_indexing-a1c21b8.json similarity index 64% rename from tests/reference/asr-test_set_indexing-cd60f9d.json rename to tests/reference/asr-test_set_indexing-a1c21b8.json index c2e31db512..6bb6e96be3 100644 --- a/tests/reference/asr-test_set_indexing-cd60f9d.json +++ b/tests/reference/asr-test_set_indexing-a1c21b8.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_set_indexing-cd60f9d", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_set_indexing-a1c21b8", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_set_indexing.py", "infile_hash": "24f02fc93b8ed20f1c9ea7ae862faa087d070ec288577b90b90b3bc5", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_set_indexing-cd60f9d.stderr", + "stderr": "asr-test_set_indexing-a1c21b8.stderr", "stderr_hash": "fe69096aca9c3be072acac0e28081e5378f30d4ba335176abc76c555", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_set_indexing-cd60f9d.stderr b/tests/reference/asr-test_set_indexing-a1c21b8.stderr similarity index 100% rename from tests/reference/asr-test_set_indexing-cd60f9d.stderr rename to tests/reference/asr-test_set_indexing-a1c21b8.stderr diff --git a/tests/reference/asr-test_str_capitalize-c5a2a24.json b/tests/reference/asr-test_str_capitalize-9f8dfa9.json similarity index 64% rename from tests/reference/asr-test_str_capitalize-c5a2a24.json rename to tests/reference/asr-test_str_capitalize-9f8dfa9.json index cdd4968eb3..88a959a54d 100644 --- a/tests/reference/asr-test_str_capitalize-c5a2a24.json +++ b/tests/reference/asr-test_str_capitalize-9f8dfa9.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_str_capitalize-c5a2a24", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_str_capitalize-9f8dfa9", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_str_capitalize.py", "infile_hash": "692d46b579b69174d3f9bc7091d1b79d6e003fd14bc669a6f93dcb80", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_str_capitalize-c5a2a24.stderr", + "stderr": "asr-test_str_capitalize-9f8dfa9.stderr", "stderr_hash": "7dea3deffeee54e7f479d4c0dbcd7b5aab3b1a28e4a568adfb52cf51", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_str_capitalize-c5a2a24.stderr b/tests/reference/asr-test_str_capitalize-9f8dfa9.stderr similarity index 100% rename from tests/reference/asr-test_str_capitalize-c5a2a24.stderr rename to tests/reference/asr-test_str_capitalize-9f8dfa9.stderr diff --git a/tests/reference/asr-test_str_indexing-433fbfd.json b/tests/reference/asr-test_str_indexing-b200a4e.json similarity index 64% rename from tests/reference/asr-test_str_indexing-433fbfd.json rename to tests/reference/asr-test_str_indexing-b200a4e.json index e0539cd5dd..04bd44e9cd 100644 --- a/tests/reference/asr-test_str_indexing-433fbfd.json +++ b/tests/reference/asr-test_str_indexing-b200a4e.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_str_indexing-433fbfd", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_str_indexing-b200a4e", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_str_indexing.py", "infile_hash": "d237030704fd7f04d4cad59083ca0d663561f9be6f3407e3ed04ed78", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_str_indexing-433fbfd.stderr", + "stderr": "asr-test_str_indexing-b200a4e.stderr", "stderr_hash": "1af6d788d13f858af5766c0b273362c72caaf4a5267b20e2087a53b4", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_str_indexing-433fbfd.stderr b/tests/reference/asr-test_str_indexing-b200a4e.stderr similarity index 100% rename from tests/reference/asr-test_str_indexing-433fbfd.stderr rename to tests/reference/asr-test_str_indexing-b200a4e.stderr diff --git a/tests/reference/asr-test_str_slicing-e93553b.json b/tests/reference/asr-test_str_slicing-eca1381.json similarity index 64% rename from tests/reference/asr-test_str_slicing-e93553b.json rename to tests/reference/asr-test_str_slicing-eca1381.json index 4c65f6871f..684a869d6a 100644 --- a/tests/reference/asr-test_str_slicing-e93553b.json +++ b/tests/reference/asr-test_str_slicing-eca1381.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_str_slicing-e93553b", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_str_slicing-eca1381", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_str_slicing.py", "infile_hash": "24041d5ae8086e162ce7fa574ad5877102af8f718ad33bea7006260d", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_str_slicing-e93553b.stderr", + "stderr": "asr-test_str_slicing-eca1381.stderr", "stderr_hash": "7374319e4378d1cc717e1bab3f68f207cb90c40c168d5700c77d189b", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_str_slicing-e93553b.stderr b/tests/reference/asr-test_str_slicing-eca1381.stderr similarity index 100% rename from tests/reference/asr-test_str_slicing-e93553b.stderr rename to tests/reference/asr-test_str_slicing-eca1381.stderr diff --git a/tests/reference/asr-test_str_slicing2-b542789.json b/tests/reference/asr-test_str_slicing2-2f07e9a.json similarity index 64% rename from tests/reference/asr-test_str_slicing2-b542789.json rename to tests/reference/asr-test_str_slicing2-2f07e9a.json index 3800a31257..dc63e9a7b0 100644 --- a/tests/reference/asr-test_str_slicing2-b542789.json +++ b/tests/reference/asr-test_str_slicing2-2f07e9a.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_str_slicing2-b542789", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_str_slicing2-2f07e9a", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_str_slicing2.py", "infile_hash": "eb9027d2b6ec0aba9cc78aeedc1b0b36972ff36b076fecf547eeb014", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_str_slicing2-b542789.stderr", + "stderr": "asr-test_str_slicing2-2f07e9a.stderr", "stderr_hash": "48a9286126c2333bdf5237358bd4ad27acac4a16a78069c9bd36d089", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_str_slicing2-b542789.stderr b/tests/reference/asr-test_str_slicing2-2f07e9a.stderr similarity index 100% rename from tests/reference/asr-test_str_slicing2-b542789.stderr rename to tests/reference/asr-test_str_slicing2-2f07e9a.stderr diff --git a/tests/reference/asr-test_str_slicing3-04a6b27.json b/tests/reference/asr-test_str_slicing3-fe6a03c.json similarity index 64% rename from tests/reference/asr-test_str_slicing3-04a6b27.json rename to tests/reference/asr-test_str_slicing3-fe6a03c.json index d8122f909c..d1fe49fdfe 100644 --- a/tests/reference/asr-test_str_slicing3-04a6b27.json +++ b/tests/reference/asr-test_str_slicing3-fe6a03c.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_str_slicing3-04a6b27", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_str_slicing3-fe6a03c", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_str_slicing3.py", "infile_hash": "b223abc3ec96fe91876fa188259f151d61383687776e8975df45b139", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_str_slicing3-04a6b27.stderr", + "stderr": "asr-test_str_slicing3-fe6a03c.stderr", "stderr_hash": "5f7553d1509bed25d5137abc4fc2cb1d2cb983a1fab81d8d178ed197", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_str_slicing3-04a6b27.stderr b/tests/reference/asr-test_str_slicing3-fe6a03c.stderr similarity index 100% rename from tests/reference/asr-test_str_slicing3-04a6b27.stderr rename to tests/reference/asr-test_str_slicing3-fe6a03c.stderr diff --git a/tests/reference/asr-test_str_to_int-fc70075.json b/tests/reference/asr-test_str_to_int-61553e7.json similarity index 64% rename from tests/reference/asr-test_str_to_int-fc70075.json rename to tests/reference/asr-test_str_to_int-61553e7.json index 9a0858a6a4..ac1093b9c8 100644 --- a/tests/reference/asr-test_str_to_int-fc70075.json +++ b/tests/reference/asr-test_str_to_int-61553e7.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_str_to_int-fc70075", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_str_to_int-61553e7", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_str_to_int.py", "infile_hash": "da0ed82ada98ef2757178c4997af53abc82f4761a0e683a613216c64", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_str_to_int-fc70075.stderr", + "stderr": "asr-test_str_to_int-61553e7.stderr", "stderr_hash": "1998e37d9abe044f164c73ea1e000ce748ed43af5ea14c2eb4715f11", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_str_to_int-fc70075.stderr b/tests/reference/asr-test_str_to_int-61553e7.stderr similarity index 100% rename from tests/reference/asr-test_str_to_int-fc70075.stderr rename to tests/reference/asr-test_str_to_int-61553e7.stderr diff --git a/tests/reference/asr-test_tuple1-05c8313.json b/tests/reference/asr-test_tuple1-7abe88f.json similarity index 65% rename from tests/reference/asr-test_tuple1-05c8313.json rename to tests/reference/asr-test_tuple1-7abe88f.json index 98bfd53010..e308970eea 100644 --- a/tests/reference/asr-test_tuple1-05c8313.json +++ b/tests/reference/asr-test_tuple1-7abe88f.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_tuple1-05c8313", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_tuple1-7abe88f", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_tuple1.py", "infile_hash": "4716ea56ce9d57a0d88ffeb9fca4e09204f7a2c1166a5315c4d1245c", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_tuple1-05c8313.stderr", + "stderr": "asr-test_tuple1-7abe88f.stderr", "stderr_hash": "56df3d46c63077fcdd09c3b54b63e6e096d7d39b2f8cfb61dab0930a", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_tuple1-05c8313.stderr b/tests/reference/asr-test_tuple1-7abe88f.stderr similarity index 100% rename from tests/reference/asr-test_tuple1-05c8313.stderr rename to tests/reference/asr-test_tuple1-7abe88f.stderr diff --git a/tests/reference/asr-test_tuple2-2d7dd26.json b/tests/reference/asr-test_tuple2-b046610.json similarity index 65% rename from tests/reference/asr-test_tuple2-2d7dd26.json rename to tests/reference/asr-test_tuple2-b046610.json index 785f8ee8ed..051ed20bfb 100644 --- a/tests/reference/asr-test_tuple2-2d7dd26.json +++ b/tests/reference/asr-test_tuple2-b046610.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_tuple2-2d7dd26", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_tuple2-b046610", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_tuple2.py", "infile_hash": "84aa4ecdd21f5d633975d08f6927a7d336c47a31c2fd2bc42cae1c7b", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_tuple2-2d7dd26.stderr", + "stderr": "asr-test_tuple2-b046610.stderr", "stderr_hash": "1e22bbde9c9fdc171314f1158dcac6bf6373d94e00c9878f66d7b667", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_tuple2-2d7dd26.stderr b/tests/reference/asr-test_tuple2-b046610.stderr similarity index 100% rename from tests/reference/asr-test_tuple2-2d7dd26.stderr rename to tests/reference/asr-test_tuple2-b046610.stderr diff --git a/tests/reference/asr-test_tuple3-431e112.json b/tests/reference/asr-test_tuple3-19fa47f.json similarity index 65% rename from tests/reference/asr-test_tuple3-431e112.json rename to tests/reference/asr-test_tuple3-19fa47f.json index 4d8d26755e..0a703f17d4 100644 --- a/tests/reference/asr-test_tuple3-431e112.json +++ b/tests/reference/asr-test_tuple3-19fa47f.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_tuple3-431e112", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_tuple3-19fa47f", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_tuple3.py", "infile_hash": "cfa12cc4d8456bfd45e77cc49c5e8d2417181a1443cdaaf8b15c0528", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_tuple3-431e112.stderr", + "stderr": "asr-test_tuple3-19fa47f.stderr", "stderr_hash": "780d951c4bfa3476ee84d16d9a89c5a9255691b270bfb312d974608e", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_tuple3-431e112.stderr b/tests/reference/asr-test_tuple3-19fa47f.stderr similarity index 100% rename from tests/reference/asr-test_tuple3-431e112.stderr rename to tests/reference/asr-test_tuple3-19fa47f.stderr diff --git a/tests/reference/asr-test_type_mismatch_01-5b45109.json b/tests/reference/asr-test_type_mismatch_01-09e8af3.json similarity index 63% rename from tests/reference/asr-test_type_mismatch_01-5b45109.json rename to tests/reference/asr-test_type_mismatch_01-09e8af3.json index 62f567b372..ce2513c935 100644 --- a/tests/reference/asr-test_type_mismatch_01-5b45109.json +++ b/tests/reference/asr-test_type_mismatch_01-09e8af3.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_type_mismatch_01-5b45109", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_type_mismatch_01-09e8af3", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_type_mismatch_01.py", "infile_hash": "58baa8f4a5094bfa977527f92814a375ceea1f9a99c08e43bdd18ad4", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_type_mismatch_01-5b45109.stderr", + "stderr": "asr-test_type_mismatch_01-09e8af3.stderr", "stderr_hash": "78ff11b22438e133b740e778063db612841fb15ef00f8599bdf8602c", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_type_mismatch_01-5b45109.stderr b/tests/reference/asr-test_type_mismatch_01-09e8af3.stderr similarity index 100% rename from tests/reference/asr-test_type_mismatch_01-5b45109.stderr rename to tests/reference/asr-test_type_mismatch_01-09e8af3.stderr diff --git a/tests/reference/asr-test_unsupported_type-1f16a93.json b/tests/reference/asr-test_unsupported_type-0d813dd.json similarity index 63% rename from tests/reference/asr-test_unsupported_type-1f16a93.json rename to tests/reference/asr-test_unsupported_type-0d813dd.json index b9f8376465..357b39f378 100644 --- a/tests/reference/asr-test_unsupported_type-1f16a93.json +++ b/tests/reference/asr-test_unsupported_type-0d813dd.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_unsupported_type-1f16a93", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_unsupported_type-0d813dd", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_unsupported_type.py", "infile_hash": "ff3af4fffe097c4ecd6ab673301b37806aefdd77c661d5b4afbbfc5d", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_unsupported_type-1f16a93.stderr", + "stderr": "asr-test_unsupported_type-0d813dd.stderr", "stderr_hash": "1675de57db132a5a4a589070d7c54ff23a57532bd967ccb416ff8c2a", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_unsupported_type-1f16a93.stderr b/tests/reference/asr-test_unsupported_type-0d813dd.stderr similarity index 100% rename from tests/reference/asr-test_unsupported_type-1f16a93.stderr rename to tests/reference/asr-test_unsupported_type-0d813dd.stderr diff --git a/tests/reference/asr-test_zero_division-96c56ec.json b/tests/reference/asr-test_zero_division-3dd84e8.json similarity index 64% rename from tests/reference/asr-test_zero_division-96c56ec.json rename to tests/reference/asr-test_zero_division-3dd84e8.json index e0e2290db0..129e181bef 100644 --- a/tests/reference/asr-test_zero_division-96c56ec.json +++ b/tests/reference/asr-test_zero_division-3dd84e8.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_zero_division-96c56ec", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_zero_division-3dd84e8", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_zero_division.py", "infile_hash": "cef09721d9ea9f3846f213e1b1718f2aac2edba08d555af776293504", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_zero_division-96c56ec.stderr", + "stderr": "asr-test_zero_division-3dd84e8.stderr", "stderr_hash": "9403e36c7ace95241bf1d59a108732b298fbee5425c44455fb81ac77", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_zero_division-96c56ec.stderr b/tests/reference/asr-test_zero_division-3dd84e8.stderr similarity index 100% rename from tests/reference/asr-test_zero_division-96c56ec.stderr rename to tests/reference/asr-test_zero_division-3dd84e8.stderr diff --git a/tests/reference/asr-test_zero_division2-8edba44.json b/tests/reference/asr-test_zero_division2-d84989f.json similarity index 64% rename from tests/reference/asr-test_zero_division2-8edba44.json rename to tests/reference/asr-test_zero_division2-d84989f.json index 3665859905..b9a7de7d1e 100644 --- a/tests/reference/asr-test_zero_division2-8edba44.json +++ b/tests/reference/asr-test_zero_division2-d84989f.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_zero_division2-8edba44", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_zero_division2-d84989f", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_zero_division2.py", "infile_hash": "0ddca188fc2e8d665c5af0d438e34ed8afe255611320caa3a27ed483", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_zero_division2-8edba44.stderr", + "stderr": "asr-test_zero_division2-d84989f.stderr", "stderr_hash": "09fcb9f6244ddf2c2d14cd76ec91274cffd240e24e2b2f1c0697c8b5", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_zero_division2-8edba44.stderr b/tests/reference/asr-test_zero_division2-d84989f.stderr similarity index 100% rename from tests/reference/asr-test_zero_division2-8edba44.stderr rename to tests/reference/asr-test_zero_division2-d84989f.stderr diff --git a/tests/reference/asr-test_zero_division3-55ea2f5.json b/tests/reference/asr-test_zero_division3-29efb9e.json similarity index 64% rename from tests/reference/asr-test_zero_division3-55ea2f5.json rename to tests/reference/asr-test_zero_division3-29efb9e.json index 97a3fc23b2..0c4f4b3d5d 100644 --- a/tests/reference/asr-test_zero_division3-55ea2f5.json +++ b/tests/reference/asr-test_zero_division3-29efb9e.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_zero_division3-55ea2f5", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_zero_division3-29efb9e", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_zero_division3.py", "infile_hash": "41a589085cd6154cb97f8ed0febadf7c0741f083daa7c9dbbbdde9ca", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_zero_division3-55ea2f5.stderr", + "stderr": "asr-test_zero_division3-29efb9e.stderr", "stderr_hash": "061f891a72cebaa335b5db060b27e04f21f6a09d150f78f1a572c135", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_zero_division3-55ea2f5.stderr b/tests/reference/asr-test_zero_division3-29efb9e.stderr similarity index 100% rename from tests/reference/asr-test_zero_division3-55ea2f5.stderr rename to tests/reference/asr-test_zero_division3-29efb9e.stderr diff --git a/tests/reference/asr-test_zero_division4-67f7c69.json b/tests/reference/asr-test_zero_division4-bf4af64.json similarity index 64% rename from tests/reference/asr-test_zero_division4-67f7c69.json rename to tests/reference/asr-test_zero_division4-bf4af64.json index e3c7a7adbc..e1f6ce6bc0 100644 --- a/tests/reference/asr-test_zero_division4-67f7c69.json +++ b/tests/reference/asr-test_zero_division4-bf4af64.json @@ -1,13 +1,13 @@ { - "basename": "asr-test_zero_division4-67f7c69", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-test_zero_division4-bf4af64", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/test_zero_division4.py", "infile_hash": "87b6a224572c853741dd70f25b05b257d214bd3269a7e71af117057c", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-test_zero_division4-67f7c69.stderr", + "stderr": "asr-test_zero_division4-bf4af64.stderr", "stderr_hash": "1d16ac2d95ab997ff9b94f4028d8741121e41471445179d185264884", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-test_zero_division4-67f7c69.stderr b/tests/reference/asr-test_zero_division4-bf4af64.stderr similarity index 100% rename from tests/reference/asr-test_zero_division4-67f7c69.stderr rename to tests/reference/asr-test_zero_division4-bf4af64.stderr diff --git a/tests/reference/asr-tuple1-ce358d9.json b/tests/reference/asr-tuple1-09972ab.json similarity index 66% rename from tests/reference/asr-tuple1-ce358d9.json rename to tests/reference/asr-tuple1-09972ab.json index 70045861e3..9c213bb2b3 100644 --- a/tests/reference/asr-tuple1-ce358d9.json +++ b/tests/reference/asr-tuple1-09972ab.json @@ -1,11 +1,11 @@ { - "basename": "asr-tuple1-ce358d9", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-tuple1-09972ab", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/tuple1.py", "infile_hash": "0ad9c210f19f9e560890c7a67ed06f4a710bbc8535c0097c35736028", "outfile": null, "outfile_hash": null, - "stdout": "asr-tuple1-ce358d9.stdout", + "stdout": "asr-tuple1-09972ab.stdout", "stdout_hash": "cca445b87818b178705c256b1c5bff51fd74459cf52d573f2c20914d", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-tuple1-ce358d9.stdout b/tests/reference/asr-tuple1-09972ab.stdout similarity index 100% rename from tests/reference/asr-tuple1-ce358d9.stdout rename to tests/reference/asr-tuple1-09972ab.stdout diff --git a/tests/reference/asr-type_mismatch-865037b.json b/tests/reference/asr-type_mismatch-61052c7.json similarity index 65% rename from tests/reference/asr-type_mismatch-865037b.json rename to tests/reference/asr-type_mismatch-61052c7.json index c9e3bdda25..80ce9f69b3 100644 --- a/tests/reference/asr-type_mismatch-865037b.json +++ b/tests/reference/asr-type_mismatch-61052c7.json @@ -1,13 +1,13 @@ { - "basename": "asr-type_mismatch-865037b", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-type_mismatch-61052c7", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/type_mismatch.py", "infile_hash": "45ee4815e13c9fc4d58572a2f4ec01f5546e1f67878a2913bda89e5c", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, - "stderr": "asr-type_mismatch-865037b.stderr", + "stderr": "asr-type_mismatch-61052c7.stderr", "stderr_hash": "8c0de9edb133ff8cfa5c0e7c6b2a8d425c5d84a5ec98844eb367040c", "returncode": 2 } \ No newline at end of file diff --git a/tests/reference/asr-type_mismatch-865037b.stderr b/tests/reference/asr-type_mismatch-61052c7.stderr similarity index 100% rename from tests/reference/asr-type_mismatch-865037b.stderr rename to tests/reference/asr-type_mismatch-61052c7.stderr diff --git a/tests/reference/asr-vec_01-9b22f33.json b/tests/reference/asr-vec_01-66ac423.json similarity index 67% rename from tests/reference/asr-vec_01-9b22f33.json rename to tests/reference/asr-vec_01-66ac423.json index a2471b09c0..8963ae6f7b 100644 --- a/tests/reference/asr-vec_01-9b22f33.json +++ b/tests/reference/asr-vec_01-66ac423.json @@ -1,11 +1,11 @@ { - "basename": "asr-vec_01-9b22f33", - "cmd": "lpython --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "asr-vec_01-66ac423", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/vec_01.py", "infile_hash": "b22cabe2248cf58c7ffaad83dd8dc5b2433f244ee23b0703b536547b", "outfile": null, "outfile_hash": null, - "stdout": "asr-vec_01-9b22f33.stdout", + "stdout": "asr-vec_01-66ac423.stdout", "stdout_hash": "bec37fdcb37bbeedc497e125ea081a1395c8006b9edf8dbc3c1c79be", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/asr-vec_01-9b22f33.stdout b/tests/reference/asr-vec_01-66ac423.stdout similarity index 100% rename from tests/reference/asr-vec_01-9b22f33.stdout rename to tests/reference/asr-vec_01-66ac423.stdout diff --git a/tests/reference/ast-assert1-ca86e1f.json b/tests/reference/ast-assert1-b0154ee.json similarity index 66% rename from tests/reference/ast-assert1-ca86e1f.json rename to tests/reference/ast-assert1-b0154ee.json index 502fec0b1d..8158218cc4 100644 --- a/tests/reference/ast-assert1-ca86e1f.json +++ b/tests/reference/ast-assert1-b0154ee.json @@ -1,11 +1,11 @@ { - "basename": "ast-assert1-ca86e1f", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-assert1-b0154ee", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/assert1.py", "infile_hash": "0ff84ea5ccd3d0815cbb66e1c3d3acd61dee7257c98aa1a27ceeef3b", "outfile": null, "outfile_hash": null, - "stdout": "ast-assert1-ca86e1f.stdout", + "stdout": "ast-assert1-b0154ee.stdout", "stdout_hash": "f5e00f32dc7ae2feda2e3c495b42ae3f193a79baf8b42e313373aa4b", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-assert1-ca86e1f.stdout b/tests/reference/ast-assert1-b0154ee.stdout similarity index 100% rename from tests/reference/ast-assert1-ca86e1f.stdout rename to tests/reference/ast-assert1-b0154ee.stdout diff --git a/tests/reference/ast-assign1-f667542.json b/tests/reference/ast-assign1-2a4c9ed.json similarity index 66% rename from tests/reference/ast-assign1-f667542.json rename to tests/reference/ast-assign1-2a4c9ed.json index 08709cd773..49bfe84ecb 100644 --- a/tests/reference/ast-assign1-f667542.json +++ b/tests/reference/ast-assign1-2a4c9ed.json @@ -1,11 +1,11 @@ { - "basename": "ast-assign1-f667542", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-assign1-2a4c9ed", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/assign1.py", "infile_hash": "3b82a73e457bd65e85828b72d56596ca927e7c661e333691f154912b", "outfile": null, "outfile_hash": null, - "stdout": "ast-assign1-f667542.stdout", + "stdout": "ast-assign1-2a4c9ed.stdout", "stdout_hash": "96e9236f069321ffb388a891be45a46f55c581bd96d509685be54f86", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-assign1-f667542.stdout b/tests/reference/ast-assign1-2a4c9ed.stdout similarity index 100% rename from tests/reference/ast-assign1-f667542.stdout rename to tests/reference/ast-assign1-2a4c9ed.stdout diff --git a/tests/reference/ast-complex1-b52cd7b.json b/tests/reference/ast-complex1-800b4bb.json similarity index 65% rename from tests/reference/ast-complex1-b52cd7b.json rename to tests/reference/ast-complex1-800b4bb.json index 1d4e994ae2..e71d8dddfa 100644 --- a/tests/reference/ast-complex1-b52cd7b.json +++ b/tests/reference/ast-complex1-800b4bb.json @@ -1,11 +1,11 @@ { - "basename": "ast-complex1-b52cd7b", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-complex1-800b4bb", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/complex1.py", "infile_hash": "60b45de7b88ec768d70a3122b36545e9604a86504ed6e5d9d813c719", "outfile": null, "outfile_hash": null, - "stdout": "ast-complex1-b52cd7b.stdout", + "stdout": "ast-complex1-800b4bb.stdout", "stdout_hash": "30482dce2a68624ef71ed52e4c4ce4122e1f2efddcef40bee2a3b10e", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-complex1-b52cd7b.stdout b/tests/reference/ast-complex1-800b4bb.stdout similarity index 100% rename from tests/reference/ast-complex1-b52cd7b.stdout rename to tests/reference/ast-complex1-800b4bb.stdout diff --git a/tests/reference/ast-constants1-66d568d.json b/tests/reference/ast-constants1-91cb6ff.json similarity index 65% rename from tests/reference/ast-constants1-66d568d.json rename to tests/reference/ast-constants1-91cb6ff.json index 9d39da6e8a..f84e32ca40 100644 --- a/tests/reference/ast-constants1-66d568d.json +++ b/tests/reference/ast-constants1-91cb6ff.json @@ -1,11 +1,11 @@ { - "basename": "ast-constants1-66d568d", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-constants1-91cb6ff", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/constants1.py", "infile_hash": "5dca391c30a1477fb903e17c1d47dad3b9b816088384ba61ff372db1", "outfile": null, "outfile_hash": null, - "stdout": "ast-constants1-66d568d.stdout", + "stdout": "ast-constants1-91cb6ff.stdout", "stdout_hash": "8c7b5384e18cfcea4b080c39a4d367fc8a57a6785ad936454005d6b1", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-constants1-66d568d.stdout b/tests/reference/ast-constants1-91cb6ff.stdout similarity index 100% rename from tests/reference/ast-constants1-66d568d.stdout rename to tests/reference/ast-constants1-91cb6ff.stdout diff --git a/tests/reference/ast-dictionary1-817b071.json b/tests/reference/ast-dictionary1-1a7e00a.json similarity index 65% rename from tests/reference/ast-dictionary1-817b071.json rename to tests/reference/ast-dictionary1-1a7e00a.json index 695b090de7..41583be770 100644 --- a/tests/reference/ast-dictionary1-817b071.json +++ b/tests/reference/ast-dictionary1-1a7e00a.json @@ -1,11 +1,11 @@ { - "basename": "ast-dictionary1-817b071", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-dictionary1-1a7e00a", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/dictionary1.py", "infile_hash": "2d9f15b746aa8185afb3f2dc6415c20a7edccc8e711df1b323178d94", "outfile": null, "outfile_hash": null, - "stdout": "ast-dictionary1-817b071.stdout", + "stdout": "ast-dictionary1-1a7e00a.stdout", "stdout_hash": "cd85b7fa2f2f43a4be7a88c54d582616f529b9acee1de757eb361bd7", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-dictionary1-817b071.stdout b/tests/reference/ast-dictionary1-1a7e00a.stdout similarity index 100% rename from tests/reference/ast-dictionary1-817b071.stdout rename to tests/reference/ast-dictionary1-1a7e00a.stdout diff --git a/tests/reference/ast-doconcurrentloop_01-5646034.json b/tests/reference/ast-doconcurrentloop_01-ed7017b.json similarity index 63% rename from tests/reference/ast-doconcurrentloop_01-5646034.json rename to tests/reference/ast-doconcurrentloop_01-ed7017b.json index 8ed67434ae..f535d23ee8 100644 --- a/tests/reference/ast-doconcurrentloop_01-5646034.json +++ b/tests/reference/ast-doconcurrentloop_01-ed7017b.json @@ -1,11 +1,11 @@ { - "basename": "ast-doconcurrentloop_01-5646034", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-doconcurrentloop_01-ed7017b", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/doconcurrentloop_01.py", "infile_hash": "2fe3769863a595a01e46a88bf55c944e61a0d141d5c75816ffa74d96", "outfile": null, "outfile_hash": null, - "stdout": "ast-doconcurrentloop_01-5646034.stdout", + "stdout": "ast-doconcurrentloop_01-ed7017b.stdout", "stdout_hash": "3967d9e6602dfb4fd3fdab3718811979d4745dc0a97060f9b281e0e9", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-doconcurrentloop_01-5646034.stdout b/tests/reference/ast-doconcurrentloop_01-ed7017b.stdout similarity index 100% rename from tests/reference/ast-doconcurrentloop_01-5646034.stdout rename to tests/reference/ast-doconcurrentloop_01-ed7017b.stdout diff --git a/tests/reference/ast-ellipsis1-dcbe16f.json b/tests/reference/ast-ellipsis1-4f6c4dd.json similarity index 66% rename from tests/reference/ast-ellipsis1-dcbe16f.json rename to tests/reference/ast-ellipsis1-4f6c4dd.json index 9759ff25d8..1e53be9f78 100644 --- a/tests/reference/ast-ellipsis1-dcbe16f.json +++ b/tests/reference/ast-ellipsis1-4f6c4dd.json @@ -1,11 +1,11 @@ { - "basename": "ast-ellipsis1-dcbe16f", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-ellipsis1-4f6c4dd", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/parser/ellipsis1.py", "infile_hash": "24df29cba718c679016f3758a2eccafbeb9cfebd56265fd8da16bee1", "outfile": null, "outfile_hash": null, - "stdout": "ast-ellipsis1-dcbe16f.stdout", + "stdout": "ast-ellipsis1-4f6c4dd.stdout", "stdout_hash": "6d6aef7896c1a43a27f489cb283c508b2bf1238ff6ad0c807b58b9e7", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-ellipsis1-dcbe16f.stdout b/tests/reference/ast-ellipsis1-4f6c4dd.stdout similarity index 100% rename from tests/reference/ast-ellipsis1-dcbe16f.stdout rename to tests/reference/ast-ellipsis1-4f6c4dd.stdout diff --git a/tests/reference/ast-expr1-20cdacc.json b/tests/reference/ast-expr1-1e8f7b1.json similarity index 66% rename from tests/reference/ast-expr1-20cdacc.json rename to tests/reference/ast-expr1-1e8f7b1.json index a524ac881a..004b2a39e0 100644 --- a/tests/reference/ast-expr1-20cdacc.json +++ b/tests/reference/ast-expr1-1e8f7b1.json @@ -1,11 +1,11 @@ { - "basename": "ast-expr1-20cdacc", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-expr1-1e8f7b1", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/expr1.py", "infile_hash": "a0c9e93e40f29b7d4541f8c513de490a892abf78a34700478d1827dd", "outfile": null, "outfile_hash": null, - "stdout": "ast-expr1-20cdacc.stdout", + "stdout": "ast-expr1-1e8f7b1.stdout", "stdout_hash": "8de807242a73633d63f3e92bed88eacdd9f283f479d9adf11fefb1fd", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-expr1-20cdacc.stdout b/tests/reference/ast-expr1-1e8f7b1.stdout similarity index 100% rename from tests/reference/ast-expr1-20cdacc.stdout rename to tests/reference/ast-expr1-1e8f7b1.stdout diff --git a/tests/reference/ast-expr10-49c656f.json b/tests/reference/ast-expr10-a8d646d.json similarity index 66% rename from tests/reference/ast-expr10-49c656f.json rename to tests/reference/ast-expr10-a8d646d.json index 959c3f57e8..8f0222f7aa 100644 --- a/tests/reference/ast-expr10-49c656f.json +++ b/tests/reference/ast-expr10-a8d646d.json @@ -1,11 +1,11 @@ { - "basename": "ast-expr10-49c656f", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-expr10-a8d646d", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/expr10.py", "infile_hash": "7eb1dd6ad27fcc091e18c4447fb7a56c659565bbdb57f567b68f4a58", "outfile": null, "outfile_hash": null, - "stdout": "ast-expr10-49c656f.stdout", + "stdout": "ast-expr10-a8d646d.stdout", "stdout_hash": "b807dc54b7741e61fd091d70d83c68d7c58c2c38fd5a22b279217916", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-expr10-49c656f.stdout b/tests/reference/ast-expr10-a8d646d.stdout similarity index 100% rename from tests/reference/ast-expr10-49c656f.stdout rename to tests/reference/ast-expr10-a8d646d.stdout diff --git a/tests/reference/ast-expr11-df775f8.json b/tests/reference/ast-expr11-1d29f78.json similarity index 66% rename from tests/reference/ast-expr11-df775f8.json rename to tests/reference/ast-expr11-1d29f78.json index c3bc456564..d3ebc1ed40 100644 --- a/tests/reference/ast-expr11-df775f8.json +++ b/tests/reference/ast-expr11-1d29f78.json @@ -1,11 +1,11 @@ { - "basename": "ast-expr11-df775f8", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-expr11-1d29f78", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/expr11.py", "infile_hash": "940f2d32759315dfb8d54ea50819f2bfef9737e486615703609fd47a", "outfile": null, "outfile_hash": null, - "stdout": "ast-expr11-df775f8.stdout", + "stdout": "ast-expr11-1d29f78.stdout", "stdout_hash": "60719c0d166865f8157e6479a6bd6fc7d300b2d2eff48d8b1553fc8c", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-expr11-df775f8.stdout b/tests/reference/ast-expr11-1d29f78.stdout similarity index 100% rename from tests/reference/ast-expr11-df775f8.stdout rename to tests/reference/ast-expr11-1d29f78.stdout diff --git a/tests/reference/ast-expr12-49f1f8d.json b/tests/reference/ast-expr12-adaecda.json similarity index 66% rename from tests/reference/ast-expr12-49f1f8d.json rename to tests/reference/ast-expr12-adaecda.json index daa8ba6936..6fa2133b08 100644 --- a/tests/reference/ast-expr12-49f1f8d.json +++ b/tests/reference/ast-expr12-adaecda.json @@ -1,11 +1,11 @@ { - "basename": "ast-expr12-49f1f8d", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-expr12-adaecda", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/expr12.py", "infile_hash": "bad9ac6e0956fddb636f4e806f4a97c27396adc2416640bd291d2dc8", "outfile": null, "outfile_hash": null, - "stdout": "ast-expr12-49f1f8d.stdout", + "stdout": "ast-expr12-adaecda.stdout", "stdout_hash": "b4fdb14f66196f4692126efb3b349707d3f862d6c045b61125af41cb", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-expr12-49f1f8d.stdout b/tests/reference/ast-expr12-adaecda.stdout similarity index 100% rename from tests/reference/ast-expr12-49f1f8d.stdout rename to tests/reference/ast-expr12-adaecda.stdout diff --git a/tests/reference/ast-expr13-b25242b.json b/tests/reference/ast-expr13-c35ace1.json similarity index 66% rename from tests/reference/ast-expr13-b25242b.json rename to tests/reference/ast-expr13-c35ace1.json index 6516d866e7..8da96d5109 100644 --- a/tests/reference/ast-expr13-b25242b.json +++ b/tests/reference/ast-expr13-c35ace1.json @@ -1,11 +1,11 @@ { - "basename": "ast-expr13-b25242b", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-expr13-c35ace1", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/expr13.py", "infile_hash": "fae72924c71183c45d328b379dfa81aa4971b5e1a9ea668db546078f", "outfile": null, "outfile_hash": null, - "stdout": "ast-expr13-b25242b.stdout", + "stdout": "ast-expr13-c35ace1.stdout", "stdout_hash": "e92fa43a3f8dd1bdf555b71e6f5a263a5a5c10a8f63582fb57d04ce6", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-expr13-b25242b.stdout b/tests/reference/ast-expr13-c35ace1.stdout similarity index 100% rename from tests/reference/ast-expr13-b25242b.stdout rename to tests/reference/ast-expr13-c35ace1.stdout diff --git a/tests/reference/ast-expr2-58df65e.json b/tests/reference/ast-expr2-6642d4a.json similarity index 66% rename from tests/reference/ast-expr2-58df65e.json rename to tests/reference/ast-expr2-6642d4a.json index 057d57ab84..779b2b5411 100644 --- a/tests/reference/ast-expr2-58df65e.json +++ b/tests/reference/ast-expr2-6642d4a.json @@ -1,11 +1,11 @@ { - "basename": "ast-expr2-58df65e", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-expr2-6642d4a", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/expr2.py", "infile_hash": "52d7d4d33553138f2cf55b9900047e5310c54d62e54b3ca1fa394024", "outfile": null, "outfile_hash": null, - "stdout": "ast-expr2-58df65e.stdout", + "stdout": "ast-expr2-6642d4a.stdout", "stdout_hash": "cf996ecb8e3abdced429c59eedcbd9943bf59bbf22dcfd79ef94f799", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-expr2-58df65e.stdout b/tests/reference/ast-expr2-6642d4a.stdout similarity index 100% rename from tests/reference/ast-expr2-58df65e.stdout rename to tests/reference/ast-expr2-6642d4a.stdout diff --git a/tests/reference/ast-expr4-78d463e.json b/tests/reference/ast-expr4-49316cb.json similarity index 66% rename from tests/reference/ast-expr4-78d463e.json rename to tests/reference/ast-expr4-49316cb.json index c70eae908b..f60410170c 100644 --- a/tests/reference/ast-expr4-78d463e.json +++ b/tests/reference/ast-expr4-49316cb.json @@ -1,11 +1,11 @@ { - "basename": "ast-expr4-78d463e", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-expr4-49316cb", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/expr4.py", "infile_hash": "5cba7a5d589f54fc31463e48903d5b46604fb64e3e64ba215339047c", "outfile": null, "outfile_hash": null, - "stdout": "ast-expr4-78d463e.stdout", + "stdout": "ast-expr4-49316cb.stdout", "stdout_hash": "8f1ed7fd76dff70c8cca71bda8f528f3e12bda9bb716e3e32ed58657", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-expr4-78d463e.stdout b/tests/reference/ast-expr4-49316cb.stdout similarity index 100% rename from tests/reference/ast-expr4-78d463e.stdout rename to tests/reference/ast-expr4-49316cb.stdout diff --git a/tests/reference/ast-expr5-5e64a6e.json b/tests/reference/ast-expr5-bbc6e71.json similarity index 66% rename from tests/reference/ast-expr5-5e64a6e.json rename to tests/reference/ast-expr5-bbc6e71.json index 48209aa837..93662179fd 100644 --- a/tests/reference/ast-expr5-5e64a6e.json +++ b/tests/reference/ast-expr5-bbc6e71.json @@ -1,11 +1,11 @@ { - "basename": "ast-expr5-5e64a6e", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-expr5-bbc6e71", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/expr5.py", "infile_hash": "7bbb5f9dacb13556f99de8f2969f9089235fea372fc2f43fc9c4bb18", "outfile": null, "outfile_hash": null, - "stdout": "ast-expr5-5e64a6e.stdout", + "stdout": "ast-expr5-bbc6e71.stdout", "stdout_hash": "f856520f5cd00933d05c95de857ee6527c9a5ed476070c6d13857a40", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-expr5-5e64a6e.stdout b/tests/reference/ast-expr5-bbc6e71.stdout similarity index 100% rename from tests/reference/ast-expr5-5e64a6e.stdout rename to tests/reference/ast-expr5-bbc6e71.stdout diff --git a/tests/reference/ast-expr6-9ba0998.json b/tests/reference/ast-expr6-0b12a67.json similarity index 66% rename from tests/reference/ast-expr6-9ba0998.json rename to tests/reference/ast-expr6-0b12a67.json index 68aac2183a..5b9e9c3ec4 100644 --- a/tests/reference/ast-expr6-9ba0998.json +++ b/tests/reference/ast-expr6-0b12a67.json @@ -1,11 +1,11 @@ { - "basename": "ast-expr6-9ba0998", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-expr6-0b12a67", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/expr6.py", "infile_hash": "1f3b5a7d997851264e679d58353346835eb450c608f6da7d2f5e5cd2", "outfile": null, "outfile_hash": null, - "stdout": "ast-expr6-9ba0998.stdout", + "stdout": "ast-expr6-0b12a67.stdout", "stdout_hash": "52edb5a692f7bc13f8c9642228f19a7e93960271cd3513a26a97df5d", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-expr6-9ba0998.stdout b/tests/reference/ast-expr6-0b12a67.stdout similarity index 100% rename from tests/reference/ast-expr6-9ba0998.stdout rename to tests/reference/ast-expr6-0b12a67.stdout diff --git a/tests/reference/ast-expr7-bf4cb65.json b/tests/reference/ast-expr7-fe52776.json similarity index 66% rename from tests/reference/ast-expr7-bf4cb65.json rename to tests/reference/ast-expr7-fe52776.json index ad7cb10d99..f24345a89e 100644 --- a/tests/reference/ast-expr7-bf4cb65.json +++ b/tests/reference/ast-expr7-fe52776.json @@ -1,11 +1,11 @@ { - "basename": "ast-expr7-bf4cb65", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-expr7-fe52776", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/expr7.py", "infile_hash": "7ef1383d1798621ee35adb7296bfe66dcdc08a21ac8dc86b9ce42878", "outfile": null, "outfile_hash": null, - "stdout": "ast-expr7-bf4cb65.stdout", + "stdout": "ast-expr7-fe52776.stdout", "stdout_hash": "5bf8b877e7cfee7d365d1c03622cced374fd006625e861154c8edc1b", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-expr7-bf4cb65.stdout b/tests/reference/ast-expr7-fe52776.stdout similarity index 100% rename from tests/reference/ast-expr7-bf4cb65.stdout rename to tests/reference/ast-expr7-fe52776.stdout diff --git a/tests/reference/ast-expr8-beffee3.json b/tests/reference/ast-expr8-7db6b28.json similarity index 66% rename from tests/reference/ast-expr8-beffee3.json rename to tests/reference/ast-expr8-7db6b28.json index bf684d604e..cdac33386b 100644 --- a/tests/reference/ast-expr8-beffee3.json +++ b/tests/reference/ast-expr8-7db6b28.json @@ -1,11 +1,11 @@ { - "basename": "ast-expr8-beffee3", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-expr8-7db6b28", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/expr8.py", "infile_hash": "6966e19cf343700cbc11ec1bf6a495e43c685c6fa065669875aa61ce", "outfile": null, "outfile_hash": null, - "stdout": "ast-expr8-beffee3.stdout", + "stdout": "ast-expr8-7db6b28.stdout", "stdout_hash": "b739c4d505f4e1c1a01c7ceaf6230f3a489bd9285a056bfda3a995c2", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-expr8-beffee3.stdout b/tests/reference/ast-expr8-7db6b28.stdout similarity index 100% rename from tests/reference/ast-expr8-beffee3.stdout rename to tests/reference/ast-expr8-7db6b28.stdout diff --git a/tests/reference/ast-expr9-187e786.json b/tests/reference/ast-expr9-d184496.json similarity index 66% rename from tests/reference/ast-expr9-187e786.json rename to tests/reference/ast-expr9-d184496.json index 02977fa415..e177e00997 100644 --- a/tests/reference/ast-expr9-187e786.json +++ b/tests/reference/ast-expr9-d184496.json @@ -1,11 +1,11 @@ { - "basename": "ast-expr9-187e786", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-expr9-d184496", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/expr9.py", "infile_hash": "1f02a7486b298ae9e74a163875a76f8fa7cc25d7f50547133dbbdfab", "outfile": null, "outfile_hash": null, - "stdout": "ast-expr9-187e786.stdout", + "stdout": "ast-expr9-d184496.stdout", "stdout_hash": "53f5e472ca197da7600955039541adb81d458cf53ea6e9c27b742adb", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-expr9-187e786.stdout b/tests/reference/ast-expr9-d184496.stdout similarity index 100% rename from tests/reference/ast-expr9-187e786.stdout rename to tests/reference/ast-expr9-d184496.stdout diff --git a/tests/reference/ast-expr_01-2d63276.json b/tests/reference/ast-expr_01-d0927f9.json similarity index 66% rename from tests/reference/ast-expr_01-2d63276.json rename to tests/reference/ast-expr_01-d0927f9.json index 8da4d69bbe..45b1c2df0e 100644 --- a/tests/reference/ast-expr_01-2d63276.json +++ b/tests/reference/ast-expr_01-d0927f9.json @@ -1,11 +1,11 @@ { - "basename": "ast-expr_01-2d63276", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-expr_01-d0927f9", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/expr_01.py", "infile_hash": "4284fe3a1b4dd3e5d1de1357a79e9a25b426ca245b4cc91cf99e8547", "outfile": null, "outfile_hash": null, - "stdout": "ast-expr_01-2d63276.stdout", + "stdout": "ast-expr_01-d0927f9.stdout", "stdout_hash": "ba3af72a124b03f3aa21ae8a31d25ef05ee2f442dcf6b9759a659c98", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-expr_01-2d63276.stdout b/tests/reference/ast-expr_01-d0927f9.stdout similarity index 100% rename from tests/reference/ast-expr_01-2d63276.stdout rename to tests/reference/ast-expr_01-d0927f9.stdout diff --git a/tests/reference/ast-global1-36fd19b.json b/tests/reference/ast-global1-b2690cf.json similarity index 66% rename from tests/reference/ast-global1-36fd19b.json rename to tests/reference/ast-global1-b2690cf.json index 49b10aaa6e..a5a57d4dcb 100644 --- a/tests/reference/ast-global1-36fd19b.json +++ b/tests/reference/ast-global1-b2690cf.json @@ -1,11 +1,11 @@ { - "basename": "ast-global1-36fd19b", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-global1-b2690cf", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/parser/global1.py", "infile_hash": "cdbcc3f545f865cfc6e412f53fc6fd7cccdbc0d33b66e45460f3e916", "outfile": null, "outfile_hash": null, - "stdout": "ast-global1-36fd19b.stdout", + "stdout": "ast-global1-b2690cf.stdout", "stdout_hash": "b0b999497a27625582a6dedfa024dba012a6ac1103ac427c49cc7d9d", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-global1-36fd19b.stdout b/tests/reference/ast-global1-b2690cf.stdout similarity index 100% rename from tests/reference/ast-global1-36fd19b.stdout rename to tests/reference/ast-global1-b2690cf.stdout diff --git a/tests/reference/ast-global_scope1-7809fe0.json b/tests/reference/ast-global_scope1-1d68a6c.json similarity index 64% rename from tests/reference/ast-global_scope1-7809fe0.json rename to tests/reference/ast-global_scope1-1d68a6c.json index d5a44b76c6..44e3204dee 100644 --- a/tests/reference/ast-global_scope1-7809fe0.json +++ b/tests/reference/ast-global_scope1-1d68a6c.json @@ -1,11 +1,11 @@ { - "basename": "ast-global_scope1-7809fe0", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-global_scope1-1d68a6c", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/global_scope1.py", "infile_hash": "e7b33a2680429ee47d15af5af7c31ac24cc802d18d5566b568fc8ef4", "outfile": null, "outfile_hash": null, - "stdout": "ast-global_scope1-7809fe0.stdout", + "stdout": "ast-global_scope1-1d68a6c.stdout", "stdout_hash": "3311aec1626b395dc1c35208afdb7e3ddab90ac70a8a43f4f3e31325", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-global_scope1-7809fe0.stdout b/tests/reference/ast-global_scope1-1d68a6c.stdout similarity index 100% rename from tests/reference/ast-global_scope1-7809fe0.stdout rename to tests/reference/ast-global_scope1-1d68a6c.stdout diff --git a/tests/reference/ast-list1-2e4b88a.json b/tests/reference/ast-list1-9ce2da0.json similarity index 66% rename from tests/reference/ast-list1-2e4b88a.json rename to tests/reference/ast-list1-9ce2da0.json index c0fa20f90c..af1c5005eb 100644 --- a/tests/reference/ast-list1-2e4b88a.json +++ b/tests/reference/ast-list1-9ce2da0.json @@ -1,11 +1,11 @@ { - "basename": "ast-list1-2e4b88a", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-list1-9ce2da0", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/list1.py", "infile_hash": "9d6b3f1a83a585d5a7a5e50ff5e1ddd15705fce268208d0cc2749514", "outfile": null, "outfile_hash": null, - "stdout": "ast-list1-2e4b88a.stdout", + "stdout": "ast-list1-9ce2da0.stdout", "stdout_hash": "fea2e7f56f26d3848224a3ca52219f76e456b2f4066e1156c22896f5", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-list1-2e4b88a.stdout b/tests/reference/ast-list1-9ce2da0.stdout similarity index 100% rename from tests/reference/ast-list1-2e4b88a.stdout rename to tests/reference/ast-list1-9ce2da0.stdout diff --git a/tests/reference/ast-loop1-d1c242e.json b/tests/reference/ast-loop1-194a137.json similarity index 66% rename from tests/reference/ast-loop1-d1c242e.json rename to tests/reference/ast-loop1-194a137.json index 0eb860c696..44f8695ff2 100644 --- a/tests/reference/ast-loop1-d1c242e.json +++ b/tests/reference/ast-loop1-194a137.json @@ -1,11 +1,11 @@ { - "basename": "ast-loop1-d1c242e", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-loop1-194a137", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/loop1.py", "infile_hash": "324b018f29f7dffbd326e77b7ff9b6a9286837d573ed28f9d86e0311", "outfile": null, "outfile_hash": null, - "stdout": "ast-loop1-d1c242e.stdout", + "stdout": "ast-loop1-194a137.stdout", "stdout_hash": "f4a9db8f60a56098bbd7f524f0e0a64fdad95cbe3ca44412879489e3", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-loop1-d1c242e.stdout b/tests/reference/ast-loop1-194a137.stdout similarity index 100% rename from tests/reference/ast-loop1-d1c242e.stdout rename to tests/reference/ast-loop1-194a137.stdout diff --git a/tests/reference/ast-loop2-44a8219.json b/tests/reference/ast-loop2-63bf329.json similarity index 66% rename from tests/reference/ast-loop2-44a8219.json rename to tests/reference/ast-loop2-63bf329.json index 9dbd7f2821..68666bfef2 100644 --- a/tests/reference/ast-loop2-44a8219.json +++ b/tests/reference/ast-loop2-63bf329.json @@ -1,11 +1,11 @@ { - "basename": "ast-loop2-44a8219", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-loop2-63bf329", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/loop2.py", "infile_hash": "7946c522ceb16f99810780d4aba7fa2593695a4b49fb35ea1f131f53", "outfile": null, "outfile_hash": null, - "stdout": "ast-loop2-44a8219.stdout", + "stdout": "ast-loop2-63bf329.stdout", "stdout_hash": "23d093b4e41f70ed85927ef9c365b448a2268de74c6c916d14148bc1", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-loop2-44a8219.stdout b/tests/reference/ast-loop2-63bf329.stdout similarity index 100% rename from tests/reference/ast-loop2-44a8219.stdout rename to tests/reference/ast-loop2-63bf329.stdout diff --git a/tests/reference/ast-loop3-c545eab.json b/tests/reference/ast-loop3-f7e0393.json similarity index 66% rename from tests/reference/ast-loop3-c545eab.json rename to tests/reference/ast-loop3-f7e0393.json index 96a3ca31ee..1dc5625553 100644 --- a/tests/reference/ast-loop3-c545eab.json +++ b/tests/reference/ast-loop3-f7e0393.json @@ -1,11 +1,11 @@ { - "basename": "ast-loop3-c545eab", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-loop3-f7e0393", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/loop3.py", "infile_hash": "498c7c40ca352ed21dde33c128aff4d59d3c329e770e3a2ff3eb3fad", "outfile": null, "outfile_hash": null, - "stdout": "ast-loop3-c545eab.stdout", + "stdout": "ast-loop3-f7e0393.stdout", "stdout_hash": "edf8630a987fb8f9e62d064eb7c1d37f08f896b1453a141fd4db15cf", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-loop3-c545eab.stdout b/tests/reference/ast-loop3-f7e0393.stdout similarity index 100% rename from tests/reference/ast-loop3-c545eab.stdout rename to tests/reference/ast-loop3-f7e0393.stdout diff --git a/tests/reference/ast-set1-8938049.json b/tests/reference/ast-set1-ebd6ee0.json similarity index 66% rename from tests/reference/ast-set1-8938049.json rename to tests/reference/ast-set1-ebd6ee0.json index a61cb0b76e..a04c792797 100644 --- a/tests/reference/ast-set1-8938049.json +++ b/tests/reference/ast-set1-ebd6ee0.json @@ -1,11 +1,11 @@ { - "basename": "ast-set1-8938049", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-set1-ebd6ee0", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/set1.py", "infile_hash": "63b5dc6a1f9c17099f1b10c8c45fcac1e50319ca8efbf7c283060abb", "outfile": null, "outfile_hash": null, - "stdout": "ast-set1-8938049.stdout", + "stdout": "ast-set1-ebd6ee0.stdout", "stdout_hash": "f2003da3359a1713befbdd7bd1c789dcec22ac91a6d1f5b25cac1c77", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-set1-8938049.stdout b/tests/reference/ast-set1-ebd6ee0.stdout similarity index 100% rename from tests/reference/ast-set1-8938049.stdout rename to tests/reference/ast-set1-ebd6ee0.stdout diff --git a/tests/reference/ast-subscript1-76dcb5a.json b/tests/reference/ast-subscript1-bd5584b.json similarity index 65% rename from tests/reference/ast-subscript1-76dcb5a.json rename to tests/reference/ast-subscript1-bd5584b.json index 8ee8c57d55..2c3b5acfa5 100644 --- a/tests/reference/ast-subscript1-76dcb5a.json +++ b/tests/reference/ast-subscript1-bd5584b.json @@ -1,11 +1,11 @@ { - "basename": "ast-subscript1-76dcb5a", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-subscript1-bd5584b", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/subscript1.py", "infile_hash": "5d229893d3e13ea4463e8ed47eb3798be0b8c28f5ef6b6c773e87b80", "outfile": null, "outfile_hash": null, - "stdout": "ast-subscript1-76dcb5a.stdout", + "stdout": "ast-subscript1-bd5584b.stdout", "stdout_hash": "452c89181fdd389e48053af79eb944114e567a8a2e2d3b04c73721bd", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-subscript1-76dcb5a.stdout b/tests/reference/ast-subscript1-bd5584b.stdout similarity index 100% rename from tests/reference/ast-subscript1-76dcb5a.stdout rename to tests/reference/ast-subscript1-bd5584b.stdout diff --git a/tests/reference/ast-tuple1-0b7b893.json b/tests/reference/ast-tuple1-2fb5396.json similarity index 66% rename from tests/reference/ast-tuple1-0b7b893.json rename to tests/reference/ast-tuple1-2fb5396.json index 5031d4589d..feb6e53223 100644 --- a/tests/reference/ast-tuple1-0b7b893.json +++ b/tests/reference/ast-tuple1-2fb5396.json @@ -1,11 +1,11 @@ { - "basename": "ast-tuple1-0b7b893", - "cmd": "lpython --show-ast --indent --no-color {infile} -o {outfile}", + "basename": "ast-tuple1-2fb5396", + "cmd": "lpython --show-ast --no-color {infile} -o {outfile}", "infile": "tests/tuple1.py", "infile_hash": "0ad9c210f19f9e560890c7a67ed06f4a710bbc8535c0097c35736028", "outfile": null, "outfile_hash": null, - "stdout": "ast-tuple1-0b7b893.stdout", + "stdout": "ast-tuple1-2fb5396.stdout", "stdout_hash": "b8f815cc5c9d9732bca16340aca88fd5b4453cf499a305fb0b036316", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast-tuple1-0b7b893.stdout b/tests/reference/ast-tuple1-2fb5396.stdout similarity index 100% rename from tests/reference/ast-tuple1-0b7b893.stdout rename to tests/reference/ast-tuple1-2fb5396.stdout diff --git a/tests/reference/ast_new-async1-3f88bf1.json b/tests/reference/ast_new-async1-b3d07ed.json similarity index 63% rename from tests/reference/ast_new-async1-3f88bf1.json rename to tests/reference/ast_new-async1-b3d07ed.json index 3db0c57d90..78595a5beb 100644 --- a/tests/reference/ast_new-async1-3f88bf1.json +++ b/tests/reference/ast_new-async1-b3d07ed.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-async1-3f88bf1", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-async1-b3d07ed", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/async1.py", "infile_hash": "7c5dba5bb5fe728a9452de16f8164730885146b2d93e49be8642d96a", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-async1-3f88bf1.stdout", + "stdout": "ast_new-async1-b3d07ed.stdout", "stdout_hash": "1f809509a8c0637d93e82cf35a231a0f5e001a0b4bb2cfb37cc962ad", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-async1-3f88bf1.stdout b/tests/reference/ast_new-async1-b3d07ed.stdout similarity index 100% rename from tests/reference/ast_new-async1-3f88bf1.stdout rename to tests/reference/ast_new-async1-b3d07ed.stdout diff --git a/tests/reference/ast_new-boolOp1-6a81afc.json b/tests/reference/ast_new-boolOp1-478328f.json similarity index 63% rename from tests/reference/ast_new-boolOp1-6a81afc.json rename to tests/reference/ast_new-boolOp1-478328f.json index d548348f1d..561331afd8 100644 --- a/tests/reference/ast_new-boolOp1-6a81afc.json +++ b/tests/reference/ast_new-boolOp1-478328f.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-boolOp1-6a81afc", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-boolOp1-478328f", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/boolOp1.py", "infile_hash": "d3c477215f26d7a7e09c7de32d3e716585796d1674cba2ea692fe161", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-boolOp1-6a81afc.stdout", + "stdout": "ast_new-boolOp1-478328f.stdout", "stdout_hash": "e17703190ca113a29b38292421ba27f4d2d8e235a51115e9d3a2710f", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-boolOp1-6a81afc.stdout b/tests/reference/ast_new-boolOp1-478328f.stdout similarity index 100% rename from tests/reference/ast_new-boolOp1-6a81afc.stdout rename to tests/reference/ast_new-boolOp1-478328f.stdout diff --git a/tests/reference/ast_new-class_def1-9fd9de1.json b/tests/reference/ast_new-class_def1-fe69291.json similarity index 63% rename from tests/reference/ast_new-class_def1-9fd9de1.json rename to tests/reference/ast_new-class_def1-fe69291.json index 554019bd3a..77bc5ba91c 100644 --- a/tests/reference/ast_new-class_def1-9fd9de1.json +++ b/tests/reference/ast_new-class_def1-fe69291.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-class_def1-9fd9de1", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-class_def1-fe69291", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/class_def1.py", "infile_hash": "e904e820fab9d596d2675abf65e19fc2b5fb6ecf950a902a0ec537fb", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-class_def1-9fd9de1.stdout", + "stdout": "ast_new-class_def1-fe69291.stdout", "stdout_hash": "9802c1d135072a26d8cc97d779d5c89b93317138aa7903dde7d42fb0", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-class_def1-9fd9de1.stdout b/tests/reference/ast_new-class_def1-fe69291.stdout similarity index 100% rename from tests/reference/ast_new-class_def1-9fd9de1.stdout rename to tests/reference/ast_new-class_def1-fe69291.stdout diff --git a/tests/reference/ast_new-class_def2-505b454.json b/tests/reference/ast_new-class_def2-c6db986.json similarity index 63% rename from tests/reference/ast_new-class_def2-505b454.json rename to tests/reference/ast_new-class_def2-c6db986.json index df36977817..e03cb049fb 100644 --- a/tests/reference/ast_new-class_def2-505b454.json +++ b/tests/reference/ast_new-class_def2-c6db986.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-class_def2-505b454", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-class_def2-c6db986", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/class_def2.py", "infile_hash": "e7ad3c230a50dbe235499e6cc7ca8a93c59142bbc91b640edbd072af", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-class_def2-505b454.stdout", + "stdout": "ast_new-class_def2-c6db986.stdout", "stdout_hash": "25cb94d2ea083f3e06cf057b1c074808a51365717dca131ce67f06f6", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-class_def2-505b454.stdout b/tests/reference/ast_new-class_def2-c6db986.stdout similarity index 100% rename from tests/reference/ast_new-class_def2-505b454.stdout rename to tests/reference/ast_new-class_def2-c6db986.stdout diff --git a/tests/reference/ast_new-comment2-08e9f9a.json b/tests/reference/ast_new-comment2-f0984d5.json similarity index 63% rename from tests/reference/ast_new-comment2-08e9f9a.json rename to tests/reference/ast_new-comment2-f0984d5.json index 4af9fcb86f..1309f6159f 100644 --- a/tests/reference/ast_new-comment2-08e9f9a.json +++ b/tests/reference/ast_new-comment2-f0984d5.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-comment2-08e9f9a", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-comment2-f0984d5", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/tokens/comment2.py", "infile_hash": "b62404a5d774f0b18fcad6fb1dac8733334ce3593a77d34bcbb05019", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-comment2-08e9f9a.stdout", + "stdout": "ast_new-comment2-f0984d5.stdout", "stdout_hash": "4dd8b313619df81c518cdfbddd523b3486b2ad5406ff720dde825af9", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-comment2-08e9f9a.stdout b/tests/reference/ast_new-comment2-f0984d5.stdout similarity index 100% rename from tests/reference/ast_new-comment2-08e9f9a.stdout rename to tests/reference/ast_new-comment2-f0984d5.stdout diff --git a/tests/reference/ast_new-comprehension1-575f5b3.json b/tests/reference/ast_new-comprehension1-69cf2af.json similarity index 62% rename from tests/reference/ast_new-comprehension1-575f5b3.json rename to tests/reference/ast_new-comprehension1-69cf2af.json index 2ea2cb8801..1e1b460b96 100644 --- a/tests/reference/ast_new-comprehension1-575f5b3.json +++ b/tests/reference/ast_new-comprehension1-69cf2af.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-comprehension1-575f5b3", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-comprehension1-69cf2af", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/comprehension1.py", "infile_hash": "2e5d7d233befce4f5cbf334234537fe4f11e8b6e8d057974579aed89", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-comprehension1-575f5b3.stdout", + "stdout": "ast_new-comprehension1-69cf2af.stdout", "stdout_hash": "dd4d6e66646c90be9ebc7070964a2f42ca21d5c782bfddbf89ce854b", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-comprehension1-575f5b3.stdout b/tests/reference/ast_new-comprehension1-69cf2af.stdout similarity index 100% rename from tests/reference/ast_new-comprehension1-575f5b3.stdout rename to tests/reference/ast_new-comprehension1-69cf2af.stdout diff --git a/tests/reference/ast_new-conditional_expr1-b290d84.json b/tests/reference/ast_new-conditional_expr1-07ccb9e.json similarity index 61% rename from tests/reference/ast_new-conditional_expr1-b290d84.json rename to tests/reference/ast_new-conditional_expr1-07ccb9e.json index 25dca379ec..e90a4839bd 100644 --- a/tests/reference/ast_new-conditional_expr1-b290d84.json +++ b/tests/reference/ast_new-conditional_expr1-07ccb9e.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-conditional_expr1-b290d84", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-conditional_expr1-07ccb9e", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/conditional_expr1.py", "infile_hash": "5846a6c58bf238c4276f733b5fc9876a948ed63558444210d9f79c55", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-conditional_expr1-b290d84.stdout", + "stdout": "ast_new-conditional_expr1-07ccb9e.stdout", "stdout_hash": "92adfc3fb76aa117fdee246478837474332ec5de543e164920e3ec40", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-conditional_expr1-b290d84.stdout b/tests/reference/ast_new-conditional_expr1-07ccb9e.stdout similarity index 100% rename from tests/reference/ast_new-conditional_expr1-b290d84.stdout rename to tests/reference/ast_new-conditional_expr1-07ccb9e.stdout diff --git a/tests/reference/ast_new-dictionary1-a0c7807.json b/tests/reference/ast_new-dictionary1-445e718.json similarity index 62% rename from tests/reference/ast_new-dictionary1-a0c7807.json rename to tests/reference/ast_new-dictionary1-445e718.json index 98e3d77ddc..5d739b9a9b 100644 --- a/tests/reference/ast_new-dictionary1-a0c7807.json +++ b/tests/reference/ast_new-dictionary1-445e718.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-dictionary1-a0c7807", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-dictionary1-445e718", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/dictionary1.py", "infile_hash": "68922e77dbabe06c271463150653684880d3c28d88caa44109b2e202", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-dictionary1-a0c7807.stdout", + "stdout": "ast_new-dictionary1-445e718.stdout", "stdout_hash": "dfae0ace6e4267478ecfd053f2be4a56fddf1f635099b4f6695d250b", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-dictionary1-a0c7807.stdout b/tests/reference/ast_new-dictionary1-445e718.stdout similarity index 100% rename from tests/reference/ast_new-dictionary1-a0c7807.stdout rename to tests/reference/ast_new-dictionary1-445e718.stdout diff --git a/tests/reference/ast_new-ellipsis2-227f104.json b/tests/reference/ast_new-ellipsis2-3a9750b.json similarity index 63% rename from tests/reference/ast_new-ellipsis2-227f104.json rename to tests/reference/ast_new-ellipsis2-3a9750b.json index 4d50d69a2e..90701cb0d6 100644 --- a/tests/reference/ast_new-ellipsis2-227f104.json +++ b/tests/reference/ast_new-ellipsis2-3a9750b.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-ellipsis2-227f104", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-ellipsis2-3a9750b", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/ellipsis2.py", "infile_hash": "2e6669bafe4247887d3cd6d9f479ef9c02de96d2a018df4a716ae259", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-ellipsis2-227f104.stdout", + "stdout": "ast_new-ellipsis2-3a9750b.stdout", "stdout_hash": "c31c7abbb37cfb16b2e919f083ffc3839162529f9e18e82dc3a1ed7c", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-ellipsis2-227f104.stdout b/tests/reference/ast_new-ellipsis2-3a9750b.stdout similarity index 100% rename from tests/reference/ast_new-ellipsis2-227f104.stdout rename to tests/reference/ast_new-ellipsis2-3a9750b.stdout diff --git a/tests/reference/ast_new-for1-0494920.json b/tests/reference/ast_new-for1-887432e.json similarity index 64% rename from tests/reference/ast_new-for1-0494920.json rename to tests/reference/ast_new-for1-887432e.json index 0fba025421..3e2c929fae 100644 --- a/tests/reference/ast_new-for1-0494920.json +++ b/tests/reference/ast_new-for1-887432e.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-for1-0494920", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-for1-887432e", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/for1.py", "infile_hash": "8f9e8ef938c302e9ec566be988c563e0378002ac96687c46d7d9c137", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-for1-0494920.stdout", + "stdout": "ast_new-for1-887432e.stdout", "stdout_hash": "f9f49679cca12cff7db1a7828457e033b55aae6dd408b3a4326d1d7e", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-for1-0494920.stdout b/tests/reference/ast_new-for1-887432e.stdout similarity index 100% rename from tests/reference/ast_new-for1-0494920.stdout rename to tests/reference/ast_new-for1-887432e.stdout diff --git a/tests/reference/ast_new-for2-574cea6.json b/tests/reference/ast_new-for2-af08901.json similarity index 64% rename from tests/reference/ast_new-for2-574cea6.json rename to tests/reference/ast_new-for2-af08901.json index f5c1e34922..ff9c17f689 100644 --- a/tests/reference/ast_new-for2-574cea6.json +++ b/tests/reference/ast_new-for2-af08901.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-for2-574cea6", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-for2-af08901", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/for2.py", "infile_hash": "32c45d5c5edc44504a3fa5d24c6c1660977d2ceceeef311ee5a37410", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-for2-574cea6.stdout", + "stdout": "ast_new-for2-af08901.stdout", "stdout_hash": "ac6e50517c5d609747b66c75e15bfa69ada7f0f41ebeb943da9b3167", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-for2-574cea6.stdout b/tests/reference/ast_new-for2-af08901.stdout similarity index 100% rename from tests/reference/ast_new-for2-574cea6.stdout rename to tests/reference/ast_new-for2-af08901.stdout diff --git a/tests/reference/ast_new-function_def1-ca8dc19.json b/tests/reference/ast_new-function_def1-1a872df.json similarity index 62% rename from tests/reference/ast_new-function_def1-ca8dc19.json rename to tests/reference/ast_new-function_def1-1a872df.json index fe158ab00c..ff54698350 100644 --- a/tests/reference/ast_new-function_def1-ca8dc19.json +++ b/tests/reference/ast_new-function_def1-1a872df.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-function_def1-ca8dc19", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-function_def1-1a872df", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/function_def1.py", "infile_hash": "1afa1fb49c292eabdb1a8798f8b0642d878f3a67f8f069ab0bac4574", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-function_def1-ca8dc19.stdout", + "stdout": "ast_new-function_def1-1a872df.stdout", "stdout_hash": "0110165ec922436f3a1dcf21de9d64353f410bb4b5dab943df168d79", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-function_def1-ca8dc19.stdout b/tests/reference/ast_new-function_def1-1a872df.stdout similarity index 100% rename from tests/reference/ast_new-function_def1-ca8dc19.stdout rename to tests/reference/ast_new-function_def1-1a872df.stdout diff --git a/tests/reference/ast_new-function_def2-cead6f1.json b/tests/reference/ast_new-function_def2-52c4587.json similarity index 62% rename from tests/reference/ast_new-function_def2-cead6f1.json rename to tests/reference/ast_new-function_def2-52c4587.json index cbd50b692a..6a84a1afa5 100644 --- a/tests/reference/ast_new-function_def2-cead6f1.json +++ b/tests/reference/ast_new-function_def2-52c4587.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-function_def2-cead6f1", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-function_def2-52c4587", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/function_def2.py", "infile_hash": "7530fc0c8839061b935134cf72ca1ed46d0f2e5ec1b7053ef68b011b", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-function_def2-cead6f1.stdout", + "stdout": "ast_new-function_def2-52c4587.stdout", "stdout_hash": "701f1ddbc26053b77201943dc8be23c2cb86b979a207ebf11d5c0772", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-function_def2-cead6f1.stdout b/tests/reference/ast_new-function_def2-52c4587.stdout similarity index 100% rename from tests/reference/ast_new-function_def2-cead6f1.stdout rename to tests/reference/ast_new-function_def2-52c4587.stdout diff --git a/tests/reference/ast_new-function_def3-a3f4dcf.json b/tests/reference/ast_new-function_def3-f66064a.json similarity index 62% rename from tests/reference/ast_new-function_def3-a3f4dcf.json rename to tests/reference/ast_new-function_def3-f66064a.json index 1d331b79da..ef5687d117 100644 --- a/tests/reference/ast_new-function_def3-a3f4dcf.json +++ b/tests/reference/ast_new-function_def3-f66064a.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-function_def3-a3f4dcf", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-function_def3-f66064a", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/function_def3.py", "infile_hash": "eb7900aec51ff71ffb02799ef3191ea93aa8dc68a4d12bcab18135be", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-function_def3-a3f4dcf.stdout", + "stdout": "ast_new-function_def3-f66064a.stdout", "stdout_hash": "5e5db40257c0c509b0496cf33a9ed0d4d7da8b4c16428b4c2fb264b0", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-function_def3-a3f4dcf.stdout b/tests/reference/ast_new-function_def3-f66064a.stdout similarity index 100% rename from tests/reference/ast_new-function_def3-a3f4dcf.stdout rename to tests/reference/ast_new-function_def3-f66064a.stdout diff --git a/tests/reference/ast_new-global1-4288396.json b/tests/reference/ast_new-global1-38edfbd.json similarity index 63% rename from tests/reference/ast_new-global1-4288396.json rename to tests/reference/ast_new-global1-38edfbd.json index a8993c29ff..e064ef2044 100644 --- a/tests/reference/ast_new-global1-4288396.json +++ b/tests/reference/ast_new-global1-38edfbd.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-global1-4288396", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-global1-38edfbd", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/global1.py", "infile_hash": "cdbcc3f545f865cfc6e412f53fc6fd7cccdbc0d33b66e45460f3e916", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-global1-4288396.stdout", + "stdout": "ast_new-global1-38edfbd.stdout", "stdout_hash": "b0b999497a27625582a6dedfa024dba012a6ac1103ac427c49cc7d9d", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-global1-4288396.stdout b/tests/reference/ast_new-global1-38edfbd.stdout similarity index 100% rename from tests/reference/ast_new-global1-4288396.stdout rename to tests/reference/ast_new-global1-38edfbd.stdout diff --git a/tests/reference/ast_new-if1-e6432ed.json b/tests/reference/ast_new-if1-db43586.json similarity index 64% rename from tests/reference/ast_new-if1-e6432ed.json rename to tests/reference/ast_new-if1-db43586.json index 2aff475b9d..61c6c14427 100644 --- a/tests/reference/ast_new-if1-e6432ed.json +++ b/tests/reference/ast_new-if1-db43586.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-if1-e6432ed", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-if1-db43586", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/if1.py", "infile_hash": "22ff1df9592cea862ebc5a2a03f872b87d7ef6cf7101670e8fc566da", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-if1-e6432ed.stdout", + "stdout": "ast_new-if1-db43586.stdout", "stdout_hash": "c21dfca87b12c05bb7230f342ad43cdee10fd7a574dcd2733d8736c8", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-if1-e6432ed.stdout b/tests/reference/ast_new-if1-db43586.stdout similarity index 100% rename from tests/reference/ast_new-if1-e6432ed.stdout rename to tests/reference/ast_new-if1-db43586.stdout diff --git a/tests/reference/ast_new-if2-33fa625.json b/tests/reference/ast_new-if2-c3b6022.json similarity index 64% rename from tests/reference/ast_new-if2-33fa625.json rename to tests/reference/ast_new-if2-c3b6022.json index 979cb3de41..f9c4d553f4 100644 --- a/tests/reference/ast_new-if2-33fa625.json +++ b/tests/reference/ast_new-if2-c3b6022.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-if2-33fa625", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-if2-c3b6022", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/if2.py", "infile_hash": "8568c759d82b43b471520eb7eb42d2ccbdfea5ceb59bd27671342206", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-if2-33fa625.stdout", + "stdout": "ast_new-if2-c3b6022.stdout", "stdout_hash": "cef89f96f75c68381a475911818e03cbcb78bff27d91b5d356fc667b", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-if2-33fa625.stdout b/tests/reference/ast_new-if2-c3b6022.stdout similarity index 100% rename from tests/reference/ast_new-if2-33fa625.stdout rename to tests/reference/ast_new-if2-c3b6022.stdout diff --git a/tests/reference/ast_new-import1-6a0330c.json b/tests/reference/ast_new-import1-f643fd3.json similarity index 63% rename from tests/reference/ast_new-import1-6a0330c.json rename to tests/reference/ast_new-import1-f643fd3.json index 27de195956..2d9ee2fae2 100644 --- a/tests/reference/ast_new-import1-6a0330c.json +++ b/tests/reference/ast_new-import1-f643fd3.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-import1-6a0330c", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-import1-f643fd3", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/import1.py", "infile_hash": "be84cf9989667702a391da31494811cc4a2a0a2f7a6be764bcedc4bf", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-import1-6a0330c.stdout", + "stdout": "ast_new-import1-f643fd3.stdout", "stdout_hash": "ac5f443b72953c6b307da4cdd6d5c3976c3db1591a9703223614dd72", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-import1-6a0330c.stdout b/tests/reference/ast_new-import1-f643fd3.stdout similarity index 100% rename from tests/reference/ast_new-import1-6a0330c.stdout rename to tests/reference/ast_new-import1-f643fd3.stdout diff --git a/tests/reference/ast_new-lambda1-58822d0.json b/tests/reference/ast_new-lambda1-260d046.json similarity index 63% rename from tests/reference/ast_new-lambda1-58822d0.json rename to tests/reference/ast_new-lambda1-260d046.json index bd772c5aec..5acaaa551c 100644 --- a/tests/reference/ast_new-lambda1-58822d0.json +++ b/tests/reference/ast_new-lambda1-260d046.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-lambda1-58822d0", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-lambda1-260d046", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/lambda1.py", "infile_hash": "0d9e4ba965ad635b7081019955a0f6d3d54b4f04f17239c454364d83", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-lambda1-58822d0.stdout", + "stdout": "ast_new-lambda1-260d046.stdout", "stdout_hash": "9efeee85a5a565024e5487cec1f868ce923dba161bfb2e7a0d24431f", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-lambda1-58822d0.stdout b/tests/reference/ast_new-lambda1-260d046.stdout similarity index 100% rename from tests/reference/ast_new-lambda1-58822d0.stdout rename to tests/reference/ast_new-lambda1-260d046.stdout diff --git a/tests/reference/ast_new-lambda2-d6a1f95.json b/tests/reference/ast_new-lambda2-d84336e.json similarity index 63% rename from tests/reference/ast_new-lambda2-d6a1f95.json rename to tests/reference/ast_new-lambda2-d84336e.json index 26ac29e238..42cda2aa2a 100644 --- a/tests/reference/ast_new-lambda2-d6a1f95.json +++ b/tests/reference/ast_new-lambda2-d84336e.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-lambda2-d6a1f95", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-lambda2-d84336e", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/lambda2.py", "infile_hash": "f115bc76bd599a545ebe065ec72d392374a97a52e434c079ec05e606", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-lambda2-d6a1f95.stdout", + "stdout": "ast_new-lambda2-d84336e.stdout", "stdout_hash": "b16a532dd4c0c68c374093e9f11bbc4b3f97736a10aa82634c0cbce9", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-lambda2-d6a1f95.stdout b/tests/reference/ast_new-lambda2-d84336e.stdout similarity index 100% rename from tests/reference/ast_new-lambda2-d6a1f95.stdout rename to tests/reference/ast_new-lambda2-d84336e.stdout diff --git a/tests/reference/ast_new-match_stmt1-9f49edb.json b/tests/reference/ast_new-match_stmt1-9e84d24.json similarity index 62% rename from tests/reference/ast_new-match_stmt1-9f49edb.json rename to tests/reference/ast_new-match_stmt1-9e84d24.json index d72335baba..6e096f25ea 100644 --- a/tests/reference/ast_new-match_stmt1-9f49edb.json +++ b/tests/reference/ast_new-match_stmt1-9e84d24.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-match_stmt1-9f49edb", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-match_stmt1-9e84d24", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/match_stmt1.py", "infile_hash": "59820be702cda5062ce26ffbf5abe667a01d0e37f8a0658aa458d65f", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-match_stmt1-9f49edb.stdout", + "stdout": "ast_new-match_stmt1-9e84d24.stdout", "stdout_hash": "8e43bb4b05ebab0df9520dac9908702af0d2e7f63ddb42bf93baf0a0", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-match_stmt1-9f49edb.stdout b/tests/reference/ast_new-match_stmt1-9e84d24.stdout similarity index 100% rename from tests/reference/ast_new-match_stmt1-9f49edb.stdout rename to tests/reference/ast_new-match_stmt1-9e84d24.stdout diff --git a/tests/reference/ast_new-slice1-0471787.json b/tests/reference/ast_new-slice1-9c440e3.json similarity index 63% rename from tests/reference/ast_new-slice1-0471787.json rename to tests/reference/ast_new-slice1-9c440e3.json index b899eaa864..5efa42035d 100644 --- a/tests/reference/ast_new-slice1-0471787.json +++ b/tests/reference/ast_new-slice1-9c440e3.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-slice1-0471787", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-slice1-9c440e3", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/slice1.py", "infile_hash": "b682e6a952b39d1b9310299340035aed5d4c6916814c1293d0aa9977", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-slice1-0471787.stdout", + "stdout": "ast_new-slice1-9c440e3.stdout", "stdout_hash": "f2c5ce2eeecd08f73104a45cfb87a2bcabc55ca3a65e3c751c207beb", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-slice1-0471787.stdout b/tests/reference/ast_new-slice1-9c440e3.stdout similarity index 100% rename from tests/reference/ast_new-slice1-0471787.stdout rename to tests/reference/ast_new-slice1-9c440e3.stdout diff --git a/tests/reference/ast_new-statements1-1685ab2.json b/tests/reference/ast_new-statements1-e081093.json similarity index 62% rename from tests/reference/ast_new-statements1-1685ab2.json rename to tests/reference/ast_new-statements1-e081093.json index 4cd7d126ff..5676cb70c4 100644 --- a/tests/reference/ast_new-statements1-1685ab2.json +++ b/tests/reference/ast_new-statements1-e081093.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-statements1-1685ab2", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-statements1-e081093", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/statements1.py", "infile_hash": "98dd16a7e41cfca5cce2fd716fa5888ad5b970cd368e6171f1e66306", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-statements1-1685ab2.stdout", + "stdout": "ast_new-statements1-e081093.stdout", "stdout_hash": "9425fb51c6f0e2ed284e0ba59bb2efee1a86541d77150d20c02fd5fc", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-statements1-1685ab2.stdout b/tests/reference/ast_new-statements1-e081093.stdout similarity index 100% rename from tests/reference/ast_new-statements1-1685ab2.stdout rename to tests/reference/ast_new-statements1-e081093.stdout diff --git a/tests/reference/ast_new-statements2-d9ec152.json b/tests/reference/ast_new-statements2-c4cdc5f.json similarity index 62% rename from tests/reference/ast_new-statements2-d9ec152.json rename to tests/reference/ast_new-statements2-c4cdc5f.json index 0b25890d07..efb47d87e7 100644 --- a/tests/reference/ast_new-statements2-d9ec152.json +++ b/tests/reference/ast_new-statements2-c4cdc5f.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-statements2-d9ec152", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-statements2-c4cdc5f", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/statements2.py", "infile_hash": "8c96f6788e951a113e775f497394a372018d04b4f7f910d304471017", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-statements2-d9ec152.stdout", + "stdout": "ast_new-statements2-c4cdc5f.stdout", "stdout_hash": "d79c678d3b5de63e5d424a2015595bfc3a686fc5c7ba0802aed6f3af", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-statements2-d9ec152.stdout b/tests/reference/ast_new-statements2-c4cdc5f.stdout similarity index 100% rename from tests/reference/ast_new-statements2-d9ec152.stdout rename to tests/reference/ast_new-statements2-c4cdc5f.stdout diff --git a/tests/reference/ast_new-string1-f14340e.json b/tests/reference/ast_new-string1-96b90b3.json similarity index 63% rename from tests/reference/ast_new-string1-f14340e.json rename to tests/reference/ast_new-string1-96b90b3.json index 260fefc33c..49a78caf38 100644 --- a/tests/reference/ast_new-string1-f14340e.json +++ b/tests/reference/ast_new-string1-96b90b3.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-string1-f14340e", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-string1-96b90b3", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/string1.py", "infile_hash": "278e24162e6d88441f13d84bab068f1862b4fa490bf95e145fb71318", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-string1-f14340e.stdout", + "stdout": "ast_new-string1-96b90b3.stdout", "stdout_hash": "51806e5893017a386c0ce7a4f3260c7605cabd5ea4e6a16aa300d8c2", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-string1-f14340e.stdout b/tests/reference/ast_new-string1-96b90b3.stdout similarity index 100% rename from tests/reference/ast_new-string1-f14340e.stdout rename to tests/reference/ast_new-string1-96b90b3.stdout diff --git a/tests/reference/ast_new-string2-b6abe54.json b/tests/reference/ast_new-string2-44323ea.json similarity index 63% rename from tests/reference/ast_new-string2-b6abe54.json rename to tests/reference/ast_new-string2-44323ea.json index 91384b3852..3bcc6c58df 100644 --- a/tests/reference/ast_new-string2-b6abe54.json +++ b/tests/reference/ast_new-string2-44323ea.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-string2-b6abe54", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-string2-44323ea", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/string2.py", "infile_hash": "58397718a6e0dc5cc453081e82ad1b2ca378639dfb516c3f28d34323", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-string2-b6abe54.stdout", + "stdout": "ast_new-string2-44323ea.stdout", "stdout_hash": "52d1edc0e332527fc6e077ed895f9d01a6eb79b3fb43405319864a1c", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-string2-b6abe54.stdout b/tests/reference/ast_new-string2-44323ea.stdout similarity index 100% rename from tests/reference/ast_new-string2-b6abe54.stdout rename to tests/reference/ast_new-string2-44323ea.stdout diff --git a/tests/reference/ast_new-string3-27e8bd2.json b/tests/reference/ast_new-string3-37f35a0.json similarity index 63% rename from tests/reference/ast_new-string3-27e8bd2.json rename to tests/reference/ast_new-string3-37f35a0.json index 181d5568b8..bd16a6a8a7 100644 --- a/tests/reference/ast_new-string3-27e8bd2.json +++ b/tests/reference/ast_new-string3-37f35a0.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-string3-27e8bd2", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-string3-37f35a0", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/string3.py", "infile_hash": "61a3cd7139d6c429a037d74fe12b8f8305cabe9b91218082851dd7ca", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-string3-27e8bd2.stdout", + "stdout": "ast_new-string3-37f35a0.stdout", "stdout_hash": "9d8ca937b551799ff4908f347ff6685917d0bfc41977c5316af4e108", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-string3-27e8bd2.stdout b/tests/reference/ast_new-string3-37f35a0.stdout similarity index 100% rename from tests/reference/ast_new-string3-27e8bd2.stdout rename to tests/reference/ast_new-string3-37f35a0.stdout diff --git a/tests/reference/ast_new-try1-be44da5.json b/tests/reference/ast_new-try1-a9a22cf.json similarity index 64% rename from tests/reference/ast_new-try1-be44da5.json rename to tests/reference/ast_new-try1-a9a22cf.json index 9ef61523cd..a252588d6f 100644 --- a/tests/reference/ast_new-try1-be44da5.json +++ b/tests/reference/ast_new-try1-a9a22cf.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-try1-be44da5", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-try1-a9a22cf", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/try1.py", "infile_hash": "a7fac6105109bebf6a38bd317f4bbf5876e2dd62a341c71232791619", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-try1-be44da5.stdout", + "stdout": "ast_new-try1-a9a22cf.stdout", "stdout_hash": "2d208d18296ba0b82463ef7c49b2dedaed5d5600b0956f27084b454e", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-try1-be44da5.stdout b/tests/reference/ast_new-try1-a9a22cf.stdout similarity index 100% rename from tests/reference/ast_new-try1-be44da5.stdout rename to tests/reference/ast_new-try1-a9a22cf.stdout diff --git a/tests/reference/ast_new-tuple1-3e447de.json b/tests/reference/ast_new-tuple1-29c08af.json similarity index 63% rename from tests/reference/ast_new-tuple1-3e447de.json rename to tests/reference/ast_new-tuple1-29c08af.json index ea7d87407f..c23dd5efe2 100644 --- a/tests/reference/ast_new-tuple1-3e447de.json +++ b/tests/reference/ast_new-tuple1-29c08af.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-tuple1-3e447de", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-tuple1-29c08af", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/tuple1.py", "infile_hash": "a598d163f33a7eb37376592c8018780cb4024618f4a8024bd728ff15", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-tuple1-3e447de.stdout", + "stdout": "ast_new-tuple1-29c08af.stdout", "stdout_hash": "ba3dcb7011c5466eb869001acbc2c1a89c60f15e59dcdf8e7974baab", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-tuple1-3e447de.stdout b/tests/reference/ast_new-tuple1-29c08af.stdout similarity index 100% rename from tests/reference/ast_new-tuple1-3e447de.stdout rename to tests/reference/ast_new-tuple1-29c08af.stdout diff --git a/tests/reference/ast_new-type_comment1-a1dfe37.json b/tests/reference/ast_new-type_comment1-710ea6c.json similarity index 62% rename from tests/reference/ast_new-type_comment1-a1dfe37.json rename to tests/reference/ast_new-type_comment1-710ea6c.json index ea5705b944..5cabf43401 100644 --- a/tests/reference/ast_new-type_comment1-a1dfe37.json +++ b/tests/reference/ast_new-type_comment1-710ea6c.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-type_comment1-a1dfe37", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-type_comment1-710ea6c", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/type_comment1.py", "infile_hash": "068e12017f2d2c484023dba5e6d127d0ef53e3e4148ce40452c1284b", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-type_comment1-a1dfe37.stdout", + "stdout": "ast_new-type_comment1-710ea6c.stdout", "stdout_hash": "ef1c4024c790cdf5ef3262c9b94f127a5d546dcc24932b87d98ed980", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-type_comment1-a1dfe37.stdout b/tests/reference/ast_new-type_comment1-710ea6c.stdout similarity index 100% rename from tests/reference/ast_new-type_comment1-a1dfe37.stdout rename to tests/reference/ast_new-type_comment1-710ea6c.stdout diff --git a/tests/reference/ast_new-unicode-1c0cbec.json b/tests/reference/ast_new-unicode-d3199dc.json similarity index 63% rename from tests/reference/ast_new-unicode-1c0cbec.json rename to tests/reference/ast_new-unicode-d3199dc.json index 9597b4afd7..953033c69f 100644 --- a/tests/reference/ast_new-unicode-1c0cbec.json +++ b/tests/reference/ast_new-unicode-d3199dc.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-unicode-1c0cbec", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-unicode-d3199dc", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/unicode.py", "infile_hash": "6b3cd163f80b29c927ea2538095688bb9d903c15b5e4a782dc821db5", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-unicode-1c0cbec.stdout", + "stdout": "ast_new-unicode-d3199dc.stdout", "stdout_hash": "094e93359015843e391595911489ad12bf6abeb7fdc92649bb97ca3a", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-unicode-1c0cbec.stdout b/tests/reference/ast_new-unicode-d3199dc.stdout similarity index 100% rename from tests/reference/ast_new-unicode-1c0cbec.stdout rename to tests/reference/ast_new-unicode-d3199dc.stdout diff --git a/tests/reference/ast_new-while1-1c5ee87.json b/tests/reference/ast_new-while1-a4c6382.json similarity index 63% rename from tests/reference/ast_new-while1-1c5ee87.json rename to tests/reference/ast_new-while1-a4c6382.json index 652289872b..b007957ac4 100644 --- a/tests/reference/ast_new-while1-1c5ee87.json +++ b/tests/reference/ast_new-while1-a4c6382.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-while1-1c5ee87", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-while1-a4c6382", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/while1.py", "infile_hash": "d013884f95378177c308b9e8cc762e1f1a57ff5b49ea7aae5461901e", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-while1-1c5ee87.stdout", + "stdout": "ast_new-while1-a4c6382.stdout", "stdout_hash": "90f2e03370e7ea2eb4cfc10b32b6c7b24b4abb61491c46e5e23b8629", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-while1-1c5ee87.stdout b/tests/reference/ast_new-while1-a4c6382.stdout similarity index 100% rename from tests/reference/ast_new-while1-1c5ee87.stdout rename to tests/reference/ast_new-while1-a4c6382.stdout diff --git a/tests/reference/ast_new-with1-cf2a022.json b/tests/reference/ast_new-with1-6c88c0f.json similarity index 64% rename from tests/reference/ast_new-with1-cf2a022.json rename to tests/reference/ast_new-with1-6c88c0f.json index acf9b87da4..379e083532 100644 --- a/tests/reference/ast_new-with1-cf2a022.json +++ b/tests/reference/ast_new-with1-6c88c0f.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-with1-cf2a022", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-with1-6c88c0f", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/with1.py", "infile_hash": "76c56f94e39ec49c634bd827a4b1e6c14e8da599466c733c44d55b1e", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-with1-cf2a022.stdout", + "stdout": "ast_new-with1-6c88c0f.stdout", "stdout_hash": "da9e18ca666189ea27993cfac36f5193654225e29453bd37b5df0a17", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-with1-cf2a022.stdout b/tests/reference/ast_new-with1-6c88c0f.stdout similarity index 100% rename from tests/reference/ast_new-with1-cf2a022.stdout rename to tests/reference/ast_new-with1-6c88c0f.stdout diff --git a/tests/reference/ast_new-yield-b585d08.json b/tests/reference/ast_new-yield-4c41668.json similarity index 64% rename from tests/reference/ast_new-yield-b585d08.json rename to tests/reference/ast_new-yield-4c41668.json index 5ca17ef702..84c7e07ded 100644 --- a/tests/reference/ast_new-yield-b585d08.json +++ b/tests/reference/ast_new-yield-4c41668.json @@ -1,11 +1,11 @@ { - "basename": "ast_new-yield-b585d08", - "cmd": "lpython --show-ast --indent --new-parser --no-color {infile} -o {outfile}", + "basename": "ast_new-yield-4c41668", + "cmd": "lpython --show-ast --new-parser --no-color {infile} -o {outfile}", "infile": "tests/parser/yield.py", "infile_hash": "8be8f045d190dbc958c308128da40d7e8b590f0320166d10b545722b", "outfile": null, "outfile_hash": null, - "stdout": "ast_new-yield-b585d08.stdout", + "stdout": "ast_new-yield-4c41668.stdout", "stdout_hash": "86dec82fdfba5c8c8fe63c0a67dac680041e208fb7f372bf1744ce7d", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/ast_new-yield-b585d08.stdout b/tests/reference/ast_new-yield-4c41668.stdout similarity index 100% rename from tests/reference/ast_new-yield-b585d08.stdout rename to tests/reference/ast_new-yield-4c41668.stdout diff --git a/tests/reference/pass_inline_function_calls-func_inline_01-6cf8821.json b/tests/reference/pass_inline_function_calls-func_inline_01-8b6a5da.json similarity index 59% rename from tests/reference/pass_inline_function_calls-func_inline_01-6cf8821.json rename to tests/reference/pass_inline_function_calls-func_inline_01-8b6a5da.json index 67e4329c18..4e2052d23f 100644 --- a/tests/reference/pass_inline_function_calls-func_inline_01-6cf8821.json +++ b/tests/reference/pass_inline_function_calls-func_inline_01-8b6a5da.json @@ -1,11 +1,11 @@ { - "basename": "pass_inline_function_calls-func_inline_01-6cf8821", - "cmd": "lpython --pass=inline_function_calls --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "pass_inline_function_calls-func_inline_01-8b6a5da", + "cmd": "lpython --pass=inline_function_calls --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/func_inline_01.py", "infile_hash": "65a2e9a9bc7ad68a5e104549eed00cafd02b643a1d91ab2e175b2198", "outfile": null, "outfile_hash": null, - "stdout": "pass_inline_function_calls-func_inline_01-6cf8821.stdout", + "stdout": "pass_inline_function_calls-func_inline_01-8b6a5da.stdout", "stdout_hash": "96196aa6c10b49da2e9ec4e5ac6644369670c34b42422f1bca1626e2", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/pass_inline_function_calls-func_inline_01-6cf8821.stdout b/tests/reference/pass_inline_function_calls-func_inline_01-8b6a5da.stdout similarity index 100% rename from tests/reference/pass_inline_function_calls-func_inline_01-6cf8821.stdout rename to tests/reference/pass_inline_function_calls-func_inline_01-8b6a5da.stdout diff --git a/tests/reference/pass_loop_vectorise-vec_01-fdf30b1.json b/tests/reference/pass_loop_vectorise-vec_01-be9985e.json similarity index 60% rename from tests/reference/pass_loop_vectorise-vec_01-fdf30b1.json rename to tests/reference/pass_loop_vectorise-vec_01-be9985e.json index 342d9935f2..52fabee30f 100644 --- a/tests/reference/pass_loop_vectorise-vec_01-fdf30b1.json +++ b/tests/reference/pass_loop_vectorise-vec_01-be9985e.json @@ -1,11 +1,11 @@ { - "basename": "pass_loop_vectorise-vec_01-fdf30b1", - "cmd": "lpython --pass=loop_vectorise --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "pass_loop_vectorise-vec_01-be9985e", + "cmd": "lpython --pass=loop_vectorise --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/vec_01.py", "infile_hash": "b22cabe2248cf58c7ffaad83dd8dc5b2433f244ee23b0703b536547b", "outfile": null, "outfile_hash": null, - "stdout": "pass_loop_vectorise-vec_01-fdf30b1.stdout", + "stdout": "pass_loop_vectorise-vec_01-be9985e.stdout", "stdout_hash": "7b0e57ce973a20caf244484503b638533da5291aaf5341b61b35cbbb", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/pass_loop_vectorise-vec_01-fdf30b1.stdout b/tests/reference/pass_loop_vectorise-vec_01-be9985e.stdout similarity index 100% rename from tests/reference/pass_loop_vectorise-vec_01-fdf30b1.stdout rename to tests/reference/pass_loop_vectorise-vec_01-be9985e.stdout diff --git a/tests/reference/pass_print_list_tuple-print_02-1bcc4ec.json b/tests/reference/pass_print_list_tuple-print_02-09600eb.json similarity index 59% rename from tests/reference/pass_print_list_tuple-print_02-1bcc4ec.json rename to tests/reference/pass_print_list_tuple-print_02-09600eb.json index bbad69c6a7..b3a8e5d4d3 100644 --- a/tests/reference/pass_print_list_tuple-print_02-1bcc4ec.json +++ b/tests/reference/pass_print_list_tuple-print_02-09600eb.json @@ -1,11 +1,11 @@ { - "basename": "pass_print_list_tuple-print_02-1bcc4ec", - "cmd": "lpython --pass=print_list_tuple --show-asr --indent --no-color {infile} -o {outfile}", + "basename": "pass_print_list_tuple-print_02-09600eb", + "cmd": "lpython --pass=print_list_tuple --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/print_02.py", "infile_hash": "c4513f1b2ab1a2f33a0784fe80b4d32b506c05799b0c920c4f5b0411", "outfile": null, "outfile_hash": null, - "stdout": "pass_print_list_tuple-print_02-1bcc4ec.stdout", + "stdout": "pass_print_list_tuple-print_02-09600eb.stdout", "stdout_hash": "632afad0dfd3439278b02e3f6f3219008bd43628fcc5a9720ecad3a0", "stderr": null, "stderr_hash": null, diff --git a/tests/reference/pass_print_list_tuple-print_02-1bcc4ec.stdout b/tests/reference/pass_print_list_tuple-print_02-09600eb.stdout similarity index 100% rename from tests/reference/pass_print_list_tuple-print_02-1bcc4ec.stdout rename to tests/reference/pass_print_list_tuple-print_02-09600eb.stdout From 6e57da7b2e78025577b6026a9f0c3eb2f069d8dc Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Thu, 11 May 2023 20:28:58 +0530 Subject: [PATCH 50/72] ASR: Fix numpy size() dim field --- src/lpython/semantics/python_ast_to_asr.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index c954ef6405..8134019ef9 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -6749,13 +6749,16 @@ class BodyVisitor : public CommonVisitor { std::to_string(args.size()) + " arguments instead.", x.base.base.loc); } + const Location &loc = x.base.base.loc; ASR::expr_t *var = args[0].m_value; ASR::expr_t *dim = nullptr; + ASR::ttype_t *int_type = ASRUtils::TYPE(ASR::make_Integer_t(al, loc, 4, nullptr, 0)); if (args.size() == 2) { - dim = args[1].m_value; + ASR::expr_t* const_one = ASRUtils::EXPR(make_IntegerConstant_t(al, loc, 1, int_type)); + dim = ASRUtils::EXPR(ASR::make_IntegerBinOp_t(al, loc, + args[1].m_value, ASR::binopType::Add, const_one, int_type, nullptr)); } - ASR::ttype_t *int_type = ASRUtils::TYPE(ASR::make_Integer_t(al, x.base.base.loc, 4, nullptr, 0)); - tmp = ASR::make_ArraySize_t(al, x.base.base.loc, var, dim, int_type, nullptr); + tmp = ASR::make_ArraySize_t(al, loc, var, dim, int_type, nullptr); return; } else if (call_name == "empty") { // TODO: check that the `empty` arguments are compatible From 53299208f6dccd8b79e8df25386f354f7433ed14 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Thu, 11 May 2023 20:28:17 +0530 Subject: [PATCH 51/72] TEST: Add test for numpy size() --- integration_tests/CMakeLists.txt | 1 + integration_tests/array_size_02.py | 90 ++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 integration_tests/array_size_02.py diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index 39d72d6154..9c1f05791e 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -281,6 +281,7 @@ RUN(NAME variable_decl_03 LABELS cpython llvm c) RUN(NAME array_expr_01 LABELS cpython llvm c) RUN(NAME array_expr_02 LABELS cpython llvm c) RUN(NAME array_size_01 LABELS cpython llvm c) +RUN(NAME array_size_02 LABELS cpython llvm c) RUN(NAME array_01 LABELS cpython llvm wasm c) RUN(NAME array_02 LABELS cpython wasm c) RUN(NAME bindc_01 LABELS cpython llvm c) diff --git a/integration_tests/array_size_02.py b/integration_tests/array_size_02.py new file mode 100644 index 0000000000..07bd7af0d7 --- /dev/null +++ b/integration_tests/array_size_02.py @@ -0,0 +1,90 @@ +from lpython import i32, f64, c32, c64, u32 +from numpy import empty, size + +def main0(): + x: i32[4, 5, 2] = empty([4, 5, 2]) + y: f64[24, 100, 2, 5] = empty([24, 100, 2, 5]) + z: i32 + w: i32 + z = 2 + w = 3 + print(size(x)) + print(size(x, 0)) + print(size(x, 1)) + print(size(x, 2)) + print(size(y)) + print(size(y, 0)) + print(size(y, 1)) + print(size(y, z)) + print(size(y, w)) + + assert size(x) == 40 + assert size(x, 0) == 4 + assert size(x, 1) == 5 + assert size(x, 2) == 2 + assert size(y) == 24000 + assert size(y, 0) == 24 + assert size(y, 1) == 100 + assert size(y, z) == 2 + assert size(y, w) == 5 + +def main1(): + a: c32[12] = empty([12]) + b: c64[15, 15, 10] = empty([15, 15, 10]) + c: i32 + d: i32 + c = 1 + d = 2 + print(size(a)) + print(size(a, 0)) + print(size(b)) + print(size(b, 0)) + print(size(b, c)) + print(size(b, d)) + + assert size(a) == 12 + assert size(a, 0) == 12 + assert size(b) == 2250 + assert size(b, 0) == 15 + assert size(b, c) == 15 + assert size(b, d) == 10 + +def main2(): + a: i32[2, 3] = empty([2, 3]) + print(size(a)) + print(size(a, 0)) + print(size(a, 1)) + + assert size(a) == 2*3 + assert size(a, 0) == 2 + assert size(a, 1) == 3 + +def main3(): + a: u32[2, 3, 4] = empty([2, 3, 4]) + b: u64[10, 5] = empty([10, 5]) + c: i32 + d: i32 + c = 1 + d = 2 + print(size(a)) + print(size(a, 0)) + print(size(a, c)) + print(size(a, d)) + + print(size(b)) + print(size(b, 0)) + print(size(b, c)) + + assert size(a) == 2*3*4 + assert size(a, 0) == 2 + assert size(a, c) == 3 + assert size(a, d) == 4 + + assert size(b) == 50 + assert size(b, 0) == 10 + assert size(b, c) == 5 + +main0() +main1() +main2() +main3() From 6728f50b371671b55a3083d8201be30560594a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Thu, 11 May 2023 18:20:32 -0600 Subject: [PATCH 52/72] Rename the @jit decorator to @lpython Added inital docstring explaining the motivation. The term `jit` is not the right term for this decorator because we are not using JIT (=Just In Time) compilation, but rather AOT (=Ahead of Time) compilation, at runtime from CPython. The term `lpython` is better, as it conveys that we are using LPython to compile the function (ahead of time). It is also consistent with the @cpython decorator. --- integration_tests/CMakeLists.txt | 2 +- .../{test_jit_01.py => test_lpython_decorator.py} | 4 ++-- src/runtime/lpython/lpython.py | 11 ++++++++++- 3 files changed, 13 insertions(+), 4 deletions(-) rename integration_tests/{test_jit_01.py => test_lpython_decorator.py} (83%) diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index 39d72d6154..8292fe1a21 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -542,4 +542,4 @@ RUN(NAME intrinsics_01 LABELS cpython llvm) # any COMPILE(NAME import_order_01 LABELS cpython llvm c) # any # Jit -RUN(NAME test_jit_01 LABELS cpython) +RUN(NAME test_lpython_decorator LABELS cpython) diff --git a/integration_tests/test_jit_01.py b/integration_tests/test_lpython_decorator.py similarity index 83% rename from integration_tests/test_jit_01.py rename to integration_tests/test_lpython_decorator.py index a92bd63e9a..eaab04b5b1 100644 --- a/integration_tests/test_jit_01.py +++ b/integration_tests/test_lpython_decorator.py @@ -1,7 +1,7 @@ from numpy import array -from lpython import i32, f64, jit +from lpython import i32, f64, lpython -@jit +@lpython def fast_sum(n: i32, x: f64[:]) -> f64: s: f64 = 0.0 i: i32 diff --git a/src/runtime/lpython/lpython.py b/src/runtime/lpython/lpython.py index 561da522fc..f1fb0136fc 100644 --- a/src/runtime/lpython/lpython.py +++ b/src/runtime/lpython/lpython.py @@ -525,7 +525,16 @@ def ccallable(f): def ccallback(f): return f -class jit: +class lpython: + """ + The @lpython decorator compiles a given function using LPython. + + The decorator should be used from CPython mode, i.e., when the module is + being run using CPython. When possible, it is recommended to use LPython + for the main program, and use the @cpython decorator from the LPython mode + to access CPython features that are not supported by LPython. + """ + def __init__(self, function): def get_rtlib_dir(): current_dir = os.path.dirname(os.path.abspath(__file__)) From 0f195930f291fddbb2c04fa9a33ce23d2d62046d Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Fri, 12 May 2023 07:30:15 +0530 Subject: [PATCH 53/72] ASR: Skip if in SymbolTableVisitor --- src/lpython/semantics/python_ast_to_asr.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index 8134019ef9..e1f1cd26e3 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -4080,6 +4080,10 @@ class SymbolTableVisitor : public CommonVisitor { void visit_Assert(const AST::Assert_t &/*x*/) { // We skip this in the SymbolTable visitor, but visit it in the BodyVisitor } + + void visit_If(const AST::If_t &/*x*/) { + // We skip this in the SymbolTable visitor, but visit it in the BodyVisitor + } }; Result symbol_table_visitor(Allocator &al, LocationManager &lm, const AST::Module_t &ast, From 9ef41230afd77b6f7b51c1a6dfc0c0b749421058 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Fri, 12 May 2023 07:32:39 +0530 Subject: [PATCH 54/72] TEST: Add test for if in global scope --- integration_tests/CMakeLists.txt | 1 + integration_tests/if_03.py | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 integration_tests/if_03.py diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index a8ffb07bf6..91e371b8dd 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -340,6 +340,7 @@ RUN(NAME loop_04 LABELS cpython llvm c) RUN(NAME loop_05 LABELS cpython llvm c) RUN(NAME if_01 LABELS cpython llvm c wasm wasm_x86 wasm_x64) RUN(NAME if_02 LABELS cpython llvm c wasm wasm_x86 wasm_x64) +RUN(NAME if_03 FAIL LABELS cpython llvm c) RUN(NAME print_02 LABELS cpython llvm c) RUN(NAME test_types_01 LABELS cpython llvm c) RUN(NAME test_types_02 LABELS cpython llvm c wasm) diff --git a/integration_tests/if_03.py b/integration_tests/if_03.py new file mode 100644 index 0000000000..780a7a7af8 --- /dev/null +++ b/integration_tests/if_03.py @@ -0,0 +1,5 @@ +from sys import exit + +if True: + print("Yes, true") + exit(1) From 797f1ba573510dc115162cdd49ffe92cd5861929 Mon Sep 17 00:00:00 2001 From: Smit-create Date: Fri, 12 May 2023 09:56:55 +0530 Subject: [PATCH 55/72] Allow importing enums --- src/lpython/semantics/python_ast_to_asr.cpp | 26 ++++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index 8134019ef9..5c9a7f374b 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -467,6 +467,20 @@ ASR::symbol_t* import_from_module(Allocator &al, ASR::Module_t *m, SymbolTable * ASR::accessType::Public ); return ASR::down_cast(est); + } else if (ASR::is_a(*t)) { + ASR::EnumType_t *et = ASR::down_cast(t); + Str name; + name.from_str(al, new_sym_name); + char *cname = name.c_str(al); + ASR::asr_t *est = ASR::make_ExternalSymbol_t( + al, et->base.base.loc, + /* a_symtab */ current_scope, + /* a_name */ cname, + (ASR::symbol_t*)et, + m->m_name, nullptr, 0, et->m_name, + ASR::accessType::Public + ); + return ASR::down_cast(est); } else if (ASR::is_a(*t)) { ASR::Variable_t *mv = ASR::down_cast(t); // `mv` is the Variable in a module. Now we construct @@ -5302,12 +5316,12 @@ class BodyVisitor : public CommonVisitor { return ; } - ASR::symbol_t *t = current_scope->resolve_symbol(value); - - if (!t) { + ASR::symbol_t *org_sym = current_scope->resolve_symbol(value); + if (!org_sym) { throw SemanticError("'" + value + "' is not defined in the scope", x.base.base.loc); } + ASR::symbol_t *t = ASRUtils::symbol_get_past_external(org_sym); if (ASR::is_a(*t)) { ASR::Variable_t *var = ASR::down_cast(t); visit_AttributeUtil(var->m_type, x.m_attr, t, x.base.base.loc); @@ -5320,7 +5334,7 @@ class BodyVisitor : public CommonVisitor { x.base.base.loc); } ASR::Variable_t* enum_member_variable = ASR::down_cast(enum_member); - ASR::expr_t* enum_type_var = ASRUtils::EXPR(ASR::make_Var_t(al, x.base.base.loc, t)); + ASR::expr_t* enum_type_var = ASRUtils::EXPR(ASR::make_Var_t(al, x.base.base.loc, org_sym)); ASR::expr_t* enum_member_var = ASRUtils::EXPR(ASR::make_EnumStaticMember_t(al, x.base.base.loc, enum_type_var, enum_member, enum_type->m_type, ASRUtils::expr_value(enum_member_variable->m_symbolic_value))); @@ -5338,12 +5352,12 @@ class BodyVisitor : public CommonVisitor { } if( ASR::is_a(*struct_member) ) { ASR::Variable_t* struct_member_variable = ASR::down_cast(struct_member); - ASR::expr_t* struct_type_var = ASRUtils::EXPR(ASR::make_Var_t(al, x.base.base.loc, t)); + ASR::expr_t* struct_type_var = ASRUtils::EXPR(ASR::make_Var_t(al, x.base.base.loc, org_sym)); tmp = ASR::make_StructStaticMember_t(al, x.base.base.loc, struct_type_var, struct_member, struct_member_variable->m_type, nullptr); } else if( ASR::is_a(*struct_member) ) { - ASR::expr_t* struct_type_var = ASRUtils::EXPR(ASR::make_Var_t(al, x.base.base.loc, t)); + ASR::expr_t* struct_type_var = ASRUtils::EXPR(ASR::make_Var_t(al, x.base.base.loc, org_sym)); ASR::ttype_t* union_type = ASRUtils::TYPE(ASR::make_Union_t(al, x.base.base.loc, struct_member, nullptr, 0)); tmp = ASR::make_StructStaticMember_t(al, x.base.base.loc, struct_type_var, struct_member, union_type, nullptr); } From 3be64d2bde0b6dea7821f202d559273ad3cc707b Mon Sep 17 00:00:00 2001 From: Smit-create Date: Fri, 12 May 2023 10:05:43 +0530 Subject: [PATCH 56/72] Add tests --- integration_tests/CMakeLists.txt | 2 ++ integration_tests/enum_07.py | 7 +++++++ integration_tests/enum_07_module.py | 6 ++++++ 3 files changed, 15 insertions(+) create mode 100644 integration_tests/enum_07.py create mode 100644 integration_tests/enum_07_module.py diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index a8ffb07bf6..78b41a4795 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -484,6 +484,8 @@ RUN(NAME enum_04 LABELS cpython llvm c) RUN(NAME enum_05 LABELS llvm c EXTRAFILES enum_05b.c) RUN(NAME enum_06 LABELS cpython llvm c) +RUN(NAME enum_07 IMPORT_PATH .. + LABELS cpython llvm c) RUN(NAME union_01 LABELS cpython llvm c) RUN(NAME union_02 LABELS llvm c) RUN(NAME union_03 LABELS cpython llvm c) diff --git a/integration_tests/enum_07.py b/integration_tests/enum_07.py new file mode 100644 index 0000000000..204443130a --- /dev/null +++ b/integration_tests/enum_07.py @@ -0,0 +1,7 @@ +from enum_07_module import Constants + +def check(): + assert Constants.NUM_ELEMS.value == 4 + assert Constants.NUM_CHECK.value == 51 + +check() diff --git a/integration_tests/enum_07_module.py b/integration_tests/enum_07_module.py new file mode 100644 index 0000000000..a42956ec59 --- /dev/null +++ b/integration_tests/enum_07_module.py @@ -0,0 +1,6 @@ +from enum import Enum +from lpython import i32 + +class Constants(Enum): + NUM_ELEMS: i32 = 4 + NUM_CHECK: i32 = 51 From 37827ef8c896b872326a96f0e90ed25788f4d766 Mon Sep 17 00:00:00 2001 From: Thirumalai-Shaktivel Date: Fri, 12 May 2023 10:54:52 +0530 Subject: [PATCH 57/72] Rename `jit` to `lpython` --- integration_tests/CMakeLists.txt | 6 +++--- .../{test_lpython_decorator.py => lpython_decorator_01.py} | 0 src/lpython/semantics/python_ast_to_asr.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename integration_tests/{test_lpython_decorator.py => lpython_decorator_01.py} (100%) diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index 91e371b8dd..43c7d63f73 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -541,7 +541,7 @@ RUN(NAME callback_01 LABELS cpython llvm) # Intrinsic Functions RUN(NAME intrinsics_01 LABELS cpython llvm) # any -COMPILE(NAME import_order_01 LABELS cpython llvm c) # any +# lpython decorator +RUN(NAME lpython_decorator_01 LABELS cpython) -# Jit -RUN(NAME test_lpython_decorator LABELS cpython) +COMPILE(NAME import_order_01 LABELS cpython llvm c) # any diff --git a/integration_tests/test_lpython_decorator.py b/integration_tests/lpython_decorator_01.py similarity index 100% rename from integration_tests/test_lpython_decorator.py rename to integration_tests/lpython_decorator_01.py diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index e1f1cd26e3..0655af2e92 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -3589,8 +3589,8 @@ class SymbolTableVisitor : public CommonVisitor { is_inline = true; } else if (name == "static") { is_static = true; - } else if (name == "jit") { - throw SemanticError("`@lpython.jit` decorator must be " + } else if (name == "lpython") { + throw SemanticError("`@lpython` decorator must be " "run from CPython, not compiled using LPython", dec->base.loc); } else { From a4df75c0e11d52db394be11b8ed1acbc54f6dcb3 Mon Sep 17 00:00:00 2001 From: Thirumalai-Shaktivel Date: Fri, 12 May 2023 10:56:39 +0530 Subject: [PATCH 58/72] Move import statements within the lpython class --- src/runtime/lpython/lpython.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/runtime/lpython/lpython.py b/src/runtime/lpython/lpython.py index f1fb0136fc..4f4b418c17 100644 --- a/src/runtime/lpython/lpython.py +++ b/src/runtime/lpython/lpython.py @@ -4,8 +4,6 @@ import platform from dataclasses import dataclass as py_dataclass, is_dataclass as py_is_dataclass from goto import with_goto -from numpy import get_include -from distutils.sysconfig import get_python_inc # TODO: this does not seem to restrict other imports __slots__ = ["i8", "i16", "i32", "i64", "u8", "u16", "u32", "u64", "f32", "f64", "c32", "c64", "CPtr", @@ -728,6 +726,7 @@ def get_data_type(t): # TODO: Use LLVM instead of C backend r = os.system("lpython --show-c --disable-main a.py > a.h") assert r == 0, "Failed to create C file" + gcc_flags = "" if platform.system() == "Linux": gcc_flags = " -shared -fPIC " @@ -735,12 +734,16 @@ def get_data_type(t): gcc_flags = " -bundle -flat_namespace -undefined suppress " else: raise NotImplementedError("Platform not implemented") + + from numpy import get_include + from distutils.sysconfig import get_python_inc python_path = "-I" + get_python_inc() + " " numpy_path = "-I" + get_include() rt_path_01 = "-I" + get_rtlib_dir() + "/../libasr/runtime " rt_path_02 = "-L" + get_rtlib_dir() + " -Wl,-rpath " \ + get_rtlib_dir() + " -llpython_runtime " python_lib = "-L" "$CONDA_PREFIX/lib/ -lpython3.10 -lm" + r = os.system("gcc -g" + gcc_flags + python_path + numpy_path + " a.c -o lpython_jit_module.so " + rt_path_01 + rt_path_02 + python_lib) assert r == 0, "Failed to create the shared library" From cf1160b1f583bc5f930781458325201b34a13121 Mon Sep 17 00:00:00 2001 From: Gagandeep Singh Date: Fri, 12 May 2023 11:50:18 +0530 Subject: [PATCH 59/72] Update array indexing to use strides and offsets (#1765) --- src/libasr/asdl_cpp.py | 9 +++- src/libasr/asr_verify.cpp | 6 +++ src/libasr/codegen/asr_to_llvm.cpp | 9 +++- src/libasr/codegen/llvm_array_utils.cpp | 67 ++++++++++++++----------- src/libasr/codegen/llvm_array_utils.h | 8 +-- src/libasr/pass/pass_array_by_data.cpp | 41 ++++++++++++--- 6 files changed, 97 insertions(+), 43 deletions(-) diff --git a/src/libasr/asdl_cpp.py b/src/libasr/asdl_cpp.py index b58bf855e8..8c240505dc 100644 --- a/src/libasr/asdl_cpp.py +++ b/src/libasr/asdl_cpp.py @@ -2458,10 +2458,15 @@ def make_visitor(self, name, fields): LCOMPILERS_ASSERT(e->m_external); LCOMPILERS_ASSERT(!ASR::is_a(*e->m_external)); s = e->m_external; - } else if (s->type == ASR::symbolType::Function) { + } + if (s->type == ASR::symbolType::Function) { return ASR::down_cast(s)->m_function_signature; + } else if( s->type == ASR::symbolType::Variable ) { + return ASR::down_cast(s)->m_type; + } else { + LCOMPILERS_ASSERT_MSG(false, std::to_string(s->type)); } - return ASR::down_cast(s)->m_type; + return nullptr; }""" \ % (name, name), 2, new_line=False) elif name == "OverloadedBinOp": diff --git a/src/libasr/asr_verify.cpp b/src/libasr/asr_verify.cpp index 7ce4bdf9a9..b92521ef3a 100644 --- a/src/libasr/asr_verify.cpp +++ b/src/libasr/asr_verify.cpp @@ -681,6 +681,12 @@ class VerifyVisitor : public BaseWalkVisitor void handle_ArrayItemSection(const T &x) { visit_expr(*x.m_v); for (size_t i=0; i ASR::ttype_t* fptr_type = ASRUtils::expr_type(fptr); llvm::Type* llvm_fptr_type = get_type_from_ttype_t_util(ASRUtils::get_contained_type(fptr_type)); llvm::Value* fptr_array = builder->CreateAlloca(llvm_fptr_type); + builder->CreateStore(llvm::ConstantInt::get(context, llvm::APInt(32, 0)), + arr_descr->get_offset(fptr_array, false)); ASR::dimension_t* fptr_dims; int fptr_rank = ASRUtils::extract_dimensions_from_ttype( ASRUtils::expr_type(fptr), @@ -4377,16 +4379,21 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor } llvm_cptr = builder->CreateBitCast(llvm_cptr, llvm_fptr_data_type->getPointerTo()); builder->CreateStore(llvm_cptr, fptr_data); + llvm::Value* prod = llvm::ConstantInt::get(context, llvm::APInt(32, 1)); for( int i = 0; i < fptr_rank; i++ ) { llvm::Value* curr_dim = llvm::ConstantInt::get(context, llvm::APInt(32, i)); llvm::Value* desi = arr_descr->get_pointer_to_dimension_descriptor(fptr_des, curr_dim); + llvm::Value* desi_stride = arr_descr->get_stride(desi, false); llvm::Value* desi_lb = arr_descr->get_lower_bound(desi, false); llvm::Value* desi_size = arr_descr->get_dimension_size(fptr_des, curr_dim, false); + builder->CreateStore(prod, desi_stride); llvm::Value* i32_one = llvm::ConstantInt::get(context, llvm::APInt(32, 1)); llvm::Value* new_lb = i32_one; llvm::Value* new_ub = shape_data ? CreateLoad(llvm_utils->create_ptr_gep(shape_data, i)) : i32_one; builder->CreateStore(new_lb, desi_lb); - builder->CreateStore(builder->CreateAdd(builder->CreateSub(new_ub, new_lb), i32_one), desi_size); + llvm::Value* new_size = builder->CreateAdd(builder->CreateSub(new_ub, new_lb), i32_one); + builder->CreateStore(new_size, desi_size); + prod = builder->CreateMul(prod, new_size); } } else { int64_t ptr_loads_copy = ptr_loads; diff --git a/src/libasr/codegen/llvm_array_utils.cpp b/src/libasr/codegen/llvm_array_utils.cpp index af3599a131..0b77881ba3 100644 --- a/src/libasr/codegen/llvm_array_utils.cpp +++ b/src/libasr/codegen/llvm_array_utils.cpp @@ -287,24 +287,20 @@ namespace LCompilers { builder->CreateStore(llvm::ConstantInt::get(context, llvm::APInt(32, n_dims)), get_rank(arr, true)); builder->CreateStore(dim_des_first, dim_des_val); dim_des_val = LLVM::CreateLoad(*builder, dim_des_val); + llvm::Value* prod = llvm::ConstantInt::get(context, llvm::APInt(32, 1)); for( int r = 0; r < n_dims; r++ ) { llvm::Value* dim_val = llvm_utils->create_ptr_gep(dim_des_val, r); llvm::Value* s_val = llvm_utils->create_gep(dim_val, 0); llvm::Value* l_val = llvm_utils->create_gep(dim_val, 1); llvm::Value* dim_size_ptr = llvm_utils->create_gep(dim_val, 2); - builder->CreateStore(llvm::ConstantInt::get(context, llvm::APInt(32, 1)), s_val); + builder->CreateStore(prod, s_val); builder->CreateStore(llvm_dims[r].first, l_val); llvm::Value* dim_size = llvm_dims[r].second; + prod = builder->CreateMul(prod, dim_size); builder->CreateStore(dim_size, dim_size_ptr); } llvm::Value* llvm_size = builder->CreateAlloca(llvm::Type::getInt32Ty(context), nullptr); - llvm::Value* const_1 = llvm::ConstantInt::get(context, llvm::APInt(32, 1)); - llvm::Value* prod = const_1; - for( int r = 0; r < n_dims; r++ ) { - llvm::Value* dim_size = llvm_dims[r].second; - prod = builder->CreateMul(prod, dim_size); - } builder->CreateStore(prod, llvm_size); llvm::Value* first_ptr = get_pointer_to_data(arr); llvm::Value* arr_first = builder->CreateAlloca(llvm_data_type, @@ -340,12 +336,12 @@ namespace LCompilers { llvm::Value* arr, llvm::Type* llvm_data_type, int n_dims, std::vector>& llvm_dims, llvm::Module* module) { - llvm::Value* num_elements = llvm::ConstantInt::get(context, llvm::APInt(32, 1)); llvm::Value* offset_val = llvm_utils->create_gep(arr, 1); builder->CreateStore(llvm::ConstantInt::get(context, llvm::APInt(32, 0)), offset_val); set_is_allocated_flag(arr, 1); llvm::Value* dim_des_val = LLVM::CreateLoad(*builder, llvm_utils->create_gep(arr, 2)); + llvm::Value* prod = llvm::ConstantInt::get(context, llvm::APInt(32, 1)); for( int r = 0; r < n_dims; r++ ) { llvm::Value* dim_val = llvm_utils->create_ptr_gep(dim_des_val, r); llvm::Value* s_val = llvm_utils->create_gep(dim_val, 0); @@ -354,8 +350,8 @@ namespace LCompilers { builder->CreateStore(llvm::ConstantInt::get(context, llvm::APInt(32, 1)), s_val); builder->CreateStore(llvm_dims[r].first, l_val); llvm::Value* dim_size = llvm_dims[r].second; - num_elements = builder->CreateMul(num_elements, dim_size); builder->CreateStore(dim_size, dim_size_ptr); + prod = builder->CreateMul(prod, dim_size); } llvm::Value* ptr2firstptr = get_pointer_to_data(arr); llvm::AllocaInst *arg_size = builder->CreateAlloca(llvm::Type::getInt32Ty(context), nullptr); @@ -363,8 +359,8 @@ namespace LCompilers { llvm::Type* ptr_type = llvm_data_type->getPointerTo(); uint64_t size = data_layout.getTypeAllocSize(llvm_data_type); llvm::Value* llvm_size = llvm::ConstantInt::get(context, llvm::APInt(32, size)); - num_elements = builder->CreateMul(num_elements, llvm_size); - builder->CreateStore(num_elements, arg_size); + prod = builder->CreateMul(prod, llvm_size); + builder->CreateStore(prod, arg_size); llvm::Value* ptr_as_char_ptr = lfortran_malloc(context, *module, *builder, LLVM::CreateLoad(*builder, arg_size)); llvm::Value* first_ptr = builder->CreateBitCast(ptr_as_char_ptr, ptr_type); builder->CreateStore(first_ptr, ptr2firstptr); @@ -390,8 +386,12 @@ namespace LCompilers { return llvm_utils->create_gep(arr, 0); } - llvm::Value* SimpleCMODescriptor::get_offset(llvm::Value* arr) { - return LLVM::CreateLoad(*builder, llvm_utils->create_gep(arr, 1)); + llvm::Value* SimpleCMODescriptor::get_offset(llvm::Value* arr, bool load) { + llvm::Value* offset = llvm_utils->create_gep(arr, 1); + if( !load ) { + return offset; + } + return LLVM::CreateLoad(*builder, offset); } llvm::Value* SimpleCMODescriptor::get_lower_bound(llvm::Value* dim_des, bool load) { @@ -409,8 +409,12 @@ namespace LCompilers { llvm::ConstantInt::get(context, llvm::APInt(32, 1))); } - llvm::Value* SimpleCMODescriptor::get_stride(llvm::Value*) { - return nullptr; + llvm::Value* SimpleCMODescriptor::get_stride(llvm::Value* dim_des, bool load) { + llvm::Value* stride = llvm_utils->create_gep(dim_des, 0); + if( !load ) { + return stride; + } + return LLVM::CreateLoad(*builder, stride); } // TODO: Uncomment and implement later @@ -421,7 +425,6 @@ namespace LCompilers { llvm::Value* arr, std::vector& m_args, int n_args, bool check_for_bounds) { llvm::Value* dim_des_arr_ptr = LLVM::CreateLoad(*builder, llvm_utils->create_gep(arr, 2)); - llvm::Value* prod = llvm::ConstantInt::get(context, llvm::APInt(32, 1)); llvm::Value* idx = llvm::ConstantInt::get(context, llvm::APInt(32, 0)); for( int r = 0; r < n_args; r++ ) { llvm::Value* curr_llvm_idx = m_args[r]; @@ -431,11 +434,11 @@ namespace LCompilers { if( check_for_bounds ) { // check_single_element(curr_llvm_idx, arr); TODO: To be implemented } - idx = builder->CreateAdd(idx, builder->CreateMul(prod, curr_llvm_idx)); - llvm::Value* dim_size = LLVM::CreateLoad(*builder, llvm_utils->create_gep(dim_des_ptr, 2)); - prod = builder->CreateMul(prod, dim_size); + llvm::Value* stride = LLVM::CreateLoad(*builder, llvm_utils->create_gep(dim_des_ptr, 0)); + idx = builder->CreateAdd(idx, builder->CreateMul(stride, curr_llvm_idx)); } - return idx; + llvm::Value* offset_val = LLVM::CreateLoad(*builder, llvm_utils->create_gep(arr, 1)); + return builder->CreateAdd(idx, offset_val); } llvm::Value* SimpleCMODescriptor::cmo_convertor_single_element_data_only( @@ -564,12 +567,15 @@ namespace LCompilers { num_elements); if( this->is_array(asr_shape_type) ) { + builder->CreateStore(LLVM::CreateLoad(*builder, llvm_utils->create_gep(array, 1)), + llvm_utils->create_gep(reshaped, 1)); llvm::Value* n_dims = this->get_array_size(shape, nullptr, 4); llvm::Value* shape_data = LLVM::CreateLoad(*builder, this->get_pointer_to_data(shape)); llvm::Value* dim_des_val = llvm_utils->create_gep(reshaped, 2); llvm::Value* dim_des_first = builder->CreateAlloca(dim_des, n_dims); builder->CreateStore(n_dims, this->get_rank(reshaped, true)); builder->CreateStore(dim_des_first, dim_des_val); + llvm::Value* prod = llvm::ConstantInt::get(context, llvm::APInt(32, 1)); dim_des_val = LLVM::CreateLoad(*builder, dim_des_val); llvm::BasicBlock *loophead = llvm::BasicBlock::Create(context, "loop.head"); llvm::BasicBlock *loopbody = llvm::BasicBlock::Create(context, "loop.body"); @@ -588,8 +594,9 @@ namespace LCompilers { llvm::Value* dim_val = llvm_utils->create_ptr_gep(dim_des_val, r_val); llvm::Value* s_val = llvm_utils->create_gep(dim_val, 0); llvm::Value* dim_size_ptr = llvm_utils->create_gep(dim_val, 2); - builder->CreateStore(llvm::ConstantInt::get(context, llvm::APInt(32, 1)), s_val); + builder->CreateStore(prod, s_val); llvm::Value* dim_size = LLVM::CreateLoad(*builder, llvm_utils->create_ptr_gep(shape_data, r_val)); + prod = builder->CreateMul(prod, dim_size); builder->CreateStore(dim_size, dim_size_ptr); r_val = builder->CreateAdd(r_val, llvm::ConstantInt::get(context, llvm::APInt(32, 1))); builder->CreateStore(r_val, r); @@ -623,14 +630,14 @@ namespace LCompilers { LLVM::CreateLoad(*builder, ptr2firstptr), llvm::MaybeAlign(), num_elements); - llvm::Value* src_offset_ptr = LLVM::CreateLoad(*builder, llvm_utils->create_gep(src, 1)); - builder->CreateStore(src_offset_ptr, llvm_utils->create_gep(dest, 1)); llvm::Value* src_dim_des_val = this->get_pointer_to_dimension_descriptor_array(src, true); llvm::Value* n_dims = this->get_rank(src, false); llvm::Value* dest_dim_des_val = nullptr; if( !create_dim_des_array ) { dest_dim_des_val = this->get_pointer_to_dimension_descriptor_array(dest, true); } else { + llvm::Value* src_offset_ptr = LLVM::CreateLoad(*builder, llvm_utils->create_gep(src, 1)); + builder->CreateStore(src_offset_ptr, llvm_utils->create_gep(dest, 1)); llvm::Value* dest_dim_des_ptr = this->get_pointer_to_dimension_descriptor_array(dest, false); dest_dim_des_val = builder->CreateAlloca(dim_des, n_dims); builder->CreateStore(dest_dim_des_val, dest_dim_des_ptr); @@ -650,24 +657,28 @@ namespace LCompilers { llvm_utils->start_new_block(loopbody); llvm::Value* r_val = LLVM::CreateLoad(*builder, r); llvm::Value* src_dim_val = llvm_utils->create_ptr_gep(src_dim_des_val, r_val); - llvm::Value* src_s_val = llvm_utils->create_gep(src_dim_val, 0); llvm::Value* src_l_val = nullptr; + llvm::Value* src_s_val = nullptr; if( create_dim_des_array ) { + src_s_val = llvm_utils->create_gep(src_dim_val, 0); src_l_val = llvm_utils->create_gep(src_dim_val, 1); } llvm::Value* src_dim_size_ptr = llvm_utils->create_gep(src_dim_val, 2); llvm::Value* dest_dim_val = llvm_utils->create_ptr_gep(dest_dim_des_val, r_val); - llvm::Value* dest_s_val = llvm_utils->create_gep(dest_dim_val, 0); + llvm::Value* dest_s_val = nullptr; llvm::Value* dest_l_val = nullptr; + llvm::Value* dest_dim_size_ptr = nullptr; if( create_dim_des_array ) { + dest_s_val = llvm_utils->create_gep(dest_dim_val, 0); dest_l_val = llvm_utils->create_gep(dest_dim_val, 1); + dest_dim_size_ptr = llvm_utils->create_gep(dest_dim_val, 2); } - llvm::Value* dest_dim_size_ptr = llvm_utils->create_gep(dest_dim_val, 2); - builder->CreateStore(LLVM::CreateLoad(*builder, src_s_val), dest_s_val); + if( create_dim_des_array ) { builder->CreateStore(LLVM::CreateLoad(*builder, src_l_val), dest_l_val); + builder->CreateStore(LLVM::CreateLoad(*builder, src_s_val), dest_s_val); + builder->CreateStore(LLVM::CreateLoad(*builder, src_dim_size_ptr), dest_dim_size_ptr); } - builder->CreateStore(LLVM::CreateLoad(*builder, src_dim_size_ptr), dest_dim_size_ptr); r_val = builder->CreateAdd(r_val, llvm::ConstantInt::get(context, llvm::APInt(32, 1))); builder->CreateStore(r_val, r); builder->CreateBr(loophead); diff --git a/src/libasr/codegen/llvm_array_utils.h b/src/libasr/codegen/llvm_array_utils.h index 7be522a802..e32e27d0f9 100644 --- a/src/libasr/codegen/llvm_array_utils.h +++ b/src/libasr/codegen/llvm_array_utils.h @@ -183,7 +183,7 @@ namespace LCompilers { * implemented by current class). */ virtual - llvm::Value* get_offset(llvm::Value* dim_des) = 0; + llvm::Value* get_offset(llvm::Value* dim_des, bool load=true) = 0; /* * Returns lower bound in the input @@ -207,7 +207,7 @@ namespace LCompilers { * implemented by current class. */ virtual - llvm::Value* get_stride(llvm::Value* dim_des) = 0; + llvm::Value* get_stride(llvm::Value* dim_des, bool load=true) = 0; /* * Returns dimension size in the input @@ -370,7 +370,7 @@ namespace LCompilers { void set_rank(llvm::Value* arr, llvm::Value* rank); virtual - llvm::Value* get_offset(llvm::Value* dim_des); + llvm::Value* get_offset(llvm::Value* dim_des, bool load=true); virtual llvm::Value* get_lower_bound(llvm::Value* dim_des, bool load=true); @@ -390,7 +390,7 @@ namespace LCompilers { llvm::Value* dim); virtual - llvm::Value* get_stride(llvm::Value* dim_des); + llvm::Value* get_stride(llvm::Value* dim_des, bool load=true); virtual llvm::Value* get_single_element(llvm::Value* array, diff --git a/src/libasr/pass/pass_array_by_data.cpp b/src/libasr/pass/pass_array_by_data.cpp index 6840841225..f6fa028801 100644 --- a/src/libasr/pass/pass_array_by_data.cpp +++ b/src/libasr/pass/pass_array_by_data.cpp @@ -351,12 +351,14 @@ class EditProcedureCallsVisitor : public ASR::ASRPassBaseWalkVisitor& not_to_be_erased; public: EditProcedureCallsVisitor(Allocator& al_, - PassArrayByDataProcedureVisitor& v_): - al(al_), v(v_) {} + PassArrayByDataProcedureVisitor& v_, + std::set& not_to_be_erased_): + al(al_), v(v_), not_to_be_erased(not_to_be_erased_) {} template void update_args_for_pass_arr_by_data_funcs_passed_as_callback(const T& x) { @@ -414,11 +416,29 @@ class EditProcedureCallsVisitor : public ASR::ASRPassBaseWalkVisitor(* + ASRUtils::expr_type(args[i].m_value)) ) { + return false; + } + } + return true; + } + template void visit_Call(const T& x) { ASR::symbol_t* subrout_sym = x.m_name; bool is_external = ASR::is_a(*subrout_sym); subrout_sym = ASRUtils::symbol_get_past_external(subrout_sym); + + if( !can_edit_call(x.m_args, x.n_args) ) { + not_to_be_erased.insert(subrout_sym); + return ; + } + if( v.proc2newproc.find(subrout_sym) == v.proc2newproc.end() ) { update_args_for_pass_arr_by_data_funcs_passed_as_callback(x); return; @@ -501,11 +521,13 @@ class RemoveArrayByDescriptorProceduresVisitor : public PassUtils::PassVisitor& not_to_be_erased; public: - RemoveArrayByDescriptorProceduresVisitor(Allocator& al_, PassArrayByDataProcedureVisitor& v_): - PassVisitor(al_, nullptr), v(v_) {} + RemoveArrayByDescriptorProceduresVisitor(Allocator& al_, PassArrayByDataProcedureVisitor& v_, + std::set& not_to_be_erased_): + PassVisitor(al_, nullptr), v(v_), not_to_be_erased(not_to_be_erased_) {} // Shouldn't be done because allocatable arrays when // assigned to array constants work fine in gfortran @@ -519,7 +541,8 @@ class RemoveArrayByDescriptorProceduresVisitor : public PassUtils::PassVisitor to_be_erased; for( auto& item: current_scope->get_scope() ) { - if( v.proc2newproc.find(item.second) != v.proc2newproc.end() ) { + if( v.proc2newproc.find(item.second) != v.proc2newproc.end() && + not_to_be_erased.find(item.second) == not_to_be_erased.end() ) { LCOMPILERS_ASSERT(item.first == ASRUtils::symbol_name(item.second)) to_be_erased.push_back(item.first); } @@ -537,7 +560,8 @@ class RemoveArrayByDescriptorProceduresVisitor : public PassUtils::PassVisitor to_be_erased; for( auto& item: current_scope->get_scope() ) { - if( v.proc2newproc.find(item.second) != v.proc2newproc.end() ) { + if( v.proc2newproc.find(item.second) != v.proc2newproc.end() && + not_to_be_erased.find(item.second) == not_to_be_erased.end() ) { LCOMPILERS_ASSERT(item.first == ASRUtils::symbol_name(item.second)) to_be_erased.push_back(item.first); } @@ -556,9 +580,10 @@ void pass_array_by_data(Allocator &al, ASR::TranslationUnit_t &unit, v.visit_TranslationUnit(unit); EditProcedureVisitor e(v); e.visit_TranslationUnit(unit); - EditProcedureCallsVisitor u(al, v); + std::set not_to_be_erased; + EditProcedureCallsVisitor u(al, v, not_to_be_erased); u.visit_TranslationUnit(unit); - RemoveArrayByDescriptorProceduresVisitor x(al, v); + RemoveArrayByDescriptorProceduresVisitor x(al, v, not_to_be_erased); x.visit_TranslationUnit(unit); PassUtils::UpdateDependenciesVisitor y(al); y.visit_TranslationUnit(unit); From a77b3377b8254f5feb03c4586ad96af9509afb34 Mon Sep 17 00:00:00 2001 From: Smit-create Date: Fri, 12 May 2023 12:02:44 +0530 Subject: [PATCH 60/72] Fix module imports for subroutines --- src/lpython/semantics/python_ast_to_asr.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index 1d491286e9..0eccbe5be3 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -5900,6 +5900,21 @@ class BodyVisitor : public CommonVisitor { throw SemanticError("'" + value + "' is not defined in the scope", x.base.base.loc); } + if (ASR::is_a(*t)) { + std::string call_name = at->m_attr; + std::string call_name_store = "__" + value + "_" + call_name; + ASR::Module_t *m = ASR::down_cast(t); + call_name_store = ASRUtils::get_mangled_name(m, call_name_store); + ASR::symbol_t *st = import_from_module(al, m, current_scope, value, + call_name, call_name_store, x.base.base.loc); + current_scope->add_symbol(call_name_store, st); + Vec args; + args.reserve(al, c->n_args); + visit_expr_list(c->m_args, c->n_args, args); + tmp = make_call_helper(al, st, current_scope, args, + call_name, x.base.base.loc); + return; + } Vec elements; elements.reserve(al, c->n_args); for (size_t i = 0; i < c->n_args; ++i) { From 6d08cff01341560d912ff22fcc1f3426b8b4bd35 Mon Sep 17 00:00:00 2001 From: Smit-create Date: Fri, 12 May 2023 12:02:51 +0530 Subject: [PATCH 61/72] Add tests --- integration_tests/CMakeLists.txt | 2 ++ integration_tests/test_sys_01.py | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 integration_tests/test_sys_01.py diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index e4b0321dc6..5801f37afa 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -499,6 +499,8 @@ RUN(NAME vec_01 LABELS cpython llvm c) RUN(NAME test_str_comparison LABELS cpython llvm c) RUN(NAME test_bit_length LABELS cpython llvm c) RUN(NAME str_to_list_cast LABELS cpython llvm c) +RUN(NAME test_sys_01 LABELS cpython llvm c) + RUN(NAME test_package_01 LABELS cpython llvm) RUN(NAME test_pkg_lpdraw LABELS cpython llvm wasm) diff --git a/integration_tests/test_sys_01.py b/integration_tests/test_sys_01.py new file mode 100644 index 0000000000..e15e0b4503 --- /dev/null +++ b/integration_tests/test_sys_01.py @@ -0,0 +1,2 @@ +import sys +sys.exit(0) From a9e9a33cf8c6cc24f01332ba8b3e288506617e0c Mon Sep 17 00:00:00 2001 From: Thirumalai-Shaktivel Date: Fri, 12 May 2023 12:22:50 +0530 Subject: [PATCH 62/72] Use get_python_lib to get lib path --- src/runtime/lpython/lpython.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/lpython/lpython.py b/src/runtime/lpython/lpython.py index 4f4b418c17..9cd901c319 100644 --- a/src/runtime/lpython/lpython.py +++ b/src/runtime/lpython/lpython.py @@ -736,13 +736,13 @@ def get_data_type(t): raise NotImplementedError("Platform not implemented") from numpy import get_include - from distutils.sysconfig import get_python_inc + from distutils.sysconfig import get_python_inc, get_python_lib python_path = "-I" + get_python_inc() + " " numpy_path = "-I" + get_include() rt_path_01 = "-I" + get_rtlib_dir() + "/../libasr/runtime " rt_path_02 = "-L" + get_rtlib_dir() + " -Wl,-rpath " \ + get_rtlib_dir() + " -llpython_runtime " - python_lib = "-L" "$CONDA_PREFIX/lib/ -lpython3.10 -lm" + python_lib = "-L" + get_python_lib() + "/../.. -lpython3.10 -lm" r = os.system("gcc -g" + gcc_flags + python_path + numpy_path + " a.c -o lpython_jit_module.so " + rt_path_01 + rt_path_02 + python_lib) From 8472ea42e0038d85705ff60fffd2b9cacb7af4e3 Mon Sep 17 00:00:00 2001 From: Smit-create Date: Fri, 12 May 2023 12:38:09 +0530 Subject: [PATCH 63/72] Import only once --- src/lpython/semantics/python_ast_to_asr.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index 0eccbe5be3..58c33df44f 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -5905,9 +5905,12 @@ class BodyVisitor : public CommonVisitor { std::string call_name_store = "__" + value + "_" + call_name; ASR::Module_t *m = ASR::down_cast(t); call_name_store = ASRUtils::get_mangled_name(m, call_name_store); - ASR::symbol_t *st = import_from_module(al, m, current_scope, value, + ASR::symbol_t *st = current_scope->resolve_symbol(call_name_store); + if (!st) { + st = import_from_module(al, m, current_scope, value, call_name, call_name_store, x.base.base.loc); - current_scope->add_symbol(call_name_store, st); + current_scope->add_symbol(call_name_store, st); + } Vec args; args.reserve(al, c->n_args); visit_expr_list(c->m_args, c->n_args, args); From d48b5235a60272364b98bcddc20a542642c0fa62 Mon Sep 17 00:00:00 2001 From: Thirumalai-Shaktivel Date: Fri, 12 May 2023 12:54:12 +0530 Subject: [PATCH 64/72] Use unique name for the lpython decorator generated files --- .gitignore | 1 + src/runtime/lpython/lpython.py | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index e237284a56..a96d3ff80c 100644 --- a/.gitignore +++ b/.gitignore @@ -90,6 +90,7 @@ inst/bin/* *_lines.dat.txt *__tmp__generated__.c visualize*.html +lpython_decorator*/ a.c a.h a.py diff --git a/src/runtime/lpython/lpython.py b/src/runtime/lpython/lpython.py index 9cd901c319..0d48c007a0 100644 --- a/src/runtime/lpython/lpython.py +++ b/src/runtime/lpython/lpython.py @@ -570,11 +570,13 @@ def get_data_type(t): source_code = getsource(function) source_code = source_code[source_code.find('\n'):] - # TODO: Create a filename based on the function name - # filename = function.__name__ + ".py" + dir_name = "./lpython_decorator_" + self.fn_name + if not os.path.exists(dir_name): + os.mkdir(dir_name) + filename = dir_name + "/" + self.fn_name # Open the file for writing - with open("a.py", "w") as file: + with open(filename + ".py", "w") as file: # Write the Python source code to the file file.write("@ccallable") file.write(source_code) @@ -680,7 +682,7 @@ def get_data_type(t): #include // LPython generated C code -#include "a.h" +#include "{self.fn_name}.h" // Define the Python module and method mappings static PyObject* define_module(PyObject* self, PyObject* args) {{ @@ -718,13 +720,14 @@ def get_data_type(t): """ # ---------------------------------------------------------------------- # Write the C source code to the file - with open("a.c", "w") as file: + with open(filename + ".c", "w") as file: file.write(template) # ---------------------------------------------------------------------- # Generate the Shared library # TODO: Use LLVM instead of C backend - r = os.system("lpython --show-c --disable-main a.py > a.h") + r = os.system("lpython --show-c --disable-main " + + filename + ".py > " + filename + ".h") assert r == 0, "Failed to create C file" gcc_flags = "" @@ -738,14 +741,15 @@ def get_data_type(t): from numpy import get_include from distutils.sysconfig import get_python_inc, get_python_lib python_path = "-I" + get_python_inc() + " " - numpy_path = "-I" + get_include() + numpy_path = "-I" + get_include() + " " rt_path_01 = "-I" + get_rtlib_dir() + "/../libasr/runtime " rt_path_02 = "-L" + get_rtlib_dir() + " -Wl,-rpath " \ + get_rtlib_dir() + " -llpython_runtime " python_lib = "-L" + get_python_lib() + "/../.. -lpython3.10 -lm" r = os.system("gcc -g" + gcc_flags + python_path + numpy_path + - " a.c -o lpython_jit_module.so " + rt_path_01 + rt_path_02 + python_lib) + filename + ".c -o lpython_jit_module.so " + + rt_path_01 + rt_path_02 + python_lib) assert r == 0, "Failed to create the shared library" def __call__(self, *args, **kwargs): From 0154fc30b334b7baf21ba778c939459137b51f15 Mon Sep 17 00:00:00 2001 From: Thirumalai-Shaktivel Date: Fri, 12 May 2023 12:57:43 +0530 Subject: [PATCH 65/72] Use unique name for shared library --- src/runtime/lpython/lpython.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/runtime/lpython/lpython.py b/src/runtime/lpython/lpython.py index 0d48c007a0..ce49c86506 100644 --- a/src/runtime/lpython/lpython.py +++ b/src/runtime/lpython/lpython.py @@ -700,13 +700,13 @@ def get_data_type(t): // Define the module initialization function static struct PyModuleDef module_def = {{ PyModuleDef_HEAD_INIT, - "lpython_jit_module", + "lpython_module_{self.fn_name}", "Shared library to use LPython generated functions", -1, module_methods }}; -PyMODINIT_FUNC PyInit_lpython_jit_module(void) {{ +PyMODINIT_FUNC PyInit_lpython_module_{self.fn_name}(void) {{ PyObject* module; // Create the module object @@ -748,12 +748,13 @@ def get_data_type(t): python_lib = "-L" + get_python_lib() + "/../.. -lpython3.10 -lm" r = os.system("gcc -g" + gcc_flags + python_path + numpy_path + - filename + ".c -o lpython_jit_module.so " + + filename + ".c -o lpython_module_" + self.fn_name + ".so " + rt_path_01 + rt_path_02 + python_lib) assert r == 0, "Failed to create the shared library" def __call__(self, *args, **kwargs): import sys; sys.path.append('.') # import the symbol from the shared library - function = getattr(__import__("lpython_jit_module"), self.fn_name) + function = getattr(__import__("lpython_module_" + self.fn_name), + self.fn_name) return function(*args, **kwargs) From b9850da2cff7be3d30f667aceee5c15f31252bfa Mon Sep 17 00:00:00 2001 From: kabra1110 <131529938+kabra1110@users.noreply.github.com> Date: Sat, 13 May 2023 12:56:11 +0200 Subject: [PATCH 66/72] Support ``bool`` typed keys in ``dict`` (#1771) Co-authored-by: Gagandeep Singh --- integration_tests/CMakeLists.txt | 1 + integration_tests/test_dict_bool.py | 47 +++++++++++++++++++++++++++++ src/libasr/codegen/llvm_utils.cpp | 3 ++ 3 files changed, 51 insertions(+) create mode 100644 integration_tests/test_dict_bool.py diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index 1d8be7644f..046cb6574b 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -374,6 +374,7 @@ RUN(NAME test_dict_08 LABELS cpython llvm c) RUN(NAME test_dict_09 LABELS cpython llvm c) RUN(NAME test_dict_10 LABELS cpython llvm) # TODO: Add support of dict with string in C backend RUN(NAME test_dict_11 LABELS cpython llvm c) +RUN(NAME test_dict_bool LABELS cpython llvm) RUN(NAME test_for_loop LABELS cpython llvm c) RUN(NAME modules_01 LABELS cpython llvm c wasm wasm_x86 wasm_x64) RUN(NAME modules_02 LABELS cpython llvm c wasm wasm_x86 wasm_x64) diff --git a/integration_tests/test_dict_bool.py b/integration_tests/test_dict_bool.py new file mode 100644 index 0000000000..c1e4e9cca9 --- /dev/null +++ b/integration_tests/test_dict_bool.py @@ -0,0 +1,47 @@ +from lpython import i32, f64 + +def test_dict_bool(): + d_int: dict[bool, i32] = {} + d_float: dict[bool, f64] = {} + d_str: dict[bool, str] = {} + i: i32 + j: f64 + s: str = "" + l_str: list[str] = ["a", "b", "c", "d"] + + for i in range(10): + d_int[True] = i + assert d_int[True] == i + + for i in range(10, 20): + d_int[True] = i + d_int[False] = i + 1 + assert d_int[True] == d_int[False] - 1 + assert d_int[True] == i + + d_int[True] = 0 + d_int[False] = d_int[True] + + for i in range(10, 99): + d_int[i%2 == 0] = d_int[i%2 == 0] + 1 + assert d_int[True] == d_int[False] + 1 + assert d_int[True] == 45 + + j = 0.0 + while j < 1.0: + d_float[False] = j + 1.0 + d_float[True] = d_float[False] * d_float[False] + assert d_float[True] == (j + 1.0) * (j + 1.0) + assert d_float[False] == j + 1.0 + j = j + 0.1 + + d_str[False] = s + + for i in range(len(l_str)): + d_str[True] = d_str[False] + s += l_str[i] + d_str[False] = s + assert d_str[True] + l_str[i] == d_str[False] + assert d_str[False] == s + +test_dict_bool() diff --git a/src/libasr/codegen/llvm_utils.cpp b/src/libasr/codegen/llvm_utils.cpp index 8250d26b38..dd1b2ec973 100644 --- a/src/libasr/codegen/llvm_utils.cpp +++ b/src/libasr/codegen/llvm_utils.cpp @@ -1962,6 +1962,9 @@ namespace LCompilers { } return tuple_hash; } + case ASR::ttypeType::Logical: { + return builder->CreateZExt(key, llvm::Type::getInt32Ty(context)); + } default: { throw LCompilersException("Hashing " + ASRUtils::type_to_str_python(key_asr_type) + " isn't implemented yet."); From c85d0000ebd0846c11d981a71de4f963a4019da8 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sun, 14 May 2023 00:46:17 +0530 Subject: [PATCH 67/72] ASR: Error on missing struct initialization --- src/lpython/semantics/python_ast_to_asr.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index 1f9f758008..2c6d30711b 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -2465,6 +2465,11 @@ class CommonVisitor : public AST::BaseVisitor { is_c_p_pointer_call = false; if (x.m_value) { this->visit_expr(*x.m_value); + } else { + if (ASR::is_a(*type)) { + throw SemanticError(ASRUtils::type_to_str_python(type) + " " + var_name + + " must be initialized a value", x.base.base.loc); + } } if( is_c_p_pointer_call ) { create_add_variable_to_scope(var_name, nullptr, type, From 7f7dbde2f14a2ef244bd585f4dd69bc599efe8f5 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sun, 14 May 2023 00:47:03 +0530 Subject: [PATCH 68/72] ASRUtils: also print type name along with symbol name --- src/libasr/asr_utils.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libasr/asr_utils.h b/src/libasr/asr_utils.h index 3fb215d1c8..b1da17c7ec 100644 --- a/src/libasr/asr_utils.h +++ b/src/libasr/asr_utils.h @@ -1192,15 +1192,15 @@ static inline std::string type_to_str_python(const ASR::ttype_t *t, } case ASR::ttypeType::Struct: { ASR::Struct_t* d = ASR::down_cast(t); - return symbol_name(d->m_derived_type); + return "struct " + std::string(symbol_name(d->m_derived_type)); } case ASR::ttypeType::Enum: { ASR::Enum_t* d = ASR::down_cast(t); - return symbol_name(d->m_enum_type); + return "enum " + std::string(symbol_name(d->m_enum_type)); } case ASR::ttypeType::Union: { ASR::Union_t* d = ASR::down_cast(t); - return symbol_name(d->m_union_type); + return "union " + std::string(symbol_name(d->m_union_type)); } case ASR::ttypeType::Pointer: { ASR::Pointer_t* p = ASR::down_cast(t); From abdb697ec90e7e55dd0421fea1c25749dac2199b Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sun, 14 May 2023 00:52:45 +0530 Subject: [PATCH 69/72] TEST: Add test for struct with no init_expr --- tests/errors/structs_02.py | 11 +++++++++++ tests/tests.toml | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 tests/errors/structs_02.py diff --git a/tests/errors/structs_02.py b/tests/errors/structs_02.py new file mode 100644 index 0000000000..5c0c1010a0 --- /dev/null +++ b/tests/errors/structs_02.py @@ -0,0 +1,11 @@ +from lpython import i32, dataclass + +@dataclass +class S: + x: i32 + +def main0(): + s: S + s.x = 2 + +main0() diff --git a/tests/tests.toml b/tests/tests.toml index 71d61d9eb1..21790026c9 100644 --- a/tests/tests.toml +++ b/tests/tests.toml @@ -638,6 +638,10 @@ asr = true filename = "errors/structs_01.py" asr = true +[[test]] +filename = "errors/structs_02.py" +asr = true + [[test]] filename = "errors/const_01.py" asr = true From d0cd19b78c6f62cf18da0a05c5043b91146a1a77 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sun, 14 May 2023 01:32:49 +0530 Subject: [PATCH 70/72] TEST: Update tests to add struct init --- integration_tests/bindc_03.py | 2 +- integration_tests/structs_01.py | 3 +-- integration_tests/structs_02.py | 3 +-- integration_tests/structs_04.py | 4 ++-- integration_tests/structs_05.py | 6 +++--- integration_tests/structs_09.py | 7 +++---- integration_tests/structs_10.py | 4 ++-- integration_tests/structs_17.py | 4 ++-- integration_tests/union_02.py | 6 +++--- 9 files changed, 18 insertions(+), 21 deletions(-) diff --git a/integration_tests/bindc_03.py b/integration_tests/bindc_03.py index 3a1a9fbf33..d1e699371b 100644 --- a/integration_tests/bindc_03.py +++ b/integration_tests/bindc_03.py @@ -42,7 +42,7 @@ def h(q_void: CPtr) -> None: def run(): a: CPtr array_wrapped: ArrayWrapped = ArrayWrapped(a) - array_wrapped1: ArrayWrapped + array_wrapped1: ArrayWrapped = ArrayWrapped() size: i32 size = 10 a = get_array(size) diff --git a/integration_tests/structs_01.py b/integration_tests/structs_01.py index e88682d93b..e588116414 100644 --- a/integration_tests/structs_01.py +++ b/integration_tests/structs_01.py @@ -14,8 +14,7 @@ def change_struct(a: A): a.y = a.y + f32(1) def g(): - x: A - x = A(f32(3.25), 3) + x: A = A(f32(3.25), 3) f(x) assert x.x == 3 assert f64(x.y) == 3.25 diff --git a/integration_tests/structs_02.py b/integration_tests/structs_02.py index 5dc1acb5e6..f3325d6a9a 100644 --- a/integration_tests/structs_02.py +++ b/integration_tests/structs_02.py @@ -9,9 +9,8 @@ class A: def f(a: CPtr) -> None: x: i32 y: f32 - a1: A + a1: A = A(3, f32(3.25)) a2: Pointer[A] - a1 = A(3, f32(3.25)) a2 = pointer(a1) print(a2, pointer(a1)) x = a2.x diff --git a/integration_tests/structs_04.py b/integration_tests/structs_04.py index ac902839a8..087fac365e 100644 --- a/integration_tests/structs_04.py +++ b/integration_tests/structs_04.py @@ -8,8 +8,8 @@ class A: @dataclass class B: - a: A z: i32 + a: A = A(f32(0.0), 0) def f(b: B): print(b.z, b.a.x, b.a.y) @@ -20,7 +20,7 @@ def f(b: B): def g(): a1: A = A(f32(1.0), 1) a2: A = A(f32(2.0), 2) - b: B = B(a1, 1) + b: B = B(1, a1) b.a = deepcopy(a2) b.z = 1 b.a.x = 2 diff --git a/integration_tests/structs_05.py b/integration_tests/structs_05.py index 05c9dda4ea..d738778109 100644 --- a/integration_tests/structs_05.py +++ b/integration_tests/structs_05.py @@ -1,4 +1,5 @@ from lpython import i32, f64, i64, i16, i8, f32, dataclass +from numpy import empty @dataclass class A: @@ -49,9 +50,8 @@ def update_2(s: A[:]): s[1].c = i8(3) def g(): - # TODO: Replace y: A[2] with y: A[2] = [None, None] - # TODO: And enable cpython in integration_tests. - y: A[2] + # TODO: Enable cpython in integration_tests. + y: A[2] = empty([2], dtype=A) y[0] = A(1.1, 1, i64(1), f32(1.1), i16(1), i8(1), True) y[1] = A(2.2, 2, i64(2), f32(2.2), i16(2), i8(2), True) verify(y, 1, 1.1, 2, 2.2) diff --git a/integration_tests/structs_09.py b/integration_tests/structs_09.py index ea309529be..b32d059afa 100644 --- a/integration_tests/structs_09.py +++ b/integration_tests/structs_09.py @@ -7,13 +7,13 @@ class C: @dataclass class B: z: i32 - bc: C + bc: C = C(f32(0.0)) @dataclass class A: y: f32 x: i32 - b: B + b: B = B(0, C(f32(0.0))) def f(a: A): @@ -22,8 +22,7 @@ def f(a: A): print(a.b.z) def g(): - x: A - x = A(f32(3.25), 3, B(71, C(f32(4.0)))) + x: A = A(f32(3.25), 3, B(71, C(f32(4.0)))) f(x) assert x.x == 3 assert f64(x.y) == 3.25 diff --git a/integration_tests/structs_10.py b/integration_tests/structs_10.py index 59fd41cd5b..8e55c9a5ae 100644 --- a/integration_tests/structs_10.py +++ b/integration_tests/structs_10.py @@ -11,8 +11,8 @@ class Vec: @dataclass class MatVec: - mat: Mat - vec: Vec + mat: Mat = Mat([f64(0.0), f64(0.0)]) + vec: Vec = Vec([f64(0.0), f64(0.0)]) def rotate(mat_vec: MatVec) -> f64[2]: rotated_vec: f64[2] = empty(2, dtype=float64) diff --git a/integration_tests/structs_17.py b/integration_tests/structs_17.py index 95aeada9c3..462432c9ba 100644 --- a/integration_tests/structs_17.py +++ b/integration_tests/structs_17.py @@ -6,13 +6,13 @@ class B: @dataclass class C: cz: f32 - bc: C + bc: C = C(f32(0.0)) @dataclass class A: y: f32 x: i32 - b: B + b: B = B(0, B.C(f32(0.0))) def f(a: A): diff --git a/integration_tests/union_02.py b/integration_tests/union_02.py index 12b340b3dd..c64f08463a 100644 --- a/integration_tests/union_02.py +++ b/integration_tests/union_02.py @@ -19,9 +19,9 @@ class C: @ccall @union class D(Union): - a: A - b: B - c: C + a: A = A() + b: B = B() + c: C = C() def test_struct_union(): d: D = D() From 8dcdcbeb8a86d902d2736ea16fdb0e112cd90183 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sun, 14 May 2023 01:33:36 +0530 Subject: [PATCH 71/72] ASR: Skip visit_Call() in SymbolTableVisitor --- src/lpython/semantics/python_ast_to_asr.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index 2c6d30711b..49a6299395 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -4103,6 +4103,10 @@ class SymbolTableVisitor : public CommonVisitor { void visit_If(const AST::If_t &/*x*/) { // We skip this in the SymbolTable visitor, but visit it in the BodyVisitor } + + void visit_Call(const AST::Call_t &/*x*/) { + // We skip this in the SymbolTable visitor, but visit it in the BodyVisitor + } }; Result symbol_table_visitor(Allocator &al, LocationManager &lm, const AST::Module_t &ast, From bf6ef8fbeaba453c87ce0ade5be77c9ad3dd667f Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sun, 14 May 2023 01:36:09 +0530 Subject: [PATCH 72/72] TEST: Update reference tests --- tests/reference/asr-structs_01-be14d49.json | 2 +- tests/reference/asr-structs_02-2ab459a.json | 2 +- tests/reference/asr-structs_02-f95782c.json | 13 + tests/reference/asr-structs_02-f95782c.stderr | 5 + tests/reference/asr-structs_04-387747b.json | 4 +- tests/reference/asr-structs_04-387747b.stdout | 8 +- tests/reference/asr-structs_05-fa98307.json | 4 +- tests/reference/asr-structs_05-fa98307.stdout | 6183 ++++++++++++++++- 8 files changed, 6041 insertions(+), 180 deletions(-) create mode 100644 tests/reference/asr-structs_02-f95782c.json create mode 100644 tests/reference/asr-structs_02-f95782c.stderr diff --git a/tests/reference/asr-structs_01-be14d49.json b/tests/reference/asr-structs_01-be14d49.json index b15e93631e..b0ef6e9369 100644 --- a/tests/reference/asr-structs_01-be14d49.json +++ b/tests/reference/asr-structs_01-be14d49.json @@ -2,7 +2,7 @@ "basename": "asr-structs_01-be14d49", "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/structs_01.py", - "infile_hash": "a17eed6995c1af36b3968cb80367bda33fb855a60793b6bdc770aad2", + "infile_hash": "c8012b0c841b0d8e304c18ca7c6d4365f1d5e41235dc6f4e2dc21664", "outfile": null, "outfile_hash": null, "stdout": "asr-structs_01-be14d49.stdout", diff --git a/tests/reference/asr-structs_02-2ab459a.json b/tests/reference/asr-structs_02-2ab459a.json index 9fc29f74ff..7859a34eb9 100644 --- a/tests/reference/asr-structs_02-2ab459a.json +++ b/tests/reference/asr-structs_02-2ab459a.json @@ -2,7 +2,7 @@ "basename": "asr-structs_02-2ab459a", "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/structs_02.py", - "infile_hash": "f101938e4f5608477de4e57be8f04196e51b97aab3ade62833cecf91", + "infile_hash": "6d54aa7c2bb850cbce2c0add7b77f9f72c9323162ae080c7eef4867a", "outfile": null, "outfile_hash": null, "stdout": "asr-structs_02-2ab459a.stdout", diff --git a/tests/reference/asr-structs_02-f95782c.json b/tests/reference/asr-structs_02-f95782c.json new file mode 100644 index 0000000000..6a45542935 --- /dev/null +++ b/tests/reference/asr-structs_02-f95782c.json @@ -0,0 +1,13 @@ +{ + "basename": "asr-structs_02-f95782c", + "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", + "infile": "tests/errors/structs_02.py", + "infile_hash": "bc4446b7b96cad60bb368378e7af4a8f628bfaaecac2063a1bec5c06", + "outfile": null, + "outfile_hash": null, + "stdout": null, + "stdout_hash": null, + "stderr": "asr-structs_02-f95782c.stderr", + "stderr_hash": "feebf3045d755a862d604df8c8ab0e0cb346f7fbc285256b18e9d559", + "returncode": 2 +} \ No newline at end of file diff --git a/tests/reference/asr-structs_02-f95782c.stderr b/tests/reference/asr-structs_02-f95782c.stderr new file mode 100644 index 0000000000..4ae0a08977 --- /dev/null +++ b/tests/reference/asr-structs_02-f95782c.stderr @@ -0,0 +1,5 @@ +semantic error: struct S s must be initialized a value + --> tests/errors/structs_02.py:8:5 + | +8 | s: S + | ^^^^ diff --git a/tests/reference/asr-structs_04-387747b.json b/tests/reference/asr-structs_04-387747b.json index 82ee8c0110..942a62efad 100644 --- a/tests/reference/asr-structs_04-387747b.json +++ b/tests/reference/asr-structs_04-387747b.json @@ -2,11 +2,11 @@ "basename": "asr-structs_04-387747b", "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/structs_04.py", - "infile_hash": "b57d1dd265f7a7906398ff70e0d5713433a7c3354590d727b3e6306d", + "infile_hash": "c19af3c3fbac1430c22c5aaf69aea7c622faa9d7c4e7734edbd0066d", "outfile": null, "outfile_hash": null, "stdout": "asr-structs_04-387747b.stdout", - "stdout_hash": "596c5faeae119e44e06dc8f6501c1b84360bceed027db7b76498eb1f", + "stdout_hash": "421cc9ffddc15f1c8ec8724fed6b2a87c54d03cfbfc288b13175d718", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-structs_04-387747b.stdout b/tests/reference/asr-structs_04-387747b.stdout index 03aa35d7e4..67c42f339a 100644 --- a/tests/reference/asr-structs_04-387747b.stdout +++ b/tests/reference/asr-structs_04-387747b.stdout @@ -95,8 +95,8 @@ }) B [A] - [a - z] + [z + a] Source Public .false. @@ -432,8 +432,8 @@ (Var 5 b) (StructTypeConstructor 8 B - [((Var 5 a1)) - ((IntegerConstant 1 (Integer 4 [])))] + [((IntegerConstant 1 (Integer 4 []))) + ((Var 5 a1))] (Struct 8 B [] diff --git a/tests/reference/asr-structs_05-fa98307.json b/tests/reference/asr-structs_05-fa98307.json index d795618fd4..f8694a70e6 100644 --- a/tests/reference/asr-structs_05-fa98307.json +++ b/tests/reference/asr-structs_05-fa98307.json @@ -2,11 +2,11 @@ "basename": "asr-structs_05-fa98307", "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/structs_05.py", - "infile_hash": "5c9d6218394744f26160b09fb545064c82ef9172e10b474d6be5fca2", + "infile_hash": "0ca482232f99c40614dc5b994fa8c9f4865fbe72f5a133b02914b5ad", "outfile": null, "outfile_hash": null, "stdout": "asr-structs_05-fa98307.stdout", - "stdout_hash": "eed215681e7afcff6553f61228ae7482df849e1b24c3a022f80c6da0", + "stdout_hash": "4adb7d314cd3d28086e7e0ebb8a701b1de0d0f253d5de63730b6f113", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-structs_05-fa98307.stdout b/tests/reference/asr-structs_05-fa98307.stdout index 0ef6e59ba5..f2ef05d938 100644 --- a/tests/reference/asr-structs_05-fa98307.stdout +++ b/tests/reference/asr-structs_05-fa98307.stdout @@ -5,16 +5,16 @@ _global_symbols: (Module (SymbolTable - 9 + 200 { A: (StructType (SymbolTable - 2 + 193 { a: (Variable - 2 + 193 a [] Local @@ -29,7 +29,7 @@ ), b: (Variable - 2 + 193 b [] Local @@ -44,7 +44,7 @@ ), c: (Variable - 2 + 193 c [] Local @@ -59,7 +59,7 @@ ), d: (Variable - 2 + 193 d [] Local @@ -74,7 +74,7 @@ ), x: (Variable - 2 + 193 x [] Local @@ -89,7 +89,7 @@ ), y: (Variable - 2 + 193 y [] Local @@ -104,7 +104,7 @@ ), z: (Variable - 2 + 193 z [] Local @@ -137,7 +137,7 @@ _lpython_main_program: (Function (SymbolTable - 8 + 199 { }) @@ -160,7 +160,7 @@ [g] [] [(SubroutineCall - 9 g + 200 g () [] () @@ -174,11 +174,11 @@ g: (Function (SymbolTable - 6 + 197 { y: (Variable - 6 + 197 y [] Local @@ -186,7 +186,7 @@ () Default (Struct - 9 A + 200 A [((IntegerConstant 0 (Integer 4 [])) (IntegerConstant 2 (Integer 4 [])))] ) @@ -218,19 +218,19 @@ [] [(= (ArrayItem - (Var 6 y) + (Var 197 y) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Struct - 9 A + 200 A [] ) RowMajor () ) (StructTypeConstructor - 9 A + 200 A [((RealConstant 1.100000 (Real 8 []) @@ -271,7 +271,7 @@ (Logical 4 []) ))] (Struct - 9 A + 200 A [] ) () @@ -280,19 +280,19 @@ ) (= (ArrayItem - (Var 6 y) + (Var 197 y) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Struct - 9 A + 200 A [] ) RowMajor () ) (StructTypeConstructor - 9 A + 200 A [((RealConstant 2.200000 (Real 8 []) @@ -333,7 +333,7 @@ (Logical 4 []) ))] (Struct - 9 A + 200 A [] ) () @@ -341,9 +341,9 @@ () ) (SubroutineCall - 9 verify + 200 verify () - [((Var 6 y)) + [((Var 197 y)) ((IntegerConstant 1 (Integer 4 []))) ((RealConstant 1.100000 @@ -357,15 +357,15 @@ () ) (SubroutineCall - 9 update_1 + 200 update_1 () [((ArrayItem - (Var 6 y) + (Var 197 y) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Struct - 9 A + 200 A [] ) RowMajor @@ -374,15 +374,15 @@ () ) (SubroutineCall - 9 update_2 + 200 update_2 () - [((Var 6 y))] + [((Var 197 y))] () ) (SubroutineCall - 9 verify + 200 verify () - [((Var 6 y)) + [((Var 197 y)) ((IntegerConstant 2 (Integer 4 []))) ((RealConstant 1.200000 @@ -404,11 +404,11 @@ update_1: (Function (SymbolTable - 4 + 195 { s: (Variable - 4 + 195 s [] In @@ -416,7 +416,7 @@ () Default (Struct - 9 A + 200 A [] ) Source @@ -428,7 +428,7 @@ update_1 (FunctionType [(Struct - 9 A + 200 A [] )] () @@ -445,11 +445,11 @@ .false. ) [] - [(Var 4 s)] + [(Var 195 s)] [(= (StructInstanceMember - (Var 4 s) - 2 x + (Var 195 s) + 193 x (Integer 4 []) () ) @@ -458,8 +458,8 @@ ) (= (StructInstanceMember - (Var 4 s) - 2 y + (Var 195 s) + 193 y (Real 8 []) () ) @@ -471,8 +471,8 @@ ) (= (StructInstanceMember - (Var 4 s) - 2 z + (Var 195 s) + 193 z (Integer 8 []) () ) @@ -486,8 +486,8 @@ ) (= (StructInstanceMember - (Var 4 s) - 2 a + (Var 195 s) + 193 a (Real 4 []) () ) @@ -507,8 +507,8 @@ ) (= (StructInstanceMember - (Var 4 s) - 2 b + (Var 195 s) + 193 b (Integer 2 []) () ) @@ -522,8 +522,8 @@ ) (= (StructInstanceMember - (Var 4 s) - 2 c + (Var 195 s) + 193 c (Integer 1 []) () ) @@ -544,11 +544,11 @@ update_2: (Function (SymbolTable - 5 + 196 { s: (Variable - 5 + 196 s [] InOut @@ -556,7 +556,7 @@ () Default (Struct - 9 A + 200 A [(() ())] ) @@ -569,7 +569,7 @@ update_2 (FunctionType [(Struct - 9 A + 200 A [(() ())] )] @@ -587,22 +587,22 @@ .false. ) [] - [(Var 5 s)] + [(Var 196 s)] [(= (StructInstanceMember (ArrayItem - (Var 5 s) + (Var 196 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Struct - 9 A + 200 A [] ) RowMajor () ) - 2 x + 193 x (Integer 4 []) () ) @@ -612,18 +612,18 @@ (= (StructInstanceMember (ArrayItem - (Var 5 s) + (Var 196 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Struct - 9 A + 200 A [] ) RowMajor () ) - 2 y + 193 y (Real 8 []) () ) @@ -636,18 +636,18 @@ (= (StructInstanceMember (ArrayItem - (Var 5 s) + (Var 196 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Struct - 9 A + 200 A [] ) RowMajor () ) - 2 z + 193 z (Integer 8 []) () ) @@ -662,18 +662,18 @@ (= (StructInstanceMember (ArrayItem - (Var 5 s) + (Var 196 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Struct - 9 A + 200 A [] ) RowMajor () ) - 2 a + 193 a (Real 4 []) () ) @@ -694,18 +694,18 @@ (= (StructInstanceMember (ArrayItem - (Var 5 s) + (Var 196 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Struct - 9 A + 200 A [] ) RowMajor () ) - 2 b + 193 b (Integer 2 []) () ) @@ -720,18 +720,18 @@ (= (StructInstanceMember (ArrayItem - (Var 5 s) + (Var 196 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Struct - 9 A + 200 A [] ) RowMajor () ) - 2 c + 193 c (Integer 1 []) () ) @@ -752,11 +752,11 @@ verify: (Function (SymbolTable - 3 + 194 { eps: (Variable - 3 + 194 eps [] Local @@ -771,7 +771,7 @@ ), s: (Variable - 3 + 194 s [] InOut @@ -779,7 +779,7 @@ () Default (Struct - 9 A + 200 A [(() ())] ) @@ -790,7 +790,7 @@ ), s0: (Variable - 3 + 194 s0 [] Local @@ -798,7 +798,7 @@ () Default (Struct - 9 A + 200 A [] ) Source @@ -808,7 +808,7 @@ ), s1: (Variable - 3 + 194 s1 [] Local @@ -816,7 +816,7 @@ () Default (Struct - 9 A + 200 A [] ) Source @@ -826,7 +826,7 @@ ), x1: (Variable - 3 + 194 x1 [] In @@ -841,7 +841,7 @@ ), x2: (Variable - 3 + 194 x2 [] In @@ -856,7 +856,7 @@ ), y1: (Variable - 3 + 194 y1 [] In @@ -871,7 +871,7 @@ ), y2: (Variable - 3 + 194 y2 [] In @@ -888,7 +888,7 @@ verify (FunctionType [(Struct - 9 A + 200 A [(() ())] ) @@ -910,13 +910,13 @@ .false. ) [] - [(Var 3 s) - (Var 3 x1) - (Var 3 y1) - (Var 3 x2) - (Var 3 y2)] + [(Var 194 s) + (Var 194 x1) + (Var 194 y1) + (Var 194 x2) + (Var 194 y2)] [(= - (Var 3 eps) + (Var 194 eps) (RealConstant 0.000000 (Real 8 []) @@ -924,14 +924,14 @@ () ) (= - (Var 3 s0) + (Var 194 s0) (ArrayItem - (Var 3 s) + (Var 194 s) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Struct - 9 A + 200 A [] ) RowMajor @@ -942,44 +942,44 @@ (Print () [(StructInstanceMember - (Var 3 s0) - 2 x + (Var 194 s0) + 193 x (Integer 4 []) () ) (StructInstanceMember - (Var 3 s0) - 2 y + (Var 194 s0) + 193 y (Real 8 []) () ) (StructInstanceMember - (Var 3 s0) - 2 z + (Var 194 s0) + 193 z (Integer 8 []) () ) (StructInstanceMember - (Var 3 s0) - 2 a + (Var 194 s0) + 193 a (Real 4 []) () ) (StructInstanceMember - (Var 3 s0) - 2 b + (Var 194 s0) + 193 b (Integer 2 []) () ) (StructInstanceMember - (Var 3 s0) - 2 c + (Var 194 s0) + 193 c (Integer 1 []) () ) (StructInstanceMember - (Var 3 s0) - 2 d + (Var 194 s0) + 193 d (Logical 4 []) () )] @@ -989,13 +989,13 @@ (Assert (IntegerCompare (StructInstanceMember - (Var 3 s0) - 2 x + (Var 194 s0) + 193 x (Integer 4 []) () ) Eq - (Var 3 x1) + (Var 194 x1) (Logical 4 []) () ) @@ -1007,13 +1007,13 @@ Abs [(RealBinOp (StructInstanceMember - (Var 3 s0) - 2 y + (Var 194 s0) + 193 y (Real 8 []) () ) Sub - (Var 3 y1) + (Var 194 y1) (Real 8 []) () )] @@ -1022,7 +1022,7 @@ () ) Lt - (Var 3 eps) + (Var 194 eps) (Logical 4 []) () ) @@ -1031,14 +1031,14 @@ (Assert (IntegerCompare (StructInstanceMember - (Var 3 s0) - 2 z + (Var 194 s0) + 193 z (Integer 8 []) () ) Eq (Cast - (Var 3 x1) + (Var 194 x1) IntegerToInteger (Integer 8 []) () @@ -1054,14 +1054,14 @@ Abs [(RealBinOp (StructInstanceMember - (Var 3 s0) - 2 a + (Var 194 s0) + 193 a (Real 4 []) () ) Sub (Cast - (Var 3 y1) + (Var 194 y1) RealToReal (Real 4 []) () @@ -1094,14 +1094,14 @@ (Assert (IntegerCompare (StructInstanceMember - (Var 3 s0) - 2 b + (Var 194 s0) + 193 b (Integer 2 []) () ) Eq (Cast - (Var 3 x1) + (Var 194 x1) IntegerToInteger (Integer 2 []) () @@ -1114,14 +1114,14 @@ (Assert (IntegerCompare (StructInstanceMember - (Var 3 s0) - 2 c + (Var 194 s0) + 193 c (Integer 1 []) () ) Eq (Cast - (Var 3 x1) + (Var 194 x1) IntegerToInteger (Integer 1 []) () @@ -1133,22 +1133,22 @@ ) (Assert (StructInstanceMember - (Var 3 s0) - 2 d + (Var 194 s0) + 193 d (Logical 4 []) () ) () ) (= - (Var 3 s1) + (Var 194 s1) (ArrayItem - (Var 3 s) + (Var 194 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Struct - 9 A + 200 A [] ) RowMajor @@ -1159,44 +1159,44 @@ (Print () [(StructInstanceMember - (Var 3 s1) - 2 x + (Var 194 s1) + 193 x (Integer 4 []) () ) (StructInstanceMember - (Var 3 s1) - 2 y + (Var 194 s1) + 193 y (Real 8 []) () ) (StructInstanceMember - (Var 3 s1) - 2 z + (Var 194 s1) + 193 z (Integer 8 []) () ) (StructInstanceMember - (Var 3 s1) - 2 a + (Var 194 s1) + 193 a (Real 4 []) () ) (StructInstanceMember - (Var 3 s1) - 2 b + (Var 194 s1) + 193 b (Integer 2 []) () ) (StructInstanceMember - (Var 3 s1) - 2 c + (Var 194 s1) + 193 c (Integer 1 []) () ) (StructInstanceMember - (Var 3 s1) - 2 d + (Var 194 s1) + 193 d (Logical 4 []) () )] @@ -1206,13 +1206,13 @@ (Assert (IntegerCompare (StructInstanceMember - (Var 3 s1) - 2 x + (Var 194 s1) + 193 x (Integer 4 []) () ) Eq - (Var 3 x2) + (Var 194 x2) (Logical 4 []) () ) @@ -1224,13 +1224,13 @@ Abs [(RealBinOp (StructInstanceMember - (Var 3 s1) - 2 y + (Var 194 s1) + 193 y (Real 8 []) () ) Sub - (Var 3 y2) + (Var 194 y2) (Real 8 []) () )] @@ -1239,7 +1239,7 @@ () ) Lt - (Var 3 eps) + (Var 194 eps) (Logical 4 []) () ) @@ -1248,14 +1248,14 @@ (Assert (IntegerCompare (StructInstanceMember - (Var 3 s1) - 2 z + (Var 194 s1) + 193 z (Integer 8 []) () ) Eq (Cast - (Var 3 x2) + (Var 194 x2) IntegerToInteger (Integer 8 []) () @@ -1271,14 +1271,14 @@ Abs [(RealBinOp (StructInstanceMember - (Var 3 s1) - 2 a + (Var 194 s1) + 193 a (Real 4 []) () ) Sub (Cast - (Var 3 y2) + (Var 194 y2) RealToReal (Real 4 []) () @@ -1311,14 +1311,14 @@ (Assert (IntegerCompare (StructInstanceMember - (Var 3 s1) - 2 b + (Var 194 s1) + 193 b (Integer 2 []) () ) Eq (Cast - (Var 3 x2) + (Var 194 x2) IntegerToInteger (Integer 2 []) () @@ -1331,14 +1331,14 @@ (Assert (IntegerCompare (StructInstanceMember - (Var 3 s1) - 2 c + (Var 194 s1) + 193 c (Integer 1 []) () ) Eq (Cast - (Var 3 x2) + (Var 194 x2) IntegerToInteger (Integer 1 []) () @@ -1350,8 +1350,8 @@ ) (Assert (StructInstanceMember - (Var 3 s1) - 2 d + (Var 194 s1) + 193 d (Logical 4 []) () ) @@ -1369,16 +1369,18 @@ .false. .false. ), + lpython_builtin: + (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable - 7 + 198 { _lpython_main_program: (ExternalSymbol - 7 + 198 _lpython_main_program - 9 _lpython_main_program + 200 _lpython_main_program _global_symbols [] _lpython_main_program @@ -1388,11 +1390,5852 @@ main_program [_global_symbols] [(SubroutineCall - 7 _lpython_main_program + 198 _lpython_main_program () [] () )] + ), + numpy: + (Module + (SymbolTable + 3 + { + __lpython_overloaded_0__arccos: + (Function + (SymbolTable + 41 + { + _lpython_return_variable: + (Variable + 41 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 41 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__arccos + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_dacos] + [(Var 41 x)] + [(= + (Var 41 _lpython_return_variable) + (FunctionCall + 3 _lfortran_dacos + () + [((Var 41 x))] + (Real 8 []) + () + () + ) + () + ) + (Return)] + (Var 41 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__arccosh: + (Function + (SymbolTable + 65 + { + _lpython_return_variable: + (Variable + 65 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 65 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__arccosh + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_dacosh] + [(Var 65 x)] + [(= + (Var 65 _lpython_return_variable) + (FunctionCall + 3 _lfortran_dacosh + () + [((Var 65 x))] + (Real 8 []) + () + () + ) + () + ) + (Return)] + (Var 65 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__arcsin: + (Function + (SymbolTable + 37 + { + _lpython_return_variable: + (Variable + 37 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 37 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__arcsin + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_dasin] + [(Var 37 x)] + [(= + (Var 37 _lpython_return_variable) + (FunctionCall + 3 _lfortran_dasin + () + [((Var 37 x))] + (Real 8 []) + () + () + ) + () + ) + (Return)] + (Var 37 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__arcsinh: + (Function + (SymbolTable + 61 + { + _lpython_return_variable: + (Variable + 61 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 61 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__arcsinh + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_dasinh] + [(Var 61 x)] + [(= + (Var 61 _lpython_return_variable) + (FunctionCall + 3 _lfortran_dasinh + () + [((Var 61 x))] + (Real 8 []) + () + () + ) + () + ) + (Return)] + (Var 61 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__arctan: + (Function + (SymbolTable + 53 + { + _lpython_return_variable: + (Variable + 53 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 53 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__arctan + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_datan] + [(Var 53 x)] + [(= + (Var 53 _lpython_return_variable) + (FunctionCall + 3 _lfortran_datan + () + [((Var 53 x))] + (Real 8 []) + () + () + ) + () + ) + (Return)] + (Var 53 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__arctanh: + (Function + (SymbolTable + 69 + { + _lpython_return_variable: + (Variable + 69 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 69 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__arctanh + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_datanh] + [(Var 69 x)] + [(= + (Var 69 _lpython_return_variable) + (FunctionCall + 3 _lfortran_datanh + () + [((Var 69 x))] + (Real 8 []) + () + () + ) + () + ) + (Return)] + (Var 69 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__ceil: + (Function + (SymbolTable + 76 + { + _lpython_return_variable: + (Variable + 76 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + result: + (Variable + 76 + result + [] + Local + () + () + Default + (Integer 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 76 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__ceil + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 76 x)] + [(= + (Var 76 result) + (Cast + (Var 76 x) + RealToInteger + (Integer 8 []) + () + ) + () + ) + (If + (LogicalBinOp + (RealCompare + (Var 76 x) + LtE + (Cast + (IntegerConstant 0 (Integer 4 [])) + IntegerToReal + (Real 8 []) + (RealConstant + 0.000000 + (Real 8 []) + ) + ) + (Logical 4 []) + () + ) + Or + (RealCompare + (Var 76 x) + Eq + (Cast + (Var 76 result) + IntegerToReal + (Real 8 []) + () + ) + (Logical 4 []) + () + ) + (Logical 4 []) + () + ) + [(= + (Var 76 _lpython_return_variable) + (Cast + (Var 76 result) + IntegerToReal + (Real 8 []) + () + ) + () + ) + (Return)] + [] + ) + (= + (Var 76 _lpython_return_variable) + (Cast + (IntegerBinOp + (Var 76 result) + Add + (Cast + (IntegerConstant 1 (Integer 4 [])) + IntegerToInteger + (Integer 8 []) + (IntegerConstant 1 (Integer 8 [])) + ) + (Integer 8 []) + () + ) + IntegerToReal + (Real 8 []) + () + ) + () + ) + (Return)] + (Var 76 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__cos: + (Function + (SymbolTable + 9 + { + _lpython_return_variable: + (Variable + 9 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 9 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__cos + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_dcos] + [(Var 9 x)] + [(= + (Var 9 _lpython_return_variable) + (FunctionCall + 3 _lfortran_dcos + () + [((Var 9 x))] + (Real 8 []) + () + () + ) + () + ) + (Return)] + (Var 9 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__cosh: + (Function + (SymbolTable + 23 + { + _lpython_return_variable: + (Variable + 23 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 23 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__cosh + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_dcosh] + [(Var 23 x)] + [(= + (Var 23 _lpython_return_variable) + (FunctionCall + 3 _lfortran_dcosh + () + [((Var 23 x))] + (Real 8 []) + () + () + ) + () + ) + (Return)] + (Var 23 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__degrees: + (Function + (SymbolTable + 56 + { + _lpython_return_variable: + (Variable + 56 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 56 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__degrees + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 56 x)] + [(= + (Var 56 _lpython_return_variable) + (RealBinOp + (RealBinOp + (Var 56 x) + Mul + (RealConstant + 180.000000 + (Real 8 []) + ) + (Real 8 []) + () + ) + Div + (Var 3 pi_64) + (Real 8 []) + () + ) + () + ) + (Return)] + (Var 56 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__exp: + (Function + (SymbolTable + 49 + { + _lpython_return_variable: + (Variable + 49 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 49 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__exp + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_dexp] + [(Var 49 x)] + [(= + (Var 49 _lpython_return_variable) + (FunctionCall + 3 _lfortran_dexp + () + [((Var 49 x))] + (Real 8 []) + () + () + ) + () + ) + (Return)] + (Var 49 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__floor: + (Function + (SymbolTable + 74 + { + _lpython_return_variable: + (Variable + 74 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + result: + (Variable + 74 + result + [] + Local + () + () + Default + (Integer 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 74 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__floor + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 74 x)] + [(= + (Var 74 result) + (Cast + (Var 74 x) + RealToInteger + (Integer 8 []) + () + ) + () + ) + (If + (LogicalBinOp + (RealCompare + (Var 74 x) + GtE + (Cast + (IntegerConstant 0 (Integer 4 [])) + IntegerToReal + (Real 8 []) + (RealConstant + 0.000000 + (Real 8 []) + ) + ) + (Logical 4 []) + () + ) + Or + (RealCompare + (Var 74 x) + Eq + (Cast + (Var 74 result) + IntegerToReal + (Real 8 []) + () + ) + (Logical 4 []) + () + ) + (Logical 4 []) + () + ) + [(= + (Var 74 _lpython_return_variable) + (Cast + (Var 74 result) + IntegerToReal + (Real 8 []) + () + ) + () + ) + (Return)] + [] + ) + (= + (Var 74 _lpython_return_variable) + (Cast + (IntegerBinOp + (Var 74 result) + Sub + (Cast + (IntegerConstant 1 (Integer 4 [])) + IntegerToInteger + (Integer 8 []) + (IntegerConstant 1 (Integer 8 [])) + ) + (Integer 8 []) + () + ) + IntegerToReal + (Real 8 []) + () + ) + () + ) + (Return)] + (Var 74 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__log: + (Function + (SymbolTable + 27 + { + _lpython_return_variable: + (Variable + 27 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 27 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__log + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_dlog] + [(Var 27 x)] + [(= + (Var 27 _lpython_return_variable) + (FunctionCall + 3 _lfortran_dlog + () + [((Var 27 x))] + (Real 8 []) + () + () + ) + () + ) + (Return)] + (Var 27 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__log10: + (Function + (SymbolTable + 31 + { + _lpython_return_variable: + (Variable + 31 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 31 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__log10 + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_dlog10] + [(Var 31 x)] + [(= + (Var 31 _lpython_return_variable) + (FunctionCall + 3 _lfortran_dlog10 + () + [((Var 31 x))] + (Real 8 []) + () + () + ) + () + ) + (Return)] + (Var 31 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__log2: + (Function + (SymbolTable + 34 + { + _lpython_return_variable: + (Variable + 34 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 34 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__log2 + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_dlog] + [(Var 34 x)] + [(= + (Var 34 _lpython_return_variable) + (RealBinOp + (FunctionCall + 3 _lfortran_dlog + () + [((Var 34 x))] + (Real 8 []) + () + () + ) + Div + (FunctionCall + 3 _lfortran_dlog + () + [((RealConstant + 2.000000 + (Real 8 []) + ))] + (Real 8 []) + () + () + ) + (Real 8 []) + () + ) + () + ) + (Return)] + (Var 34 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__mod: + (Function + (SymbolTable + 72 + { + _lpython_return_variable: + (Variable + 72 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Integer 8 []) + Source + Public + Required + .false. + ), + _mod: + (ExternalSymbol + 72 + _mod + 79 _mod + lpython_builtin + [] + _mod + Private + ), + _mod@__lpython_overloaded_4___mod: + (ExternalSymbol + 72 + _mod@__lpython_overloaded_4___mod + 79 __lpython_overloaded_4___mod + lpython_builtin + [] + __lpython_overloaded_4___mod + Public + ), + x1: + (Variable + 72 + x1 + [] + In + () + () + Default + (Integer 8 []) + Source + Public + Required + .false. + ), + x2: + (Variable + 72 + x2 + [] + In + () + () + Default + (Integer 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__mod + (FunctionType + [(Integer 8 []) + (Integer 8 [])] + (Integer 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_mod@__lpython_overloaded_4___mod] + [(Var 72 x1) + (Var 72 x2)] + [(If + (IntegerCompare + (Var 72 x2) + Eq + (Cast + (IntegerConstant 0 (Integer 4 [])) + IntegerToInteger + (Integer 8 []) + (IntegerConstant 0 (Integer 8 [])) + ) + (Logical 4 []) + () + ) + [(= + (Var 72 _lpython_return_variable) + (Cast + (IntegerConstant 0 (Integer 4 [])) + IntegerToInteger + (Integer 8 []) + (IntegerConstant 0 (Integer 8 [])) + ) + () + ) + (Return)] + [] + ) + (= + (Var 72 _lpython_return_variable) + (FunctionCall + 72 _mod@__lpython_overloaded_4___mod + 72 _mod + [((Var 72 x1)) + ((Var 72 x2))] + (Integer 8 []) + () + () + ) + () + ) + (Return)] + (Var 72 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__radians: + (Function + (SymbolTable + 58 + { + _lpython_return_variable: + (Variable + 58 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 58 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__radians + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 58 x)] + [(= + (Var 58 _lpython_return_variable) + (RealBinOp + (RealBinOp + (Var 58 x) + Mul + (Var 3 pi_64) + (Real 8 []) + () + ) + Div + (RealConstant + 180.000000 + (Real 8 []) + ) + (Real 8 []) + () + ) + () + ) + (Return)] + (Var 58 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__sin: + (Function + (SymbolTable + 5 + { + _lpython_return_variable: + (Variable + 5 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 5 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__sin + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_dsin] + [(Var 5 x)] + [(= + (Var 5 _lpython_return_variable) + (FunctionCall + 3 _lfortran_dsin + () + [((Var 5 x))] + (Real 8 []) + () + () + ) + () + ) + (Return)] + (Var 5 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__sinh: + (Function + (SymbolTable + 19 + { + _lpython_return_variable: + (Variable + 19 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 19 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__sinh + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_dsinh] + [(Var 19 x)] + [(= + (Var 19 _lpython_return_variable) + (FunctionCall + 3 _lfortran_dsinh + () + [((Var 19 x))] + (Real 8 []) + () + () + ) + () + ) + (Return)] + (Var 19 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__sqrt: + (Function + (SymbolTable + 12 + { + _lpython_return_variable: + (Variable + 12 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 12 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__sqrt + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 12 x)] + [(= + (Var 12 _lpython_return_variable) + (RealBinOp + (Var 12 x) + Pow + (RealBinOp + (Cast + (IntegerConstant 1 (Integer 4 [])) + IntegerToReal + (Real 8 []) + (RealConstant + 1.000000 + (Real 8 []) + ) + ) + Div + (Cast + (IntegerConstant 2 (Integer 4 [])) + IntegerToReal + (Real 8 []) + (RealConstant + 2.000000 + (Real 8 []) + ) + ) + (Real 8 []) + (RealConstant + 0.500000 + (Real 8 []) + ) + ) + (Real 8 []) + () + ) + () + ) + (Return)] + (Var 12 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__tan: + (Function + (SymbolTable + 15 + { + _lpython_return_variable: + (Variable + 15 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 15 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__tan + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_dtan] + [(Var 15 x)] + [(= + (Var 15 _lpython_return_variable) + (FunctionCall + 3 _lfortran_dtan + () + [((Var 15 x))] + (Real 8 []) + () + () + ) + () + ) + (Return)] + (Var 15 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_0__tanh: + (Function + (SymbolTable + 45 + { + _lpython_return_variable: + (Variable + 45 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ), + x: + (Variable + 45 + x + [] + In + () + () + Default + (Real 8 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_0__tanh + (FunctionType + [(Real 8 [])] + (Real 8 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_dtanh] + [(Var 45 x)] + [(= + (Var 45 _lpython_return_variable) + (FunctionCall + 3 _lfortran_dtanh + () + [((Var 45 x))] + (Real 8 []) + () + () + ) + () + ) + (Return)] + (Var 45 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__arccos: + (Function + (SymbolTable + 43 + { + _lpython_return_variable: + (Variable + 43 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 43 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__arccos + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_sacos] + [(Var 43 x)] + [(= + (Var 43 _lpython_return_variable) + (FunctionCall + 3 _lfortran_sacos + () + [((Var 43 x))] + (Real 4 []) + () + () + ) + () + ) + (Return)] + (Var 43 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__arccosh: + (Function + (SymbolTable + 67 + { + _lpython_return_variable: + (Variable + 67 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 67 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__arccosh + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_sacosh] + [(Var 67 x)] + [(= + (Var 67 _lpython_return_variable) + (FunctionCall + 3 _lfortran_sacosh + () + [((Var 67 x))] + (Real 4 []) + () + () + ) + () + ) + (Return)] + (Var 67 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__arcsin: + (Function + (SymbolTable + 39 + { + _lpython_return_variable: + (Variable + 39 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 39 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__arcsin + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_sasin] + [(Var 39 x)] + [(= + (Var 39 _lpython_return_variable) + (FunctionCall + 3 _lfortran_sasin + () + [((Var 39 x))] + (Real 4 []) + () + () + ) + () + ) + (Return)] + (Var 39 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__arcsinh: + (Function + (SymbolTable + 63 + { + _lpython_return_variable: + (Variable + 63 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 63 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__arcsinh + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_sasinh] + [(Var 63 x)] + [(= + (Var 63 _lpython_return_variable) + (FunctionCall + 3 _lfortran_sasinh + () + [((Var 63 x))] + (Real 4 []) + () + () + ) + () + ) + (Return)] + (Var 63 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__arctan: + (Function + (SymbolTable + 55 + { + _lpython_return_variable: + (Variable + 55 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 55 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__arctan + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_satan] + [(Var 55 x)] + [(= + (Var 55 _lpython_return_variable) + (FunctionCall + 3 _lfortran_satan + () + [((Var 55 x))] + (Real 4 []) + () + () + ) + () + ) + (Return)] + (Var 55 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__arctanh: + (Function + (SymbolTable + 71 + { + _lpython_return_variable: + (Variable + 71 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 71 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__arctanh + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_satanh] + [(Var 71 x)] + [(= + (Var 71 _lpython_return_variable) + (FunctionCall + 3 _lfortran_satanh + () + [((Var 71 x))] + (Real 4 []) + () + () + ) + () + ) + (Return)] + (Var 71 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__ceil: + (Function + (SymbolTable + 77 + { + _lpython_return_variable: + (Variable + 77 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + resultf: + (Variable + 77 + resultf + [] + Local + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 77 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__ceil + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 77 x)] + [(= + (Var 77 resultf) + (Cast + (Cast + (Var 77 x) + RealToInteger + (Integer 4 []) + () + ) + IntegerToReal + (Real 4 []) + () + ) + () + ) + (If + (LogicalBinOp + (RealCompare + (Var 77 x) + LtE + (Cast + (IntegerConstant 0 (Integer 4 [])) + IntegerToReal + (Real 4 []) + (RealConstant + 0.000000 + (Real 4 []) + ) + ) + (Logical 4 []) + () + ) + Or + (RealCompare + (Var 77 x) + Eq + (Var 77 resultf) + (Logical 4 []) + () + ) + (Logical 4 []) + () + ) + [(= + (Var 77 _lpython_return_variable) + (Var 77 resultf) + () + ) + (Return)] + [] + ) + (= + (Var 77 _lpython_return_variable) + (RealBinOp + (Var 77 resultf) + Add + (Cast + (IntegerConstant 1 (Integer 4 [])) + IntegerToReal + (Real 4 []) + (RealConstant + 1.000000 + (Real 4 []) + ) + ) + (Real 4 []) + () + ) + () + ) + (Return)] + (Var 77 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__cos: + (Function + (SymbolTable + 11 + { + _lpython_return_variable: + (Variable + 11 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 11 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__cos + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_scos] + [(Var 11 x)] + [(= + (Var 11 _lpython_return_variable) + (FunctionCall + 3 _lfortran_scos + () + [((Var 11 x))] + (Real 4 []) + () + () + ) + () + ) + (Return)] + (Var 11 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__cosh: + (Function + (SymbolTable + 25 + { + _lpython_return_variable: + (Variable + 25 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 25 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__cosh + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_scosh] + [(Var 25 x)] + [(= + (Var 25 _lpython_return_variable) + (FunctionCall + 3 _lfortran_scosh + () + [((Var 25 x))] + (Real 4 []) + () + () + ) + () + ) + (Return)] + (Var 25 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__degrees: + (Function + (SymbolTable + 57 + { + _lpython_return_variable: + (Variable + 57 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 57 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__degrees + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 57 x)] + [(= + (Var 57 _lpython_return_variable) + (RealBinOp + (Var 57 x) + Mul + (RealBinOp + (Cast + (IntegerConstant 180 (Integer 4 [])) + IntegerToReal + (Real 4 []) + (RealConstant + 180.000000 + (Real 4 []) + ) + ) + Div + (Var 3 pi_32) + (Real 4 []) + () + ) + (Real 4 []) + () + ) + () + ) + (Return)] + (Var 57 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__exp: + (Function + (SymbolTable + 51 + { + _lpython_return_variable: + (Variable + 51 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 51 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__exp + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_sexp] + [(Var 51 x)] + [(= + (Var 51 _lpython_return_variable) + (FunctionCall + 3 _lfortran_sexp + () + [((Var 51 x))] + (Real 4 []) + () + () + ) + () + ) + (Return)] + (Var 51 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__floor: + (Function + (SymbolTable + 75 + { + _lpython_return_variable: + (Variable + 75 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + resultf: + (Variable + 75 + resultf + [] + Local + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 75 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__floor + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 75 x)] + [(= + (Var 75 resultf) + (Cast + (Cast + (Var 75 x) + RealToInteger + (Integer 4 []) + () + ) + IntegerToReal + (Real 4 []) + () + ) + () + ) + (If + (LogicalBinOp + (RealCompare + (Var 75 x) + GtE + (Cast + (IntegerConstant 0 (Integer 4 [])) + IntegerToReal + (Real 4 []) + (RealConstant + 0.000000 + (Real 4 []) + ) + ) + (Logical 4 []) + () + ) + Or + (RealCompare + (Var 75 x) + Eq + (Var 75 resultf) + (Logical 4 []) + () + ) + (Logical 4 []) + () + ) + [(= + (Var 75 _lpython_return_variable) + (Var 75 resultf) + () + ) + (Return)] + [] + ) + (= + (Var 75 _lpython_return_variable) + (RealBinOp + (Var 75 resultf) + Sub + (Cast + (IntegerConstant 1 (Integer 4 [])) + IntegerToReal + (Real 4 []) + (RealConstant + 1.000000 + (Real 4 []) + ) + ) + (Real 4 []) + () + ) + () + ) + (Return)] + (Var 75 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__log: + (Function + (SymbolTable + 29 + { + _lpython_return_variable: + (Variable + 29 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 29 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__log + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_slog] + [(Var 29 x)] + [(= + (Var 29 _lpython_return_variable) + (FunctionCall + 3 _lfortran_slog + () + [((Var 29 x))] + (Real 4 []) + () + () + ) + () + ) + (Return)] + (Var 29 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__log10: + (Function + (SymbolTable + 33 + { + _lpython_return_variable: + (Variable + 33 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 33 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__log10 + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_slog10] + [(Var 33 x)] + [(= + (Var 33 _lpython_return_variable) + (FunctionCall + 3 _lfortran_slog10 + () + [((Var 33 x))] + (Real 4 []) + () + () + ) + () + ) + (Return)] + (Var 33 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__log2: + (Function + (SymbolTable + 35 + { + _lpython_return_variable: + (Variable + 35 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 35 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__log2 + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_slog] + [(Var 35 x)] + [(= + (Var 35 _lpython_return_variable) + (RealBinOp + (FunctionCall + 3 _lfortran_slog + () + [((Var 35 x))] + (Real 4 []) + () + () + ) + Div + (FunctionCall + 3 _lfortran_slog + () + [((Cast + (RealConstant + 2.000000 + (Real 8 []) + ) + RealToReal + (Real 4 []) + (RealConstant + 2.000000 + (Real 4 []) + ) + ))] + (Real 4 []) + () + () + ) + (Real 4 []) + () + ) + () + ) + (Return)] + (Var 35 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__mod: + (Function + (SymbolTable + 73 + { + _lpython_return_variable: + (Variable + 73 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Integer 4 []) + Source + Public + Required + .false. + ), + _mod: + (ExternalSymbol + 73 + _mod + 79 _mod + lpython_builtin + [] + _mod + Private + ), + _mod@__lpython_overloaded_2___mod: + (ExternalSymbol + 73 + _mod@__lpython_overloaded_2___mod + 79 __lpython_overloaded_2___mod + lpython_builtin + [] + __lpython_overloaded_2___mod + Public + ), + x1: + (Variable + 73 + x1 + [] + In + () + () + Default + (Integer 4 []) + Source + Public + Required + .false. + ), + x2: + (Variable + 73 + x2 + [] + In + () + () + Default + (Integer 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__mod + (FunctionType + [(Integer 4 []) + (Integer 4 [])] + (Integer 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_mod@__lpython_overloaded_2___mod] + [(Var 73 x1) + (Var 73 x2)] + [(If + (IntegerCompare + (Var 73 x2) + Eq + (IntegerConstant 0 (Integer 4 [])) + (Logical 4 []) + () + ) + [(= + (Var 73 _lpython_return_variable) + (IntegerConstant 0 (Integer 4 [])) + () + ) + (Return)] + [] + ) + (= + (Var 73 _lpython_return_variable) + (FunctionCall + 73 _mod@__lpython_overloaded_2___mod + 73 _mod + [((Var 73 x1)) + ((Var 73 x2))] + (Integer 4 []) + () + () + ) + () + ) + (Return)] + (Var 73 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__radians: + (Function + (SymbolTable + 59 + { + _lpython_return_variable: + (Variable + 59 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 59 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__radians + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 59 x)] + [(= + (Var 59 _lpython_return_variable) + (RealBinOp + (Var 59 x) + Mul + (RealBinOp + (Var 3 pi_32) + Div + (Cast + (IntegerConstant 180 (Integer 4 [])) + IntegerToReal + (Real 4 []) + (RealConstant + 180.000000 + (Real 4 []) + ) + ) + (Real 4 []) + () + ) + (Real 4 []) + () + ) + () + ) + (Return)] + (Var 59 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__sin: + (Function + (SymbolTable + 7 + { + _lpython_return_variable: + (Variable + 7 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 7 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__sin + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_ssin] + [(Var 7 x)] + [(= + (Var 7 _lpython_return_variable) + (FunctionCall + 3 _lfortran_ssin + () + [((Var 7 x))] + (Real 4 []) + () + () + ) + () + ) + (Return)] + (Var 7 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__sinh: + (Function + (SymbolTable + 21 + { + _lpython_return_variable: + (Variable + 21 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 21 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__sinh + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_ssinh] + [(Var 21 x)] + [(= + (Var 21 _lpython_return_variable) + (FunctionCall + 3 _lfortran_ssinh + () + [((Var 21 x))] + (Real 4 []) + () + () + ) + () + ) + (Return)] + (Var 21 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__sqrt: + (Function + (SymbolTable + 13 + { + _lpython_return_variable: + (Variable + 13 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 13 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__sqrt + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 13 x)] + [(= + (Var 13 _lpython_return_variable) + (RealBinOp + (Var 13 x) + Pow + (Cast + (RealBinOp + (Cast + (IntegerConstant 1 (Integer 4 [])) + IntegerToReal + (Real 8 []) + (RealConstant + 1.000000 + (Real 8 []) + ) + ) + Div + (Cast + (IntegerConstant 2 (Integer 4 [])) + IntegerToReal + (Real 8 []) + (RealConstant + 2.000000 + (Real 8 []) + ) + ) + (Real 8 []) + (RealConstant + 0.500000 + (Real 8 []) + ) + ) + RealToReal + (Real 4 []) + (RealConstant + 0.500000 + (Real 4 []) + ) + ) + (Real 4 []) + () + ) + () + ) + (Return)] + (Var 13 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__tan: + (Function + (SymbolTable + 17 + { + _lpython_return_variable: + (Variable + 17 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 17 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__tan + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_stan] + [(Var 17 x)] + [(= + (Var 17 _lpython_return_variable) + (FunctionCall + 3 _lfortran_stan + () + [((Var 17 x))] + (Real 4 []) + () + () + ) + () + ) + (Return)] + (Var 17 _lpython_return_variable) + Public + .false. + .false. + () + ), + __lpython_overloaded_1__tanh: + (Function + (SymbolTable + 47 + { + _lpython_return_variable: + (Variable + 47 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ), + x: + (Variable + 47 + x + [] + In + () + () + Default + (Real 4 []) + Source + Public + Required + .false. + ) + }) + __lpython_overloaded_1__tanh + (FunctionType + [(Real 4 [])] + (Real 4 []) + Source + Implementation + () + .true. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [_lfortran_stanh] + [(Var 47 x)] + [(= + (Var 47 _lpython_return_variable) + (FunctionCall + 3 _lfortran_stanh + () + [((Var 47 x))] + (Real 4 []) + () + () + ) + () + ) + (Return)] + (Var 47 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_dacos: + (Function + (SymbolTable + 40 + { + _lpython_return_variable: + (Variable + 40 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 40 + x + [] + In + () + () + Default + (Real 8 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_dacos + (FunctionType + [(Real 8 [])] + (Real 8 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 40 x)] + [] + (Var 40 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_dacosh: + (Function + (SymbolTable + 64 + { + _lpython_return_variable: + (Variable + 64 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 64 + x + [] + In + () + () + Default + (Real 8 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_dacosh + (FunctionType + [(Real 8 [])] + (Real 8 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 64 x)] + [] + (Var 64 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_dasin: + (Function + (SymbolTable + 36 + { + _lpython_return_variable: + (Variable + 36 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 36 + x + [] + In + () + () + Default + (Real 8 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_dasin + (FunctionType + [(Real 8 [])] + (Real 8 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 36 x)] + [] + (Var 36 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_dasinh: + (Function + (SymbolTable + 60 + { + _lpython_return_variable: + (Variable + 60 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 60 + x + [] + In + () + () + Default + (Real 8 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_dasinh + (FunctionType + [(Real 8 [])] + (Real 8 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 60 x)] + [] + (Var 60 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_datan: + (Function + (SymbolTable + 52 + { + _lpython_return_variable: + (Variable + 52 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 52 + x + [] + In + () + () + Default + (Real 8 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_datan + (FunctionType + [(Real 8 [])] + (Real 8 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 52 x)] + [] + (Var 52 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_datanh: + (Function + (SymbolTable + 68 + { + _lpython_return_variable: + (Variable + 68 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 68 + x + [] + In + () + () + Default + (Real 8 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_datanh + (FunctionType + [(Real 8 [])] + (Real 8 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 68 x)] + [] + (Var 68 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_dcos: + (Function + (SymbolTable + 8 + { + _lpython_return_variable: + (Variable + 8 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 8 + x + [] + In + () + () + Default + (Real 8 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_dcos + (FunctionType + [(Real 8 [])] + (Real 8 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 8 x)] + [] + (Var 8 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_dcosh: + (Function + (SymbolTable + 22 + { + _lpython_return_variable: + (Variable + 22 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 22 + x + [] + In + () + () + Default + (Real 8 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_dcosh + (FunctionType + [(Real 8 [])] + (Real 8 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 22 x)] + [] + (Var 22 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_dexp: + (Function + (SymbolTable + 48 + { + _lpython_return_variable: + (Variable + 48 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 48 + x + [] + In + () + () + Default + (Real 8 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_dexp + (FunctionType + [(Real 8 [])] + (Real 8 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 48 x)] + [] + (Var 48 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_dlog: + (Function + (SymbolTable + 26 + { + _lpython_return_variable: + (Variable + 26 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 26 + x + [] + In + () + () + Default + (Real 8 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_dlog + (FunctionType + [(Real 8 [])] + (Real 8 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 26 x)] + [] + (Var 26 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_dlog10: + (Function + (SymbolTable + 30 + { + _lpython_return_variable: + (Variable + 30 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 30 + x + [] + In + () + () + Default + (Real 8 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_dlog10 + (FunctionType + [(Real 8 [])] + (Real 8 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 30 x)] + [] + (Var 30 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_dsin: + (Function + (SymbolTable + 4 + { + _lpython_return_variable: + (Variable + 4 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 4 + x + [] + In + () + () + Default + (Real 8 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_dsin + (FunctionType + [(Real 8 [])] + (Real 8 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 4 x)] + [] + (Var 4 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_dsinh: + (Function + (SymbolTable + 18 + { + _lpython_return_variable: + (Variable + 18 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 18 + x + [] + In + () + () + Default + (Real 8 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_dsinh + (FunctionType + [(Real 8 [])] + (Real 8 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 18 x)] + [] + (Var 18 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_dtan: + (Function + (SymbolTable + 14 + { + _lpython_return_variable: + (Variable + 14 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 14 + x + [] + In + () + () + Default + (Real 8 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_dtan + (FunctionType + [(Real 8 [])] + (Real 8 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 14 x)] + [] + (Var 14 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_dtanh: + (Function + (SymbolTable + 44 + { + _lpython_return_variable: + (Variable + 44 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 8 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 44 + x + [] + In + () + () + Default + (Real 8 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_dtanh + (FunctionType + [(Real 8 [])] + (Real 8 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 44 x)] + [] + (Var 44 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_sacos: + (Function + (SymbolTable + 42 + { + _lpython_return_variable: + (Variable + 42 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 42 + x + [] + In + () + () + Default + (Real 4 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_sacos + (FunctionType + [(Real 4 [])] + (Real 4 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 42 x)] + [] + (Var 42 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_sacosh: + (Function + (SymbolTable + 66 + { + _lpython_return_variable: + (Variable + 66 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 66 + x + [] + In + () + () + Default + (Real 4 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_sacosh + (FunctionType + [(Real 4 [])] + (Real 4 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 66 x)] + [] + (Var 66 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_sasin: + (Function + (SymbolTable + 38 + { + _lpython_return_variable: + (Variable + 38 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 38 + x + [] + In + () + () + Default + (Real 4 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_sasin + (FunctionType + [(Real 4 [])] + (Real 4 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 38 x)] + [] + (Var 38 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_sasinh: + (Function + (SymbolTable + 62 + { + _lpython_return_variable: + (Variable + 62 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 62 + x + [] + In + () + () + Default + (Real 4 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_sasinh + (FunctionType + [(Real 4 [])] + (Real 4 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 62 x)] + [] + (Var 62 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_satan: + (Function + (SymbolTable + 54 + { + _lpython_return_variable: + (Variable + 54 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 54 + x + [] + In + () + () + Default + (Real 4 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_satan + (FunctionType + [(Real 4 [])] + (Real 4 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 54 x)] + [] + (Var 54 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_satanh: + (Function + (SymbolTable + 70 + { + _lpython_return_variable: + (Variable + 70 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 70 + x + [] + In + () + () + Default + (Real 4 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_satanh + (FunctionType + [(Real 4 [])] + (Real 4 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 70 x)] + [] + (Var 70 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_scos: + (Function + (SymbolTable + 10 + { + _lpython_return_variable: + (Variable + 10 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 10 + x + [] + In + () + () + Default + (Real 4 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_scos + (FunctionType + [(Real 4 [])] + (Real 4 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 10 x)] + [] + (Var 10 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_scosh: + (Function + (SymbolTable + 24 + { + _lpython_return_variable: + (Variable + 24 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 24 + x + [] + In + () + () + Default + (Real 4 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_scosh + (FunctionType + [(Real 4 [])] + (Real 4 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 24 x)] + [] + (Var 24 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_sexp: + (Function + (SymbolTable + 50 + { + _lpython_return_variable: + (Variable + 50 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 50 + x + [] + In + () + () + Default + (Real 4 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_sexp + (FunctionType + [(Real 4 [])] + (Real 4 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 50 x)] + [] + (Var 50 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_slog: + (Function + (SymbolTable + 28 + { + _lpython_return_variable: + (Variable + 28 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 28 + x + [] + In + () + () + Default + (Real 4 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_slog + (FunctionType + [(Real 4 [])] + (Real 4 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 28 x)] + [] + (Var 28 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_slog10: + (Function + (SymbolTable + 32 + { + _lpython_return_variable: + (Variable + 32 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 32 + x + [] + In + () + () + Default + (Real 4 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_slog10 + (FunctionType + [(Real 4 [])] + (Real 4 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 32 x)] + [] + (Var 32 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_ssin: + (Function + (SymbolTable + 6 + { + _lpython_return_variable: + (Variable + 6 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 6 + x + [] + In + () + () + Default + (Real 4 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_ssin + (FunctionType + [(Real 4 [])] + (Real 4 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 6 x)] + [] + (Var 6 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_ssinh: + (Function + (SymbolTable + 20 + { + _lpython_return_variable: + (Variable + 20 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 20 + x + [] + In + () + () + Default + (Real 4 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_ssinh + (FunctionType + [(Real 4 [])] + (Real 4 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 20 x)] + [] + (Var 20 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_stan: + (Function + (SymbolTable + 16 + { + _lpython_return_variable: + (Variable + 16 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 16 + x + [] + In + () + () + Default + (Real 4 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_stan + (FunctionType + [(Real 4 [])] + (Real 4 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 16 x)] + [] + (Var 16 _lpython_return_variable) + Public + .false. + .false. + () + ), + _lfortran_stanh: + (Function + (SymbolTable + 46 + { + _lpython_return_variable: + (Variable + 46 + _lpython_return_variable + [] + ReturnVar + () + () + Default + (Real 4 []) + BindC + Public + Required + .false. + ), + x: + (Variable + 46 + x + [] + In + () + () + Default + (Real 4 []) + BindC + Public + Required + .true. + ) + }) + _lfortran_stanh + (FunctionType + [(Real 4 [])] + (Real 4 []) + BindC + Interface + () + .false. + .false. + .false. + .false. + .false. + [] + [] + .false. + ) + [] + [(Var 46 x)] + [] + (Var 46 _lpython_return_variable) + Public + .false. + .false. + () + ), + arccos: + (GenericProcedure + 3 + arccos + [3 __lpython_overloaded_0__arccos + 3 __lpython_overloaded_1__arccos] + Public + ), + arccosh: + (GenericProcedure + 3 + arccosh + [3 __lpython_overloaded_0__arccosh + 3 __lpython_overloaded_1__arccosh] + Public + ), + arcsin: + (GenericProcedure + 3 + arcsin + [3 __lpython_overloaded_0__arcsin + 3 __lpython_overloaded_1__arcsin] + Public + ), + arcsinh: + (GenericProcedure + 3 + arcsinh + [3 __lpython_overloaded_0__arcsinh + 3 __lpython_overloaded_1__arcsinh] + Public + ), + arctan: + (GenericProcedure + 3 + arctan + [3 __lpython_overloaded_0__arctan + 3 __lpython_overloaded_1__arctan] + Public + ), + arctanh: + (GenericProcedure + 3 + arctanh + [3 __lpython_overloaded_0__arctanh + 3 __lpython_overloaded_1__arctanh] + Public + ), + ceil: + (GenericProcedure + 3 + ceil + [3 __lpython_overloaded_0__ceil + 3 __lpython_overloaded_1__ceil] + Public + ), + cos: + (GenericProcedure + 3 + cos + [3 __lpython_overloaded_0__cos + 3 __lpython_overloaded_1__cos] + Public + ), + cosh: + (GenericProcedure + 3 + cosh + [3 __lpython_overloaded_0__cosh + 3 __lpython_overloaded_1__cosh] + Public + ), + degrees: + (GenericProcedure + 3 + degrees + [3 __lpython_overloaded_0__degrees + 3 __lpython_overloaded_1__degrees] + Public + ), + exp: + (GenericProcedure + 3 + exp + [3 __lpython_overloaded_0__exp + 3 __lpython_overloaded_1__exp] + Public + ), + floor: + (GenericProcedure + 3 + floor + [3 __lpython_overloaded_0__floor + 3 __lpython_overloaded_1__floor] + Public + ), + log: + (GenericProcedure + 3 + log + [3 __lpython_overloaded_0__log + 3 __lpython_overloaded_1__log] + Public + ), + log10: + (GenericProcedure + 3 + log10 + [3 __lpython_overloaded_0__log10 + 3 __lpython_overloaded_1__log10] + Public + ), + log2: + (GenericProcedure + 3 + log2 + [3 __lpython_overloaded_0__log2 + 3 __lpython_overloaded_1__log2] + Public + ), + mod: + (GenericProcedure + 3 + mod + [3 __lpython_overloaded_0__mod + 3 __lpython_overloaded_1__mod] + Public + ), + pi_32: + (Variable + 3 + pi_32 + [] + Local + (Cast + (RealConstant + 3.141593 + (Real 8 []) + ) + RealToReal + (Real 4 []) + (RealConstant + 3.141593 + (Real 4 []) + ) + ) + (RealConstant + 3.141593 + (Real 4 []) + ) + Default + (Real 4 []) + Source + Public + Required + .false. + ), + pi_64: + (Variable + 3 + pi_64 + [] + Local + (RealConstant + 3.141593 + (Real 8 []) + ) + (RealConstant + 3.141593 + (Real 8 []) + ) + Default + (Real 8 []) + Source + Public + Required + .false. + ), + radians: + (GenericProcedure + 3 + radians + [3 __lpython_overloaded_0__radians + 3 __lpython_overloaded_1__radians] + Public + ), + sin: + (GenericProcedure + 3 + sin + [3 __lpython_overloaded_0__sin + 3 __lpython_overloaded_1__sin] + Public + ), + sinh: + (GenericProcedure + 3 + sinh + [3 __lpython_overloaded_0__sinh + 3 __lpython_overloaded_1__sinh] + Public + ), + sqrt: + (GenericProcedure + 3 + sqrt + [3 __lpython_overloaded_0__sqrt + 3 __lpython_overloaded_1__sqrt] + Public + ), + tan: + (GenericProcedure + 3 + tan + [3 __lpython_overloaded_0__tan + 3 __lpython_overloaded_1__tan] + Public + ), + tanh: + (GenericProcedure + 3 + tanh + [3 __lpython_overloaded_0__tanh + 3 __lpython_overloaded_1__tanh] + Public + ) + }) + numpy + [lpython_builtin] + .false. + .false. ) }) []