Changes between Version 11 and Version 12 of FortranOverview
- Timestamp:
- 05/16/19 17:41:30 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FortranOverview
v11 v12 2 2 [wiki:DeveloperPage#ToolDevelopment Back:DeveloperPage] 3 3 == 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`. 4 The ''FORTRAN'' front-end is a ''CIVL'' component generating a set of 5 intermediate abstract syntax trees (or `CIVL IR`) from given ''FORTRAN'' 6 source files, 7 then the verifier component can check desired correctness properties 8 of the program based on its `CIVL IR`. 7 9 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. 11 18 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 === 22 20 ==== Completed ==== 23 21 * Support pre-processing `FORTRAN` source with a general pre-processor [https://vsl.cis.udel.edu/lib/sw/civl/ directives]; … … 41 39 * Support `CIVL` primitives in `FORTRAN` code; 42 40 43 === 1.2. RAPIDS ===41 === 1.2. RAPIDS related goals === 44 42 || '''Goal''' || '''Status''' || 45 43 |||| Phase. 1 || 46 44 || 1.1 Basic OpenMP directives || Completed || 47 45 || 1.2 Basic CIVL primitives || TODO || 48 || 1.3 Commonly used F ortranfeatures || Completed ||46 || 1.3 Commonly used FORTRAN features || Completed || 49 47 || 1.4 Basic OpenMP SIMD directives || In-progress || 50 48 |||| Phase. 2 || … … 59 57 60 58 ==== 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]) 61 63 62 64 ==== In-progress ==== 63 65 * 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. 65 71 66 72 ==== TODO list ==== 73 * Support ''CIVL'' primitives 67 74 68 75 == 2. Design == 69 76 The ''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'''. 81 Major 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 70 94 === 2.1. A general preprocessor === 71 95 * Input: A set of `FORTRAN` source files
