-
-
Notifications
You must be signed in to change notification settings - Fork 129
GSoC 2023 Ideas
LFortran is participating again in GSoC 2023 under the Fortran-lang organizations.
Below we list developed project ideas listed by priority. The "High Priority" section contains projects that we are especially interested in, as they lie on the critical path to a minimal viable product: make LFortran usable for simpler projects.
However, feel free to propose any project idea that you like to improve LFortran, for example by browsing open issues:
https://github.com/lfortran/lfortran/issues
If you are interested in applying, please get in touch with us at either our Zulip chat or our mailinglist:
We will help answer questions and help with finding and refining a project idea. You do not need to have a prior experience with compilers, we will teach you. It is fun. LFortran is written in C++, but we do not use many advanced features and if you have any programming experience you will be able to pick it up.
Here are a few projects for inspiration. You are welcome to propose your own idea.
Potential mentors:
- Ondřej Čertík
- Gagandeep Singh
- Rohit Goswami
- Thirumalai Shaktivel
- Smit Lunagariya
- Luthfan Lubis
Compile benchmarking code written in Fortran with LFortran and improving LFortran's performance on these benchmarks
https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/fortran.html contains all the benchmark codes written for various problems such as n-body
, sepctral norm
, mandelbrot
. The workflow would involve first doing bug fixes to compile the code (modifying the input code would be okay) with LFortran and producing correct outputs. Then, improving LFortran to perform better or equivalent to other Fortran compilers such as GFortran.
n-body
already compiles with workarounds with LFortran main. See, https://github.com/lfortran/lfortran/pull/1213. More work needs to be done for other benchmark codes.
Expected outcomes: LFortran can compile as many benchmark codes as possible. Performing better than other compilers would be an additional plus.
Skills preferred: Fortran and C++ programming
Difficulty: intermediate/hard, 350 hours
Mentors - Gagandeep Singh (Github - @czgdp1807)
Compile all Fortran files in SciPy with LFortran. This project involves making improvements to the fixed form parser in LFortran if needed and then mainly implementing the rest of the semantics that is needed to compile the Fortran files with LFortran.
Being able to compile SciPy with LFortran would make a huge impact on both LFortran and SciPy.
Expected outcomes: LFortran can compile all Fortran code in SciPy.
Skills preferred: Fortran and C++ programming
Difficulty: intermediate, 350 hours
Mentors - Ondřej Čertík
We have LFortran running in the browser using WASM here: https://dev.lfortran.org/, the goal of this project would be to improve the user interface. Here is a list of issues that the project can work on fixing: https://github.com/lfortran/lcompilers_frontend/issues
This project would entail working with LFortran, LLVM, Emscripten, and Webassembly to allow running Fortran in the browser.
Skills preferred: Fortran and C++ programming
Difficulty: intermediate, 350 hours
Mentors - Ondřej Čertík
This project would be used to first serialize the ASR and then use it within a language server.
Expected outcomes: LFortran can be used as a Fortran language server that can be used in other software such as source code editors and IDEs.
Skills preferred: Fortran and C++ programming
Difficulty: intermediate, 350 hours
Mentors: Ondřej Čertík (@certik)
The roadmap https://gitlab.com/lfortran/lfortran/-/issues/272 issue contains a list of Fortran features that we want implemented. Each feature should be implemented at the ASR level and in the LLVM backend to be complete. If AST is missing for a given feature, then it has to be implemented also.
Here you can pick a feature or a set of features from the list and propose it as a GSoC project. In other words, this project idea can accommodate multiple student projects.
List of resources for more information and background:
- ASR.asdl, the comment at the top explains the design motivation
- asr_to_llvm.cpp is the LLVM backend
- ast_to_asr.cpp is the AST -> ASR conversion where all semantics checks are being done and compiler errors reported to the user
- Developer Tutorial
If you have any questions, please do not hesitate to ask, we can discuss or provide more details.
Mentors: Ondrej Certik (@certik)
LFortran has a very fast x86 code generation backend implemented in asr_to_x86.cpp which allows very fast compiling (many times faster than going via LLVM). The x86 backend does not do any optimizations, so it is meant to be used in Debug mode only. As every backend in LFortran, the backend receives the code as ASR, and it recursively walks over each ASR node and generates x86 machine code.
The purpose of this project would be to extend this backend to cover more Fortran features.
If you have any questions, please do not hesitate to ask, we can discuss or provide more details.
Mentors: Ondrej Certik (@certik)
Enhance the frontend parser to allow for more generic extensions and keywords. In particular, parsing the pyf
or signature file format consumed by F2PY. This would mean that SciPy can be directly transformed to the ASR representation without a fixed form parser.
This also involves adding nodes to the ASR itself.
Difficulty: intermediate, 350 hours
Expected outcomes: LFortran's ASR is improved such that it can parse the pyf
format consumed by F2PY.
Skills preferred: Fortran and C++ programming
Mentors: Rohit Goswami (@HaoZeke)
Add a backend to LFortran that automatically exposes (eventually all) Fortran module contents to Python. Similar to how f2py works, but using a robust production level parser and semantic analysis from LFortran.
Related issues:
- lfortran#133: Automatic wrappers Fortran -> Python
Mentors: Ondrej Certik (@certik),
Here is a list of issues that should be fixed in order to make automatic formatting via lfortran fmt
more useful: https://gitlab.com/lfortran/lfortran/-/milestones/2. This project could work on fixing those and implement other improvements in order for lfortran fmt
to work on some projects such as stdlib
.
Mentors: Ondrej Certik (@certik),
There is a prototype parser for gfortran module files here: https://gitlab.com/lfortran/lfortran.py/-/blob/7a3b356122174d291562a5c47f0d2c9dc3b183da/lfortran/adapters/gfortran/mod.py. Port it to C++ and the current LFortran, and then allow such modules to be "used" in LFortran.
Related issues:
- lfortran#52: Allow to "use" modules compiled by gfortran
Mentors: Ondrej Certik (@certik),
Modify one of the following Fortran parsers as a roundtrip parser, which can recreate the original source code by fully capturing formatting data (case-sensitive variable names, whitespace, comments, etc.) alongside the syntactically essential content. The goal would be to develop code that both LFortran and Flint could use.
Mentors: Ondrej Certik (@certik), Marshall Ward (@marshallward)