A FORTRAN interpreterRuns ANSI FORTRAN 77, ANSI FORTRAN 66 and DEC FORTRAN‑10 V5

Software Architecture, Design & Engineering by Nicholas J. Kisseberth.

Code Synthesized via Anthropic Claude Code / Opus 4.8.

Automated Code Review via OpenAI Codex / ChatGPT 5.5.

Written in pure Python, with two pluggable axes: the front-end dialect — ANSI FORTRAN 77 by default, ANSI FORTRAN 66, or DEC FORTRAN-10 — and the machine value model — a native-Python 64-bit default, a little-endian LP64, or a faithful 36-bit PDP-10. Language conformance is checked against the FCVS (FORTRAN Compiler Validation System, 1978) corpus.

Three dialects, one core

By default forterp is an ANSI FORTRAN 77 interpreter — the CHARACTER type, block IF, list-directed I/O, OPEN/CLOSE/INQUIRE. Or run it as ANSI FORTRAN 66 (F66), or DEC FORTRAN-10 (FORTRAN10) — which adds octal, Hollerith, IMPLICIT, apostrophe strings, random-access I/O, and the DEC library. Dozens of gated knobs tune the dialect.

Pluggable machine target

The value model is a Target: word width and overflow, the logical-truth convention, the character codec. NATIVE (64-bit, ASCII) is the portable default; LP64LE is a 64-bit little-endian IEEE machine; PDP10 is the 36-bit, 5×7-bit packed-ASCII, .TRUE.=−1 DEC machine, validated bit-for-bit; VAX* is a provisional middle-endian model. With word_memory, cross-type punning is bit-faithful on every validated target. *VAX is implemented from the published format but unvalidated.

Validated against real code

The PDP-10 target was exercised against real 1970s DEC FORTRAN — full programs, not toy snippets — and checked against the DEC FORTRAN-10 V5 manual and the FCVS conformance corpus.

Documentation

Use it, build on it, and see how it works.

FORTRAN 77 reference

A complete, example-driven reference manual for the FORTRAN 77 language (ANSI X3.9-1978) — forterp's default dialect — organized on the standard: data types, arrays, expressions, control flow, I/O and FORMAT, procedures, and the intrinsic library, with a forterp notes box per chapter.

Open

FORTRAN 66 reference

A complete, example-driven reference manual for the FORTRAN 66 language (USA Standard X3.9-1966) plus the DEC FORTRAN-10 extensions, organized on the standard: program form, data types, expressions, statements, procedures, and the intrinsic library, with a forterp notes box per chapter. The strict-subset dialect (forterp.F66).

Open

The forterp manual

The guide to the interpreter itself: running it (CLI + the interactive processor), driving it from Python (run_source, the Interpreter class, custom host routines), the target/dialect axes and faithful type punning, and how it works inside (the pipeline, the memory model, the seams, testing). A chaptered manual.

Open