STF Project: Compiler developer for LFortran

Project: compiling fpm with LFortran

Support for more Fortran features will be implemented in LFortran to allow compiling of the Fortran package manager (fpm). This allows bootstrapping fpm using the LFortran compiler as well as including fpm as part of the LFortran runtime.

T1: Compile fpm dependencies to ASR

3 months (M1-M3)
The first step to support compiling fpm is to have LFortran translate fpm and its dependencies to its abstract semantic representation. The two main dependencies of fpm are M_CLI2 and TOML Fortran. M\ CLI2 is used for building command line applications, while TOML Fortran is an implementation of a TOML deserialization library. Both libraries make use of a wide range of features of the Fortran language not yet supported for ASR translation in LFortran. The required work for this is estimated to be 1 month for each dependency. Similarly, translating fpm to ASR will require approximately 1 month of work.

T2: ASR to LLVM-IR translation for all required ASR features

3 months (M4-M6; requires T1)
The newly implemented ASR features needed for fpm and its dependencies must be translated by LFortran to LLVM-IR to produce machine code. The actual ASR features can only be identified once the ASR translation is finished.The following main features are expected:

  • Unlimited class polymorphic objects
  • Allocatable recursive derived types
  • stdlib features to unblock usage in fpm
  • Fortran-C interoperability

The LLVM-IR translation is expected to take 3 months.

Deliverables

  • D1: Version of LFortran able to translate fpm to ASR.
    • Period: M3.
    • Mean of verification: Version available on GitHub
  • D2: Version of LFortran able to compile fpm.
    • Period: M6.
    • Mean of verification: Version available on GitHub, fpm build with LFortran continuously tested

Compensation

The project is compensated at €60/hour over a period of 6 months up to 40 hours/week. Part time (less that 40 hours/week) is available in mutual agreement with the project administrators.

Requirements:

  • Knowledge in C++ and Fortran
  • Familiarity with LLVM

Please contact the project administrators, Sebastian @awvwgk and Ondrej @certik, for further information and to submit applications. For applications please include previous contributions to relevant Fortran-lang projects.


For more details on the STF project checkout Sovereign Tech Fund Project.

10 Likes