You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We propose to improve LFortran to be able to compile and run the Fortran Package Manager (FPM) code, which utilizes a lot of OOP features of Fortran. Compiling it enhances LFortran's capability to compile Object Oriented code.
With the successful compilation of FPM, LFortran will gain robust support for object-oriented features. This advancement will enable LFortran to be evaluated against a broader range of Fortran projects that utilize OOP features. Achieving the goals outlined in the grant would significantly help to bring LFortran from alpha stage to beta (expected to work) for modern Fortran codes.
For the broader Fortran community, the ability to distribute an open-source, modern Fortran compiler alongside FPM represents a significant milestone, as it will streamline project management and help attract greater adoption. This is because LFortran is compatible with all the platforms while being very lightweight.
Amount requested
10000
Execution plan
Description of Proposal
The Fortran Package Manager (fpm) is a package manager and a build system for Fortran. Its key goal is to improve the user experience of Fortran programmers. It does so by making it easier to build your Fortran program or library, run the executables, tests, and examples, and distribute it as a dependency to other Fortran projects.
Most Fortran projects employ diverse build systems such as cmake, make or meson tailored to specific compiler toolchains such as GFortran, Intel, and Cray. The Fortran Package Manager (FPM) standardizes and simplifies this process by offering a unified and streamlined build system, inspired by Cargo from Rust.
LFortran is a modern Fortran compiler that in addition to compiling to binaries like other compilers can also execute Fortran code interactively. It implements a structured multi-step lowering strategy where the source code is parsed into an Abstract Syntax Tree; then to an intermediate Abstract Semantic Representation (ASR) before being handled by various backends. The ASR is by construction always valid Fortran code. ASR to ASR passes allow for further optimizations and downstream backends (LLVM, WebAssembly, etc.) are guaranteed to receive semantically valid Fortran.
Compilation of FPM demands compilation of the following third-party codes:
LFortran already compiles fortran-regex, refer lfortran-7495 for more details.
LFortran can generate ASR ( Abstract Semantic Representation ) for all Fortran files in FPM.
LFortran can currently compile 44% of FPM to binaries (reported at: lfortran-6840)
LFortran can compile 64% of toml-f to binaries. (Reported at: lfortran-6838)
Successful 72% compilation of jonquil. (Reported at: lfortran-7494)
50% compilation of fortran-shlex. ( Reported at lfortran-7496)
Lastly, status of M_CLI2 can be found at lfortran-7497
Although compilation of FPM depends on the 5 packages, these do not serve as blocker in achieveing 100% compilation as based on our past experience LFortran can generate binaries for almost every Fortran code with a few workarounds.
Proposed Work:
Achieve 100% compilation of FPM to object files.
Every Fortran file generates valid LLVM.
Final binary is generated and runs successfully.
As of now LFortran can compile substantial subset of FPM, but it needs to be finished. We have identified the following semantic features that still have to be implemented / refactored:
Enhance runtime polymorphism, difficulty: medium
Refactor handling of structs, difficulty: medium
Bug fixes while compiling
The LFortran community includes several developers (Ondřej Čertík, Pranav Goswami) who have contributed substantially to FPM and LFortran in past, ensuring smooth collaboration of all projects. This project is also well placed within the existing LFortran road-map: the goal of LFortran is to compile all Fortran codes.
Timeline of Deliverables:
12 weeks
We will begin with the existing build base and proceed to compile all source files to LLVM. To fully utilize FPM for building the project, it is essential to first compile its dependencies and generate the necessary binaries. This effort will proceed along two parallel tracks: one focused on leveraging the current base to continue compiling to LLVM, and the other dedicated to addressing FPM dependencies and generating binaries. Given this parallel approach, defining a precise timeline for individual deliverables is challenging. However, the following tentative milestones are outlined:
4 weeks: Enable FPM dependencies to work seamlessly with LFortran and setup at CI to avoid regression.
Compile to ASR
Generate a binary (ASR passes and ASR->LLVM lowering)
Fix runtime bugs
8 weeks: Achieve complete FPM compilation (100%) using LFortran
Compile to ASR
Generate a binary (ASR passes and ASR->LLVM lowering)
Fix runtime bugs
The above are parallel, total of 8 weeks, the result will compile and run, with workarounds in the Fortran FPM code. Then the last 4 weeks:
Fix all workarounds by fixing a given bug in LFortran, and removing the workaround from Fortran code.
We have identified Pranav Goswami (@Pranavchiku), Gauravsingh Sisodia (@xaerru), Harshita Kalani (@HarshitaKalani), Jinang Shah (@jinangshah21), Assem Medhat (@assem2002) as possible contractors, all of them have an extensive multi-year prior experience with contributing to LFortran and have implemented many of the existing features into LFortran already. If they are unavailable, we have several more contractors that we work with regularly.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Project
LFortran
Summary
We propose to improve LFortran to be able to compile and run the Fortran Package Manager (FPM) code, which utilizes a lot of OOP features of Fortran. Compiling it enhances LFortran's capability to compile Object Oriented code.
submitter
Ondřej Čertík
project lead
@certik
Community benefit
With the successful compilation of FPM, LFortran will gain robust support for object-oriented features. This advancement will enable LFortran to be evaluated against a broader range of Fortran projects that utilize OOP features. Achieving the goals outlined in the grant would significantly help to bring LFortran from alpha stage to beta (expected to work) for modern Fortran codes.
For the broader Fortran community, the ability to distribute an open-source, modern Fortran compiler alongside FPM represents a significant milestone, as it will streamline project management and help attract greater adoption. This is because LFortran is compatible with all the platforms while being very lightweight.
Amount requested
10000
Execution plan
Description of Proposal
The Fortran Package Manager (fpm) is a package manager and a build system for Fortran. Its key goal is to improve the user experience of Fortran programmers. It does so by making it easier to build your Fortran program or library, run the executables, tests, and examples, and distribute it as a dependency to other Fortran projects.
Most Fortran projects employ diverse build systems such as cmake, make or meson tailored to specific compiler toolchains such as GFortran, Intel, and Cray. The Fortran Package Manager (FPM) standardizes and simplifies this process by offering a unified and streamlined build system, inspired by Cargo from Rust.
LFortran is a modern Fortran compiler that in addition to compiling to binaries like other compilers can also execute Fortran code interactively. It implements a structured multi-step lowering strategy where the source code is parsed into an Abstract Syntax Tree; then to an intermediate Abstract Semantic Representation (ASR) before being handled by various backends. The ASR is by construction always valid Fortran code. ASR to ASR passes allow for further optimizations and downstream backends (LLVM, WebAssembly, etc.) are guaranteed to receive semantically valid Fortran.
Compilation of FPM demands compilation of the following third-party codes:
Current status of LFortran:
fortran-regex
, refer lfortran-7495 for more details.toml-f
to binaries. (Reported at: lfortran-6838)jonquil
. (Reported at: lfortran-7494)fortran-shlex
. ( Reported at lfortran-7496)M_CLI2
can be found at lfortran-7497Although compilation of FPM depends on the 5 packages, these do not serve as blocker in achieveing 100% compilation as based on our past experience LFortran can generate binaries for almost every Fortran code with a few workarounds.
Proposed Work:
As of now LFortran can compile substantial subset of FPM, but it needs to be finished. We have identified the following semantic features that still have to be implemented / refactored:
The LFortran community includes several developers (Ondřej Čertík, Pranav Goswami) who have contributed substantially to FPM and LFortran in past, ensuring smooth collaboration of all projects. This project is also well placed within the existing LFortran road-map: the goal of LFortran is to compile all Fortran codes.
Timeline of Deliverables:
12 weeks
We will begin with the existing build base and proceed to compile all source files to LLVM. To fully utilize FPM for building the project, it is essential to first compile its dependencies and generate the necessary binaries. This effort will proceed along two parallel tracks: one focused on leveraging the current base to continue compiling to LLVM, and the other dedicated to addressing FPM dependencies and generating binaries. Given this parallel approach, defining a precise timeline for individual deliverables is challenging. However, the following tentative milestones are outlined:
The above are parallel, total of 8 weeks, the result will compile and run, with workarounds in the Fortran FPM code. Then the last 4 weeks:
A list of high priority issues can be found at lfortran-label:
toml-f
.People
We have identified Pranav Goswami (@Pranavchiku), Gauravsingh Sisodia (@xaerru), Harshita Kalani (@HarshitaKalani), Jinang Shah (@jinangshah21), Assem Medhat (@assem2002) as possible contractors, all of them have an extensive multi-year prior experience with contributing to LFortran and have implemented many of the existing features into LFortran already. If they are unavailable, we have several more contractors that we work with regularly.
The text was updated successfully, but these errors were encountered: