Skip to content

(Towards #428) Implementation of the Fortran2008 intrinsics#514

Merged
sergisiso merged 12 commits into
masterfrom
428_f08_intrinsic
Jun 25, 2026
Merged

(Towards #428) Implementation of the Fortran2008 intrinsics#514
sergisiso merged 12 commits into
masterfrom
428_f08_intrinsic

Conversation

@LonelyCat124

Copy link
Copy Markdown

I attempted to add the Fortran2008 intrinsic in an extensible and similar way to the current.

I couldn't name it Fortran2008_Intrinsic_Name as the stuff in the Fortran2008.init.py stuff breaks the Fortran2003 setup because it makes a new Name class for Fortran2003 which matches every string.

Ready for a review from @arporter or @sergisiso once I fix any formatiting issues.

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.24%. Comparing base (ea5c601) to head (5a27f24).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #514   +/-   ##
=======================================
  Coverage   92.24%   92.24%           
=======================================
  Files          88       89    +1     
  Lines       13866    13882   +16     
=======================================
+ Hits        12790    12806   +16     
  Misses       1076     1076           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sergisiso

Copy link
Copy Markdown
Collaborator

I triggered PSyclone CI with this, as it would be good to include it in the next release.

@LonelyCat124 LonelyCat124 changed the title Implementation of the Fortran2008 intrinsics (Towards #428) Implementation of the Fortran2008 intrinsics Jun 19, 2026
@LonelyCat124

Copy link
Copy Markdown
Author

I triggered PSyclone CI with this, as it would be good to include it in the next release.

I think the good news is PSyclone should immediately support these new functions without changes as its not dependent on a type check with Intrinsic_Name, but only Fortran2003.Intrinsic_Function_Reference which contains the Intirnsic_Name (sub)class as a child.

@arporter arporter added under review F2008 Relates to support for the Fortran 2008 standard labels Jun 22, 2026

@arporter arporter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @LonelyCat124. I have to confess that I can't figure out how this works - I thought I'd be able to trip it up but all my attempts failed :-) However, I do think that, to be consistent with the other F2008 support, we shouldn't end up with a parse tree with F08-specific nodes in it. i.e. it should be possible to have the F08 parser give Intrinsic_Name nodes, just like the F03 one does (but for a wider set of names).

There's also a bit of code style tidying to do.

Comment thread src/fparser/two/Fortran2008/f08_intrinsics.py Outdated
Comment thread src/fparser/two/Fortran2008/f08_intrinsics.py Outdated
Comment thread src/fparser/two/Fortran2008/f08_intrinsics.py Outdated
Comment thread src/fparser/two/Fortran2008/f08_intrinsics.py Outdated
Comment thread src/fparser/two/Fortran2003.py
Comment thread src/fparser/two/Fortran2003.py
@arporter arporter added reviewed with actions PR has been reviewed and is back with developer and removed under review labels Jun 22, 2026
@LonelyCat124 LonelyCat124 requested a review from arporter June 24, 2026 14:56
@LonelyCat124 LonelyCat124 added ready for review and removed reviewed with actions PR has been reviewed and is back with developer labels Jun 24, 2026
@LonelyCat124

Copy link
Copy Markdown
Author

@arporter Addressed as we discussed today - I didn't add "done" to the last comments as we discussed the changes in person but they should all be resolved.

@arporter arporter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Aidan, I like the new implementation - glad it worked out well. Just a little bit of tidying left. I'll fire off the PSyclone ITs with this version too.

Comment thread src/fparser/two/Fortran2008/intrinsics_f08.py Outdated
Comment thread src/fparser/two/tests/fortran2008/test_f08_intrinsics.py Outdated
@arporter arporter added reviewed with actions PR has been reviewed and is back with developer and removed under review labels Jun 24, 2026
@arporter

Copy link
Copy Markdown
Member

As the two issues are purely about pylint, I'll take the liberty of fixing them.

@arporter

Copy link
Copy Markdown
Member

I realised that we already had a test file for F2008 intrinsics so I've moved the new tests into there and removed the new test file that this PR was adding. As such, it's going to need a review from @sergisiso.

@arporter arporter added ready for review and removed reviewed with actions PR has been reviewed and is back with developer labels Jun 25, 2026
@arporter arporter self-assigned this Jun 25, 2026
@arporter

Copy link
Copy Markdown
Member

Ready for a look now @sergisiso, thanks :-)

@sergisiso sergisiso left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arporter @LonelyCat124 I launched the IT tests once again but if they pass this is ready to merge.

@sergisiso sergisiso added ready for merge PR is waiting on final CI checks before being merged. and removed under review labels Jun 25, 2026
@sergisiso

Copy link
Copy Markdown
Collaborator

@arporter Everything was gree, so I will proceed to merge

@sergisiso sergisiso merged commit 1038142 into master Jun 25, 2026
6 checks passed
@sergisiso sergisiso deleted the 428_f08_intrinsic branch June 25, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F2008 Relates to support for the Fortran 2008 standard ready for merge PR is waiting on final CI checks before being merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants