Skip to content

go-embedded-fortran documentation

Fortran in pure Go, in development: a front end, an evaluator checked against gfortran 15.2.0, an I/O runtime ported from flang-rt, an oracle harness and a measured gate.

go-embedded-fortran is in development. Its repository, fortran (module github.com/go-embedded-fortran/fortran, latest release v0.17.0), is meant to become a Fortran implementation written in Go (CGO_ENABLED=0), embedded in Go programs and run in the browser through WebAssembly. It backs the ```fortran cells of go-notebook since v0.17.0, which run in one session (eval.Session; their variables do not cross to other languages yet, and the playground’s core does not link the runtime yet), as go-embedded-c backs its C cells.

The plan is the bibliography of the go-scikit roadmap, bib/fortran.md. Every stage is checked against a reference, never against expectations written by hand.

What exists at v0.17.0

  • A front end in Go. syntax, a lexer and parser (free and fixed form), and sema, a semantic analyser producing a typed tree. See Front end.
  • An evaluator. eval runs all 14 golden programs, byte-identical to their goldens (stdout, stderr and exit status), which gfortran 15.2.0 produced.
  • An I/O runtime. rt, ported from flang-rt: 71 096 of 71 135 differential cases against gfortran 15.2.0 are identical and the 39 others are in documented classes. See I/O runtime.
  • An oracle harness and a gate. foracle runs gfortran 15.2.0 as a program, and foracle gate decides the back end from measurements; its first figures give the verdict A first. See Oracle and gate.

Known limits

  • The evaluator’s scalar loops are 8x to 108x behind gfortran -O2: open defect #17.
  • The gate’s playground home (a headless browser lane) is not implemented, so the rule cannot pick A outright: #5.
  • Some performance figures were not measured because the machine’s load was above the bound of 8; none is published rather than a loaded one.
  • The evaluator still refuses part of the language; the list is on Status.

Pages

PageWhat it holds
Statusthe milestones M0 to M6 and what is not done yet
Front endthe parser, its parse rate on three corpora, the semantic analysis and the cell splitter
I/O runtimert: edit descriptors, units, bounds and the differential against gfortran
Oracle and gategfortran 15.2.0 as the reference, foracle, and the gate of bib section 4.2 with its figures
Licenceswhat is ported, what is only run

Repositories

RepoWhat it is
fortranthe implementation (source)
docsthis site
go-embedded-fortran.github.iothe landing page
brandthe logo, icons and social images

Created on by tannevaled

Modified on by tannevaled