ALGOL 68G

ALGOL 68G

ALGOL 68G or Algol 68 Genie is an ALGOL 68 interpreter. ALGOL 68G is a nearly full implementation of ALGOL 68 as defined by the Revised Report and also implements partial parametrisation, which is an extension of ALGOL 68.

After successful parsing of an entire source program, the syntax tree, that serves as an intermediate program representation, is interpreted. The interpreter performs many runtime checks.

The author of Algol 68 Genie is Marcel van der Veer. Algol68G is released under GPL and runs on Linux, UNIX, BSD, Mac OS, and Windows XP and is available [http://www.xs4all.nl/~jmvdveer/algol.html here] .

Features of Algol68G

* The interpreter performs checks on many events, for example: assigning to NIL or dereferencing of NIL, using uninitialised values, invalid operands to standard prelude operators and procedures, bounds check when manipulating arrays, overflow of arithmetic modes, "dangling references", that are names that refer to deallocated storage.
* Precision of numeric modes: implementation of LONG INT, LONG REAL and LONG COMPLEX with roughly doubled precision with respect to INT, REAL, COMPLEX and implementation of multiprecision arithmetic through LONG LONG INT, LONG LONG REAL and LONG LONG COMPLEX which are modes with user defined precision which is set by an option.
* On systems that support them, UNIX extensions that allow e.g. for executing child processes that communicate through pipes, matching regular expressions or fetching web page contents.
* Procedures for drawing using the GNU Plotting Utilities.
* Various numerical procedures and basic linear algebra procedures from the GNU Scientific Library.
* Format texts, straightening and formatted transput. Transput routines work generically on files, (dynamic) strings and UNIX pipes.
* Parallel clause on platforms that support POSIX threads.
* Various PostgreSQL client routines.
* Upper stropping is the default, quote stropping is optional.

Extensions to Algol 68

* Implementation of C.H. Lindsey's partial parametrisation proposal, which allows for currying in Algol 68, giving it a functional sublanguage.
* A simple refinement preprocessor to facilitate top-down program construction.
* Implementation of pseudo-operators ANDF and ORF.
* Implementation of a post-checked loop. A do-part may enclose a serial clause followed by an optional until-part, or just enclose an until-part. This is an alternative to the paradigm Algol 68 post-check loop WHILE ... DO SKIP OD.
* Implementation of DOWNTO with comparable function as TO in loop clauses; DOWNTO decreases, whereas TO increases, the loop counter by the value of the (implicit) by-part.

Deviations from the Revised Report language

The important deviations are:
* The important difference with the Revised Report transput model is that Algol68G transput does not operate on FLEX [ ] FLEX [ ] FLEX [ ] CHAR, but on a FLEX [ ] CHAR. This maps better onto operating systems such as UNIX or Linux.
* The Algol68G parallel clause deviates from the Algol 68 parallel clause when parallel clauses are nested. In Algol68G, stack frames inside a parallel unit are private, therefore if parallel units modify a shared variable then this variable must be declared outside the outermost parallel clause, and a jump out of a parallel unit can only be targeted at a label outside the outermost parallel clause.
* The interpreter does not implement so-called ghost-elements {RR 2.1.3.4}, hence it cannot check bounds when assigning to rows of mode flexible-rows-of-rows-of-... when the destination has a flat descriptor.
* Algol68G does not recognise nonlocal environs {RR 5.2.3.2}. All environs are local.
* Transputting a file is essentially sequential. Only reset can intervene with sequential processing.
* When all arguments in a call of readf, printf, writef, getf or putf are processed, the format associated with the corresponding file is purged - that is, remaining insertions are processed and the format is discarded.

ee also

* [http://www.xs4all.nl/~jmvdveer/algol.html Algol 68 Genie web page]


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • ALGOL 68 — Infobox programming language name = ALGOL 68 paradigm = multi paradigm: concurrent bull; imperative year = 1968, last revised 1973 designer = A. van Wijngaarden, B.J. Mailloux, J.E.L. Peck and C.H.A. Koster, et al. developer = latest release… …   Wikipedia

  • Comparison of programming languages (basic instructions) — Programming language comparisons General comparison Basic syntax Basic instructions Arrays Associative arrays String operations …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”