ALGOL 68 Genie: Difference between revisions

Content added Content deleted
m (fix misc typo)
No edit summary
Line 7: Line 7:
[[ALGOL 68G]] is an interpretor that runs on Linux and a good way to get started with [[ALGOL 68]]. ''ALGOL 68G'' mk14.1 is now available for download for Fedora9 from Source Forge - [http://sourceforge.net/project/showfiles.php?group_id=114223&package_id=300114&release_id=642308 Download now]. (This download RPM includes a 400 page [[ALGOL 68]] manual in printer ready pdf)
[[ALGOL 68G]] is an interpretor that runs on Linux and a good way to get started with [[ALGOL 68]]. ''ALGOL 68G'' mk14.1 is now available for download for Fedora9 from Source Forge - [http://sourceforge.net/project/showfiles.php?group_id=114223&package_id=300114&release_id=642308 Download now]. (This download RPM includes a 400 page [[ALGOL 68]] manual in printer ready pdf)
==Features of Algol68G==
==Features of Algol68G==
* The [[interpreter]] performs checks on many events, for example: assigning to <code>NIL</code> or dereferencing of <code>NIL</code>, 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.
* The [[interpreter]] performs checks on many events, for example: assigning to <tt>NIL</tt> or dereferencing of <tt>NIL</tt>, 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 <code>LONG INT, LONG REAL</code> and <code>LONG COMPLEX</code> with roughly doubled precision with respect to <code>INT, REAL, COMPLEX</code> and implementation of multiprecision arithmetic through <code>LONG LONG INT, LONG LONG REAL</code> and <code>LONG LONG COMPLEX</code> which are modes with user defined precision which is set by an option.
* Precision of numeric modes: implementation of <tt>LONG INT, LONG REAL</tt> and <tt>LONG COMPLEX</tt> with roughly doubled precision with respect to <tt>INT, REAL, COMPLEX</tt> and implementation of multiprecision arithmetic through <tt>LONG LONG INT, LONG LONG REAL</tt> and <tt>LONG LONG COMPLEX</tt> 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.
* 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.
* Procedures for drawing using the GNU Plotting Utilities.
Line 20: Line 20:
* Implementation of C.H. Lindsey's partial parametrisation proposal, which allows for currying in Algol 68, giving it a functional sublanguage.
* 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.
* A simple refinement preprocessor to facilitate top-down program construction.
* Implementation of pseudo-operators <code>ANDF</code> and <code>ORF</code>.
* Implementation of pseudo-operators <tt>ANDF</tt> and <tt>ORF</tt>.
* 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 <code>WHILE ... DO SKIP OD</code>.
* 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 <tt>WHILE ... DO SKIP OD</tt>.
* Implementation of <code>DOWNTO</code> with comparable function as <code>TO</code> in loop clauses; <code>DOWNTO</code> decreases, whereas <code>TO</code> increases, the loop counter by the value of the (implicit) by-part.
* Implementation of <tt>DOWNTO</tt> with comparable function as <tt>TO</tt> in loop clauses; <tt>DOWNTO</tt> decreases, whereas <tt>TO</tt> increases, the loop counter by the value of the (implicit) by-part.


== Deviations from the Revised Report language ==
== Deviations from the Revised Report language ==
The important deviations are:
The important deviations are:
* The important difference with the Revised Report transput model is that Algol68G transput does not operate on <code>FLEX [ ] FLEX [ ] FLEX [ ] CHAR</code>, but on a <code>FLEX [ ] CHAR</code>. This maps better onto operating systems such as UNIX or Linux.
* The important difference with the Revised Report transput model is that Algol68G transput does not operate on <tt>FLEX [ ] FLEX [ ] FLEX [ ] CHAR</tt>, but on a <tt>FLEX [ ] CHAR</tt>. 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 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.
* 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.
* Algol68G does not recognise nonlocal environs {RR 5.2.3.2}. All environs are local.
* Transputting a file is essentially sequential. Only <code>reset</code> can intervene with sequential processing.
* Transputting a file is essentially sequential. Only <tt>reset</tt> can intervene with sequential processing.
* When all arguments in a call of <code>readf, printf, writef, getf</code> or <code>putf</code> are processed, the format associated with the corresponding file is purged - that is, remaining insertions are processed and the format is discarded.
* When all arguments in a call of <tt>readf, printf, writef, getf</tt> or <tt>putf</tt> are processed, the format associated with the corresponding file is purged - that is, remaining insertions are processed and the format is discarded.


==See also==
==See also==