Elsevier Science Home
Computer Physics Communications Program Library
Full text online from Science Direct
Programs in Physics & Physical Chemistry
CPC Home

[Licence| Download | New Version Template] abun_v1_0.gz(7 Kbytes)
Manuscript Title: TRANAL: a program for the translation of Symbolic Algol I into Symbolic Algol II.
Authors: L.G.K. Petravic, M. Petravic, K.V. Roberts
Program title: TRANAL
Catalogue identifier: ABUN_v1_0
Distribution format: gz
Journal reference: Comput. Phys. Commun. 11(1976)5
Programming language: Algol.
Computer: ICL 4-70.
Operating system: ICL MULTIJOB.
RAM: 42K words
Word size: 32
Keywords: Symbolic algol, Translator, Magnetohydrodynamics, Vector notation, General purpose, Utility.
Classification: 4.14.

Nature of problem:
Two symbolic styles of Algol 60 programming have previously been developed for the expression of partial differential equations in vector form: SAI which solves the equations directly but executes slowly because of the large number of nested procedure calls involved and SAII which is used to generate an optimized version of the program in a chosen target language. Conversion from SAI to SAII has previously been carried out by hand and the present program TRANAL is intended to preform this process automatically. It is written in Algol 60 and illustrates the usefulness of Algol for the manipulation of physics equations. The main SAI & SAII program packages will be published in due course.

Solution method:
Each SA I equation is read character by character and converted by recursive syntax analysis into a tree structure. It is then output in SA II form by an appropriate set of rules.

Restrictions:
The number and complexity of the equations can be increased by changing the symbolic parameters in # 1.2 of the program. TRANAL is written in ECMA Algol 60 and conversion to most computer systems should only entail changing a few system-dependent I/O procedures in #6. The operators currently allowed are the basic operators, +,-,*,/ together with arbitrary unary and binary function operators such as CURL (A) and CROSS (A,B). Limited error diagonstics are provided, and the working of the program can be examined on a second output channel by including the symbol '$' in the input deck.

Running time:
With diagonstics switched off, the Test Run requires 3.5 s on the Culham ICL 4-70.