Abstract
The paper describes the method used in the GIER ALGOL compiler for checking the source program for the compatibility of the kinds and types of identifiers and constants as given in declarations with the use of these entities as operands in the statements and expressions of the program. The basic method is a pseudoevaluation of the expressions of the program. This proceeds like a run-time evaluation, but works with descriptions of the types and kinds of the operands instead of with values. Several examples of the use of this method are given. A general way of achieving suppression of redundant error messages while still retaining the power to continue the checking process when an error has been detected is also described. Further, a classification of the operands of ALGOL 60 for use in the process is given. The paper ends with a sample error report produced by the GIER ALGOL compiler, illustrating the power of the method.
Similar content being viewed by others
References
P. Naur,The Design of the GIER ALGOL Compiler, BIT 3 (1963), 124–140 and 145–166.
J. Jensen,Generation of Machinecode in ALGOL Compilers, Proc. NordSAM 64, to appear in BIT.
E. W. Dijkstra,ALGOL 60 Translation, ALGOL Bulletin Supplement no. 10, Math. Centrum Amsterdam, Nov. 1961; Annual Review of Automatic Programming Vol. III, 327–356, Pergamon Press, London, 1963.
P. Naur (ed.),A Manual of GIER ALGOL III, Regnecentralen, Copenhagen, 1964.
P. Naur (ed.),A Manual of GIER ALGOL, Regnecentralen, Copenhagen, 1963.
Author information
Authors and Affiliations
Additional information
This paper was presented at the NordSAM conference in Stockholm, Aug. 1964.
Rights and permissions
About this article
Cite this article
Naur, P. Checking of operand types in algol compilers. BIT 5, 151–163 (1965). https://doi.org/10.1007/BF01940219
Issue Date:
DOI: https://doi.org/10.1007/BF01940219