This file is part of Algol 68 Genie - an Algol 68 compiler-interpreter.
Copyright 2001-2026 J. Marcel van der Veer <algol68g@algol68genie.nl>.


ALGOL68G - ALGOL 68 GENIE
-------------------------

Algol68G is an implementation of Algol 68 as defined by the Revised Report.

Algol68G is free software, you can redistribute it and/or modify it under the
terms of the GNU General Public License. This software is distributed in the
hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The author of
this software does not accept responsibility to anyone for the consequences of
using it or for whether it serves any particular purpose or works at all. See
the GNU General Public License for more details. The GNU General Public License
does not permit this software to be redistributed in proprietary programs.


THE ALGOL 68 GENIE PROJECT
--------------------------

The development of Algol played an important role in establishing computer
science as an academic discipline. The Algol 68 Genie project preserves and
promotes Algol 68 out of educational as well as scientific-historical interest,
by making available a recent checkout compiler-interpreter written from scratch
by Marcel van der Veer.

Algol 68 Genie is a fast compiler-interpreter ranking among the most
complete implementations of the language; it supports for instance

* partial parametrisation,
* parallel processing, 
* formatted transput and a
* refinement preprocessor.

A detailed description of Algol 68 is in the book

        Learning Algol 68 Genie

which contains an informal introduction to the language, a manual for
Algol 68 Genie, and the Revised Report on Algol 68.

Algol 68 is a secure, expression-oriented programming language with which you
elegantly code algorithms without having to bother too much about irrelevant
technical details and limitations inherent to many other languages.

Algol 68 Genie offers for example:

- many runtime checks facilitating debugging and improving the
  reliability of your programs,
- native support for arbitrary precision arithmetic including
  complex numbers,
- syntactic constructions to support linear algebra,
- optionally, many procedures from R mathlib or the
  GNU Scientific Library,
- a gdb-style debugger and a pretty-printer to
  beautify source code,
- optional linkage to GNU plotutils, GNU Scientific Library,
  R mathlib, or PostgreSQL,
- extensions as UNIX pipes, regular expression matching.

Author of Algol68G is Marcel van der Veer <algol68g@algol68genie.nl>.
Web pages for Algol68G are at <https://jmvdveer.home.algol68genie.nl/>.
Documentation is available from the web pages for Algol68G.


INSTALLATION
------------

The distribution contains the following directories:

./bin/          WIN32 or WIN64 precompiled binary
./src/a68g/     Source files
./src/include/  Include files 
./src/doc/      Documentation
./src/test-set/ Test programs


> WIN32, WIN64 precompiled binaries (Windows 10, 11)

Unpack the distribution and start command shell powershell.exe.
From this shell, go to algol68g-VERSION's directory and start bin\a68g.exe.


> Linux, BSD, macOS

Please refer to the manual for detailed instructions.
Since Algol 68 Genie complies with the GNU build system, a reasonably
experienced user can build the software as follows.

First, unpack the distribution archive by typing:

$ tar -xzvf algol68g-VERSION.tgz
$ cd algol68g-VERSION

Now you must select a compiler. The distribution is tested with both
gcc (Linux) and clang (BSD). Some systems have installed both gcc and clang.

To use the default compiler on your system, type: 

$ ./configure

To use gcc when clang is also installed, type:

$ ./configure CC=gcc

To use clang when also gcc is installed, type:

$ ./configure CC=clang

Build Algol 68 Genie by typing:

$ make
$ make check
$ [sudo] make install

If you plan to use the optional plugin compiler, you need to install
dependencies. The default way to do this is entering 'make install'.
Installation defaults can be changed while configuring. To view all
options, enter './configure --help'.

The preferred C compiler to build Algol 68 Genie is gcc, however clang
will work well. Algol 68 Genie will link libquadmath when compiled
with gcc, enabling 128-bit LONG REAL. In the absence of gcc, LONG REAL
is a software implementation.

Algol 68 Genie can link to libcurses, the GNU Scientific Library, plotlib
from GNU plotutils, R mathlib, GNU MPFR, libcurl and libpq from PostgreSQL.
Libraries not available on your platform are graciously ignored.

Note that some systems install 'extra' libraries in /usr/local, while the
compiler may not search that directory by default. This may be solved by

$ ./configure CFLAGS=-I/usr/local/include LDFLAGS=/usr/local/lib


INT AND REAL INTERNAL FORMATS
-----------------------------

The internal format of certain modes depend on the platform on which 
A68G was built. Below table summarizes which format is used per platform.

When possible, A68G builds with support for int64 and float128.
Note that Clang offers only partial, target-dependent support for float128,
while GCC features float128 support across platforms, 

The 'decimal' library is A68G's particular vintage multiprecision library
that has offered LONG and LONG LONG mode support since the first release.

* Vintage Algol 68 Genie version 1 and 2.

+----------------+-------------+----------+----------+------------+
| A68 Mode       | Alternative | GCC      | CLANG    | Dependency |
+----------------+-------------+----------+----------+------------+
| INT            |             | int64    | int64    |            |
| LONG INT       |             | Decimal  | Decimal  |            |
| LONG LONG INT  |             | Decimal  | Decimal  |            | 
|                |             |          |          |            |
| REAL           |             | float64  | float64  |            |
| LONG REAL      |             | Decimal  | Decimal  |            |
| LONG LONG REAL |             | Decimal  | Decimal  |            |
+----------------+-------------+----------+----------+------------+

* Algol 68 Genie version 3.

+----------------+-------------+----------+----------+------------+
| A68 Mode       | Alternative | GCC      | CLANG    | Dependency |
+----------------+-------------+----------+----------+------------+
| INT            |             | int64    | int64    |            |
| LONG INT       |             | int128   | int128   | _Float128  |
| LONG LONG INT  |             | Decimal  | Decimal  |            | 
|                |             |          |          |            |
| REAL           |             | float64  | float64  |            |
| LONG REAL      | DOUBLE      | float128 | float128 | _Float128  |
| LONG LONG REAL | LONG DOUBLE | Decimal  | Decimal  |            |
+----------------+-------------+----------+----------+------------+

Note that all LONG modes are 128-bit, or none of them. Hence the
dependency of int128 on _Float128. If _Float128 is not supported,
A68G builds fall back to version 2.


THIRD-PARTY CODE AND LICENSES
-----------------------------

Algol 68 Genie is licensed under the GNU General Public License (GPL) version 3. 
However, certain parts of this software contain code originally developed by 
third parties, notably:

* GCC quadmath library ("libquadmath")
  <https://gcc.gnu.org>
  Copyright (C) 1986-2025 Free Software Foundation, Inc.
  The license for quadmath is GNU LGPL.

* DELTAGAMMAINC Fast and Accurate Evaluation of a Generalized Incomplete Gamma Function. 
  <https://github.com/remy-abergel>
  Copyright (C) 2016 Remy Abergel, Lionel Moisan.
  The license for DELTAGAMMAINC is GNU GPL.

