Posts

Showing posts from July, 2022
    2022-07-29-progress report 7 I enhanced the ASR generation from last week. Now ASR have both "TemplatedFunctions" as well as "TemplatedSubroutines". The TypeParameters of Templates are now populated. Visiting Function in the symbol_table_visitor now results in either Functions, if there are no TypeParameters used, or TemplatedFunctions if one, some or all TypeParameters of the surrounding Template are used. The TypeParameters of TemplatedFunctions and TemplatedSubroutines are also populated with only the TypeParameters that those functions and subroutines use. I met with Ondrej and he created  this pull request  that is a combination of my first two PRs, which contain ASR generation. Then I rebased the 3rd PR on top of the one Ondrej created. Finally I started working on instantiation of templated. Particularly the parsing and AST generation of instantiation. I read through  this document  to get an idea of required syntax for templates.  The actual implementati
    2022-07-22-progress report 6 I wrote code to generate ASR from AST this week. It is an initial implementation so it's not complete.  I had to make some changes to the example "swap_m.f90" since I couldn't get the interface working. I will work on it in a future week. The general approach I took is I added a symbol table to the Template since it will contain functions and subroutines (program units) as well as derived types. I also ignored restrictions and TypeParameter for now. The first item of the Short term TODO list of  this  PR is now complete.
   2022-07-16-progress report 5 I looked at a way to start generating ASR using AST, but I would need some guidance to start off. I will be meeting with my mentor and starting to get some headway this week.
  2022-07-09-progress report 4 I was not able to get any work done this week due to school exams. I will start working on generating ASR starting from this week.
   2022-07-01-progress report 3 This week I met with Ondrej Certik online because the project was too complex for me to start working on directly. He showed me how to fix the parser to parse template syntax and he himself fixed it and created a merge request ( https://gitlab.com/lfortran/lfortran/-/merge_requests/1803/ ) which is the long running generics branch. This week I will be working on the conversion between AST and ASR and try to generate the ASR from the template AST.