Pith. sign in

REVIEW 5 cited by

Fortran2CPP: Automating Fortran-to-C++ Translation using LLMs via Multi-Turn Dialogue and Dual-Agent Integration

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2412.19770 v2 pith:HGKVMVVQ submitted 2024-12-27 cs.LG

Fortran2CPP: Automating Fortran-to-C++ Translation using LLMs via Multi-Turn Dialogue and Dual-Agent Integration

classification cs.LG
keywords translationdatasetcodefortran2cppllmsaccuracycompilationdialogue
verification ladder T0 review T1 audit T2 compute T3 formal T4 reserved
0 comments
read the original abstract

Translating legacy Fortran code into C++ is a crucial step in modernizing high-performance computing (HPC) applications. However, the scarcity of high-quality, parallel Fortran-to-C++ datasets and the limited domain-specific expertise in large language models (LLMs) present significant challenges for automated translation. In this paper, we introduce Fortran2CPP, a multi-turn dialogue dataset generated by a novel LLM agent-based approach that integrates a dual-LLM Questioner-Solver module to enhance translation accuracy. Our dataset comprises 11.7k dialogues capturing iterative feedback-decision workflows including code translation, compilation, execution, unit testing, and error-fixing. Using this dataset, we fine-tune several open-weight LLMs and achieve up to a 3.31x improvement in CodeBLEU scores and a 92\% increase in compilation success rate, demonstrating enhanced syntactic accuracy and functional reliability. Our findings highlight the value of dialogue-based LLM training for complex code translation tasks. The dataset and model have been open-sourced and are available on our public GitHub repository\footnote{\url{https://github.com/HPC-Fortran2CPP/Fortran2Cpp}}.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 5 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. SEDCoT: Enhancing LLM-Based COBOL Code Translation via Symbolic Execution and Delta Debugging

    cs.SE 2026-07 conditional novelty 6.0

    SEDCoT combines LLM translation, symbolic-execution test generation, and delta-debugging repair to raise COBOL-to-C correctness by ≥12% over SOTA LLM baselines while preserving human-readable output.

  2. Kaizen: Metamorphic Fuzzing and Differential Testing for LLM-Translated HPC Applications

    cs.SE 2026-07 accept novelty 6.0

    Compilation success and static developer tests are unreliable proxies for semantic correctness of LLM-translated HPC code; metamorphic fuzzing plus differential testing is required to expose input-dependent errors.

  3. An Ocean Model Ported by a Large Language Model: Experience and Lessons from FESOM2 (Fortran to C to C++/Kokkos)

    physics.ao-ph 2026-06 accept novelty 6.0

    LLM-assisted two-stage translation ported the full FESOM2 production ocean model from Fortran to C++/Kokkos, reproducing long-term statistics and achieving 1.6-3.7x GPU speedup on large meshes while preserving physics.

  4. Systematic LLM Translation of Legacy Scientific Code to Differentiable Frameworks: Application to a Land Surface Model

    cs.SE 2026-06 conditional novelty 6.0

    An LLM-based pipeline systematically converts the CLM-ml-v2 Fortran land surface model to JAX, delivering full differentiability, 8x fewer optimization steps, and 24x wall-clock speedup at N=2048 while releasing the c...

  5. LLM-Based Porting of Optimized C++ to CUDA Through Deoptimization and Reoptimization

    cs.DC 2026-06 unverdicted novelty 6.0

    Deopt-Reopt workflow for LLM-based C++ to CUDA porting shows mixed performance gains over direct translation depending on kernel, model, and success rate, with no universal benefit.