ÿþ<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Code Generation in an Ada Compiler</title> </head> <body> <b>Title:</b> Code Generation in the IIPS/Ada Compiler <i>(original Polish title: Opracowanie i wykonanie moduBu kompilatora jzyka Ada systemu IIPS/Ada generujcego kod wynikowy w postaci P-kodu)</i><br> <b>Author:</b> <a href="http://cierniak.org/research">Michal Cierniak</a>, <a href="http://www.polsl.pl/alma.mater/generalinfo.html">Silesian University of Technology</a>.<br> <b>Source:</b> MSc Thesis, <a href="http://www.polsl.pl/alma.mater/generalinfo.html">Silesian University of Technology</a>, 1990.<br> <b>Partial text:</b> <a href="a-code-1990.pdf">pdf (in Polish)</a>. <i>I lost the electronic copy and I have not had time to scan the complete text yet.</i><br> <b>Keywords:</b> Ada, DIANA, P-Code, A-Code, compilers, code generation<br> <p><b>Abstract:</b> <p>This dissertation describes one module of a larger system that was supposed to be a complete set of development tools for <a href="http://en.wikipedia.org/wiki/Ada_programming_language">Ada</a>. The code generation module described here took the output of earlier compiler phases in the form of the <a href="http://portal.acm.org/citation.cfm?id=69574">DIANA</a> intermediate language and generated low-level code for an abstract Ada machine. A major part of the works was the design of a language for a virtual machine for interpreting Ada programs. We took the <a href="http://en.wikipedia.org/wiki/P-Code_machine">P-Code</a> designed with a similar purpose for <a href="http://en.wikipedia.org/wiki/Pascal_programming_language">Pascal</a> (it was used in the <a href="http://en.wikipedia.org/wiki/UCSD_p-System">UCSD p-System</a>) and extended it into a language we called A-code.</p> <p> The dissertation consists of 7 chapters. Chapter 1 presents motivation and describes the overall IIPS/Ada compiler system. Chapter 2 describes the <a href="http://portal.acm.org/citation.cfm?id=69574">DIANA</a> intermediate language. The bulk of the text is in Chapter 3 that describes the A-Code language. The <a href="http://en.wikipedia.org/wiki/Turbo_Pascal">Turbo Pascal</a> implementation of the code generator is described in Chapter 4. Chapter 5 is the user manual for the code generator and Chapter 6 describes which features of Ada have been implemented and which have been omitted. Conclusions are presented in Chapter 7. Appendix 1 contains the grammar of DIANA. Appendix 2 describes all new A-Code instructions (i.e. those that are not part of the P-Code language). Appendix 3 defines a compiler runtime library that is given in the form of A-Code procedures that can be called from the generated code. Appendix 4 gives the DIANA encoding of (parts of) the STANDARD package. Appendix 5 shows examples of test runs. The tests consist of small Ada procedures or packages manually translated into DIANA. These DIANA representations of the Ada source code were translated by the code generator and the genrated A-Code representation is included in the text. </p> <p> <a href="index.html">Back to MichaB's publications</a> <p><hr> <font size=-2> Last updated: 2005-10-15 by MichaB Cierniak.</font></p> <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-238213-1"; urchinTracker(); </script> </body> </html>