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

[code2FN] Supporting CLang for Preprocess #760

Closed
titomeister opened this issue Jan 19, 2024 · 0 comments · Fixed by #775
Closed

[code2FN] Supporting CLang for Preprocess #760

titomeister opened this issue Jan 19, 2024 · 0 comments · Fixed by #775
Assignees

Comments

@titomeister
Copy link
Contributor

In the preprocess step of the tree-sitter to CAST handling, we use GCC to remove includes and other directives from Fortran files before passing them to the tree-sitter generator. A special set of command-line arguments is used for this.
On Mac OS, the default compiler is CLang, which potentially has a different set of command-line arguments to do the pre-processing correctly.
We need to determine, if possible, what the command-line arguments are for Clang and update the preprocess step in
skema/program_analysis/CAST/fortran/preprocessor/preprocess.py
to support Mac OS and clang.

github-actions bot added a commit that referenced this issue Jan 27, 2024
## Summary of Changes
- Adds CAST generation for Fortran Unconditional GO TO
- Updates Matlab generation to use CASTLiteralValue
- Adds easy_multi_file_ingester frontend to generate system Gromet
without needing a system_filepaths file
- Adds a preprocessor to python2cast which converts Python 2 source code
to Python 3
- Adds support for additional Fortran compilers
- Updated CAST Version to v1.2.6. Updates LiteralValue to
CASTLiteralValue. All instances of this have been updated.
- Updates GroMEt version to 0.1.9. This version adds `FunctionType.GOTO`
and `FunctionType.Label` enums to support Gromet generation for Gotos
and Labels.
- Adds Annotated CAST (AnnCAST) support for Goto and Label.
- Adds Gromet generation for Basic Gotos
- Adds Gromet generation for Labels.

## Tests and Bug Fixes
- Fixes a bug where the working directory can change if a Gromet pass
fails
- Fixes bug in fortran2cast where printing to stdout would fail
- Fixes a small wiring bug with conditionals.
- Adds unit tests for simple Goto/Label examples.
- Adds a `utils_test.py` script that provides an interface to reading in
Fortran files for testing.
- Updates test_object_count unit test with accurate values

### Related issues
Resolves #712
Resolves #744
Resolves #750
Resolves #760
Resolves #769
Resolves #752
Resolves #772

---------

Co-authored-by: Tito Ferra <[email protected]> 4f8bf6b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants