Skip to content

Instantly share code, notes, and snippets.

@anutosh491
Created July 21, 2023 03:05
Show Gist options
  • Save anutosh491/3b296181895d46afa89b070156f948a4 to your computer and use it in GitHub Desktop.
Save anutosh491/3b296181895d46afa89b070156f948a4 to your computer and use it in GitHub Desktop.
(TranslationUnit
(SymbolTable
1
{
__main__:
(Module
(SymbolTable
2
{
__main____global_statements:
(Function
(SymbolTable
14
{
})
__main____global_statements
(FunctionType
[]
()
Source
Implementation
()
.false.
.false.
.false.
.false.
.false.
[]
[]
.false.
)
[main0]
[]
[(SubroutineCall
2 main0
()
[]
()
)]
()
Public
.false.
.false.
()
),
basic_const_pi:
(Function
(SymbolTable
11
{
x:
(Variable
11
x
[]
In
()
()
Default
(CPtr)
()
BindC
Public
Required
.true.
)
})
basic_const_pi
(FunctionType
[(CPtr)]
()
BindC
Interface
()
.false.
.false.
.false.
.false.
.false.
[]
[]
.false.
)
[]
[(Var 11 x)]
[]
()
Public
.false.
.false.
"symengine/cwrapper.h"
),
basic_new_heap:
(Function
(SymbolTable
10
{
_lpython_return_variable:
(Variable
10
_lpython_return_variable
[]
ReturnVar
()
()
Default
(CPtr)
()
BindC
Public
Required
.false.
)
})
basic_new_heap
(FunctionType
[]
(CPtr)
BindC
Interface
()
.false.
.false.
.false.
.false.
.false.
[]
[]
.false.
)
[]
[]
[]
(Var 10 _lpython_return_variable)
Public
.false.
.false.
"symengine/cwrapper.h"
),
basic_str:
(Function
(SymbolTable
12
{
_lpython_return_variable:
(Variable
12
_lpython_return_variable
[]
ReturnVar
()
()
Default
(Character 1 -2 ())
()
BindC
Public
Required
.false.
),
x:
(Variable
12
x
[]
In
()
()
Default
(CPtr)
()
BindC
Public
Required
.true.
)
})
basic_str
(FunctionType
[(CPtr)]
(Character 1 -2 ())
BindC
Interface
()
.false.
.false.
.false.
.false.
.false.
[]
[]
.false.
)
[]
[(Var 12 x)]
[]
(Var 12 _lpython_return_variable)
Public
.false.
.false.
"symengine/cwrapper.h"
),
main0:
(Function
(SymbolTable
13
{
s:
(Variable
13
s
[]
Local
()
()
Default
(Character 1 -2 ())
()
Source
Public
Required
.false.
),
x:
(Variable
13
x
[]
Local
()
()
Default
(CPtr)
()
Source
Public
Required
.false.
)
})
main0
(FunctionType
[]
()
Source
Implementation
()
.false.
.false.
.false.
.false.
.false.
[]
[]
.false.
)
[basic_new_heap
basic_const_pi
basic_str]
[]
[(=
(Var 13 x)
(FunctionCall
2 basic_new_heap
()
[]
(CPtr)
()
()
)
()
)
(Print
()
[(Var 13 x)]
()
()
)
(SubroutineCall
2 basic_const_pi
()
[((Var 13 x))]
()
)
(=
(Var 13 s)
(FunctionCall
2 basic_str
()
[((Var 13 x))]
(Character 1 -2 ())
()
()
)
()
)
(Print
()
[(Var 13 s)]
()
()
)
(Assert
(StringCompare
(Var 13 s)
Eq
(StringConstant
"pi"
(Character 1 2 ())
)
(Logical 4)
()
)
()
)]
()
Public
.false.
.false.
()
)
})
__main__
[]
.false.
.false.
),
main_program:
(Program
(SymbolTable
15
{
__main____global_statements:
(ExternalSymbol
15
__main____global_statements
2 __main____global_statements
__main__
[]
__main____global_statements
Public
)
})
main_program
[__main__]
[(SubroutineCall
15 __main____global_statements
2 __main____global_statements
[]
()
)]
),
os:
(Module
(SymbolTable
3
{
O_RDONLY:
(Variable
3
O_RDONLY
[]
Local
()
()
Default
(Integer 4)
()
Source
Public
Required
.false.
),
_lpython_close:
(Function
(SymbolTable
9
{
fd:
(Variable
9
fd
[]
In
()
()
Default
(Integer 8)
()
BindC
Public
Required
.true.
)
})
_lpython_close
(FunctionType
[(Integer 8)]
()
BindC
Interface
()
.false.
.false.
.false.
.false.
.false.
[]
[]
.false.
)
[]
[(Var 9 fd)]
[]
()
Public
.false.
.false.
()
),
_lpython_open:
(Function
(SymbolTable
5
{
_lpython_return_variable:
(Variable
5
_lpython_return_variable
[]
ReturnVar
()
()
Default
(Integer 8)
()
BindC
Public
Required
.false.
),
flag:
(Variable
5
flag
[]
In
()
()
Default
(Character 1 -2 ())
()
BindC
Public
Required
.true.
),
path:
(Variable
5
path
[]
In
()
()
Default
(Character 1 -2 ())
()
BindC
Public
Required
.true.
)
})
_lpython_open
(FunctionType
[(Character 1 -2 ())
(Character 1 -2 ())]
(Integer 8)
BindC
Interface
()
.false.
.false.
.false.
.false.
.false.
[]
[]
.false.
)
[]
[(Var 5 path)
(Var 5 flag)]
[]
(Var 5 _lpython_return_variable)
Public
.false.
.false.
()
),
_lpython_read:
(Function
(SymbolTable
7
{
_lpython_return_variable:
(Variable
7
_lpython_return_variable
[]
ReturnVar
()
()
Default
(Character 1 -2 ())
()
BindC
Public
Required
.false.
),
fd:
(Variable
7
fd
[]
In
()
()
Default
(Integer 8)
()
BindC
Public
Required
.true.
),
n:
(Variable
7
n
[]
In
()
()
Default
(Integer 8)
()
BindC
Public
Required
.true.
)
})
_lpython_read
(FunctionType
[(Integer 8)
(Integer 8)]
(Character 1 -2 ())
BindC
Interface
()
.false.
.false.
.false.
.false.
.false.
[]
[]
.false.
)
[]
[(Var 7 fd)
(Var 7 n)]
[]
(Var 7 _lpython_return_variable)
Public
.false.
.false.
()
),
close:
(Function
(SymbolTable
8
{
fd:
(Variable
8
fd
[]
In
()
()
Default
(Integer 8)
()
Source
Public
Required
.false.
)
})
close
(FunctionType
[(Integer 8)]
()
Source
Implementation
()
.false.
.false.
.false.
.false.
.false.
[]
[]
.false.
)
[_lpython_close]
[(Var 8 fd)]
[(SubroutineCall
3 _lpython_close
()
[((Var 8 fd))]
()
)
(Return)]
()
Public
.false.
.false.
()
),
open:
(Function
(SymbolTable
4
{
_lpython_return_variable:
(Variable
4
_lpython_return_variable
[]
ReturnVar
()
()
Default
(Integer 8)
()
Source
Public
Required
.false.
),
flag:
(Variable
4
flag
[]
In
()
()
Default
(Integer 4)
()
Source
Public
Required
.false.
),
path:
(Variable
4
path
[]
In
()
()
Default
(Character 1 -2 ())
()
Source
Public
Required
.false.
),
sflag:
(Variable
4
sflag
[]
Local
()
()
Default
(Character 1 -2 ())
()
Source
Public
Required
.false.
)
})
open
(FunctionType
[(Character 1 -2 ())
(Integer 4)]
(Integer 8)
Source
Implementation
()
.false.
.false.
.false.
.false.
.false.
[]
[]
.false.
)
[_lpython_open]
[(Var 4 path)
(Var 4 flag)]
[(If
(IntegerCompare
(Var 4 flag)
Eq
(Var 3 O_RDONLY)
(Logical 4)
()
)
[(=
(Var 4 sflag)
(StringConstant
"r"
(Character 1 1 ())
)
()
)]
[(Stop
(IntegerConstant 1 (Integer 4))
)]
)
(=
(Var 4 _lpython_return_variable)
(FunctionCall
3 _lpython_open
()
[((Var 4 path))
((Var 4 sflag))]
(Integer 8)
()
()
)
()
)
(Return)]
(Var 4 _lpython_return_variable)
Public
.false.
.false.
()
),
read:
(Function
(SymbolTable
6
{
_lpython_return_variable:
(Variable
6
_lpython_return_variable
[]
ReturnVar
()
()
Default
(Character 1 -2 ())
()
Source
Public
Required
.false.
),
fd:
(Variable
6
fd
[]
In
()
()
Default
(Integer 8)
()
Source
Public
Required
.false.
),
n:
(Variable
6
n
[]
In
()
()
Default
(Integer 8)
()
Source
Public
Required
.false.
)
})
read
(FunctionType
[(Integer 8)
(Integer 8)]
(Character 1 -2 ())
Source
Implementation
()
.false.
.false.
.false.
.false.
.false.
[]
[]
.false.
)
[_lpython_read]
[(Var 6 fd)
(Var 6 n)]
[(=
(Var 6 _lpython_return_variable)
(FunctionCall
3 _lpython_read
()
[((Var 6 fd))
((Var 6 n))]
(Character 1 -2 ())
()
()
)
()
)
(Return)]
(Var 6 _lpython_return_variable)
Public
.false.
.false.
()
)
})
os
[]
.false.
.false.
)
})
[]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment