Skip to content

Commit d87465b

Browse files
authored
Update README.md
1 parent 35c50b6 commit d87465b

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

README.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# fortran-src
22
![CI status badge](https://github.com/camfort/fortran-src/actions/workflows/ci.yml/badge.svg)
33

4-
Provides lexing/parsing and early static analyses of Fortran code. The following
4+
fortran-src is an open-source Haskell library and command-line application for the lexing, parsing, and static analysis of Fortran source code. It provides an interface to build other tools, e.g., for static analysis, automated refactoring, verification, and compilation. The following
55
Fortran standards are covered:
66

77
* FORTRAN 66 (ANSI X3.9-1966)
@@ -13,12 +13,29 @@ Fortran standards are covered:
1313
Parsing is configurable, and you can select the Fortran standard to target,
1414
including special extended modes for nonstandard FORTRAN 77.
1515

16-
Includes data flow and basic block analysis, a renamer, and type analysis.
16+
Various static analyses are provided including:
17+
18+
* Control-flow analysis (building a super graph) (Language.Fortran.Analysis.BBlocks);
19+
* General data flow analyses (Language.Fortran.Analysis.DataFlow), including:
20+
* Reaching definitions;
21+
* Def-use/use-def;
22+
* Constant evaluation;
23+
* Constant propagation;
24+
* Live variable analysis;
25+
* Induction variable analysis.
26+
* Type analysis (Language.Fortran.Analysis.Types);
27+
* Module graph analysis (Language.Fortran.Analysis.ModGraph);
1728

1829
This package primarily exports a Haskell library, but also builds an executable
19-
that can be used for testing and debugging. For example usage, see the
20-
[CamFort](https://github.com/camfort/camfort) project, which uses fortran-src as
21-
its front end.
30+
that can be used for testing and debugging.
31+
32+
The library is the basis of the [CamFort verification tool](https://github.com/camfort/camfort).
33+
34+
## Statement of Need
35+
36+
Fortran remains a popular language in the international scientific community. It is not only a mainstay of legacy software, but is also used to write new software. Fortran is particularly notable for its prevalence in earth sciences, e.g., for implementing climate models that inform international policy decisions. In 2024, Fortran re-entered the Top 10 programming languages in the TIOBE Index, showing its enduring popularity. The continued use of Fortran, particularly in scientific contexts, was the catalyst for this software package. A challenge in writing language tools for Fortran is its long history. There have been several major language standards (FORTRAN I-IV, FORTRAN 66 and 77, Fortran 90, 95, 2003, 2008, etc.) Newer standards often deprecate features that are known to be a ready source of errors, or difficult to specify or understand. However, compilers often support an amalgam of features across standards, enabling developers to use deprecated features and mix language standards. This complicates the development of new tools for manipulating Fortran source code; one must tame the weight of decades of language evolution.
37+
38+
Our package, `fortran-src`, provides an open-source unified core for statically analysing Fortran code across language standards, with a focus on legacy code over cutting-edge modern Fortran. It is both a standalone tool and a library, providing a suite of standard static analyses as a basis for further programming language tools and systems.
2239

2340
## Obtaining
2441
We provide [prebuilt binaries](https://github.com/camfort/fortran-src/releases)

0 commit comments

Comments
 (0)