Universal Compiler
Universal Compiler
Introduction-
The Universal Compiling System (UCS) is an integrated compiler system for a set of programming languages and machine architectures. This comprehensive approach to compiler design provides the user with uniformity across architectures for a given language and across languages for a given architecture. Each architecture has not only the same set of languages, but also the same language definitions. This set of languages includes BASIC, COBOL, FORTRAN, PL/I and PLUS (Programming Language for Univac Systems). The uniformity across architectures provides portability of user programs by allowing movement of source. programs from one architecture to another with no conversion. There is also consistency across languages which allows users to choose the best language for an application or to use multiple languages within one project.
The conventional approach to compiler construction has been to build a separate compiler for each programming language and machine combination. Each subprocess of the compiler is placed where it is most expedient. This results in source language and machine dependencies being distributed throughout the compiler. These dependencies are also reflected in the intermediate text and dictionary used in all but the simplest compilers as an intermediate representation of the source program. Since almost every component of a conventional compiler contains both language and machine dependencies, there is little carry-over of cbde and algorithms from one compiler to another. This keeps new compiler development time and cc~ts high. Developing compilers individually also results in incompatibilities across machines for a given language and across languages for a given machine.
Structure-
2.The front ends are strictly architecture independent. On the other hand, the back end portion of UCS handles the architecture dependent processes and is strictly source language independent. Each architecture has a separate back end. The separation of language dependent processes from architecture dependent processes is achieved through the introduction of a common intermediate text and dictionary which are both langua.ge independent and architecture independent.
3.The front ends translate the source program into a representation which uses the common intermediate text and dictionary. The back end translates this representation into object code for the target architecture. The fact that the common intermediate text and dictionary are architecture independent, taken together with the use of a high-level implementation language, makes it possible for the front ends to be portable. The language independence of the text and dictionary enables the back end to be universal, i.e., applicable to all of the source languages.
Universality and Portability-
As mentioned above, there are two predominant features, or dimensions, of UCS -- universality and portability. Figure 1 can be viewed from two different viewpoints using one of the dimensions at a time. From a universality viewpoint, UCS is a single system capable of translating many languages. Programs in each compilable language are translated by the corresponding front end into the common intermediate text and dictionary. This representation of the original source program is then passed as input to the common back end for the given architecture. The elimination of all language dependent processes from the back end is what makes universality possible. The second dimension, portability, is made possible by moving the architecture dependent processes out of the front ends. This allows the front ends to be portable between different architectures. The common global optimizer is also portable. One common source will exist for these modules. The back ends, however, are unique to each architecture, although a significant amount of code can be transported to similar architectures. The goal of portability dictates that a high-level implementation language is used for UCS.
Benefit of Universal Compiler-
The benefits of UCS from an implementors point of view are fairly obvious and can be categorized generally as-
1. Lower initial development cost
2. Greater maintainability and faster and less expensive development for new languages or language features.
3.The initial development cost for UCS will be considerably lower than the sum of the development costs for separate compilers for each language. Once UCS has been implemented, the set of languages can be moved to a new architecture at the cost of a new back end and run-time system. Similarly, the maintenance costs for UCS will be considerably lower than the cost today of supporting as comprehensive a set of compilers as provided by UCS. Only one set of front ends and one global optimizer need be maintained for all those architectures on which UCS is implemented. In association with each architecture,
4.Only one back end and one run-time library need be supported for all the UCS languages.
Conclusion-
Finally the user benefits with UCS from an improved environment in which to develop programs. The debugging and error checking facilities available will be very complete. Compiler generated information will be used at execution time for advanced interactive and symbolic debugging as well as formatted dumping for programs written in any language. Although several compilers for languages such as FORTRAN and PL/I have had some debugging.Facilities in the past, implementation of such a complete system is possible for UCS since the development cost is spread over several languages. The user benefits, then, not only by the. inclusion of the comprehensive debugging

Comments
Post a Comment