Dialect of Modern Fortran for Computer Simulations (paper)

There is a Python script efpp to convert the proposed dialect, which has a few features often requested, to standard Fortran.

A Dialect of Modern Fortran for Computer Simulations (2018) by Shin’Ya Hosoyamada and Akira Kageyama

Abstract

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.

2 Likes

Nice. Here is the preprocessor: GitHub - akageyama/efpp: efpp: A simple preprocessor for Modern Fortran

Among other things it adds:

  • Uses . instead of %.
  • Adds += and *=
  • Implicit none check

All very frequently requested features. :slight_smile:

1 Like

In the 1980s-90s there were several domain-specific languages for simulation. At least 4 were based on extended Fortran syntax. For example:

ACSL “Advanced Continuous Simulation Language”
e.g. https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.854.7913&rep=rep1&type=pdf
Authors: Edward E. L. Mitchell & Joseph S. Gauthier

CSSL4 “Continuous Simulation Language”
(I can’t find a reference on-line)
Author: Ray Nilsson

ADSim “Applied Dynamics Simulation Language”
e.g. SAGE Journals: Your gateway to world-class journal research
Authors: E. O. Gilbert et al at Applied Dynamics

SysMod “MoD Simulation Language”
e.g. The SYSMOD Simulation Language | SpringerLink
Authors: Nigel Baker et al, RAE (Now DSTL) Farnborough, UK.

All of these generated Fortran so they functioned as pre-processors (though ADSim began as a dedicated language for the AD100 simulation computer and later versions of ADSim generated C).

The important feature of all of these was that, in the main dynamic loops of a simulation, they computed all of the derivative terms first and then carried out all of the integrations. In this way they prevented skew errors.

The details of the languages may be useful to you. ACSL had many thousands of users and ADSim many hundreds. I have a reference manual for ACSL if you have trouble finding one. I am sure ADI could provide one for ADSim. I helped design ADSim and worked on the compiler. I may have a SysMod manual if that proves difficult.

Fortran has moved a long way since ACSL and ADSim, and I think that the work you are doing will be very important. Please contact me if you think I can help.

Best wishes,

John

2 Likes