ACM Home Page
Please provide us with feedback. Feedback
Porting the Zed compiler
Full text PdfPdf (605 KB)
Source Symposium on Compiler Construction archive
Proceedings of the 1979 SIGPLAN symposium on Compiler construction table of contents
Denver, Colorado, United States
Pages: 92 - 97  
Year of Publication: 1979
ISBN:0-89791-002-8
Also published in ...
Authors
G. B. Bonkowski  University of Waterloo, Computer Science Department, Waterloo, Ontario, Canada
W. M. Gentleman  University of Waterloo, Computer Science Department, Waterloo, Ontario, Canada
M. A. Malcolm  University of Waterloo, Computer Science Department, Waterloo, Ontario, Canada
Sponsor
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 1,   Downloads (12 Months): 16,   Citation Count: 1
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/800229.806958
What is a DOI?

ABSTRACT

Zed is the base language used to implement the portable realtime operating system Thoth[7], and to write commands, utilities, application programs, and other software which run under Thoth. (Zed is similar to C, although language details are not important in this paper.) One of the founding principles of Thoth is our experience that the hardest problems in porting programs usually arise when interfacing to different operating systems. By porting the whole operating system first, we ensure that other programs see the same system interface. Hence, with a modicum of care in programming, programs can be machine independent in that, without change, they can be compiled for any machine to which Thoth has been ported. Since the Zed compiler is a program which runs under the Thoth operating system, it is portable in this sense, and the same source serves to produce either native mode or cross compilers because it does not depend on the machine on which the compiler will run. Compilers, in common with certain other “system software”, are, however, machine specific in that the output from executing a compiler must be different depending upon the machine on which that output is destined to be run. Clearly, for Thoth to be ported to many machines, the compiler should be portable in this second sense: as much as possible of the source of the compiler should be machine invariant, that is, independent of the target machine, and for those parts which are machine specific, there must be a well organized scheme to assist realizing versions for new machines. The Zed compiler is designed to ease such ports. Actually, the objective is broader than that, because the initial port is only part of the problem: once versions of the compiler are available for several machines, we still have the problems of maintaining all these different versions, enhancing them, and evolving them to follow changes in the language. To do this, we need a structure that is easy to understand and to work with. We also want to minimize the amount of source code for which multiple versions must exist.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
Basili, V.R., and Turner, A.J., "A Transportable Extendable Compiler", Software-Practice and Experience, Vol 5 No 3 (July-September 1975), pp 269-278.
 
2
Berry, R.E., "Experience with the Pascal P-Compiler", Software-Practice and Experience, Vol 8 No 5 (September-October 1978), pp 617-627.
 
3
Bonkowski, G.B., "The Structure of the Eh Compiler: Code Generation", Computer Science Department, University of Waterloo, August 1978.
 
4
Bron, C., and De Vries, W., "A PASCAL Compiler for PDP 11 Minicomputers", Software-Practice and Experience, Vol 6 No 1 (January-March 1976), pp 109-116.
 
5
Cattell, R.G., "A Survey of Some Models of Code Generation", Department of Computer Science, Carnegie-Mellon University, November 1977.
 
6
Cattell, R.G., "Formalization and Automatic Derivation of Code Generators" Technical Report CMU-CS-78-115, Department of Computer Science, Carnegie-Mellon University, April 1978.
7
 
8
Colin, A.J.T., Shorey, K., and Teasdale, W., "The Translation and Interpretation of STAB-11", Software-Practice and Experience, Vol 5 No 2 (April-June 1975), pp 123-138.
 
9
Glanville, R.S., "A Machine Independent Algorithm for Code Generation and Its Use in Retargetable Compilers", Technical Report UCB-CS-78-01, Computer Science Department, University of California, Berkeley, December 1977.
 
10
 
11
Grosse-Lindemann, C.O., and Nagel, H.H., "Postlude to a PASCAL-Compiler Bootstrap on a DECSystem-10", Software-Practice and Experience, Vol 6 No 1 (January-March 1976), pp 29-42.
 
12
Haddon,B.K., and Waite, W.M., "Experience with the Universal Intermediate Language Janus", Software-Practice and Experience, Vol 8 No 5 (September- October 1978), pp 601-616.
 
13
Lecarme, O., and Peyrolle-Thomas, M.-C., "Self-Compiling Compilers: An Appraisal of their Implementation and Portability", Software-Practice and Experience, Vol 8 No 2 (March-April 1978), pp 149-170.
 
14
Newcomer, J.M., "Machine Independent Generation of Optimal Local Code", Department of Computer Science, Carnegie-Mellon University, 1975.
 
15
Neal, D., and Wallentine, V., "Experiences with the Portability of Concurrent PASCAL", Software-Practice and Experience, Vol 8 No 3 (May- June 1978), pp 341-353.
 
16
Richards, M., "The Portability of the BCPL Compiler", Software-Practice and Experience, Vol 1 No 2 (April-June 1971), pp 135-146.
 
17
Sager, G.R., "The Thoth Linking Loader", Technical Report CS-77-15, Computer Science Department, University of Waterloo, October 1977.
 
18
Stafford, G.J., "Structure of the Eh Compiler: Lexical Scanning, Syntactic Analysis, and Optimization", Computer Science Department, University of Waterloo, December 1978.
19
 
20
 
21


Collaborative Colleagues:
G. B. Bonkowski: colleagues
W. M. Gentleman: colleagues
M. A. Malcolm: colleagues