Algol 68 Genie code browser

Below is a list with example Algol 68 programs, together with the cross-referenced source files of the current Algol 68 Genie version.

You can download the current version and its documentation here.

Example Algol 68 programs

File Synopsis Lines
       
ackermann.a68 Ackermann function, a paradigm total computable function that is not primitive recursive. 47
all-parser.a68 Non-left-recursive context-free grammar parser. 59
arithmetic-derivative.a68 Lagarias arithmetic derivate. 42
backtracking.a68 Split an amount of money in coins, by backtracking. 30
bulls-and-cows.a68 Break a unique code of `n' pegs and `m' colours you think of. 72
decision-tree.a68 Paradigm for building decision trees in Algol 68. 67
dictionary.a68 Write Python-style dictionaries in json format. 61
fibonacci-grammar.a68 Illustration of the use of procedure closures. 38
formula-manipulation.a68 Symbolic computing in Algol 68. 277
10  hamming.a68 Compute regular (or Hamming) numbers. 65
11  hilbert-curve-latex.a68 Generate LaTeX code to plot a Hilbert curve. 106
12  hilbert-matrix.a68 Compute the determinant of a Hilbert matrix using fractions. 195
13  linear-regression.a68 Ordinary Least Squares, Principal Component and Partial Least Squares regression. 149
14  lisp-interpreter.a68 Miniature LISP interpreter in Algol 68. 167
15  lucas-sequence.a68 Lucas sequence and the golden ratio. 36
16  mandelbrot-plotutils.a68 Plot a part of the Mandelbrot set. 56
17  parallel-fft.a68 Parallel Fast Fourier Transform in recursive form. 35
18  partial-parametrisation.a68 Lindsey's currying proposal for Algol 68. 31
19  pebbles.a68 Edsger Dijkstra's pebble problem. 69
20  queens.a68 'N' queens in classic backtracker. 41
21  quicksort.a68 The well-known recursive quicksort algorithm. 32
22  roman-decimal.a68 Translation between decimal and Roman notation. 60
23  triple-ref-trick.a68 The "Algol 68 triple-REF trick" implementation of quicksort. 36
24  tukey-test-tables.a68 Compute Studentized range q table. 57
25  van-wijngaarden-switch.a68 Van Wijngaarden's pseudo-switch. 37
26  warshall.a68 Warshall's algorithm for transitive closures. 64
27  wca.a68 Compute equilibrium Lennard Jones thermodynamic data. 141
28  www.a68 Reading web pages using Algol 68. 18
29  zeroin.a68 Zeroin is a classic root-finding algorithm. 118

Algol 68 Genie source files

File Synopsis Lines
a68g-apropos.c Command line help. 165
a68g-bits.c Miscellaneous routines. 375
a68g.c Algol 68 Genie main driver. 693
a68g-conversion.c Conversion tables for IEEE platforms. 84
a68g-diagnostics.c Error and warning routines. 814
a68g-io.c Low-level input-output routines. 273
a68g-keywords.c Algol 68 keyword tables. 214
a68g-listing.c Old-school listing file. 707
a68g-mem.c Low-level memory management. 261
10  a68g-non-terminal.c Non-terminal tables. 417
11  a68g-options.c Algol 68 Genie options. 1133
12  a68g-path.c Low-level file path routines. 157
13  a68g-postulates.c Postulates needed for proving equivalence of modes. 92
14  a68g-pretty.c Lay-out formatter for Algol 68. 1340
15  double.c LONG INT, LONG REAL and LONG BITS routines. 1998
16  double-gamic.c LONG REAL generalised incomplete gamma function. 416
17  double-math.c LONG REAL, LONG COMPLEX routines. 358
18  genie-assign.c Interpreter routines for assignations. 152
19  genie.c Interpreter driver. 878
20  genie-call.c Interpreter routines for procedure calls. 278
21  genie-coerce.c Interpreter mode coercion routines. 492
22  genie-declaration.c Interpreter routines for declarations. 215
23  genie-denotation.c Interpreter routines for denotations. 280
24  genie-enclosed.c Interpreter routines for enclosed clauses. 912
25  genie-formula.c Interpreter routines for formulas. 185
26  genie-hip.c Interpreter routines for jumps and SKIP. 223
27  genie-identifier.c Interpreter routines for identifiers. 91
28  genie-misc.c Miscellaneous interpreter routines. 113
29  genie-regex.c Low-level regular expression routines. 288
30  genie-rows.c Interpreter routines for ROW values. 139
31  genie-stowed.c Interpreter routines for STOWED values. 420
32  genie-unix.c Low-level UNIX routines. 845
33  moids-diagnostics.c MOID diagnostics routines. 186
34  moids-misc.c Miscellaneous MOID routines. 1196
35  moids-size.c Memory footprint (size) of a mode. 273
36  moids-to-string.c Pretty-print a MOID. 299
37  mp-bits.c [LONG] LONG BITS routines, legacy MP implementation. 654
38  mp.c [LONG] LONG INT, REAL routines. 1315
39  mp-complex.c [LONG] LONG COMPLEX math functions. 528
40  mp-gamic.c [LONG] LONG REAL generalised incomplete gamma function. 831
41  mp-gamma.c [LONG] LONG REAL error, gamma and beta functions. 498
42  mp-genie.c Multi-precision interpreter routines. 1411
43  mp-math.c [LONG] LONG REAL math functions. 1384
44  mp-mpfr.c [LONG] LONG REAL routines using GNU MPFR. 530
45  mp-pi.c [LONG] LONG REAL value of pi by AGM. 136
46  parser-bottom-up.c Hand-coded bottom-up parser for Algol 68. 2032
47  parser-brackets.c Recursive-descent parenthesis checker. 231
48  parser.c Mailloux-type Algol 68 parser driver. 985
49  parser-extract.c Extract tags from phrases. 543
50  parser-modes.c Mode table management. 1062
51  parser-moids-check.c Mode checker routines. 1746
52  parser-moids-coerce.c Mode coercion driver. 864
53  parser-moids-equivalence.c Prove equivalence of modes. 159
54  parser-refinement.c Refinement preprocessor. 238
55  parser-scanner.c Context-dependent Algol 68 tokeniser. 1606
56  parser-scope.c Static scope checker. 896
57  parser-taxes.c Symbol table management. 1411
58  parser-top-down.c Top-down parser for control structure. 681
59  parser-victal.c Syntax check for formal, actual and virtual declarers. 311
60  plugin-basic.c Plugin compiler routines. 388
61  plugin.c Plugin compiler driver. 973
62  plugin-driver.c Plugin compiler driver. 183
63  plugin-folder.c Plugin compiler constant folder. 453
64  plugin-gen.c Plugin compiler generator routines. 1806
65  plugin-inline.c Plugin compiler inlining routines. 1178
66  plugin-script.c Plugin script builder routines. 164
67  plugin-tables.c Plugin compiler tables. 536
68  prelude-bits.c Multiple precision BITS. 97
69  prelude.c Standard prelude definitions. 2258
70  prelude-gsl.c Standard prelude definitions from GSL. 662
71  prelude-mathlib.c Standard prelude definitions from GNU R math library. 137
72  rts-bool.c BOOL routines. 56
73  rts-char.c CHAR, STRING and BYTES routines. 677
74  rts-curl.c HTTP/HTTPS client. 135
75  rts-curses.c Curses interface. 227
76  rts-enquiries.c Environment enquiries. 73
77  rts-formatted.c Formatted transput. 2582
78  rts-heap.c Generator and garbage collector routines. 782
79  rts-int128.c 128-bit INT support. 282
80  rts-internal.c Transput routines. 360
81  rts-mach.c Machine parameters. 260
82  rts-monitor.c GDB-style monitor for the interpreter. 2289
83  rts-parallel.c Parallel clause implementation. 514
84  rts-plotutils.c Gnuplot's libplot interface. 1554
85  rts-postgresql.c PostgreSQL libpq interface. 815
86  rts-sounds.c SOUND routines. 603
87  rts-stowed.c Interpreter routines for STOWED values. 786
88  rts-transput.c Transput routines. 1648
89  rts-unformatted.c Unformatted transput. 2796
90  single-blas.c REAL GSL BLAS support. 60
91  single.c INT, REAL, COMPLEX and BITS routines. 1637
92  single-decomposition.c REAL GSL LU, QR and Choleski decomposition. 280
93  single-fft.c REAL, COMPLEX GSL fast fourier transform. 290
94  single-gamic.c REAL generalised incomplete gamma function. 414
95  single-gsl.c REAL GSL routines. 844
96  single-laplace.c REAL GSL laplace routines. 115
97  single-math.c REAL math routines supplementing libc. 780
98  single-multivariate.c REAL multivariate regression. 689
99  single-physics.c REAL GSL physical constants. 246
100  single-python.c REAL vector and matrix routines, Python look-a-likes. 314
101  single-r-math.c REAL GNU R math routines. 547
102  single-rnd.c REAL pseudo-random number generator. 194
103  single-svd.c REAL GSL matrix SVD decomposition. 106
104  single-torrix.c REAL vector and matrix support. 259
105  single-torrix-gsl.c REAL GSL vector and matrix routines. 1285

Algol 68 Genie include files

File Synopsis Lines
a68g-common.h Common definitions. 341
a68g-config.win32.h Default WIN32 configuration file. 124
a68g-defines.h General macro definitions. 660
a68g-diagnostics.h Macros and text strings for diagnostics. 248
a68g-double.h LONG REAL definitions. 463
a68g-enums.h Enumerated constants. 265
a68g-environ.h Standard prelude and postlude. 63
a68g-frames.h Macros for opening/closing frames. 212
a68g-generic.h Platform dependent definitions. 55
10  a68g-genie.h Interpreter related definitions. 465
11  a68g.h Master include file. 168
12  a68g-includes.h Common a68g includes. 294
13  a68g-level-3.h Platform dependent definitions. 80
14  a68g-lib.h Internal math routines. 129
15  a68g-listing.h Definitions for making listing files. 38
16  a68g-mach.h Machine parameters. 72
17  a68g-masks.h Bit masks. 76
18  a68g-math.h Internal math tables. 441
19  a68g-moids.h Definitions related to MOIDS. 104
20  a68g-mp.h Definitions for multiple precision modes. 577
21  a68g-nil.h Various forms of NIL. 86
22  a68g-numbers.h Math constants. 45
23  a68g-optimiser.h Definitions for the plugin compiler. 119
24  a68g-options.h Definitions for option processing. 39
25  a68g-parser.h Definitions related to the parser. 174
26  a68g-physics.h Various numerical constants from GSL. 240
27  a68g-platform.h Platform dependent definitions. 120
28  a68g-plugin.h Definitions for the plugin compiler. 207
29  a68g-postulates.h Definitions related to postulates. 35
30  a68g-prelude-gsl.h GSL definitions. 541
31  a68g-prelude.h RTS related definitions. 745
32  a68g-prelude-mathlib.h R standalone mathematics library definitions. 138
33  a68g-stack.h Macros for stack checking. 54
34  a68g-stddef.h Various standard definitions. 94
35  a68g-torrix.h REAL vector and matrix support. 84
36  a68g-transput.h Transput related definitions. 93
37  a68g-types.h Internal type definitions. 578

The number of source lines in this version is 78615.


Posts in "Algol 68"

Marcel van der Veer Algol 68
Partial Least Squares Regression in Algol 68
October 2024

We implement a Partial Least Squares Regression algorithm in a pre-Python language …


Marcel van der Veer Algol 68
A perspective of Algol 68
March 2023

To better understand the position of Algol 68 among today’s plethora of programming languages, we should consider their development …


Marcel van der Veer Algol 68
Announcing Algol 68 Genie 3.0
December 2021

I have released the current source as version 3.0. I have also updated the documentation, Learning Algol 68 Genie …


Marcel van der Veer Algol 68
A brief history of Algol 68 Genie
November 2016

Being the author of Algol 68 Genie, people frequently ask me why a physical chemist wrote an Algol 68 compiler …


Marcel van der Veer Algol 68
Announcing Algol 68 Genie 2.0
September 2010

I have posted Algol 68 Genie Version 2.0.0 and its documentation …


Marcel van der Veer Algol 68
Revised Report on the Algorithmic Language Algol 68
June 2009

This is a translation of the Algol 68 Revised Report into HTML, for distribution with Algol 68 Genie, an Open Source Algol 68 interpreter …


Marcel van der Veer Algol 68
Announcing Algol 68 Genie 1.0
September 2002

Algol 68 was conceived as a successor to Algol 60 …




© 2002-2024 J.M. van der Veer (jmvdveer@xs4all.nl)