A Dialect of Modern Fortran for Computer Simulations

  • Shin’Ya HosoyamadaEmail author
  • Akira Kageyama
Conference paper
Part of the Communications in Computer and Information Science book series (CCIS, volume 946)


The modern Fortran is one of the major languages in computational sciences. New features introduced in Fortran 2003 and later have improved the writing experiences of simulation programming. Some features of the language, however, can be further improved by slightly modifying its lexical syntax and imposing a coding rule. In this paper, we propose a dialect of the modern Fortran for the improvements. The features of the dialect include; the period “.” as the member access operator; block comments, addition/subtraction/multiplication assignment, pre-defined and user-defined aliases, automatic check of “implicit none” call, “just once” block, and “skip” block. We have developed a preprocessor to convert the dialect into the legitimate Fortran. It is a simple text converter that keeps the line numbers of the input dialect and the output standard codes.


Modern Fortran Fortran 2003 Fortran 2008 Programming language dialect Preprocessor 


  1. 1.
    Adams, J.C.: The Fortran 2003 Handbook : The Complete Syntax, Features and Procedures. Springer, Heidelberg (2009). Scholar
  2. 2.
    Componey, T.F.: F Home page.
  3. 3.
    Corporation, I.: Intel Fortran compiler.
  4. 4.
    Foster, M.P.: Quantity correctness in Fortran programs. Comput. Sci. Eng. 19(4), 83–87 (2017)CrossRefGoogle Scholar
  5. 5.
    Free Software Foundation, I.: GNU Fortran Project Home page.
  6. 6.
    Group, N.A.: NAG Fortran compiler.
  7. 7.
    Hassan, A.A., Cardellini, V., Filippone, S.: A framework for unit testing with coarray Fortran. In: 25th High Performance Computing Symposium, HPC 2017, Part of the 2017 Spring Simulation Multi-Conference, SpringSim 2017, vol. 49, no. 3, pp. 47–58 (2017)Google Scholar
  8. 8.
  9. 9.
    Kageyama, A., Miyagoshi, T., Sato, T.: Formation of current coils in geodynamo simulations. Nature 454(7208), 1106–1109 (2008)CrossRefGoogle Scholar
  10. 10.
    Kennison, D.: The IFTPAN preprocessor. Record 3(6), 8–10 (1982)Google Scholar
  11. 11.
    Kernighan, B.W.: RATFOR–a preprocessor for a rational Fortran. Softw. Pract. Exp. 5(4), 395–406 (1975)CrossRefGoogle Scholar
  12. 12.
    Kernighan, B.W., Plauger, P.J.: Software Tools. Addison-Wesley Pub. Co, Boston (1976)zbMATHGoogle Scholar
  13. 13.
    Kernighan, B., Ritchie, D.: The M4 macro processor. Bell Lab. Tech. Rep. 54, 1–5 (1977)Google Scholar
  14. 14.
    Lahey Computer Systems, I.: ELF90.
  15. 15.
    Miyagoshi, T., Kageyama, A., Sato, T.: Zonal flow formation in the earths core. Nature 463(6), 793–796 (2010)CrossRefGoogle Scholar
  16. 16.
    Osmialowski, P.: How the flang frontend works. In: Proceedings of the Fourth Workshop on the LLVM Compiler Infrastructure in HPC (LLVM-HPC 2017) (2017)Google Scholar
  17. 17.
    Project, L.: LLVM.
  18. 18.
    Spinellis, D.: Notable design patterns for domain-specific languages. J. Syst. Softw. 56(1), 91–99 (2001)CrossRefGoogle Scholar
  19. 19.
    Tsuji, T., Watanabe, K., Ikehata, A.: Structured FORTRAN preprocessors generating optimized output. Sotw.-Pract. Exp. 18(5), 427–442 (1988)CrossRefGoogle Scholar
  20. 20.
    Turner, K.J.: Exploiting the m4 Macro Language. Technical report CSM-126, pp. 1–17 (1994)Google Scholar

Copyright information

© Springer Nature Singapore Pte Ltd. 2018

Authors and Affiliations

  1. 1.Department of Computational ScienceKobe UniversityKobeJapan

Personalised recommendations