Skip to content

Initial implementation of lpython builtin module #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Feb 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion grammar/ASR.asdl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ symbol
= Program(symbol_table symtab, identifier name, identifier* dependencies,
stmt* body)
| Module(symbol_table symtab, identifier name, identifier* dependencies,
bool loaded_from_mod)
bool loaded_from_mod, bool intrinsic)
| Subroutine(symbol_table symtab, identifier name, expr* args, stmt* body,
abi abi, access access, deftype deftype, string? bindc_name, bool pure,
bool module)
Expand Down
2 changes: 2 additions & 0 deletions integration_tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"modules_01.py",
#"modules_02.py",
"test_math.py",
#"test_builtin.py",
"test_builtin_abs.py",
]

def main():
Expand Down
20 changes: 20 additions & 0 deletions integration_tests/test_builtin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from ltypes import i32

def test_ord():
i: i32
s: str
s = "1"
i = ord(s)
assert i == 49


#def test_chr():
# i: i32
# i = 48
# s: str
# s = chr(i)
# assert s == "0"


test_ord()
#test_chr()
11 changes: 11 additions & 0 deletions integration_tests/test_builtin_abs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from ltypes import f64

def test_abs():
x: f64
x = 5.5
assert abs(x) == 5.5
x = -5.5
assert abs(x) == 5.5


test_abs()
2 changes: 1 addition & 1 deletion src/lpython/pickle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class ASRPickleVisitor :
}
void visit_Module(const ASR::Module_t &x) {
if (!show_intrinsic_modules &&
startswith(x.m_name, "lfortran_intrinsic_")) {
(x.m_intrinsic || startswith(x.m_name, "lfortran_intrinsic_"))) {
s.append("(");
if (use_colors) {
s.append(color(style::bold));
Expand Down
2 changes: 1 addition & 1 deletion src/lpython/semantics/ast_symboltable_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class SymbolTableVisitor : public CommonVisitor<SymbolTableVisitor> {
/* a_name */ s2c(al, to_lower(x.m_name)),
nullptr,
0,
false);
false, false);
current_module_sym = ASR::down_cast<ASR::symbol_t>(tmp0);
if( x.class_type == AST::modType::Submodule ) {
std::string rl_path = get_runtime_library_dir();
Expand Down
858 changes: 490 additions & 368 deletions src/lpython/semantics/python_ast_to_asr.cpp

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions src/runtime/lpython_builtin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
from ltypes import i32
#from sys import exit


def ord(s: str) -> i32:
"""
Returns an integer representing the Unicode code
point of a given unicode character. This is the inverse of `chr()`.
"""
if s == '0':
return 48
elif s == '1':
return 49
# else:
# exit(1)


def chr(i: i32) -> str:
"""
Returns the string representing a unicode character from
the given Unicode code point. This is the inverse of `ord()`.
"""
if i == 48:
return '0'
elif i == 49:
return '1'
# else:
# exit(1)


# This is an implementation for f64.
# TODO: implement abs() as a generic procedure, and implement for all types
def abs(x: f64) -> f64:
"""
Return the absolute value of `x`.
"""
if x >= 0.0:
return x
else:
return -x
12 changes: 6 additions & 6 deletions tests/constants1.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ def test_ord_chr():


def test_abs():
a: i32
a = abs(5)
a = abs(-500)
a = abs(False)
a = abs(True)
# a: i32
# a = abs(5)
# a = abs(-500)
# a = abs(False)
# a = abs(True)
b: f32
b = abs(3.45)
b = abs(-5346.34)
b = abs(complex(3.45, 5.6))
# b = abs(complex(3.45, 5.6))


def test_len():
Expand Down
6 changes: 3 additions & 3 deletions tests/reference/asr-constants1-5828e8a.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"basename": "asr-constants1-5828e8a",
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
"infile": "tests/constants1.py",
"infile_hash": "96e60b5d3b6cb09a1198932629c9974ac3cf8854e3b1c7ba8959ea83",
"infile_hash": "6adf0c1cf8ec1667bf19edaf62d087483e6229370ed0f10a207ee0b4",
"outfile": null,
"outfile_hash": null,
"stdout": "asr-constants1-5828e8a.stdout",
"stdout_hash": "0bf1393bd5bfba3cb0593f45cdd27141825b57fa5e2e547ef7a84875",
"stdout_hash": "82599c6a0114feef56f5e9198dd5cfbd06d87638efc14126af92a89e",
"stderr": null,
"stderr_hash": null,
"returncode": 0
}
}
2 changes: 1 addition & 1 deletion tests/reference/asr-constants1-5828e8a.stdout
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(TranslationUnit (SymbolTable 1 {main_program: (Program (SymbolTable 12 {}) main_program [] []), test_abs: (Subroutine (SymbolTable 4 {a: (Variable 4 a Local () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 4 b Local () () Default (Real 4 []) Source Public Required .false.)}) test_abs [] [(= (Var 4 a) (ConstantInteger 5 (Integer 4 [])) ()) (= (Var 4 a) (ConstantInteger 500 (Integer 4 [])) ()) (= (Var 4 a) (ConstantInteger 0 (Integer 4 [])) ()) (= (Var 4 a) (ConstantInteger 1 (Integer 4 [])) ()) (= (Var 4 b) (ConstantReal 3.450000 (Real 8 [])) ()) (= (Var 4 b) (ConstantReal 5346.340000 (Real 8 [])) ()) (= (Var 4 b) (ConstantReal 6.577424 (Real 8 [])) ())] Source Public Implementation () .false. .false.), test_bool: (Subroutine (SymbolTable 6 {a: (Variable 6 a Local () () Default (Logical 1 []) Source Public Required .false.)}) test_bool [] [(= (Var 6 a) (ConstantLogical .false. (Logical 1 [])) ()) (= (Var 6 a) (ConstantLogical .true. (Logical 1 [])) ()) (= (Var 6 a) (ConstantLogical .false. (Logical 1 [])) ()) (= (Var 6 a) (ConstantLogical .false. (Logical 1 [])) ()) (Assert (Compare (Var 6 a) Eq (ConstantLogical .false. (Logical 1 [])) (Logical 4 []) () ()) ()) (= (Var 6 a) (ConstantLogical .true. (Logical 1 [])) ()) (= (Var 6 a) (ConstantLogical .true. (Logical 1 [])) ()) (Assert (Compare (Var 6 a) Eq (ConstantLogical .true. (Logical 1 [])) (Logical 4 []) () ()) ())] Source Public Implementation () .false. .false.), test_boz: (Subroutine (SymbolTable 2 {b: (Variable 2 b Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_boz [] [(= (Var 2 b) (ConstantString "0b101" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0b1000000" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "-0b1000010110" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0o10" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0o70" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "-0o1026" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0x2a" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0xc0ffee" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "-0x216" (Character 1 1 () [])) ())] Source Public Implementation () .false. .false.), test_callable: (Subroutine (SymbolTable 8 {a: (Variable 8 a Local () () Default (Logical 1 []) Source Public Required .false.), b: (Variable 8 b Local () () Default (Integer 4 []) Source Public Required .false.)}) test_callable [] [(= (Var 8 b) (ConstantInteger 2 (Integer 4 [])) ()) (= (Var 8 a) (ConstantLogical .true. (Logical 1 [])) ()) (Assert (Compare (Var 8 a) Eq (ConstantLogical .true. (Logical 1 [])) (Logical 4 []) () ()) ()) (= (Var 8 a) (ConstantLogical .false. (Logical 1 [])) ()) (Assert (Compare (Var 8 a) Eq (ConstantLogical .false. (Logical 1 [])) (Logical 4 []) () ()) ()) (= (Var 8 a) (ConstantLogical .false. (Logical 1 [])) ()) (Assert (Compare (Var 8 a) Eq (ConstantLogical .false. (Logical 1 [])) (Logical 4 []) () ()) ())] Source Public Implementation () .false. .false.), test_divmod: (Subroutine (SymbolTable 11 {a: (Variable 11 a Local () () Default (Integer 4 []) Source Public Required .false.)}) test_divmod [] [(= (Var 11 a) (ConstantTuple [(ConstantInteger 3 (Integer 4 [])) (ConstantInteger 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) (= (Var 11 a) (ConstantTuple [(ConstantInteger -3 (Integer 4 [])) (ConstantInteger 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) (= (Var 11 a) (ConstantTuple [(ConstantInteger 1 (Integer 4 [])) (ConstantInteger 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) (= (Var 11 a) (ConstantTuple [(ConstantInteger 0 (Integer 4 [])) (ConstantInteger 4 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) (= (Var 11 a) (ConstantTuple [(ConstantInteger 0 (Integer 4 [])) (ConstantInteger 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ())] Source Public Implementation () .false. .false.), test_float: (Subroutine (SymbolTable 10 {a: (Variable 10 a Local () () Default (Real 8 []) Source Public Required .false.)}) test_float [] [(= (Var 10 a) (ConstantReal 0.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 4.560000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 5.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal -1.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 1.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 0.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 5346.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 423.533997 (Real 8 [])) ())] Source Public Implementation () .false. .false.), test_int: (Subroutine (SymbolTable 9 {a: (Variable 9 a Local () () Default (Integer 8 []) Source Public Required .false.)}) test_int [] [(= (Var 9 a) (ImplicitCast (ConstantInteger 0 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger 4 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger 5 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger -5 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger 1 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger 0 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger 5346 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ())] Source Public Implementation () .false. .false.), test_len: (Subroutine (SymbolTable 5 {a: (Variable 5 a Local () () Default (Integer 4 []) Source Public Required .false.)}) test_len [] [(= (Var 5 a) (ConstantInteger 0 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 4 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 14 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 3 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 2 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 3 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 2 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 3 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 3 (Integer 4 [])) ())] Source Public Implementation () .false. .false.), test_ord_chr: (Subroutine (SymbolTable 3 {a: (Variable 3 a Local () () Default (Integer 4 []) Source Public Required .false.), s: (Variable 3 s Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_ord_chr [] [(= (Var 3 a) (ConstantInteger 53 (Integer 4 [])) ()) (= (Var 3 s) (ConstantString "+" (Character 1 1 () [])) ())] Source Public Implementation () .false. .false.), test_str: (Subroutine (SymbolTable 7 {s: (Variable 7 s Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_str [] [(= (Var 7 s) (ConstantString "" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "5" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "-4" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "5.600000" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "True" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "False" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "5346" (Character 1 1 () [])) ())] Source Public Implementation () .false. .false.)}) [])
(TranslationUnit (SymbolTable 1 {lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 17 {}) main_program [] []), test_abs: (Subroutine (SymbolTable 4 {abs: (ExternalSymbol 4 abs 13 abs lpython_builtin [] abs Public), b: (Variable 4 b Local () () Default (Real 4 []) Source Public Required .false.)}) test_abs [] [(= (Var 4 b) (FunctionCall 4 abs () [(ConstantReal 3.450000 (Real 8 []))] [] (Real 8 []) () ()) ()) (= (Var 4 b) (FunctionCall 4 abs () [(UnaryOp USub (ConstantReal 5346.340000 (Real 8 [])) (Real 8 []) (ConstantReal -5346.340000 (Real 8 [])))] [] (Real 8 []) () ()) ())] Source Public Implementation () .false. .false.), test_bool: (Subroutine (SymbolTable 6 {a: (Variable 6 a Local () () Default (Logical 1 []) Source Public Required .false.)}) test_bool [] [(= (Var 6 a) (ConstantLogical .false. (Logical 1 [])) ()) (= (Var 6 a) (ConstantLogical .true. (Logical 1 [])) ()) (= (Var 6 a) (ConstantLogical .false. (Logical 1 [])) ()) (= (Var 6 a) (ConstantLogical .false. (Logical 1 [])) ()) (Assert (Compare (Var 6 a) Eq (ConstantLogical .false. (Logical 1 [])) (Logical 4 []) () ()) ()) (= (Var 6 a) (ConstantLogical .true. (Logical 1 [])) ()) (= (Var 6 a) (ConstantLogical .true. (Logical 1 [])) ()) (Assert (Compare (Var 6 a) Eq (ConstantLogical .true. (Logical 1 [])) (Logical 4 []) () ()) ())] Source Public Implementation () .false. .false.), test_boz: (Subroutine (SymbolTable 2 {b: (Variable 2 b Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_boz [] [(= (Var 2 b) (ConstantString "0b101" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0b1000000" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "-0b1000010110" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0o10" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0o70" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "-0o1026" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0x2a" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0xc0ffee" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "-0x216" (Character 1 1 () [])) ())] Source Public Implementation () .false. .false.), test_callable: (Subroutine (SymbolTable 8 {a: (Variable 8 a Local () () Default (Logical 1 []) Source Public Required .false.), b: (Variable 8 b Local () () Default (Integer 4 []) Source Public Required .false.)}) test_callable [] [(= (Var 8 b) (ConstantInteger 2 (Integer 4 [])) ()) (= (Var 8 a) (ConstantLogical .true. (Logical 1 [])) ()) (Assert (Compare (Var 8 a) Eq (ConstantLogical .true. (Logical 1 [])) (Logical 4 []) () ()) ()) (= (Var 8 a) (ConstantLogical .false. (Logical 1 [])) ()) (Assert (Compare (Var 8 a) Eq (ConstantLogical .false. (Logical 1 [])) (Logical 4 []) () ()) ()) (= (Var 8 a) (ConstantLogical .false. (Logical 1 [])) ()) (Assert (Compare (Var 8 a) Eq (ConstantLogical .false. (Logical 1 [])) (Logical 4 []) () ()) ())] Source Public Implementation () .false. .false.), test_divmod: (Subroutine (SymbolTable 11 {a: (Variable 11 a Local () () Default (Integer 4 []) Source Public Required .false.)}) test_divmod [] [(= (Var 11 a) (ConstantTuple [(ConstantInteger 3 (Integer 4 [])) (ConstantInteger 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) (= (Var 11 a) (ConstantTuple [(ConstantInteger -3 (Integer 4 [])) (ConstantInteger 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) (= (Var 11 a) (ConstantTuple [(ConstantInteger 1 (Integer 4 [])) (ConstantInteger 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) (= (Var 11 a) (ConstantTuple [(ConstantInteger 0 (Integer 4 [])) (ConstantInteger 4 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) (= (Var 11 a) (ConstantTuple [(ConstantInteger 0 (Integer 4 [])) (ConstantInteger 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ())] Source Public Implementation () .false. .false.), test_float: (Subroutine (SymbolTable 10 {a: (Variable 10 a Local () () Default (Real 8 []) Source Public Required .false.)}) test_float [] [(= (Var 10 a) (ConstantReal 0.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 4.560000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 5.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal -1.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 1.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 0.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 5346.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 423.533997 (Real 8 [])) ())] Source Public Implementation () .false. .false.), test_int: (Subroutine (SymbolTable 9 {a: (Variable 9 a Local () () Default (Integer 8 []) Source Public Required .false.)}) test_int [] [(= (Var 9 a) (ImplicitCast (ConstantInteger 0 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger 4 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger 5 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger -5 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger 1 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger 0 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger 5346 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ())] Source Public Implementation () .false. .false.), test_len: (Subroutine (SymbolTable 5 {a: (Variable 5 a Local () () Default (Integer 4 []) Source Public Required .false.)}) test_len [] [(= (Var 5 a) (ConstantInteger 0 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 4 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 14 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 3 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 2 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 3 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 2 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 3 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 3 (Integer 4 [])) ())] Source Public Implementation () .false. .false.), test_ord_chr: (Subroutine (SymbolTable 3 {a: (Variable 3 a Local () () Default (Integer 4 []) Source Public Required .false.), ord: (ExternalSymbol 3 ord 13 ord lpython_builtin [] ord Public), s: (Variable 3 s Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_ord_chr [] [(= (Var 3 a) (FunctionCall 3 ord () [(ConstantString "5" (Character 1 1 () []))] [] (Integer 4 []) () ()) ()) (= (Var 3 s) (ConstantString "+" (Character 1 1 () [])) ())] Source Public Implementation () .false. .false.), test_str: (Subroutine (SymbolTable 7 {s: (Variable 7 s Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_str [] [(= (Var 7 s) (ConstantString "" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "5" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "-4" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "5.600000" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "True" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "False" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "5346" (Character 1 1 () [])) ())] Source Public Implementation () .false. .false.)}) [])
2 changes: 1 addition & 1 deletion tests/reference/asr-expr1-8df2d66.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"outfile": null,
"outfile_hash": null,
"stdout": "asr-expr1-8df2d66.stdout",
"stdout_hash": "f91e20cb7a51634aa2d7a0a405c291e3739bc0ab721ba7f22b1d5189",
"stdout_hash": "3386132d1619fd644c4ff66843325b74795f6565389176b4bf9968bc",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
Loading