Another productive week in our journey to compile the full FPM with LFortran!
This week, my focus was on two crucial libraries: jonquil and M_CLI2.
Both were successfully compiled using LFortran with some workarounds. Tests are pending but as discussed we will test it later. Also compiling dynamic and polymorphic features used heavily in these libraries is a boost for LFortran to compile codes that uses classes and runtime polymorphism.
Work done this week:
-
Compiled jonquil and M_CLI2 to 100%:
- Done workarounds and fixes to handle runtime polymorphic type assignments and certain character handling inconsistencies in ASR.
- This allows both libraries to be compiled completely using LFortran backend (LLVM), although tests will be run later once FPM compilation begins.
- As observed many issues were regarding runtime polymorphism, which helped us to get great MREs to support it well at LFortran LLVM backend.
- Branch with workarounds for jonquil: jonquil-lf-1
- Branch with workarounds for M_CLI2: M_CLI2-lf-1
-
Example Workarounds:
-
Example MREs Created:
- Issue 7774: Handle printing/writing of class(*) variables in select type
- Issue 7810: Handle class(*) current type in visit_cast in backend
- Issue 7756: Handle assignment of global character array using ArrayConstructor
- Issue 7744: Handle assignment of nested subroutine string variable
-
Pull Requests Submitted:
- PR #7755: Correct type of global string variable in nested vars pass
- PR #7757: Cast descriptor string to pointer when replacing ArrayConstructor
- PR #7770: handle character return type for function call inside select stmt
- PR #7784: Handle assignment in select type where value is class type and target is selected type
I logged about 20 hours of dedicated work this week. By addressing issues in libraries like M_CLI2 and jonquil, we’ve cleared major barriers to moving forward with the full FPM compilation. Many of the fixes I implemented this week also help LFortran to strengthen over polymorphic or character semantics.
Thanks once again to Ondřej Čertík
and Pranav Goswami
for detailed reviews, mentoring, and encouragement throughout the week. Thank to all LFortran community members for their support and fixing some MREs created by me.
Plan for next week:
- Fixing few remaining MREs created for all 5 dependencies.
- Begin compiling FPM itself using LFortran.
- Start integration of all successfully compiled dependencies into a CI pipeline for verification.
- Continue creating MREs for blockers, and work on fixing them proactively.