In a different vibe to the title…has anyone used AI and LLMs to refactor or rewrite old Fortran into modern one? There’s lots of going from language to language, but I haven’t seen any papers that attempt to modernize old Fortran
I tried it with a small test program (provided by one of the f77 codes). It took more time to fix the mistakes than if I would have done it myself. This is already one year ago. So likely things have improved a lot. I think the biggest issue for me are the small bugs that are difficult to detect. Yes, humans make those too. But if you wrote it yourself, it is easier to debug. That became very clear in my test. I am affraid that we are all becoming reviewers for these AI beasts. Review is the most boring part of the SW development process.
I use LLMs to rewrite some of my own code (some 77, some modern). They do well enough and save me some time, but a) I use them for small modules only, b) I have reference code I provide the LLM with to demonstrate style and paradigms, c) I know the code so it’s easy and quick to fix when mistakes are made. Out of curiosity, I also let it regenerate some functions to see how close it gets and it’s improved in the last 3 years for fortran. Nevertheless, I still only found it useful and felt comfortable using it as describes above. I doubt it would be much of a timesaver for larger software at this point.