Skip to content

Releases: OpenFortranProject/ofp-sdf

Spring 2017 Release for ROSE

27 Mar 22:16

Choose a tag to compare

This is an interim release of the Open Fortran Parser for the ROSE compiler infrastructure. OFP is nearing the stage where all of the rule tests for F2008 pass and then v1.0 can be released.

Notes specifying some of the changes since v0.9.3 can be found below.

  1. Completed intrinsic type conversions for the FAST to Sage conversions.

  2. Removed explicit Kind term within an IntrinsicType for FAST.

  3. Removed fixed-disamb rule because the ambiguity has been fixed in the grammar.

  4. Added a production that rejects a ReadFMTStmt with parens as it is ambiguous with a ReadStmt with no input items. This fixes issue 37.

New Year 2017 Release for ROSE

20 Jan 07:20

Choose a tag to compare

This is an interim release of the Open Fortran Parser for the ROSE compiler infrastructure. OFP is nearing the stage where all of the rule tests for F2008 pass and then v1.0 can be released.

Notes specifying some of the changes since v0.9.2 can be found below.

  1. Added preprocessing stage for fixed-form files. This currently uses a grammar, FixedForm.sdf, a transformation program, fixed-to-free, and unparsing rules, FreeForm.pp. This will likely be replaced by a C++ program to allow for more functionality (for example, Holleriths in format statements).
  2. Refactored grammar in Main.sdf to include obsolete features (FortranObsolete.sdf) and extensions (FortranExtensions.sdf).

Features added/moved to obsolete grammar module:

  • old-style component initialization, between '/' expr '/'
  • AssignStmt, ActionStmt, PauseStmt
  1. Refactored expressions to use the Fortran standard syntax using Level1Expr ... This allows the standard to be followed directly as well as makes it possible to use SDF prefer syntax for preferences.
  2. Refactored grammar to fix several ambiguities. Mostly this was done by combining some languages constructs into one construct, requiring everything to be sorted out during a later lexical analysis stage. The primary result of this is that a lot of things get expressed as a DataRef, for example some function references are expressed as DataRefs.

In particular:

  • Fixed ambiguity between substrings, function references, and arrays DataRef/PartRef by using {prefer}.
  • Added Keyword '=' ActualArg and AltReturnSpec to SectionSubscript so an array can pretend to be a function reference.
  • FMT and NML are ambiguous in an io-control-spec-list; replaced where ambiguous with MFT-or-NML.
  • Added preference of DefinedBinaryOp over LocalDefinedOperator and UseDefinedOperator.
  • Removed EndProgramStmt, EndSubroutineStmt, ... from productions of ActionStmt because it created an ambiguity for a bare END statement (without program, subroutine, ...). If end statements don't produce an action statement, they can't be added to an executable list so the parsing can now be untangled.
  • Removed DataRef % BindingName as it was ambiguous with ProcComponentRef.
  1. Improvements to parsing
  • Added EXIST (R931) as part of an inquire-spec
  • Added a nonpreferred '/' ControlEditDesc without the leading comma so that it could appear as the first descriptor in a format statement.
  • Added IncludeStmt (although not actually a statement in Fortran).
  • Added CrayPointerStmt and CrayPointerDecl to extensions.
  • Added AltReturnSpec, ProcComponentRef, RenameOp, ID to wait-spec-list, and TypeBoundProcedureStmt.
  • Completed Format edit descriptors.
  • Added several constructors leading directly to FAST terms thus reducing need for later transformations. For example, REAL with KindSelector and CHARACTER with CharSelector. Other examples: KindSelector -> Kind, RealLiteralConstant -> RealVal, BozLiteralConstant_HC -> HexVal, LogicalLiteralConstant -> TRUE/FALSE; added HexVal, OctVal, BinVal, and IntVal.
  • Added TypeBoundProcBinding, TypeBoundProcedureStmt, TypeBoundGenericStmt, TypeParamAttrSpec, and rules associated with CaseConstruct.
  • Fixed where constructs.
  • Added EntryStmt.
  • Fixed DataComponentDefStmt
  • Added constructors for DataStmtRepeat
  • Removed R438 opt-component-array-spec (replaced by ArraySpec in Main.sdf).
  • Added AssumedClass and AssumedType. Fixed Class in a type declarations stmt.
  1. Improvements to transformations to FAST
  • Added several statements to transformations moving eos terms to Comment annotations. These include: PrivateComponentsStmt, EndfileStmt, DefaultGuardStmt, LableDoStmt, TypeBoundProcedureInterfaceStmt, SelectCaseStmt, CaseStmt, EndSelectStmt, SelectTypeStmt, TypeBoundProcedureStmt, TypeGuardStmt, ClassGuardStmt, EndSelectTypeStmt, ProcComponentDefStmt, and EnumDef related statements.
  • Simplified EntityDecl rewrite rule transforming to a Var for character lengths.
  1. Improvements to unparsing
  • Added indentation for statements within a block-construct.
  • Fixed issue with char-length (R422) unparsing incorrectly for statements like: character*(2)
  • Added multiple inquire-specs (e.g., OPENED).
  • Improved EndSelectTypeStmt for indentation.
  • Added Parens(STAR()) to replace CHARACTER_LEN(STAR) so it can be unparsed correctly.
  • Added support for ForallStmt and indentation for ForallConstruct.
  • Added ppEnumerator to take care of case with no value expression.
  • Fixed unparsing of R469 AcSpec
  • Fixed unparsing of case constructs.
  • Fixed unparsing of SelectTypeStmt.
  1. Bug Fixes

Issue #15: Added rewrite of PartRef with substring-section-range to Substring as part of major refactoring to fix this issue. Also added rewrite of ParensUnaryPlus/Minus to add obsolete feature for expressions, e.g., a--b to a-(-b)

Issue #16: Transformed LengthSelector_STAR(CharLength(STAR())) to STAR()

Issue #17: Modifications allowing simpler io-control-spec-lists (specifically UNIT=, FMT=, and NML= specifiers) as long as they are correctly ordered. The bug is that FMT can be ambiguous with NML so a new constructor was added, FMT-or-NML which will have to be figured out during analysis.

Issue #18: Fixed Continuation so that blank and comment lines can appear within a continuation. Also added a transformation of a RealVal with a kind to RealVal(val,ppLiteralKind(kval)).

Issue #21: Added IncludeStmt (although not actually a statement in Fortran).

Issue #33: Made whitespace before continuation character '&' optional.

Issue #34: Added CrayPointerStmt and CrayPointerDecl.

Issue #35: Added '*' as a COMMENTCHAR in fixed format preprocessing.

Issue #36: Added multiple inquire-specs (in particular OPENED).

  1. Testing
  • A partial list of files for unit testing added (or improved) to the tests/rule-tests/pp directory includes: R417, R437, R438, R444, R456, R468, R451, R455, R468, R469, R537, R608, R609, R618, R741, R922, R923, R924, R925, R926, R927, R928, R929, R930, R931, R1221, R1222, R1223
  • Added several files to the tests/rule-tests/pp directory for the round-trip testing of Fortran rules.
  • Added testing of parsing and translation to FAST terms in the tests/rule-tests directory.
  • Added additional statements to some unit tests to test for ambiguities.

Halloween release for Open Coarrays and ROSE

30 Oct 18:42

Choose a tag to compare

Contains bug fixes and more Fortran AST (FAST) coverage.

Abstract Syntax Tree Construction Simplified

08 Sep 09:11

Choose a tag to compare

This release simplifies the AST (Abstract Syntax Tree) constructors and makes the resulting AST ATerms much shorter and easier to read. This was done by: 1. Removing unnecessary constructors; 2. Making constructors have the same arity by using NoXXXTerms as None/Null placeholders; 3. Sometimes shortening constructor names; removing the optional (?) construction so that Some and None (especially Some) aren't used.

Traversal Mechanism Completed

27 Nov 00:29

Choose a tag to compare

This release contains a first cut at code to traverse the ATerm syntax tree produced by the parser. This software is in the directory ofp-sdf/fortran/traverse. To aid in automatically generating the traversal code from the grammar, unique cons (constructor) names were given to all of the or ( | ) clauses in the grammar.

Completion of all Rule Tests

19 Sep 01:22

Choose a tag to compare

This release contains modifications to the Fortran SDF grammar that allow all of the rule tests to successfully parse.

Major items still to be completed:

  1. Some forms of continuation still cause problems.
  2. Include "statement".
  3. Fixed form input.

Completion of R600UseDataObjects Tests

23 Aug 18:52

Choose a tag to compare

This release contains several bug fixes, especially related to Clause 6, Use of Data Objects. It also removes additional ambiguities in the productions, primarily by removing the ambiguous rules (in or clauses) and appending "_AMB" to the constructor name.