Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fortran] Fix bugs in TIE-GCM ingestion #563

Closed
vincentraymond-ua opened this issue Oct 10, 2023 · 2 comments · Fixed by #567
Closed

[fortran] Fix bugs in TIE-GCM ingestion #563

vincentraymond-ua opened this issue Oct 10, 2023 · 2 comments · Fixed by #567
Assignees
Labels
bug Something isn't working Code2FN lang/Fortran Used for work related to Fortran (ex. frontend support)

Comments

@vincentraymond-ua
Copy link
Contributor

vincentraymond-ua commented Oct 10, 2023

There are a few files that are generating CAST, but cause an error during Gromet ingestion, implying that the CAST is malformed. This occurs in the following TIE-GCM files:

  • advec.F
  • cons.F
  • colath.F
  • qjnno.F
@vincentraymond-ua vincentraymond-ua added bug Something isn't working Code2FN lang/Fortran Used for work related to Fortran (ex. frontend support) labels Oct 10, 2023
@vincentraymond-ua vincentraymond-ua self-assigned this Oct 10, 2023
@vincentraymond-ua
Copy link
Contributor Author

vincentraymond-ua commented Oct 10, 2023

Update 10/10/2023

Now generating Gromet for cons.F. The issue was related to a double nested List generated by the conditional handler.

Also identified whats causing the bug in colath.F.

@vincentraymond-ua
Copy link
Contributor Author

Update 10/13/2023

To be resolved by #567

vincentraymond-ua added a commit that referenced this issue Oct 14, 2023
## TIE-GCM bug fixes
There were a number of small bugs in the Fortran->Gromet pipeline that
were discovered when determining which TIE-GCM files are currently able
to be ingested.

### Node Helper
- Fixes missing comma in CONTROL_CHARACTERS list causing '>' to be
ignored.
- Adds additional set of control characters to CONTROL_CHARACTERS list
that weren't previously seen in any examples
- Adds remove_comments function to remove comment nodes from tree-sitter
parse tree. This prevents comments from being processed by ts2cast and
creating unexpected None values in the CAST.

### Preprocessor
- Fixes bug in include directory path when running script from directory
other than the system root.
- Runs gcc processor from system root if there are no `#include`
directives.

### TS2CAST
- Fixes bug in function call handler to support ingesting functions with
no arguments.
- Fixes bug when in function call handler when the function call is part
of a unary expression `+foo()`
- Fixes bug in conditional handler to support ingesting single line
conditionals
- Adds support for `not` operator

Resolves #563
github-actions bot added a commit that referenced this issue Oct 14, 2023
## TIE-GCM bug fixes
There were a number of small bugs in the Fortran->Gromet pipeline that
were discovered when determining which TIE-GCM files are currently able
to be ingested.

### Node Helper
- Fixes missing comma in CONTROL_CHARACTERS list causing '>' to be
ignored.
- Adds additional set of control characters to CONTROL_CHARACTERS list
that weren't previously seen in any examples
- Adds remove_comments function to remove comment nodes from tree-sitter
parse tree. This prevents comments from being processed by ts2cast and
creating unexpected None values in the CAST.

### Preprocessor
- Fixes bug in include directory path when running script from directory
other than the system root.
- Runs gcc processor from system root if there are no `#include`
directives.

### TS2CAST
- Fixes bug in function call handler to support ingesting functions with
no arguments.
- Fixes bug when in function call handler when the function call is part
of a unary expression `+foo()`
- Fixes bug in conditional handler to support ingesting single line
conditionals
- Adds support for `not` operator

Resolves #563 7ae4f25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Code2FN lang/Fortran Used for work related to Fortran (ex. frontend support)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant