Changes between Version 11 and Version 12 of FortranOverview


Ignore:
Timestamp:
05/16/19 17:41:30 (7 years ago)
Author:
wuwenhao
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FortranOverview

    v11 v12  
    22[wiki:DeveloperPage#ToolDevelopment Back:DeveloperPage]
    33== 1. Goals ==
    4 `FortranFrontEnd` is a `CIVL` component generating CIVL abstract syntax trees (`CIVL IR`)
    5 from given `FORTRAN` source files so that `CIVL` can verify desired correctness properties
    6 for `FORTRAN` programs based on their `CIVL IR`.
     4The ''FORTRAN'' front-end is a ''CIVL'' component generating a set of
     5intermediate abstract syntax trees (or `CIVL IR`) from given ''FORTRAN''
     6source files,
     7then the verifier component can check desired correctness properties
     8of the program based on its `CIVL IR`.
    79
    8 Considering that:
    9  1). most concurrent APIs (e.g., `MPI`, `OpenMP`, etc.) support bindings of
    10  both `C` and `FORTRAN`;
     10==== Motivations ====
     11* Numbers of software applications (esp. scientific ones) are written
     12  in ''FORTRAN'' programming language while few verifiers support this
     13  language;
     14* Most concurrent APIs (e.g., ''MPI'', ''OpenMP'', etc.) support both
     15  bindings of ''C'' and ''FORTRAN'';
     16* The transformation between ''C'' and ''FORTRAN'' programs is frequent
     17  due to software evolution.
    1118
    12  2). `FORTRAN` source code are commonly pre-processed by a  general preprocessor;
    13 
    14  3). `CIVL` is originally designed and developed for verifying `C` programs;
    15 
    16 `FORTRAN` source files will be firstly pre-processed by `CIVL`'s general preprocessor;
    17 and then a preprocessed token stream will be converted to a `FORTRAN` token stream;
    18 an `ANTLR` generated parser will process it based on `FORTRAN 2018` standard;
    19 finally, the parse tree will be transformed to `CIVL IR`.
    20 
    21 === 1.1. Base ===
     19=== 1.1. Basic goals ===
    2220==== Completed ====
    2321* Support pre-processing `FORTRAN` source with a general pre-processor [https://vsl.cis.udel.edu/lib/sw/civl/ directives];
     
    4139* Support `CIVL` primitives in `FORTRAN` code;
    4240
    43 === 1.2. RAPIDS ===
     41=== 1.2. RAPIDS related goals ===
    4442|| '''Goal'''                         || '''Status''' ||
    4543|||| Phase. 1                                         ||
    4644|| 1.1 Basic OpenMP directives        ||  Completed   ||
    4745|| 1.2 Basic CIVL primitives          ||     TODO     ||
    48 || 1.3 Commonly used Fortran features ||  Completed   ||
     46|| 1.3 Commonly used FORTRAN features ||  Completed   ||
    4947|| 1.4 Basic OpenMP SIMD directives   || In-progress  ||
    5048|||| Phase. 2                                         ||
     
    5957
    6058==== Completed ====
     59* Support basic OpenMP directives including:
     60  `for` constructs, `parallel` constructs,
     61  `reduction` clause, data clauses, etc.
     62* Commonly used basic ''FORTRAN'' features ([wiki:FortranSubset])
    6163
    6264==== In-progress ====
    6365* Support verifying the functional equivalence for `FLASH5` project
    64  (between the original version and optimized transformation);
     66  (between the original version and optimized transformation);
     67* Re-construct the OpenMP-to-CIVL-IR transformer supporting `SIMD`
     68  directives and other scheduled directives.
     69* Construct semantic model for array sections
     70* Analyze and simplify ready-only parameters to be passed-by-val.
    6571
    6672==== TODO list ====
     73* Support ''CIVL'' primitives
    6774
    6875== 2. Design ==
    69 
     76The ''FORTRAN'' front-end involves four sub-components:
     77* a general '''preprocessor''',
     78* a preprocessor token to ''FORTRAN'' token '''convertor''',
     79* an ''ANTLR'' generated ''FORTRAN'' '''parser''', and
     80* a ''FORTRAN'' parse tree to `CIVL IR` '''transformer'''.
     81Major reasons resulting in this design are:
     82* The ''de facto'' standard ''FORTRAN'' preprocessor is usually
     83  implemented as a ''C'' preprocessor compatible with ''FORTRAN''
     84  specification.
     85* There are conflicts caused by the difference between two language
     86  specifications
     87  (e.g., a string wrapped by `'` can be accepted in ''Fortran'',
     88  but not in ''C'')
     89* ''CIVL'' uses ''ANTLR'' parser generator to construct its ''C''
     90  preprocessor and parser in Java.
     91* ''CIVL'' is originally designed for verifying ''C'' programs,
     92  so that its framework is coupled with ''C'' specification.
     93 
    7094=== 2.1. A general preprocessor ===
    7195* Input: A set of `FORTRAN` source files