<html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Compilers Algorithms</title> <link rel="stylesheet" type="text/css" href="../CSS/main.css"> </head> <body> <basefont face="Times" size="3"> <table border="0" width="100%" id="table1" cellspacing="1" cellpadding="4" > <tr> <td rowspan="2" width="40%"> <p align="center"><img border="0" src="/Images/splogo.gif" width="45" ><font face="Bernard MT Condensed" color="#FF0000" size="7"> <font color="#FF0000"><a href="/index.shtml">Softpanorama</a></font></font></p> <center> <font size="2" face="Arial"><b>May the source be with you, but remember the <a href="/SE/kiss.shtml">KISS principle</a> ;-) </b></font></center> </td> <td align="center"> <b><a href="/index.shtml"><font size="2">Home</font></a></b></td> <td align="center"> <b><a href="/switchboard.shtml"><font size="2">Switchboard</font></a></b></td> <td align="center"> <b><a href="/Admin/index.shtml"><font size="2">Unix Administration</font></a></b></td> <td align="center"> <b><a href="/Commercial_linuxes/RHEL/index.shtml"><font size="2">Red Hat</font></a></b></td> <td align="center"> <b><a href="/Net/index.shtml"><font size="2">TCP/IP Networks</font></a></b></td> <td align="center"> <b><a href="/Skeptics/Political_skeptic/Neoliberalism/index.shtml"><font size="2">Neoliberalism</font></a></b></td> <td align="center"> <b><a href="/Social/Toxic_managers/index.shtml"><font size="2">Toxic Managers</font></a></b></td> </tr> <tr> <td colspan="7" align="center"> <b><font size="2">(slightly skeptical) Educational society promoting "<a href="/Back_to_basics/index.shtml">Back to basics</a>" movement against IT overcomplexity and <a href="Commercial_linuxes/RHEL/index.shtml">bastardization of classic Unix</a></font></b></td> </tr> </table> <hr width="100%" noshade size="5" color="#FF0000"> <center> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Top_banner2021 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4031247137266443" data-ad-slot="3389635737" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script></center> <h1 align="center">Compilers Algorithms</h1> <table border="1" width="100%" bgcolor="#FFFFCC" > <tr> <td width="12%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="#News"><font size="2">News</font></a></b></td> <td width="12%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="index.shtml">Algorithms </a></b></td> <td width="12%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b><a href="../Bookshelf/Computers/compilers.shtml"><font size="2">Best books</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="#Recommended_Links"><font size="2">Recommended Links</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="#Web-based Courses"><font size="2">University Courses</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="#Papers"><font size="2">Papers</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="#groups_and_FAQs"><font size="2"> FAQs</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="#People"><font size="2">People</font></a></b></td> </tr> <tr> <td width="12%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b><a href="Compilers/lexical_analysis.shtml"><font size="2">Lexical analysis</font></a></b></td> <td width="12%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b><a href="Compilers/recursive_descent_parsing.shtml">Recursive Descent Parsing</a></b></td> <td width="12%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="#Parsing"><font size="2">Parsing</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b><a target="_blank" href="../Scripting/Articles/index.shtml"> <font size="2">Regular expressions</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="#Code generation"><font size="2">Code generation</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="#Tree-based Code optimization"> <font size="2">Tree-based code optimization</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="#Peephole optimization"><font size="2"> Peephole optimization</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="#Performance and Benchmarks"> <font size="2">Performance and Benchmarks</font></a></b></td> </tr> <tr> <td width="12%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a target="_blank" href="decompilation.shtml"><font size="2"> Decompilation</font></a></b></td> <td width="12%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="#ACM"><font size="2">ACM</font></a></b></td> <td width="12%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="#Program Analysis"><font size="2">Program Analysis and Transformations</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a target="_blank" href="../Scripting/Piping/pipes.shtml"> <font size="2">Pipes coroutines and continuations</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="#C compilers"><font size="2">C compilers</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a target="_blank" href="../Bookshelf/Computers/Compilers/generative_programming_methods.shtml"> <font size="2">Generative programming methods</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="#Graph analysis"><font size="2">Graph Analysis</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <font size="2">DSL (domain specific languages)</font></b></td> </tr> <tr> <td width="12%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b><a href="../SE/defensive_programming.shtml">Defensive programming</a></b></td> <td width="12%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <font size="2">LEX&YACC</font></b></td> <td width="12%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a target="_blank" href="../Lang/History/XPL/index.shtml"> <font size="2">XPL</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <font size="2">PL/360</font></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a target="_blank" href="../Lang/prolog.shtml"><font size="2">Prolog</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="bit_tricks.shtml">Bit Tricks</a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <b> <a href="#Humor"><font size="2">Humor</font></a></b></td> <td width="13%" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <a href="#Etc"><font size="2">Etc</font></a></td> </tr> </table> <table border="0" width="178" height="620" align="right" cellspacing="4" bgcolor="#FFFFFF"> <tr> <td> <table border="1" width="174" height="616" align="center" bgcolor="#FF0000"> <tr> <td> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Upper skyscaper --> <ins class="adsbygoogle" style="display:inline-block;width:160px;height:600px" data-ad-client="ca-pub-4031247137266443" data-ad-slot="0371843916"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </td> </tr> </table></td> </tr> </table> <ul> <li><b><a href="#Introduction">Introduction</a></b></li> <li><b> <a href="#Knowledge_of_compiler_construction_and_the_level_of_understanding_of_particular_programming_language_"> Knowledge of compiler construction and the level of understanding of a particular programming language</a></b></li> <li><b><a href="#compiler_construction_as_programming_paradigm">The idea of creating abstract, specific area oriented, machine and associated language -- compiler construction as programming paradigm</a></b></li> <li><b> <a href="#The_key_point_of_compiler_construction_as_a_programming_paradigm_is_to_create_a_set_of_domain_specific_operations_and_data_types_as_well_as_the_language_that_is_capable_operating_on_them"> The key idea of "compiler construction as a programming paradigm" movement is the creation of a set of domain specific operations and data types as well as the language that is capable operating on them</a></b></li> <li><b><a href="#Some_suggestions">Some suggestions</a></b></li> </ul> <hr noshade color="#FF0000" width="33%" size="7"> <h3><a name="Introduction">Introduction</a></h3> <p>As I used to explain students during the first lecture of my "Compiler construction" course, this topic of computer science has much wider practical significance than one can expect just from the name of course. First of all, from my point of view, this is the most exiting part of CS curriculum that touch a lot of important areas and some very interesting algorithms. </p> <p>Ability to construct and use languages is what makes humans humans, and the ability to create your own language is simply amazing. In a way writing compiler from a specialized language is just an extension of if this immanent human ability. But pretty amazing one. Please don't miss this opportunity. I think that compiler writing is an eye-opening experience for any interested student of programming, and I deeply regret that compiler construction courses are de-emphasized in current university curriculums. But at this slightly skeptical site, I am not obliged to conform to the current programming fashion, whatever it might be. </p> <p>That why this page tries to bring compiler construction to your attention as the central and most important part of CS curriculum. This course has some implicit links to scripting languages as the latter (and first of all Perl and Python) are powerful compiler construction tools that greatly simplify writing of lexical scanner and syntax analyzer of any specialized complier. They allow to produce higher quality product in less time. Speed of compiling in such cases is not a primary concern and in many cases you will be surprised how fast are supposedly inefficient methods (such as writing compiler as s set of distinct passes, connected via files written to the disk) on modern computers. But a quality of diagnostic is of primary concern and is easier achieve then you lexical parser and syntax analyzer are written (or generated) in scripting language. Also overemphasizing of syntax analysis in such courses will do no good to students (and this the grave deficiency of most "compiler construction textbooks"). Recursive decent is usually adequate as you control the language ( <a href="https://en.wikipedia.org/wiki/Niklaus_Wirth">Niklaus Wirth</a> was probably the first who understood this fact; althouth later he slipped into software verification fundamentalism, which killed him as compiler writer ;-) </p> <p>The real beef in writing the compiler is in creating an flexible intermediate representation of the program suitable for code generation (often structured similarly to the syntax tree) and generating the code from it. The hierarchical structure of Unix file system facilitates its use it in compiler writing for storing the intermediate parsing tree with templates from which you can generate final code by just traversing this tree in a right order. And having elements of intermediate representation written as files greatly simplifies debugging. </p> <p>Code generation actually does not necessary needs to be machine code or even assembler language. You can generate code in any language you want, including shell, Perl, Python and Java. </p> <p>Another advantage of taking this course that it introduces you to what is called "dual language programming" -- programming your software system in two languages (for example, TCL+C, Python+C, JPython+ Java, Shell+Perl, Groovy+Java). For many problems this approach is more productive than any currently fashionable programming paradigm. When you create interpreter from the scripting (for example TCL or Python) in lower level compiled language (such as C), you might preserve the capability to call programs that adhere to certain calling rules, but are written in low level language from the higher level language. In case of TCL this was one of the design goals for the language and its interpreter (LUA is similar in this respect). In such cases you still have access to lower level language in which you can write parts of your software that are difficult or very inefficient to express in higher level language. This is a tremendous advantage, as you can mix and match them in creating your software product. </p> <h3> <a name="Knowledge_of_compiler_construction_and_the_level_of_understanding_of_particular_programming_language_"> Knowledge of compiler construction is the key to understanding of any particular programming language, </a><br> <a name="Knowledge_of_compiler_construction_and_the_level_of_understanding_of_particular_programming_language_"> especially a complex one</a></h3> <p> You can't understand compiled and scripting programming language without understand how particular data types are represented in computers, and how particular constructs are implemented, at least of high level. Such notions as references, identifier tables (and related notion of namespaces), structures (which can hold iether values or references, including references to functions (in this case of OO languages such structures are called objects), garbage collection, passing parameters <em> by value</em> vs <em>by reference</em>, etc. Nicklaus Wirth reportedly joked that, because Europeans pronounce his name properly, while Americans pronounce it as "nickel's worth", he is called <em>by name</em> in Europe and called <em>by value</em> in America.</p> <p> There is another important lesson which you can learn by studying compiler construction and methods of translating particular constructs into the instruction of iether real of virtual machine: writing compilers is hard and raising the level of language is equal to the rising of the level of abstraction at which you are viewing the problem. Not all aspects of the problem can be viewed from high level of abstraction. Ability to switch from one level of abstraction to another (lower of higher) is one of the traits of talented software architects. </p> <p> When you have no clue about the methods used for the implementation of particular constructs, you can't write good programs. And the higher is the levle of the language the more difficult is to maintain this understanding. For example, very few people understand how OO constructs are implemented. Unfortunately many programming books try to obscure this aspect, do not provide any details of the implementation or the history of emergence of this feature (which is very important for understanding), and try to treat such constructs as something "given". </p> <p> If you have only vague understanding of the way the particular construct is implemented in compiler/interpreter, you will spend a lot of time "struggling with the language" -- attempt to understand what can be called "language bureaucracy" instead of solving the problem. </p> <p> Another problem is that modern language became way to complex. They are essentially incomprehensible for humans and most programmers are able to learn only a subset. In this sense the knowledge of how particular feature compiled in object code or interpreted is the only way really understand some features of the language. </p> <p> I suspect that this drive to "overcomplexity" while lead to some important successes in creating VHL languages (Python now is among top ten algorithmic languages used; in October 2017 is occupied fifth position in <a href="https://www.tiobe.com/tiobe-index/">TIOBE Index</a>) to a certain extent is a self-defeating approach -- the resulting language becomes too "top heavy" infused with esoteric constructs that few use or need, and interpreter became too complex to maintain. At this point the language and interpreter both need powerful financially rich sponsor to continue development. If such sponsor bails out (like O'Reilly did in case of Perl) the language stagnates as maintaining the interpreter and libraries is no longer fun and few developers are ready to deal with such a level of complexity. </p> <p> "Dual language programming approach" might be more productive and allow on both levels use simpler languages (for example in pair TCL+C, TCL is really much simpler then, say Perl or Python). Also the design of a particular language compiler or interpreter is heavily influenced by the current flavor of "religious fundamentalism" which is endemic in this area. Previously those were "structured programming" and "verification" frenzy. Now it is OO, althouth the religious fervor now is going down in this area, as it is clear that OO is unable to produce the benefits expected and never will, while contibuting to excessive complexity of the language and its imlementation in comparison with classic Algor-60 style procedural languages <a href="http://www.paulgraham.com/reesoo.html"> (Rees Re OO</a>)</p> <blockquote> <p><font face="verdana" size="2"><i>(Jonathan Rees had a really interesting response to <a href="http://www.paulgraham.com/noop.html">Why Arc isn't Especially Object-Oriented</a>, which he has allowed me to reproduce here.)</i></font></p> <p><i><font face="verdana">... ... ... </font></i></p> <p><font face="verdana" size="2">Because OO is a moving target, OO zealots will choose some subset of this menu by whim and then use it to try to convince you that you are a loser.</font></p> </blockquote> <p> (I say regular utilities written for Linux maintenance tasks written in Python in OO style -- that was a horror show; or more correctly "art for the sake of the art"). Excessive attention to religious fundamentalism aspect of programming language culture is really detrimental to the quality of implementation (and speed of execution) of many classes of programs. Also languages that too subscribed to particular fashion tend to disappear when the fashion dies out. The destiny of Pascal (only version with Borland Delphi extensions is still used) and Smalltalk are very important lessons in this respect. While OO flag is still carries by C++, Java, Python and Ruby all those language allow procedural programming as well. </p> <p> Actually it is better to learn language that allow you use regular procedural programming along with OO, such as C++, Perl and Python than languages in which your are forced into straight jacket of OO. When I see book on "Algorithms and data structures" which use OO in sorting or searching algorithms I do not know whether I should laugh or cry. In any case this is simply disgusting. KISS principle is clearly violated here: not all areas need or can benefit from OO approach. Moreover a rational part of OO approach can be modeled in non-OO languages as well. Recent growth of popularity of Javascript suggest that alternative approaches can be as good or even better (Javascript uses <a href="../Scripting/Javascript/prototype_based_object_model.shtml"> Prototype Based Object Model</a>, which is distinct and somewhat superior of Simula67-inspired class-based OO model used in C++, Java, Python, and similar languages) </p> <p> At the same time it is important to understand that the programming language and its compiler or interpreter are only a small part of the total "language ecosystem". And the quality of this ecosystem and especially the quality of libraries (especially the part of libraries that provide interface to underling OS such as Linux) and debugger are as important or even more important as the quality of the language. As Knuth pointed out long ago, in evaluating the quality of the language, you need to see the larger picture -- not the language as such, but the whole programming ecosystem that exists around the language and which include the debugger, IDE, libraries, books, Web sites, groups, etc. </p> <h3><a name="compiler_construction_as_programming_paradigm">The idea of creating abstract, specific area oriented, machine and associated language<br> -- compiler construction as programming paradigm</a></h3> <p>Compiler design and related set of classic algorithms provides a pretty flexible software architecture that can be called "abstract machine" architecture. Sometimes using this architecture and adapting it to a particular task can make design more transparent and more easily debugged. While separating lexer, parser and semantic routines is very powerful way of structuring many types of programs, especially text conversion/transformation programs, the real power of this approach is in identifying the key operations of some "abstract machine" specific to particular domain and the language that allow you to operated with those (now defined) high level operations and data structures. </p> <p>In other words structuring a large program as if it were a compiler for some new specialized language helps to solve problem that are more difficult or even impossible to solve other way. It can adds some elegance in architecture of many types of text processing and interactive programs. BTW coroutines were first introduced as a way to simplify writing compilers (<a href="https://en.wikipedia.org/wiki/Melvin_Conway">Melvin Conway</a> was a pioneer of this approach; see also his <a href="../SE/conway_law.shtml">Conway Law</a>) </p> <p>An approach when an input to the program can be treated as some formal language and program transforms it to another language now got some traction in XML world. But in no way it is limited to XML and the idea has much wider applicability. In a perverted way it is also present in OO languages, which can be viewed as simplistic implementation of "compiler-compiler" approach to problem solving. Rational ideas related to creation of a specialized data types set of abstract operations on them (disguised as objects) and are buried in superficial things such as inheritance issues, the machinery of working with hierarchical name spaces and related "visibility" problems, integration of exceptions into this framework, as well as semi-relations desire to outlaw alternative approaches, typical for OO zealots.</p> <p>In other words, elements of compiler technology, especially a notion of scanner-parser-generator troika are applicable to a wide range of programming tasks. Of course to use it you need to understand how compiler is structured and what algorithms are used. That's why complier construction course is so crucial. And again, while difficult (especially if overloaded is redundant formalisms) it is really existing. In some way, creating a new language is the way human solve complex problems. </p> <p>That's is of the reasons I created this page as the part of my career was devoted to compiler writing and teaching compiler construction. It is now so long in the past that I've already forgotten most of the things I used to know :-(. and that's sad. This page reminds me that some time in the past I knew lot more than now, and probably was a better programmer. </p> <p>But the key ideas remain applicable to my current work. And I can attest that that fact that by accident I learned the most about programming at this early stage of my career by writing compilers, made me better programmer then my more talented colleagues, who did have of such an opportunity. Without this stage I probably would have never manage to reach my present level. I also would be more susceptible to fads (which are abundant in programming with each decade producing a couple of "new and exciting" technologies, which are solidly forgotten in the next decade ;-). As compilers are one of the most complex types of programs, it makes you skeptical about any claim that somebody somehow invented a "silver bullet". moreover it allows you to see that some of the prophets of those new fads are simply charlatans who do not know much about the problem that arise in writing large and complex programming systems. </p> <p>On the other hand it's really unfortunate that many students today study only a couple of complex and boring languages (C++ and Java; sometimes one scripting language such as Python) and never learn <a target="_blank" href="../Lang/assembler.shtml">assembler language</a>. The latter is not only much simpler than any high-level language, but also is a necessary prerequisite for any decent compiler course. It allow you to understand how computer operates and ability to work on multiple levels of abstraction and switch from one level of another with ease is a sign of a top software architect. This is both a native ability and acquired skill, so without learning assembler language programming the native ability might lie dormant. </p> <p>Many <a href="bit_tricks.shtml">tricks with bit arithmetic </a>that complier writers widely use, and first of all treating words as set of bits capable to implement set operations, as well as superimposition of different types on a single memory location; thus redefining the memory area, are best implemented in assembler language. That's why I still think that a student who has not taken an assembly course at the university is a slightly crippled student and IMHO only the most gifted students can overcome an overdose of OO, Java, and other fancy topics in the current university curriculum ;-). I would like to stress it again, that understanding of low level architecture of computer including, but not limited to its instruction set, is critical for any top programmers because one of the key features of top programmers is the ability to switch the level of abstraction they operate from high to low and vise-versa. You can't think on low level of computer architecture details if you never learned them. If you never studied one or more computer architectures and programmed in assembler. That also means that high level language skills of such people are in many ways deficient. </p> <p>If a student has the real desire to obtain an intimate knowledge of the computer architecture, then compiler construction is the way to go. You will need to understand instruction set, programming conventions, learn efficiently manipulate registers bitfields, work with different and sometimes pretty complex programming structures and so on. It you look at Knuth Books (for example volume 3 of <a target="_blank" href="../Bookshelf/classic.shtml">The Art of Computer Programming</a>) and compare implementation of some sorting algorithms in MIX and high level language, you will see that many important algorithms can be expressed in assembler almost as compactly as in higher level languages. </p> <p>This multitude of abstraction levels and ability to create you own set of abstractions for solving particular problem is really what computer science are all about and in compiler writing many algorithms-related topics arise naturally and stimulate deeper learning of algorithms and data structures. We seldom learn things we do not need ;-). </p> <p>To make a parallel with math, I see compiler writing as closer to a pure computer science, as opposed to applied computer science. It's not accidental the famous <a target="_blank" href="../Bookshelf/classic.shtml">The Art of Computer Programming</a> by <a target="_blank" href="../People/Knuth/index.shtml">Donald Knuth</a> initially was intended to be a book about writing compilers. The upper layers of software: applications, GUI, etc. probably can be called applied computer science. I mean, a biologist programming a genome decoding software is mainly 'using' the computer technology, for example regular expressions engine. But if he get deep into it, he/she might modify or enhance regular expression engine to suit his/her needs better and achieve higher productivity. Generic regular expression language in this case is just a starting point, not the end of the journey. </p> <p>Thus compiler writing is more about computer and algorithms by themselves and as such are IMHO more attractive to those who is interested in those areas. </p> <h3> <a name="The_key_point_of_compiler_construction_as_a_programming_paradigm_is_to_create_a_set_of_domain_specific_operations_and_data_types_as_well_as_the_language_that_is_capable_operating_on_them"> The key idea of "compiler construction as a programming paradigm" movement is the creation of a set of domain specific operations and data types as well as the language that is capable operating on them</a></h3> <p>The key point here is that many programming problems are better solved by creating a specialized language, working with a set of abstract operations (you can call it "abstract, domain specific machine", as the term "virtual machine" is already taken). The validity of this approach was demonstrated many time in very different contexts.</p> <p>That why I would like to call compiler construction a programming paradigm, not just a pretty obscure and semi-forgotten area of computer science. Moreover compiler construction was and probably still is the source of many neat ideas in programming in general. Please remember that coroutines -- the fundamental idea of modern programming were first invented by Conway (see <font face="Arial,Helvetica,Geneva" size="-1"> <b>M. E. Conway, <i> <a target="_blank" href="http://portal.acm.org/citation.cfm?id=366704&CFID=3785531&CFTOKEN=47000247"> Design of a Separable Transition-Diagram Compiler</a></i>, Comm, A.C.M., 6(7), pp. 396-408. 1963) </b></font>for the explicit purpose of writing a compiler and only much later had found its way to other areas of programming (first to simulation languages, then to operating systems via pipe concept that was pioneered in Unix, then to high level languages such as Modula and now to scripting languages such as Python and Ruby). BTW Conway wrote his compiler in assembler. The famous <a target="_blank" href="https://en.wikipedia.org/wiki/PL/C">PL/C</a> compiler by Richard W. Conway and Thomas R. Wilcox was written in assembler too.</p> <p>That suggests that assembler language was and still is constructive to viewing the problem in a different light, than when you use just a high-level language and that mixed language approach to programming might be better than a monolithic approach. Currently the most acceptable way to write a compiler for a novice is to use combination of TCL and C with manually written lexical analyzer (in C) and a parser and code generator mainly in <a target="_blank" href="../Scripting/tcl.shtml">TCL</a> (if the language will not be still born, it is always possible to rewrite the parser in C later for efficiency). </p> <p>Programming language is just a tool and in no way one should use the only tool for a complex project. I would reiterate the value of studying assembler as a necessary step in obtaining solid programming education and would like to remind a reader that one probably will never be able to find a better book to study this important programming techniques than the first volume of <a target="_blank" href="../Bookshelf/classic.shtml">TAOCP</a>, in which Donald Knuth used a simple artificial assembler for a hypothetical computer called MIX. </p> <h3><a name="Some_suggestions">Some suggestions</a></h3> <p>For those who would like to try this approach I have several suggestions: </p> <ul> <li><b>Be skeptical about excessive formalism and too complex formal models </b>(including but not limited to attribute grammars). They are useful in moderation but many instructors tend to stress them too much because they do not know better and that 's what is required to get published. Be skeptical about your instructor and use additional books to see bigger picture. If the subject became incomprehensible, it's often the fault of the instructor. A good book or two can save your butt: use it.<br> </li> <li><b>Get some old books</b>, the books written before current OO overhype and fashion for obscure mathematic notations. Some of them are less then a dollar on Amazon (plus shipping). There are several books which implemented full compiler from some small language in C or C++. Those are very valuable teaching tools not only for compiler writing for programming too as compiler writers belong to the top echelon of computer programmers hierarchy. Those guys are not your regular commercial software writers who publish books about how to write Excel formulas or DevOps ;-)<p>Generally be skeptical about authors who want to treat compiler as a task for which OO is the next best thing since sliced bread. Especially dangerous are "obfuscators" -- authors who try to make simple things complex and complex impossible to understand. Often using as an instrument mathematical notation of some sort. The essence of mathematic is elegance and help in understanding, not the obscurity. This is true about such notations as BNF. </p> <p>The same as abuse of mathematical formalisms can be said about abuse of OO. Compilers are not GUI interfaces and too much zeal in applying OO to this domain is counterproductive (but in moderation and in structuring of namespace OO language might be a useful tool). Explicit operations with pointers and coroutines are a really useful tools in compiler writing so languages without them such as Java are inferior to languages that have them (C, C++, Perl). Yes, you can write compiler in languages like Pascal or Java but it is more difficult and you need to use some unnatural constructs. Availability of bit operations is also important.<br> </li> <li><b>Read </b> <a target="_blank" href="http://compilers.iecc.com/"><b>Comp.compilers</b> </a>Usenet group and ask questions. You may get a very good answers that will help. Also reading discussions will help you to understand many features of languages like C, C++, C#, Java much deeper. Often the most illuminating discussion about the usability and value of the a particular language feature is a discussion of compiler writers as they are the only one who understand the tradeoffs between expressive power of the language, convenience of programmer, potential difficult to find bugs and headaches of a compiler writer to implement the feature. That does not mean the opinions of compiler writers are always rational (for example Wirth often went too far in simplification of the language and killed the future for it). <br> </li> <li><b>It's better to use a hand-written lexical analyzers than generated </b>(the initial version can be generated by any tool that produce "<a href="Compilers/lexical_analysis.shtml">loop and switch</a>" type of code). IMHO all this abstract automata topics are a little bit detached from reality. You can (and probably should generate the initial prototype using flex or similar tool but after that you need to write a simple "loop and switch" scanner manually. Hand-written <a href="Compilers/lexical_analysis.shtml">loop and switch</a> scanner is still a simple, easily understandable program. It can be made more flexible than any generated scanner and can have better error diagnostic capabilities. What is more important is that this approach gives you an important leverage in structuring your syntax analyzer. For example you can use various tricks including complex look-ahead approaches in scanner to simplify parsing. <br> </li> <li><b>Learn recursive decent parsing first</b>. It is the most transparent and can be well mated to code generation. Use <a target="_blank" href="http://www.citeseer.com">http://www.citeseer.com</a> to find code samples and papers that discuss this technology. Pascal was specifically structured as language suitable for recursive decent parsing. Look at Wirth's Oberon0 compiler in his Compiler Construction book. Only after you mastered the concepts inherent in recursive decent parsing and its connection to code generation you can start playing with "shift and reduce" algorithms. Bison is a good playground for that. <br> </li> <li><b>You need to distinguish "language in the large" -- structure of the language and "language in the small" (arithmetic, Boolean and other expressions).</b> Different methods can be used to parse those languages. For example to improve the quality of diagnostic (modern compilers sucks big way in comparison with handcrafted masterpieces such as PL/C or IBM PL/1 Debugging Compiler) for example recursive decent can be used for "language at large" and LR grammars can be used for parsing expressions. Semi-forgotten Floyd-Evans language provides an interesting experimental tool for this. <br> </li> <li><b>Tree-like representation of data at intermediate stages based on subset of XML has some advantages.</b> In many cases you can generate a simplified version of XML (for example XHTML with an appropriate stylesheet) as an intermediate representation of your data stream. First of all <i><b>this instantly makes your representation readable and that is a tremendous advantage for any complex problem.</b></i> XML is less readable than XHTML with stylesheet, but there are very good XML editors which help to visualize what you are generating. Moreover this hierarchical representation is very flexible and can be easily adapted to a very wide variety of problem domains. Here you can also benefit from a current trend to use XML as an intermediate representation of data streams and even hide compiler-based approach from incompetent bosses. <br> </li> <li><b>If you need to optimize your code, peephole optimization is a very simple and nice method to improve the quality of the generated output. </b> The peephole is a small moving window on the target program. Instructions are optimized only considering the instructions in the peephole. Peephole optimization is applied over the while target program, moving the peephole window. Several passes can be used if necessary. It can be adapted to intermediate XML or XHTML+stylesheet representations and tasks different then code generation. Actually peephole optimization can be productively used for any XML-based intermediate representation of the program. Some people even tried to used XSLT to generate code in an application software project like "template driven code generator". That's a questionable approach, but for the narrow task of peephole optimization might be OK. See <a href="#Soumen Sarkar experience using XSLT">Soumen Sarkar experience of using XSLT</a> and the book <a target="_blank" href="https://www.amazon.com/exec/obidos/ASIN/0130258784/ref=nikolaibezroukov"> Program Generators with XML and Java</a> for more information. <br> </li> <li><b>Use a scripting language. </b>suitable choices are Ruby and Python, to lesser extent Perl (the problems with Perl is that it does not have a clean interface to C as a part of your implementation. The use of scripting language bridges the semantic gap between an application specification and its implementation, offers economies of scale when implementing repetitive concepts, and can result in code that is readable, more reliable, compact, easy to maintain, and concisely documents the overall structure of the application. <br> </li> <li><b>Use multipass design.</b> Intermediate representation of each pass written as a file is important debugging tool. This is especially important on the code generation phaze. <br> </li> <li><b>Learn regular expressions</b>. This is a very useful tool in compiler writing. Perl has very good integration of regular expression into the language so you might benefit from experimenting with using Perl at code generation phase. but Python while weaker is also adequate. <br> </li> <li><b>If you want to generate native doe generate assembler.</b> Generating binary code is often fun but outside simple problems and imbedded software it too difficult to debug to justify the effort. </li> </ul> <p align="right"><i>Dr. Nikolai Bezroukov</i></p> <hr /> <table border="1" width="100%" height="350"> <tr> <td width="100%" align="center" colspan="5" rowspan="4"> <center> <b>Top Visited</b></center> <iframe src="/topupdates.shtml" width="100%" height="320"> <p>Your browser does not support iframes.</p> </iframe> </td> <td bgcolor="#FFFF00" align="center"><b><a href="switchboard.shtml">Switchboard</a></b></td> </tr> <tr> <td bgcolor="#FFFF00" align="center"><b><a href="/index.shtml#Latest">Latest</a></b></td> </tr> <tr> <td bgcolor="#FFFF00" align="center"><b> <a href="https://www.google.com/search?q=site:www.softpanorama.org&hl=en&lr=&tbo=1&prmd=ivns&source=lnt&tbs=qdr:y&sa=X&ei=aML0TaHgO4fUgAedxtjzCw&ved=0CAsQpwUoBQ&biw=1256&bih=801&cad=cbv#q=site:www.softpanorama.org&hl=en&lr=&tbo=1&prmd=ivns&source=lnt&tbs=qdr:w&sa=X&ei=csL0TYHsI4LagAeKu7DPCw&ved=0CAwQpwUoAw&fp=fb58e14853731932&biw=1256&bih=801"> Past week</a></b></td> </tr> <tr> <td bgcolor="#FFFF00" align="center"><b> <a href="https://www.google.com/search?q=site:www.softpanorama.org&hl=en&lr=&tbo=1&prmd=ivns&source=lnt&tbs=qdr:m&sa=X&ei=IMD0TdjLHMXUgQe9t6zfCw&ved=0CA0QpwUoBA"> Past month</a></b></td> </tr> </table <hr noshade color="#FF0000" size="5"> <hr /> <h2><a name="NEWS_TOC">NEWS CONTENTS</a></h2> <ul> <li>20151123 : <a href="#n20151123X_knuth_recent_news">Knuth Recent News</a> <i></i> ( <a target="_blank" href="http://www-cs-faculty.stanford.edu/~knuth/news.html">Knuth Recent News</a>, Nov 23, 2015 ) </li> <li>20151123 : <a href="#n20151123X_the_mmix_supplement">The MMIX Supplement </a> <i></i> ( ) </li> <li>20130107 : <a href="#n20130107X_on_the_translation_languages_from_left_to_right_knuth_d_e">On the translation languages from left to right, Knuth, D.E</a> <i></i> ( <a target="_blank" href="http://www.cs.dartmouth.edu/~mckeeman/references/LR/index.html">On the translation languages from left to right, Knuth, D.E</a>, Jan 07, 2013 ) </li> <li>20130107 : <a href="#n20130107X_wikibook">WikiBook </a> <i></i> ( <a target="_blank" href="https://en.wikipedia.org/wiki/Book:Compiler_construction"> Wikipedia</a> ) </li> <li>20111204 : <a href="#n20111204X_comp_compilers_re_need_an_interesting_topic_for_an_undergraduate_project_on_compilers">Comp.compilers Re Need an interesting topic for an undergraduate project on Compilers</a> <i></i> ( <a target="_blank" href="http://compilers.iecc.com/comparch/article/11-09-008">Comp.compilers Re Need an interesting topic for an undergraduate project on Compilers</a>, Dec 04, 2011 ) </li> <li>20111204 : <a href="#n20111204X_roslyn_project_overview">Roslyn Project Overview</a> <i></i> ( <a target="_blank" href="http://msdn.microsoft.com/en-us/hh500769">Roslyn Project Overview</a>, Dec 04, 2011 ) </li> <li>20111027 : <a href="#n20111027X_writing_a_programming_language_in_perl">Writing a Programming Language in Perl</a> <i></i> ( Oct 25, 2011 ) </li> <li>20101229 : <a href="#n20101229X_making_c_compiler_generate_obfuscated_code">Making C compiler generate obfuscated code</a> <i></i> ( Dec 07, 2010 , <a target="_blank" href="http://compilers.iecc.com/comparch/article/10-12-017">Comp.compilers</a> ) </li> <li>20101229 : <a href="#n20101229X_compiler_construction">Compiler construction</a> <i> by Prof. O. Nierstrasz</i> ( <a target="_blank" href="http://scg.unibe.ch/download/cc/">Compiler construction</a>, Dec 29, 2010 ) </li> <li>20101228 : <a href="#n20101228X_cs_375_compilers_lecture_notes">CS 375 Compilers Lecture Notes</a> <i></i> ( <a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375contents.html">CS 375 Compilers Lecture Notes</a>, Dec 28, 2010 ) </li> <li>20101228 : <a href="#n20101228X_writing_a_compiler_in_c_lexical_analysis_all_your_base_are_belong_to_us"> Writing a Compiler in C# Lexical Analysis - All Your Base Are Belong To Us</a> <i></i> ( <a target="_blank" href="http://blogs.microsoft.co.il/blogs/sasha/archive/2010/10/06/writing-a-compiler-in-c-lexical-analysis.aspx"> Writing a Compiler in C# Lexical Analysis - All Your Base Are Belong To Us</a>, ) </li> <li>20101227 : <a href="#n20101227X_writing_your_own_toy_compiler_using_flex_bison_and_llvm_gnuu_org">Writing Your Own Toy Compiler Using Flex, Bison and LLVM (gnuu.org)</a> <i></i> ( <a target="_blank" href="http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/">Writing Your Own Toy Compiler Using Flex, Bison and LLVM (gnuu.org)</a>, Dec 27, 2010 ) </li> <li>20101227 : <a href="#n20101227X_lets_build_a_compiler">Lets Build a Compiler</a> <i></i> ( <a target="_blank" href="http://compilers.iecc.com/crenshaw/">Let's Build a Compiler</a>, Dec 27, 2010 ) </li> <li>20090406 : <a href="#n20090406X_lepl_2_3">LEPL 2.3</a> <i></i> ( <a title="LEPL 2.3" href="http://freshmeat.net/projects/lepl">LEPL 2.3</a>, Apr 6, 2009 ) </li> <li>20080221 : <a href="#n20080221X_project_details_for_bare_bones_interpreter"> Project details for Bare Bones interpreter</a> <i></i> ( <a target="_blank" href="http://freshmeat.net/projects/barebones/?branch_id=73315&release_id=272236"> Project details for Bare Bones interpreter</a>, Feb 21, 2008 ) </li> <li>20080122 : <a href="#n20080122X_freshmeat_net_project_details_for_tinyap"> freshmeat.net Project details for tinyap</a> <i></i> ( <a target="_blank" href="http://freshmeat.net/projects/tinyap/?branch_id=73067&release_id=270270"> freshmeat.net Project details for tinyap</a>, Jan 22, 2008 ) </li> <li>20071211 : <a href="#n20071211X_complier"> Complier</a> <i></i> ( <a target="_blank" href="http://www.iturls.com/English/SoftwareEngineering/SE_Complier.asp"> Complier</a>, Dec 11, 2007 ) </li> <li>20070809 : <a href="#n20070809X_freshmeat_net_project_details_for_parsing_py_parser_generator"> freshmeat.net Project details for Parsing.py Parser Generator</a> <i></i> ( <a target="_blank" href="http://freshmeat.net/projects/parsing/?branch_id=70757&release_id=259415"> freshmeat.net Project details for Parsing.py Parser Generator</a>, Aug 9, 2007 ) </li> <li>20070809 : <a href="#n20070809X_using_prolog_to_compile_things_comp_compilers_google_groups"> Using Prolog to Compile Things - comp.compilers Google Groups</a> <i></i> ( <a target="_blank" href="https://groups.google.com/group/comp.compilers/browse_thread/thread/2f9d4afffea2f38f/b53e550ca1798814?lnk=st&q=Prolog&rnum=15#b53e550ca1798814"> Using Prolog to Compile Things - comp.compilers Google Groups</a>, ) </li> <li>20070809 : <a href="#n20070809X_informatik_ii_languages_compilers_and_theory_lecture_1_introduction_and_overview"> Informatik II Languages, Compilers, and Theory Lecture 1: Introduction and Overview</a> <i></i> ( <a target="_blank" href="http://user.informatik.uni-goettingen.de/~fu/teaching/Info-II/SS2003/part6a.pdf"> Informatik II Languages, Compilers, and Theory Lecture 1: Introduction and Overview</a>, ) </li> <li>20070809 : <a href="#n20070809X_program_analysis_in_prolog_john_hannan_the_pennsylvania_state"> Program Analysis in Prolog John Hannan The Pennsylvania State ...</a> <i></i> ( <a target="_blank" href="http://www.cse.psu.edu/~hannan/papers/plilp-tutorial.ps.gz"> Program Analysis in Prolog John Hannan The Pennsylvania State ...</a>, ) </li> <li>20070809 : <a href="#n20070809X_prolog3_1new"> Prolog3-1New</a> <i></i> ( <a target="_blank" href="http://www.cs.rutgers.edu/~ryder/515/f05/lectures/Prolog3-1New.pdf"> Prolog3-1New</a>, ) </li> <li>20070809 : <a href="#n20070809X_compiling_little_languages_in_python_aycock_researchindex"> Compiling Little Languages in Python - Aycock (ResearchIndex)</a> <i></i> ( <a target="_blank" href="http://citeseer.ist.psu.edu/aycock98compiling.html"> Compiling Little Languages in Python - Aycock (ResearchIndex)</a>, ) </li> <li>20070809 : <a href="#n20070809X_dave_bodenstabs_home_page">Dave Bodenstabs Home Page</a> <i></i> ( <a target="_blank" href="http://www.bodenstab.org/">Dave Bodenstab's Home Page</a>, ) </li> <li>20050525 : <a href="#n20050525X_prolog_parsers">Prolog Parsers</a> <i></i> ( <a target="_blank" href="http://utenti.lycos.it/parsers/">Prolog Parsers</a>, May 25, 2005 ) </li> <li>20050314 : <a href="#n20050314X_key_open_source_programming_tool_due_for_overhaul_tech_news_on_zdnet"> Key open-source programming tool due for overhaul Tech News on ZDNet</a> <i></i> ( <a target="_blank" href="http://news.zdnet.com/2100-3513_22-5615886.html?tag=nl.e539"> Key open-source programming tool due for overhaul Tech News on ZDNet</a>, Mar 14, 2005 ) </li> <li>20050202 : <a href="#n20050202X_compilers_contents"> Compilers - Contents</a> <i></i> ( <a target="_blank" href="http://www.scifac.ru.ac.za/compilers/conts.htm"> Compilers - Contents</a>, Feb 2, 2005 ) </li> <li>20050120 : <a href="#n20050120X_tacc_single_processor_optimization_on_the_ibm_power4_system"> TACC Single Processor Optimization on the IBM Power4 System</a> <i></i> ( <a target="_blank" href="http://www.tacc.utexas.edu/resources/userguides/power4/optimization/"> TACC Single Processor Optimization on the IBM Power4 System</a>, Jan 20, 2005 ) </li> </ul> <h2 align="center"><a name="News">Old News</a> ;-)</h2> <p>To preserve bandwidth for humans as opposed to robots older News (1999-2003) now are moved in a separate subdirectory. Sorry for any inconvenience. </p> <center> <table border="1" width="100%" bgcolor="#FFFFCC" > <tr> <td align="center">2011</td> <td align="center">2010</td> <td align="center">2009</td> <td align="center">2008</td> <td align="center">2007</td> <td align="center">2006</td> <td align="center">2005</td> <td align="center"><a href="#2004">2004</a></td> <td align="center"><b><i> <a target="_blank" href="Compilers/sp1999-2003.shtml">1999-2003</a></i></b></td> </tr> </table> </center> <center><table border="0" width="100"><tr> <td align="center"><a href="#NEWS_TOC"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20151123X_knuth_recent_news" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20151123X_the_mmix_supplement"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Nov 23, 2015] <a target="_blank" href="http://www-cs-faculty.stanford.edu/~knuth/news.html">Knuth Recent News</a></h4> <h5>So far only MMIX can be ordered in ePub and PDF formats</h5> <blockquote> <p style="text-align: left"><b>Announcing the first Art of Computer Programming eBooks </b></p> <blockquote> <p>For many years I've resisted temptations to put out a hasty electronic version of <a target="_blank" href="http://www-cs-faculty.stanford.edu/~knuth/taocp.html"><cite>The Art of Computer Programming</cite></a>, because the samples sent to me were not well made. </p> <p>But now, working together with experts at <a target="_blank" href="http://msp.org/">Mathematical Sciences Publishers</a>, Addison-Wesley and I have launched an electronic edition that meets the highest standards. We've put special emphasis into making the search feature work well. Thousands of useful "clickable" cross-references are also provided --- from exercises to their answers and back, from the index to the text, from the text to important tables and figures, etc. </p> <p><i>Note: However, I have personally approved <b>ONLY</b> the PDF versions of these books. Beware of glitches in the ePUB and Kindle versions, etc., which cannot be faithful to my intentions because of serious deficiencies in those alternative formats. Indeed, the Kindle edition in particular is a travesty, an insult to Addison-Wesley's proud tradition of quality. </i></p> <p><i><b>Readers of the Kindle edition should not expect the mathematics to make sense!</b> Maybe the ePUB version is just as bad, or worse --- I don't know, and I don't really want to know. If you have been misled into purchasing any part of eTAOCP in an inferior format, please ask the publisher for a replacement. </i></p> <p>The first fascicle can be ordered from <a target="_blank" href="http://www.informit.com/store/art-of-computer-programming-volume-1-fascicle-1-mmix-9780201853926"> Pearson's InformIT website</a>, and so can Volumes 1, 2, 3, and 4A. </p> </blockquote> <p><b>MMIXware </b></p> <blockquote> <p>Hooray: After fifteen years of concentrated work with the help of numerous volunteers, I'm finally able to declare success by releasing Version 1.0 of the software for MMIX. This represents the most difficult set of programs I have ever undertaken to write; I regard it as a major proof-of-concept for literate programming, without which I believe the task would have been too difficult. <p> Version 0.0 was published in 1999 as a tutorial volume of Springer's Lecture Notes in Computer Science, Number 1750. Version 1.0 has now been published as a thoroughly revised printing, available both in hardcopy and as an eBook. I hope readers will enjoy such things as the exposition of a computer's pipeline, which is discussed via analogy to the activites in a high tech automobile repair shop. There also is a complete implementation of IEEE standard floating point arithmetic in terms of operations on 32-point integers, including original routines for floating point input and output that deliver the maximum possible accuracy. The book contains extensive indexes, designed to enhance the experience of readers who wish to exercise and improve their code-reading skills. </p> </blockquote> </blockquote> <blockquote> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20151123X_knuth_recent_news"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20151123X_the_mmix_supplement" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20130107X_on_the_translation_languages_from_left_to_right_knuth_d_e"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>The MMIX Supplement <img alt="" src="http://www-cs-faculty.stanford.edu/~knuth/mmix-supp.jpeg"> </h4> <blockquote> <p>I'm pleased to announce the appearance of an excellent 200-page companion to Volumes 1, 2, and 3, written by Martin Ruckert. It is jam-packed with goodies from which an extraordinary amount can be learned. <em>Martin has not merely transcribed my early programs for</em> <tt> MIX</tt> <em>and recast them in a modern idiom using</em> <tt>MMIX</tt>; <em>he has penetrated to their essence and rendered them anew with elegance and good taste. </em></p> <p><em>His carefully checked code represents a significant contribution to the art of pedagogy as well as to the art of programming. </em></p> </blockquote> </blockquote> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20151123X_the_mmix_supplement"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20130107X_on_the_translation_languages_from_left_to_right_knuth_d_e" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20130107X_wikibook"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Jan 07, 2013] <a target="_blank" href="http://www.cs.dartmouth.edu/~mckeeman/references/LR/index.html">On the translation languages from left to right, Knuth, D.E</a></h4> <blockquote> <p>Scanned version of Knuth, D.E., On the translation of languages from left to right, Information and Control 8, 607-639 (1965) Here are pages 607-616.</p> </blockquote> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20130107X_on_the_translation_languages_from_left_to_right_knuth_d_e"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20130107X_wikibook" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20111204X_comp_compilers_re_need_an_interesting_topic_for_an_undergraduate_project_on_compilers"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Jan 07, 2013] <a target="_blank" href="https://en.wikipedia.org/wiki/Book:Compiler_construction">WikiBook </a> <a target="_blank" href="https://en.wikipedia.org/wiki/Book:Compiler_construction">Compiler construction</a></h4> <h5>This is a Wikipedia book, a collection of Wikipedia articles that can be easily saved, rendered electronically, and ordered as a printed book </h5> <blockquote> <h6><a target="_blank" href="https://en.wikipedia.org/wiki/Book:Compiler_construction"> Wikipedia</a></h6> <dl> <dt><b>Introduction</b></dt> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Compiler_construction">Compiler construction</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Compiler">Compiler</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Interpreter_(computing)">Interpreter</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/History_of_compiler_writing">History of compiler writing</a></dd> <dt><b>Lexical analysis</b></dt> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Lexical_analysis">Lexical analysis</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Regular_expression">Regular expression</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Regular_expression_examples">Regular expression examples</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Finite-state_machine">Finite-state machine</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Preprocessor">Preprocessor</a></dd> <dt><b>Syntactic analysis</b></dt> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Parsing">Parsing</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Lookahead">Lookahead</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Symbol_table">Symbol table</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Abstract_syntax">Abstract syntax</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Abstract_syntax_tree">Abstract syntax tree</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Context-free_grammar">Context-free grammar</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Terminal_and_nonterminal_symbols">Terminal and nonterminal symbols</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Left_recursion">Left recursion</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Backus–Naur_Form">Backus–Naur Form</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Extended_Backus–Naur_Form">Extended Backus–Naur Form</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/TBNF">TBNF</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Top-down_parsing">Top-down parsing</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Recursive_descent_parser">Recursive descent parser</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Tail_recursive_parser">Tail recursive parser</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Parsing_expression_grammar">Parsing expression grammar</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/LL_parser">LL parser</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/LR_parser">LR parser</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Parsing_table">Parsing table</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Simple_LR_parser">Simple LR parser</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Canonical_LR_parser">Canonical LR parser</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/GLR_parser">GLR parser</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/LALR_parser">LALR parser</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Recursive_ascent_parser">Recursive ascent parser</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Parser_combinator">Parser combinator</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Bottom-up_parsing">Bottom-up parsing</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Chomsky_normal_form">Chomsky normal form</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/CYK_algorithm">CYK algorithm</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Simple_precedence_grammar">Simple precedence grammar</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Simple_precedence_parser">Simple precedence parser</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Operator-precedence_grammar">Operator-precedence grammar</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Operator-precedence_parser">Operator-precedence parser</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Shunting-yard_algorithm">Shunting-yard algorithm</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Chart_parser">Chart parser</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Earley_parser">Earley parser</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/The_lexer_hack">The lexer hack</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Scannerless_parsing">Scannerless parsing</a></dd> <dt><b>Semantic analysis</b></dt> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Attribute_grammar">Attribute grammar</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/L-attributed_grammar">L-attributed grammar</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/LR-attributed_grammar">LR-attributed grammar</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/S-attributed_grammar">S-attributed grammar</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/ECLR-attributed_grammar">ECLR-attributed grammar</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Intermediate_language">Intermediate language</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Control_flow_graph">Control flow graph</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Basic_block">Basic block</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Call_graph">Call graph</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Data-flow_analysis">Data-flow analysis</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Use-define_chain">Use-define chain</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Live_variable_analysis">Live variable analysis</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Reaching_definition">Reaching definition</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Three-address_code">Three-address code</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Static_single_assignment_form">Static single assignment form</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Dominator_(graph_theory)">Dominator</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/C3_linearization">C3 linearization</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Intrinsic_function">Intrinsic function</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Aliasing_(computing)">Aliasing</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Alias_analysis">Alias analysis</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Array_access_analysis">Array access analysis</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Pointer_analysis">Pointer analysis</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Escape_analysis">Escape analysis</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Shape_analysis_(program_analysis)">Shape analysis</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Loop_dependence_analysis">Loop dependence analysis</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Program_slicing">Program slicing</a></dd> <dt><b>Code optimization</b></dt> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Compiler_optimization">Compiler optimization</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Peephole_optimization">Peephole optimization</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Copy_propagation">Copy propagation</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Constant_folding">Constant folding</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Sparse_conditional_constant_propagation">Sparse conditional constant propagation</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Common_subexpression_elimination">Common subexpression elimination</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Partial_redundancy_elimination">Partial redundancy elimination</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Global_value_numbering">Global value numbering</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Strength_reduction">Strength reduction</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Bounds-checking_elimination">Bounds-checking elimination</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Inline_expansion">Inline expansion</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Return_value_optimization">Return value optimization</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Dead_code">Dead code</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Dead_code_elimination">Dead code elimination</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Unreachable_code">Unreachable code</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Redundant_code">Redundant code</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Jump_threading">Jump threading</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Superoptimization">Superoptimization</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Loop_optimization">Loop optimization</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Induction_variable">Induction variable</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Loop_fission">Loop fission</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Loop_fusion">Loop fusion</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Loop_inversion">Loop inversion</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Loop_interchange">Loop interchange</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Loop-invariant_code_motion">Loop-invariant code motion</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Loop_nest_optimization">Loop nest optimization</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Manifest_expression">Manifest expression</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Polytope_model">Polytope model</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Loop_unwinding">Loop unwinding</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Loop_splitting">Loop splitting</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Loop_tiling">Loop tiling</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Loop_unswitching">Loop unswitching</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Interprocedural_optimization">Interprocedural optimization</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Whole_program_optimization">Whole program optimization</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Adaptive_optimization">Adaptive optimization</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Lazy_evaluation">Lazy evaluation</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Partial_evaluation">Partial evaluation</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Profile-guided_optimization">Profile-guided optimization</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Automatic_parallelization">Automatic parallelization</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Loop_scheduling">Loop scheduling</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Vectorization_(parallel_computing)">Vectorization</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Superword_Level_Parallelism">Superword Level Parallelism</a></dd> <dt><b>Code generation</b></dt> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Code_generation_(compiler)">Code generation</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Name_mangling">Name mangling</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Register_allocation">Register allocation</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Chaitin's_algorithm">Chaitin's algorithm</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Rematerialization">Rematerialization</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Sethi-Ullman_algorithm">Sethi-Ullman algorithm</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Data_structure_alignment">Data structure alignment</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Instruction_selection">Instruction selection</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Instruction_scheduling">Instruction scheduling</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Software_pipelining">Software pipelining</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Trace_scheduling">Trace scheduling</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Just-in-time_compilation">Just-in-time compilation</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Bytecode">Bytecode</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Dynamic_compilation">Dynamic compilation</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Dynamic_recompilation">Dynamic recompilation</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Object_file">Object file</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Code_segment">Code segment</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Data_segment">Data segment</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/.bss">.bss</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Literal_pool">Literal pool</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Overhead_code">Overhead code</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Link_time">Link time</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Relocation_(computer_science)">Relocation</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Library_(computing)">Library</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Static_build">Static build</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Architecture_Neutral_Distribution_Format"> Architecture Neutral Distribution Format</a></dd> <dt><b>Development techniques</b></dt> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Bootstrapping_(compilers)">Bootstrapping</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Compiler_correctness">Compiler correctness</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Jensen's_Device">Jensen's Device</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Man_or_boy_test">Man or boy test</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Cross_compiler">Cross compiler</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Source-to-source_compiler">Source-to-source compiler</a></dd> <dt><b>Tools</b></dt> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Compiler-compiler">Compiler-compiler</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/PQCC">PQCC</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Compiler_Description_Language">Compiler Description Language</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines"> Comparison of regular expression engines</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Comparison_of_parser_generators">Comparison of parser generators</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Lex_(software)">Lex</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Flex_lexical_analyser">Flex lexical analyser</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Quex">Quex</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Ragel">Ragel</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Yacc">Yacc</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Berkeley_Yacc">Berkeley Yacc</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/ANTLR">ANTLR</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/GNU_bison">GNU bison</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Coco/R">Coco/R</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/GOLD_(parser)">GOLD</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/JavaCC">JavaCC</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/JetPAG">JetPAG</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Lemon_Parser_Generator">Lemon Parser Generator</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/LALR_parser_generator">LALR parser generator</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/ROSE_compiler_framework">ROSE compiler framework</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/SableCC">SableCC</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Scannerless_Boolean_Parser">Scannerless Boolean Parser</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Spirit_Parser_Framework">Spirit Parser Framework</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/S/SL_programming_language">S/SL programming language</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/SYNTAX">SYNTAX</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Syntax_Definition_Formalism">Syntax Definition Formalism</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/TREE-META">TREE-META</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Frameworks_supporting_the_polyhedral_model"> Frameworks supporting the polyhedral model</a></dd> <dt><b>Case studies</b></dt> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/GNU_Compiler_Collection">GNU Compiler Collection</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Java_performance">Java performance</a></dd> <dt><b>Literature</b></dt> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Dragon_Book_(computer_science)">Compilers: Principles, Techniques, and Tools</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/Principles_of_Compiler_Design">Principles of Compiler Design</a></dd> <dd><a target="_blank" href="https://en.wikipedia.org/wiki/The_Design_of_an_Optimizing_Compiler">The Design of an Optimizing Compiler</a></dd> </dl> </blockquote> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20130107X_wikibook"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20111204X_comp_compilers_re_need_an_interesting_topic_for_an_undergraduate_project_on_compilers" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20111204X_roslyn_project_overview"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Dec 04, 2011] <a target="_blank" href="http://compilers.iecc.com/comparch/article/11-09-008">Comp.compilers Re Need an interesting topic for an undergraduate project on Compilers</a></h4> <blockquote> <table cellSpacing="0" cellPadding="0" id="table1"> <tr> <td><b>From: </b></td> <td>Christophe de Dinechin <<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ed8e859f849e99829d8588c38988c3898483888e858483ad8a808c8481c38e8280">[email protected]</a>></td> </tr> <tr> <td><b>Newsgroups: </b></td> <td>comp.compilers</td> </tr> <tr> <td><b>Date: </b></td> <td>Sun, 4 Sep 2011 23:42:48 -0700 (PDT)</td> </tr> <tr> <td><b>Organization: </b></td> <td>Compilers Central</td> </tr> <tr> <td><b>References: </b></td> <td><a target="_blank" href="http://compilers.iecc.com/comparch/article/11-08-006"> 11-08-006</a></td> </tr> <tr> <td><b>Keywords: </b></td> <td>courses</td> </tr> <tr> <td><b>Posted-Date: </b></td> <td>06 Sep 2011 22:12:39 EDT</td> </tr> </table> <p>On Aug 6, 7:28 pm, amit karmakar <<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f594989c81db969a91909b9498dbdbdbb59298949c99db969a98">[email protected]</a>> wrote:<br> <i>> I would like to have some suggestions as to what *new* and</i><br> <i>> *innovative* project i can do which are based on compiler design.</i> <p> <br> Innovation in compilers can happen at a number of levels : <p> <br> 1. Parsing techniques, grammars, etc. Very active research a while<br> back, considered (erroneously methinks) as dead by most today, who<br> happily use flex/bison and don't think twice about it. <p> <br> 2. Language design. One of the active areas these days is "domain<br> specific languages" or DSLs, i.e. languages designed for one specific<br> need. Often using "meta-programming" techniques (programs that<br> generate programs) <p> <br> 3. Type systems, proofs, program validation. Languages like Haskell<br> use type inference, so that you don't have to specify types yourself<br> most of the time. C++ recently gained the "auto" keyword for types.<br> DSLs pose a new class of interesting problems in that space. <p> <br> 4. Intermediate representations, code generation and optimization<br> frameworks. The king of this hill these days IMO is LLVM. But there<br> are a number of contenders. If you are interested in optimizations,<br> that's the right place to look at. <p> <br> 5. Runtime support : garbage collectors, just-in-time code generation,<br> parallel execution, use of new hardware such as GPUs,  <p> <br> 6. Support for innovative hardware, hardware generation, hardware/<br> software co-design, etc. If you are more into silicon, this is a very<br> interesting are to learn about. <p> <p> <br> My own pet project, XLR (<a target="_blank" href="http://xlr.sf.net">http://xlr.sf.net</a>) offers a number of<br> innovations in the first three of these areas. It is a language<br> designed to grow with the user, i.e. the objective is to make it as<br> easy to add language constructs as it is to add, say, functions or<br> classes in other languages. <p> <br> Regarding parsing, it generates a parse tree made of exactly 8 nodes :<br> integer, real, text and name/symbol represent leaves of the tree,<br> infix, prefix, postfix and block represent inner nodes. This makes it<br> possible to write programs in a very natural-looking way, yet with an<br> internal program representation that is easy to manipulate. This is<br> the foundation of XL meta-programming / DSL capabilities. <p> <br> To validate that, XLR has practically no built-in constructs. It has<br> constructs to connect to LLVM primitives, constructs to connect to C<br> code, and a pair of "rewrite" constructs, notably ->, to transform one<br> tree shape into another. For example : <p> <br> extern bool puts(text);<br> (x:integer - y:integer):integer -> opcode Sub <p> <br> repeat 0, B -> true<br> repeat N, B -> B; repeat N-1, B <p> <br> repeat 25,<br> puts "Hello" <p> <br> You can check the code generated for the above with xlr -tcode -O3<br> tests/09.Compiler/optimized-repeat-loop.xl. LLVM actually turns it<br> into a sequence of 25 calls to puts, you can hardly do better. <p> <br> The most active area of research for XLR these days is its type<br> system. In order to generate efficient code, an Haskell-like type<br> inference mechanism is in place. But the standard type inference<br> algorithms must be extended, because there are a few additional<br> transformations compared to lambda calculus (not just "alpha" and<br> "beta"), and the closest there is to a type is the shape of a tree<br> (e.g. "if X then Y else Z"). <p> <br> Since it uses LLVM, it is also an interesting way to learn a little<br> about LLVM, but it's not intended as an LLVM tutorial. <p> <br> So if you are interested in experimenting with "growing a language" in<br> a text-based framework, XLR is the right way to go. There are other<br> projects that are more advanced e.g. if you want to build the IDE at<br> the same time, see for example JetBrain's Meta Programming System. But<br> they are not as strong in language development per-se, I believe.<br> </p> </blockquote> <p> </p> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20111204X_comp_compilers_re_need_an_interesting_topic_for_an_undergraduate_project_on_compilers"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20111204X_roslyn_project_overview" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20111027X_writing_a_programming_language_in_perl"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Dec 04, 2011] <a target="_blank" href="http://msdn.microsoft.com/en-us/hh500769">Roslyn Project Overview</a></h4> <blockquote> <p><a target="_blank" href="http://msdn.microsoft.com/en-us/">Microsoft Developer Network</a></p> <p><strong>October 2011</strong></p> <p>Traditionally, compilers are black boxes -- source code goes in one end, magic happens in the middle, and object files or assemblies come out the other end. As compilers perform their magic, they build up deep understanding of the code they are processing, but that knowledge is unavailable to anyone but the compiler implementation wizards and it is promptly forgotten after the translated output is produced.</p> <p>For decades, this world view has served us well, but it is no longer sufficient. Increasingly we rely on integrated development environment (IDE) features such as IntelliSense, refactoring, intelligent rename, "Find all references," and "Go to definition" to increase our productivity. We rely on code analysis tools to improve our code quality and code generators to aid in application construction. As these tools get smarter, they need access to more and more of the deep code knowledge that only compilers possess. This is the core mission of the Roslyn project: opening up the black boxes and allowing tools and end users to share in the wealth of information compilers have about our code. Instead of being opaque source-code-in and object-code-out translators, through the Roslyn project, compilers become services-APIs that you can use for code related tasks in your tools and applications.</p> <p>The transition to compilers as services dramatically lowers the barrier to entry for creating code focused tools and applications. It creates many opportunities for innovation in areas such as meta-programming, code generation and transformation, interactive use of the C# and VB languages, and embedding of C# and VB in domain specific languages.</p> <p>The Microsoft "Roslyn" CTP previews the new language object models for code generation, analysis, and refactoring, and the upcoming support for scripting and interactive use of C# and Visual Basic. This document is meant to be a conceptual overview of the Roslyn project. Further details can be found in the walkthroughs and samples included in the Roslyn CTP.</p> <p><b>Summary</b></p> <p>Project Roslyn exposes a set of Compiler APIs, Scripting APIs, Workspace APIs, and Services APIs that provides rich information about your source code and that has full fidelity with the C# and Visual Basic languages. The transition to compilers as a service dramatically lowers the barrier to entry for creating code focused tools and applications. It creates many opportunities for innovation in areas such as meta-programming, code generation and transformation, interactive use of the C# and VB languages, and embedding of C# and VB in domain specific languages. </p> </blockquote> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20111204X_roslyn_project_overview"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20111027X_writing_a_programming_language_in_perl" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20101229X_making_c_compiler_generate_obfuscated_code"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Oct 27, 2011] <a target="_blank" href="http://www.perlmonks.org/?node_id=933680">Writing a Programming Language in Perl</a></h4> <blockquote> <h6>Oct 25, 2011</h6> programmer99 has asked for the wisdom of the Perl Monks concerning the following question: <blockquote> Hello. This is my first post, so please forgive me for any mistakes I make.<p> I have been programming for about 16 years now and Perl has always been one of my absolute favorite languages. I have been wondering how I can make a Programming language using Perl, only Perl and nothing but Perl. How would I go about doing this?</p> <p>I have never created a language before. I know the basics of what a compiler is and how it works. But I don't know how to make one. After I make the language (which I don't know how to do) how do I make the language work with the compiler?</p> <p>I truly do not want to read another book, as these can be extremely unhelpful. There really aren't any good tutorials that I can find. Can anyone give me some kind of tutorial or a point in the right direction? Thanks</p> <p><i>P.S.- No mistakes that I can find! I'm good at this :-)</i></p> </blockquote> <b>BrowserUk (Pope) </b> <blockquote> <p>See <a target="_blank" href="http://billhails.net/Book/">Exploring Programming Language Architecture in Perl by Bill Hails.</a> for one of the most complete explorations of doing exactly what the title suggests. </p> <blockquote> With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'<p>Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.</p> "Science is about questioning the status quo. Questioning authority". > <p>In the absence of evidence, opinion is indistinguishable from prejudice.</p> </blockquote> </blockquote> <b>Your Mother (Abbot)</b><blockquote> <p>BUK's suggestion is quite good. IIRC, it's a fun manuscript.</p> <p>I've been meaning to suggest <a target="_blank" href="http://search.cpan.org/perldoc?Marpa">Marpa</a> to you for awhile. While still marked experimental it should be excellent for this kind of thing. I've wanted to play with it myself for a long time but tuits being what they are...</p> <p>Marpa would be used, I'd expect, to convert a language spec/grammar to Perl and then you could use any number of strategies to freeze the resulting code (in memory, file, some other specialized cache) until the original source changed, at which point it could be "recompiled." Doing it this way should afford an easy path for testing and building up a grammar piece by piece. If you don't write tests as you go, you will be sorry down the road. If you do write tests, you'll be able to breeze through wrong turns and accidentally introduced bugs with confidence. </p> </blockquote> <b>programmer99</b><blockquote> Ok, I have a few questions (if you don't mind). What do you mean by grammar? How will Marpa help me? Thanks.</blockquote> <p><b>Your Mother (Abbot)</b></p> <blockquote> <p>As I say, tuits in the round are the issue and without the time to cook up some working example I'd just be glossing the various documentation and BNF/ParseRec stuffage. I think a simple example can be cooked up but it's also not entirely trivial or my forte (hint, hint to others who might have something to show). This is quite interesting and I've been waiting to try some Marpa though. If I can grab an hour tonight I'll revisit this otherwise, the weekend, otherwise... uh, what were we talking about? </p> </blockquote> <b>ikegami</b><blockquote> <p>The grammar of a language defines its syntax. Parsers (e.g. Marpa) take a sequence of bytes, characters or tokens, check if it conforms to the grammar, and assigns meaning to the components of the sequence as per the grammar. </p> <p>For example, the job of the parser is to receive "a+b*c" and return "a multiplication of ( an addition of ( identifier a ) and (identifier b ) ) and ( identifier c )". </p> </blockquote> <b>ikegami</b> <blockquote> <p>Marpa - Parse any Language You Can Describe in BNF</p> <p>Hopefully, it can do a bit more than that, because associativity cannot be described in BNF.</p> </blockquote> <b>davies </b> <blockquote> <p>Have a look at Jonathan Worthington's slides (<a target="_blank" href="http://www.jnthn.net/papers/2011-yapc-russia-compiler.pdf">http://www.jnthn.net/papers/2011-yapc-russia-compiler.pdf</a>). The code is next door on his web site. But as this was a public talk, there may be a recording of it on YAPC.tv. My spies tell me that the talk was outstanding, writing a complete language (well, almost) from next to nothing in under an hour.</p> <p>Regards,</p> <p>John Davies</p> </blockquote> <b>ikegami</b><blockquote> <p>If you're interested in parsing and compiling, consider getting your hands on <a target="_blank" href="https://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools"> Compilers: Principles, Techniques, and Tools</a>. You won't find any Perl in it, though.</p> </blockquote> <b>Corion (Saint)</b><blockquote> <p>In my opinion a very good book is <a target="_blank" href="http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf">Compiler Construction (pdf warning)</a> by Niklaus Wirth. I've only used the German edition from 1986, but it introduces a small language and how to build a parser and compiler for it. It only teaches you the technique of recursive descent. Recursive Descent is a technique that is currently enjoying a comeback because it is easier with it to produce meaningful error messages than it is when using <tt><font size="-1">lex</font></tt> and <tt><font size="-1">yacc</font></tt> or other parsing tools. The German book has 115 pages, the English and more recent edition (from 1996) has 130 pages. This seems to me a good starting point in the sense that little previous knowledge is needed and it gets you a feel for implementing some language with Pascal-like syntax. Actually, in the English PDF, it's an Oberon-like syntax, but that's still close enough.</p> <p>When I first read the book, I skipped over the chapters 1 to 4, as they concern themselves with the theoretical background of the languages that the approach can handle. Looking back over the chapters, I'm not sure whether it was really necessary to skip over them, as they don't seem as dry to me as they did back then. On the other hand, I now have much more experience and also learned the theory of regular languages and context-free languages in university.</p> <p>Browsing through the PDF, I see that it also mentions bottom-up (<tt><font size="-1">yacc</font></tt>-style) parsing and gives a rough outline of it. </p> </blockquote> <b>andal:</b><blockquote> <p>The work of Crenshaw at <a target="_blank" href="http://compilers.iecc.com/crenshaw/"> http://compilers.iecc.com/crenshaw/</a> appears to be simpler. But YMMV.</p> </blockquote> <b>spx2</b><blockquote> There's a lot of theory about "bla grammars bla bla translators bla ... context-free context-dependent bla bla etc".<br> You can just throw that Dragon Book out the window and study the grammar of some small language like Basic or JavaScript's grammar to learn stuff<br> (<a target="_blank" href="http://www.antlr.org/grammar/list">here</a> you can find a lot of grammars to many many languages).<br> This is not rocket science, it's engineering.<br> So I totally agree with you about not wanting to read 9999 books on the subject, you need to build something.<br> I'm not in any way a compiler/language expert but I do feel that you want to get down to business<br> so.. here's <a target="_blank" href="https://metacpan.org/module/Parse::Yapp">Parse::Yapp</a>, here's <a href="ftp://ftp.etsii.ull.es/pub/PROLEN1/theperlreview/theperlreview.pdf"> an article</a> , here's <a href="?node=another article">another article</a> , here's some <a target="_blank" href="http://nereida.deioc.ull.es/~pl/pspdf/otros/YE06-Parsers.pdf">benchmarks and comparisons</a> between different parser generators for Perl, <br> and another <a target="_blank" href="http://inforum.org.pt/INForum2010/papers/compiladores-e-linguagens-de-programacao/Paper083.pdf"> comparison</a> , and <a target="_blank" href="http://perlmeister.com/lme/prod-0605.pdf"> another article</a>. If you have further questions, I'm sure the monastery has lots of monks with knowledge of Parse::Yapp <br> so your questions will receive an answer.<br> Now go write a language and good luck ! </blockquote> <b>hbm (Pilgrim:)</b><blockquote> For ideas, you might look at Brainf*ck, which has a simple grammar of: <tt><>+-[],.</tt> </blockquote> <b>Your Mother</b><blockquote> <p>Speaking of which, this is worth revisiting for anyone interested or that missed it the first time around: <a href="?node_id=480146">Ook interpreter</a>.</p> </blockquote> <b>sundialsvc4</b><blockquote> <p>Creating a programming language from scratch is an interesting exercise. I not only did that, but sold umpteen thousand copies of a system that <strike>used</strike> uses it. <i>(So there...)</i> But I dunno if I would implement the entire language <em>in</em> Perl. If you do it, I'd love to see it.</p> </blockquote> <b>JavaFan</b><blockquote> I'd start by first thinking what your new language should do. Is it going to be a domain specific language? Or a general purpose one? If the latter, what is its strength going to be? Is it going to be procedial? functional? OO? Block based? List based? Something else?<br> Second, make some trade-offs. Do you want to write a simple compiler/interpreter? (That probably means a simple syntax, not many features in your language). Does the compiler have to be run fast? Or do you want to give much power to the user of the language (resulting in a more complex compiler)? <p>Only then I'd worry about the implementation. </p> <p>Oh, and my step 0 would be is to ponder about "if I really haven't a fucking clue on how to do that, is my disdain to read a book justified"? </p> </blockquote> <b>spx2:</b><blockquote> well, just look over Parse::Yapp, that would be your entry point.</blockquote> <b>JavaFan (Abbot) </b> <blockquote> <em>In a way, I have already thought this out. The issue I am having now how to get started with the actual code.</em><p>So, your question really is, <em>I know what I want to do, but I'm not telling you what it is, yet I ask from you how to get started</em>? </p> <p>Is that how you ask for directions in an unknown city as well? You ask <em>I want to go somewhere, in which direction do I go?</em> </p> </blockquote> Anonymous Monk<blockquote> LOL *cough* *cough* aXML *cough* *cough*</blockquote> Anonymous Monk<blockquote> <a target="_blank" href="http://nereida.deioc.ull.es/~pl/eyapsimple/theperlreview.html"> Parsing Strings and Trees with <tt><font size="-1">Parse::Eyapp</font></tt> (An Introduction to Compiler Construction</a> <li> <a target="_blank" href="http://search.cpan.org/dist/HOP-Lexer/lib/HOP/Lexer/Article.pod"> http://search.cpan.org/dist/HOP-Lexer/lib/HOP/Lexer/Article.pod</a> Lexing Without Grammars: When Regular Expressions Suck </li> <li><a target="_blank" href="http://hop.perl.plover.com/Examples/ALL/calculator">http://hop.perl.plover.com/Examples/ALL/calculator</a> </li> <li><a target="_blank" href="http://hop.perl.plover.com/Examples/ALL/regex-parser">http://hop.perl.plover.com/Examples/ALL/regex-parser</a> </li> <li><a target="_blank" href="http://hop.perl.plover.com/linogram/">http://hop.perl.plover.com/linogram/</a> </li> </li> </blockquote> </blockquote> <!--file:///Algorithms/compilers.shtml:Date=2011_1027 --> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20111027X_writing_a_programming_language_in_perl"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20101229X_making_c_compiler_generate_obfuscated_code" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20101229X_compiler_construction"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Dec 29, 2010] <a target="_blank" href="http://compilers.iecc.com/comparch/article/10-12-017">Making C compiler generate obfuscated code</a></h4> <h5>The thread contains a very interesting discussion... </h5> <blockquote> <h6> Dec 07, 2010 | <a target="_blank" href="http://compilers.iecc.com/comparch/article/10-12-017">Comp.compilers</a></h6> <p>About my little attempt to hack Tiny C compiler's codegenerator so it produces obfuscated code:<br> <a target="_blank" href="http://blogs.conus.info/node/58">http://blogs.conus.info/node/58</a></p> <p>Martin Ward <<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="274a4655534e4967404c440948554009524c">[email protected]</a>> :</p> <blockquote> <p>On Thursday 16 Dec 2010 at 15:23, Joshua Cranmer <<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4d1d24292a2822397c750d2a202c2421632e2220">[email protected]</a>> wrote: </p> <p>> I'm not sure what work has been done on deoptimization (perhaps anyone <br> > with the Hex-Rays decompiler could tell us?), but some of the<br> > optimization techniques seem relatively easy to reverse. <br> > > From a purely theoretical standpoint, obfuscation that adds <br> > non-executing code is going to be less difficult to reverse engineer <br> > than obfuscation that does the same thing, just... less obviously. </p> <p>A major theoretical result in this area is the paper "On the (Im)possibility of Obfuscating Programs" by Boaz Barak et al, published in: CRYPTO '01 Proceedings of the 21st Annual International Cryptology Conference on Advances in Cryptology. Boaz Barak gives a non-technical description of the results and their meaning here: </p> <p> <a target="_blank" href="http://www.math.ias.edu/~boaz/Papers/obf_informal.html"> http://www.math.ias.edu/~boaz/Papers/obf_informal.html</a> </p> <p>The FermaT program transformation system can interactively transform code into semantically equivalent forms: including restructuring, simplification, dataflow analysis , SSA construction, slicing and, in simple cases, abstraction to a specification. The FermaT engine and graphical front end runs on Windows and Linux and can be downloaded from here: </p> <p><a target="_blank" href="http://www.gkc.org.uk/fermat.html"> http://www.gkc.org.uk/fermat.html</a> </p> <p>or: </p> <p><a target="_blank" href="http://www.cse.dmu.ac.uk/~mward/fermat.html"> http://www.cse.dmu.ac.uk/~mward/fermat.html</a> </p> <p>FermaT's primary commercial application is migrating assembler to structured and maintainable C and COBOL, so the "deobfuscation" transformations are geared towards removing the "clever tricks" introduced by assembler programmers to save a byte here and a cycle there: or just because they were </p> <p>-- Martin </p> <p>STRL Reader in Software Engineering and Royal Society Industry Fellow <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4825293a3c2126082f232b66273a2f663d23">[email protected]</a> http://www.cse.dmu.ac.uk/~mward/ Erdos number: 4 G.K.Chesterton web site: http://www.cse.dmu.ac.uk/~mward/gkc/ Mirrors: http://www.gkc.org.uk and http://www.gkc.org.uk/gkc </p> </blockquote> </blockquote> <p><br> </p> </blockquote> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20101229X_making_c_compiler_generate_obfuscated_code"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20101229X_compiler_construction" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20101228X_cs_375_compilers_lecture_notes"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Dec 29, 2010] <a target="_blank" href="http://scg.unibe.ch/download/cc/">Compiler construction</a> by Prof. O. Nierstrasz</h4> <h5>Fall Semester 2008</h5> <table> <tr> <td valign="top"> </td> <td><a target="_blank" href="http://scg.unibe.ch/download/cc/01Intro.pdf">01Intro.pdf</a></td> <td align="right">17-Sep-2008 09:49 </td> <td align="right">2.8M</td> </tr> <tr> <td valign="top"> </td> <td><a target="_blank" href="http://scg.unibe.ch/download/cc/02Lexical.pdf">02Lexical.pdf</a></td> <td align="right">17-Sep-2008 16:38 </td> <td align="right">853K</td> </tr> <tr> <td valign="top"> </td> <td><a target="_blank" href="http://scg.unibe.ch/download/cc/03Parsing.pdf">03Parsing.pdf</a></td> <td align="right">01-Oct-2008 09:55 </td> <td align="right">1.7M</td> </tr> <tr> <td valign="top"> </td> <td> <a target="_blank" href="http://scg.unibe.ch/download/cc/04ParsingPractice.pdf"> 04ParsingPractice.pdf</a></td> <td align="right">17-Sep-2008 16:39 </td> <td align="right">757K</td> </tr> <tr> <td valign="top"> </td> <td> <a target="_blank" href="http://scg.unibe.ch/download/cc/05SemanticAnalysis.pdf"> 05SemanticAnalysis.pdf</a></td> <td align="right">20-Oct-2008 14:49 </td> <td align="right">1.2M</td> </tr> <tr> <td valign="top"> </td> <td> <a target="_blank" href="http://scg.unibe.ch/download/cc/06IntermediateRepresentation.pdf"> 06IntermediateRepresentation.pdf</a></td> <td align="right">17-Sep-2008 16:40 </td> <td align="right">456K</td> </tr> <tr> <td valign="top"> </td> <td> <a target="_blank" href="http://scg.unibe.ch/download/cc/07CodeGeneration.pdf">07CodeGeneration.pdf</a></td> <td align="right">28-Oct-2008 20:52 </td> <td align="right">1.1M</td> </tr> <tr> <td valign="top"> </td> <td><a target="_blank" href="http://scg.unibe.ch/download/cc/08IntroSSA.pdf">08IntroSSA.pdf</a></td> <td align="right">09-Dec-2008 14:29 </td> <td align="right">1.0M</td> </tr> <tr> <td valign="top"> </td> <td> <a target="_blank" href="http://scg.unibe.ch/download/cc/09Optimization.pdf">09Optimization.pdf</a></td> <td align="right">09-Dec-2008 14:29 </td> <td align="right">446K</td> </tr> <tr> <td valign="top"> </td> <td><a target="_blank" href="http://scg.unibe.ch/download/cc/10PyPy.pdf">10PyPy.pdf</a></td> <td align="right">19-Nov-2008 10:57 </td> <td align="right">1.0M</td> </tr> <tr> <td valign="top"> </td> <td><a target="_blank" href="http://scg.unibe.ch/download/cc/11PEGs.pdf">11PEGs.pdf</a></td> <td align="right">29-Oct-2008 09:52 </td> <td align="right">472K</td> </tr> <tr> <td valign="top"> </td> <td><a target="_blank" href="http://scg.unibe.ch/download/cc/12DSL.pdf">12DSL.pdf</a></td> <td align="right">02-Dec-2008 22:20 </td> <td align="right">1.5M</td> </tr> <tr> <td valign="top"> </td> <td><a target="_blank" href="http://scg.unibe.ch/download/cc/12DSL.zip">12DSL.zip</a></td> <td align="right">02-Dec-2008 22:26 </td> <td align="right">21M</td> </tr> <tr> <td valign="top"> </td> <td> <a target="_blank" href="http://scg.unibe.ch/download/cc/13ProgramTransformation.pdf"> 13ProgramTransformation.pdf</a></td> <td align="right">26-Nov-2008 12:08 </td> <td align="right">2.3M</td> </tr> <tr> <th colspan="5"> <hr></th> </tr> </table> <address> Apache</address> <p><a target="_blank" href="http://dotnet.jku.at/courses/CC/#download">Compiler Construction</a></p> <ul> <li><a target="_blank" href="http://dotnet.jku.at/courses/CC/slides.aspx">Powerpoint slides</a> (more than 300)<br> </li> <li><a target="_blank" href="http://dotnet.jku.at/courses/CC/project.aspx">Case study</a> (complete compiler for the Z# programming language) </li> </ul> <p> </p> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20101229X_compiler_construction"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20101228X_cs_375_compilers_lecture_notes" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20101228X_writing_a_compiler_in_c_lexical_analysis_all_your_base_are_belong_to_us"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Dec 28, 2010] <a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375contents.html">CS 375 Compilers Lecture Notes</a></h4> <blockquote> <p>Copyright © 2009 by Gordon S. Novak Jr. </p> <p>Permission is granted for individuals to make copies of these notes for personal use, or for instructors to make copies for classroom use. </p> <p><b>Note:</b> Many of these pages use math symbols such as: &forall &exist . Microsoft Internet Explorer will not display the math symbols, but <a target="_blank" href="http://www.mozilla.com">Firefox</a> will. </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375index.html">Index</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs3751.html">1. CS 375, Compilers: Class Notes</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs3752.html">2. </a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs3753.html">3. Course Topics</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs3754.html">4. Pascal Test Program</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs3755.html">5. Introduction</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs3756.html">6. Machine Language</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs3757.html">7. Assembly Language</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs3758.html">8. High-Level Language</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs3759.html">9. Compilers</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37510.html">10. Sequential Phases of a Compiler</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37511.html">11. Data Flow through the Compiler</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37512.html">12. Line Handler</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37513.html">13. Lexical Analyzer</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37514.html">14. Syntactic Analyzer</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37515.html">15. Semantic Analysis</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37516.html">16. Lexical Analysis</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37517.html">17. Character Classes</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37518.html">18. Implementation of Character Classes</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37519.html">19. Hand-written Lexical Analyzer</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37520.html">20. Example Lexical Analyzer</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37521.html">21. Flowchart for Parsing Identifier</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37522.html">22. Lexical Language Design</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37523.html">23. Token Data Structure</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37524.html">24. Example Token Data Structure</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37525.html">25. Number Conversion</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37526.html">26. Simple Number Scanner</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37527.html">27. Lexical Analyzer Output</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37528.html">28. Floating Point Numbers </a></p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37529.html">29. IEEE Floating Point Standard </a></p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37530.html">30. Floating Point Examples </a></p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37531.html">31. Errors</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37532.html">32. Error Messages</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37533.html">33. Formal Syntax</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37534.html">34. Grammar</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37535.html">35. Language Generation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37536.html">36. Parsing</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37537.html">37. Ambiguity</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37538.html">38. Notation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37539.html">39. Phrase Structure Grammar</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37540.html">40. Chomsky Hierarchy</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37541.html">41. Recognizing Automaton</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37542.html">42. Chomsky Language Hierarchy</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37543.html">43. Regular Languages</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37544.html">44. Example Regular Language</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37545.html">45. lex</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37546.html">46. Regular Expressions</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37547.html">47. Lex Specifications</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37548.html">48. Sample lex Specification</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37549.html">49. C for Lex Sample</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37550.html">50. lex.yy.c</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37551.html">51. Comments on Sample lex</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37552.html">52. Translation Section</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37553.html">53. Lex Conventions</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37554.html">54. The Lookahead Operator</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37555.html">55. Auxiliary Procedures</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37556.html">56. Parser Overview</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37557.html">57. Context Free Languages</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37558.html">58. Context Sensitive Languages</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37559.html">59. Derivations</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37560.html">60. Language Generated by a Grammar</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37561.html">61. Ambiguity and Left Recursion</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37562.html">62. Parsing</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37563.html">63. Top-down Parser</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37564.html">64. Bottom-up Parsing</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37565.html">65. Chart Parser</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37566.html">66. Augmented Transition Network Grammars</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37567.html">67. Augmented Transition Networks</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37568.html">68. Context Free Parser</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37569.html">69. Semantics Influences Parsing</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37570.html">70. Arithmetic Expressions</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37571.html">71. Example of Operator Precedence</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37572.html">72. Operator Precedence</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37573.html">73. Operator Precedence Parsing</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37574.html">74. Operator Precedence Parser</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37575.html">75. Examples</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37576.html">76. Stack Handling in C</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37577.html">77. Basic Routines</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37578.html">78. </a></p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37579.html">79. Operator Precedence Parser</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37580.html">80. </a></p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37581.html">81. Additional Considerations</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37582.html">82. Recursive Descent Parser</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37583.html">83. Bottom-up Table-driven (LR) Parsing</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37584.html">84. The LR Parsing Algorithm</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37585.html">85. Shift-Reduce Parser</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37586.html">86. Example Parsing Table</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37587.html">87. A Parse of <tt>id * id + id</tt></a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37588.html">88. Synthesized Translation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37589.html">89. Using yacc</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37590.html">90. y.tab.c</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37591.html">91. Yacc Specifications</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37592.html">92. Example: Desk Calculator</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37593.html">93. Yacc: Pascal Subset</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37594.html">94. Auxiliary C Code </a></p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37595.html">95. Auxiliary C Code ... </a></p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37596.html">96. Example </a></p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37597.html">97. Examples ...</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37598.html">98. Examples ...</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs37599.html">99. Hints for yacc</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375100.html">100. File trivb.tree</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375101.html">101. The Semantic Actions</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375102.html">102. Supporting C Routines</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375103.html">103. Example</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375104.html">104. Comments on the Example</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375105.html">105. Parsing Action Conflicts</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375106.html">106. Resolving Shift/Reduce Conflicts</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375107.html">107. Error Productions</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375108.html">108. Error Handling</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375109.html">109. Parsing Techniques</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375110.html">110. Looping Statements</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375111.html">111. Symbol Table</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375112.html">112. Symbol Table Organization</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375113.html">113. Symbol Table Organizations</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375114.html">114. Binary Tree Symbol Table</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375115.html">115. AVL Trees</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375116.html">116. Hash Table</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375117.html">117. Hash Functions</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375118.html">118. Indexed Buckets</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375119.html">119. Nested Procedures</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375120.html">120. Tree of Symbol Tables</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375121.html">121. Stack Symbol Table</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375122.html">122. Symbol Table Entry</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375123.html">123. Kinds of Symbols</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375124.html">124. Kinds of Symbols ...</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375125.html">125. Looking up ID in Symbol Table</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375126.html">126. Variable Declarations</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375127.html">127. Identifier List etc.</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375128.html">128. Data Addressing</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375129.html">129. Storage Allocation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375130.html">130. Alignment and Padding</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375131.html">131. Installing Variables in Symbol Table</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375132.html">132. Record Declarations</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375133.html">133. Symbol Table Structures for Record</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375134.html">134. Array Declarations</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375135.html">135. Symbol Table Structures for Array</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375136.html">136. Type Checking, Coercion, and Inference</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375137.html">137. Structure References</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375138.html">138. Structure References....</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375139.html">139. Record References</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375140.html">140. Array References</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375141.html">141. Array References in Pascal</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375142.html">142. Does Array Order Matter?</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375143.html">143. Example of Structure Declaration</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375144.html">144. Example of Structure Reference</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375145.html">145. Pointer Reference</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375146.html">146. Types as Tree Structures</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375147.html">147. Dynamic Type Checking</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375148.html">148. Static Type Checking</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375149.html">149. Strong Typing</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375150.html">150. Type Equivalence</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375151.html">151. Type Signatures</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375152.html">152. Polymorphic Procedures</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375153.html">153. Table for Labels</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375154.html">154. Intermediate Code</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375155.html">155. Quadruples</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375156.html">156. Triples</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375157.html">157. Reverse Polish Notation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375158.html">158. Trees and Reverse Polish</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375159.html">159. Converting a Tree to RPN</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375160.html">160. Executing Reverse Polish</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375161.html">161. Executing RPN</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375162.html">162. RPN as Intermediate Code</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375163.html">163. Code Generation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375164.html">164. Loading Process</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375165.html">165. Absolute File</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375166.html">166. Initializing BSS Storage</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375167.html">167. Banked Memory</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375168.html">168. Location Counter</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375169.html">169. Example of Assembly Listing</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375170.html">170. Backpatching</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375171.html">171. Link Editing Process</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375172.html">172. Relocatable Code</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375173.html">173. Finding Relocatable Modules</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375174.html">174. Assigning Absolute Addresses</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375175.html">175. Absolute Addresses</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375176.html">176. Link Editor</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375177.html">177. Form of Relocatable Code</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375178.html">178. Static Allocation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375179.html">179. Dynamically Linked Library</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375180.html">180. Run-Time Support</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375181.html">181. Operations by Subroutine</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375182.html">182. Special Subroutines</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375183.html">183. Memory Management</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375184.html">184. Returning Memory</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375185.html">185. Heap Memory Management</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375186.html">186. Garbage Collection</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375187.html">187. Garbage Collection</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375188.html">188. Mark-And-Sweep Garbage Collection</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375189.html">189. Mark-and-Sweep ...</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375190.html">190. Copying Garbage Collection</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375191.html">191. Reference Counting</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375192.html">192. Reference Counting...</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375193.html">193. Garbage Collection Is Expensive</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375194.html">194. Compiled Procedure</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375195.html">195. Subroutine Call Is Expensive</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375196.html">196. Activations and Control Stack</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375197.html">197. Environment</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375198.html">198. Run-time Memory Organization</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375199.html">199. PowerPC Stack Frame Layout</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375200.html">200. SPARC Stack Frame Layout</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375201.html">201. SPARC Stack Frame Layout...</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375202.html">202. Global Variable References</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375203.html">203. Global Variables in Algol, Pascal, PL/I</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375204.html">204. Block-structured Symbol Table</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375205.html">205. Run-time Stack for Algol</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375206.html">206. Code Generation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375207.html">207. Code Generation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375208.html">208. Code Generation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375209.html">209. Running Generated Code</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375210.html">210. Code Generation for Statements</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375211.html">211. Arithmetic Expressions</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375212.html">212. Basic Expression Algorithm</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375213.html">213. Trace of Expression Algorithm</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375214.html">214. Arithmetic Expression Algorithm</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375215.html">215. Register Management</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375216.html">216. Simple Register Allocation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375217.html">217. Heuristic for Expressions</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375218.html">218. Improving Register Allocation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375219.html">219. Register Allocation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375220.html">220. Example of Code Generation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375221.html">221. Example (2)</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375222.html">222. Example (3)</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375223.html">223. Example (4)</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375224.html">224. Reusing Register Contents</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375225.html">225. Register Targeting</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375226.html">226. SPARC Processor</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375227.html">227. Load/Store Instructions</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375228.html">228. Load/Store with Calculated Address</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375229.html">229. Literals</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375230.html">230. Integer Arithmetic Instructions</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375231.html">231. Compare and Branch</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375232.html">232. Floating Point</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375233.html">233. Intrinsic Functions</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375234.html">234. Function Calls</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375235.html">235. Volatile Registers</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375236.html">236. Details of Function Call</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375237.html">237. IF Statement Generation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375238.html">238. IF Statement Optimization</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375239.html">239. Array References</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375240.html">240. Easy Array References</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375241.html">241. Better Array References</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375242.html">242. Pointer References</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375243.html">243. switch Statement</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375244.html">244. switch Statement Compiled</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375245.html">245. switch Statement Compiled -O</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375246.html">246. Table Lookup</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375247.html">247. Table Lookup Compiled</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375248.html">248. Table Lookup Compiled -O</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375249.html">249. Parameter Passing</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375250.html">250. Macros</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375251.html">251. In-line Compilation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375252.html">252. Optimization</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375253.html">253. Correctness of Optimization</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375254.html">254. Optional Optimization</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375255.html">255. Local and Global Optimization</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375256.html">256. Easy Optimization Techniques</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375257.html">257. Constant Folding</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375258.html">258. Peephole Optimization</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375259.html">259. Loop Unrolling</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375260.html">260. Partial Evaluation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375261.html">261. Partial Evaluation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375262.html">262. Example</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375263.html">263. Simple Partial Evaluator</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375264.html">264. Simple Partial Evaluator...</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375265.html">265. Examples</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375266.html">266. Examples</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375267.html">267. Binding-Time Analysis</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375268.html">268. Futamura Projections</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375269.html">269. Interpreter</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375270.html">270. Specialization</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375271.html">271. Parameterized Programs</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375272.html">272. Pitfalls of Partial Evaluation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375273.html">273. Pitfalls ...</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375274.html">274. Program Analysis</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375275.html">275. Basic Block</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375276.html">276. Finding Basic Blocks</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375277.html">277. Relations and Graphs</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375278.html">278. Graph Notations</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375279.html">279. Bit Vector Representations</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375280.html">280. Boolean Matrix Representation of Graph</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375281.html">281. Dominators</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375282.html">282. Intervals</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375283.html">283. Definition and Reference of Variables</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375284.html">284. Data Flow Analysis for a Block</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375285.html">285. Availability of Expressions</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375286.html">286. Data Flow Analysis for an Interval</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375287.html">287. Busy Variables</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375288.html">288. Variable Uses and Register Assignment</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375289.html">289. Register Allocation by Graph Coloring</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375290.html">290. Overview of Global Optimization</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375291.html">291. gcc Compiler Optimization Options</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375292.html">292. gcc Optimizations</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375293.html">293. Loop Transformations</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375294.html">294. Strip Mining</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375295.html">295. Induction Variable Transformation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375296.html">296. Finite Differencing</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375297.html">297. Example: Computing Squares</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375298.html">298. General Case</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375299.html">299. Finite Differencing for Set Operations</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375300.html">300. Memoization</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375301.html">301. Hardware Assistance</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375302.html">302. PowerPC Features</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375303.html">303. SPARC Features</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375304.html">304. Hardware Trends</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375305.html">305. Object-oriented Programming</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375306.html">306. Access to Objects</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375307.html">307. Domain Analysis</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375308.html">308. Internal Implementation is Hidden</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375309.html">309. Encapsulation with OOP</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375310.html">310. Object-oriented Programming Terminology</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375311.html">311. Terminology ...</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375312.html">312. Implementation of Objects</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375313.html">313. Are Basic Types Objects?</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375314.html">314. Inheritance and Class Structure</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375315.html">315. Message Sending</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375316.html">316. Dynamic Method Lookup</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375317.html">317. Static Method Lookup</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375318.html">318. Multiple Inheritance</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375319.html">319. Improving OOP Efficiency</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375320.html">320. Smalltalk</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375321.html">321. Smalltalk Code</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375322.html">322. ThingLab</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375323.html">323. ThingLab Examples</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375324.html">324. Good Features of OOP</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375325.html">325. Unfortunate Features of OOP</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375326.html">326. Why OOP Is Not Enough</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375327.html">327. Top Ten Lies About OOP</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375328.html">328. Aspect-Oriented Programming</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375329.html">329. Lisp</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375330.html">330. History of Lisp</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375331.html">331. Advantages of Lisp</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375332.html">332. Lisp Interaction</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375333.html">333. Function Definition</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375334.html">334. List Structure</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375335.html">335. Abstract Syntax Tree</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375336.html">336. Binding Lists</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375337.html">337. Substitution</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375338.html">338. Copying and Substitution Functions</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375339.html">339. Substitution in C</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375340.html">340. Loop Unrolling</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375341.html">341. Instantiating Design Patterns</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375342.html">342. Pattern Matching</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375343.html">343. Pattern Matching</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375344.html">344. Transformation by Patterns</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375345.html">345. Transformation Patterns</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375346.html">346. Program Transformation using Lisp</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375347.html">347. Dot Matching</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375348.html">348. Looping Patterns</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375349.html">349. Code Expansion by Looping Patterns</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375350.html">350. More Complex Rules</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375351.html">351. Multi-Level Patterns</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375352.html">352. Use of Multi-Level Patterns</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375353.html">353. Function Inlining</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375354.html">354. Program Transformation</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375355.html">355. Pattern Optimization Examples</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375356.html">356. Examples ...</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375357.html">357. Examples ...</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375358.html">358. Examples ...</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375359.html">359. Paul Graham:</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375360.html">360. English</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375361.html">361. Expression Trees to English </a></p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375362.html">362. Generating English</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375363.html">363. Parsing English</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375364.html">364. ATN in Lisp </a></p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375365.html">365. Parsing Functions</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375366.html">366. Grammar Compiler </a></p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375367.html">367. Access to Database</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375368.html">368. Restaurant Database Grammar</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375369.html">369. Restaurant Queries</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375370.html">370. Physics Problems</a> </p> <p><a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375371.html">371. Physics Queries</a></p> </blockquote> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20101228X_cs_375_compilers_lecture_notes"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20101228X_writing_a_compiler_in_c_lexical_analysis_all_your_base_are_belong_to_us" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20101227X_writing_your_own_toy_compiler_using_flex_bison_and_llvm_gnuu_org"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4> <a target="_blank" href="http://blogs.microsoft.co.il/blogs/sasha/archive/2010/10/06/writing-a-compiler-in-c-lexical-analysis.aspx"> Writing a Compiler in C# Lexical Analysis - All Your Base Are Belong To Us</a></h4> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20101228X_writing_a_compiler_in_c_lexical_analysis_all_your_base_are_belong_to_us"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20101227X_writing_your_own_toy_compiler_using_flex_bison_and_llvm_gnuu_org" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20101227X_lets_build_a_compiler"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Dec 27, 2010] <a target="_blank" href="http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/">Writing Your Own Toy Compiler Using Flex, Bison and LLVM (gnuu.org)</a></h4> <ol> <li>Introduction</li> <li><a target="_blank" href="http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/2/">Getting Started</a></li> <li><a target="_blank" href="http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/3/">Step1. Lexical Analysis with Flex</a></li> <li><a target="_blank" href="http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/4/">Step 2. Semantic Parsing with Bison</a></li> <li><a target="_blank" href="http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/5/">Generating Flex and Bison Code</a></li> <li><a target="_blank" href="http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/6/">Step 3. Assembling the AST with LLVM</a></li> <li><a target="_blank" href="http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/7/">Building and Running Our Toy Language</a></li> <li><a target="_blank" href="http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/8/">Conclusion</a></li> <li> <a target="_blank" href="http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/all/1">View All</a></li> </ol> <p> </p> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20101227X_writing_your_own_toy_compiler_using_flex_bison_and_llvm_gnuu_org"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20101227X_lets_build_a_compiler" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20090406X_lepl_2_3"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Dec 27, 2010] <a target="_blank" href="http://compilers.iecc.com/crenshaw/">Let's Build a Compiler</a></h4> <blockquote> <p><b>Read the tutorial on-line</b></p> <ul> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor1.txt">Part 1: INTRODUCTION</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor2.txt">Part 2: EXPRESSION PARSING</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor3.txt">Part 3: MORE EXPRESSIONS</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor4.txt">Part 4 INTERPRETERS</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor5.txt">Part 5: CONTROL CONSTRUCTS</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor6.txt">Part 6: BOOLEAN EXPRESSIONS</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor7.txt">Part 7: LEXICAL SCANNING</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor8.txt">Part 8: A LITTLE PHILOSOPHY</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor9.txt">Part 9: A TOP VIEW</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor10.txt">Part 10: INTRODUCING "TINY"</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor11.txt">Part 11: LEXICAL SCAN REVISITED</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor12.txt">Part 12: MISCELLANY</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor13.txt">Part 13: PROCEDURES</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor14.txt">Part 14: TYPES</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor15.txt">Part 15: BACK TO THE FUTURE</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor16.txt">Part 16: UNIT CONSTRUCTION </a></li> </ul> <p><b>Download the tutorial</b></p> It's available in two formats, plain text, and with printer control characters so it will print reasonably on an Epson printer. <ul> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/crenshaw-txt.zip">ZIP file of plain text files (212K)</a> </li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/crenshaw-dostxt.zip"> ZIP file of DOS text files (214K)</a> </li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/crenshaw-doc.zip">ZIP file of plain formatted files (193K)</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/tutorfinal.pdf"> PDF of plain formatted files (581K)</a> </li> </ul> </blockquote> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20101227X_lets_build_a_compiler"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20090406X_lepl_2_3" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20080221X_project_details_for_bare_bones_interpreter"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Apr 6, 2009] <a title="LEPL 2.3" href="http://freshmeat.net/projects/lepl">LEPL 2.3</a> </h4> <blockquote> <p>LEPL is a recursive descent parser library written in Python. It is based on parser combinator libraries popular in functional programming, but also exploits Python language features. Operators provide... a friendly syntax, and the consistent use of generators supports full backtracking and resource management. Backtracking implies that a wide variety of grammars are supported; appropriate memoisation ensures that even left-recursive grammars terminate </p> <p> <a target="_blank" href="http://freshmeat.net/?page=2#"> more</a></p> </blockquote> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20090406X_lepl_2_3"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20080221X_project_details_for_bare_bones_interpreter" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20080122X_freshmeat_net_project_details_for_tinyap"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Feb 21, 2008] <a target="_blank" href="http://freshmeat.net/projects/barebones/?branch_id=73315&release_id=272236"> Project details for Bare Bones interpreter</a></h4> <blockquote> <a target="_blank" href="http://freshmeat.net/projects/barebones/?branch_id=73315&release_id=272236"> freshmeat.net</a><p>BareBones is an interpreter for the "Bare Bones" programming language defined in Chapter 11 of "Computer Science: An Overview", 9th Edition, by J. Glenn Brookshear. </p> <p><b>Release focus:</b> Minor feature enhancements </p> <p><b>Changes:</b><br> Identifiers were made case-insensitive. A summary of the language was added to the README file. </p> <p><b>Author:</b><br> Eric Smith <a href="/cdn-cgi/l/email-protection#93f6e1faf0b6a1a3bbf2e7bab6a1a3f1e1fce6fbf2fbf2b6a1a3bbf7fce7bab6a1a3f0fcfe"> [contact developer]</a> </p> </blockquote> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20080221X_project_details_for_bare_bones_interpreter"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20080122X_freshmeat_net_project_details_for_tinyap" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20071211X_complier"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Jan 22, 2008] <a target="_blank" href="http://freshmeat.net/projects/tinyap/?branch_id=73067&release_id=270270"> freshmeat.net Project details for tinyap</a></h4> <blockquote> <p>tinyap is a recursive descent parser with backup that outputs an abstract syntax tree (AST). Unlike in most parsers, the grammar is data. Tinyap uses an AST that represents a grammar to parse its input text. The factory default for the grammar is tinyap's grammar description language itself, so one can parse a grammar description and directly use the parse output to parse some other text written in the described language. Tinyap also features a plugin mechanism for grammars, which allows for dynamic modular grammars. Finally, it provides an interface to walk down the ASTs and to write external plugins to visit the nodes. </p> <p><b>Release focus:</b> Initial freshmeat announcement </p> </blockquote> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20080122X_freshmeat_net_project_details_for_tinyap"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20071211X_complier" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20070809X_freshmeat_net_project_details_for_parsing_py_parser_generator"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Dec 11, 2007] <a target="_blank" href="http://www.iturls.com/English/SoftwareEngineering/SE_Complier.asp"> Complier</a></h4> <h5>A very extensive collection of links</h5> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20071211X_complier"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20070809X_freshmeat_net_project_details_for_parsing_py_parser_generator" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20070809X_using_prolog_to_compile_things_comp_compilers_google_groups"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Aug 9, 2007] <a target="_blank" href="http://freshmeat.net/projects/parsing/?branch_id=70757&release_id=259415"> freshmeat.net Project details for Parsing.py Parser Generator</a></h4> <blockquote> The Parsing module is a pure-Python module that implements an LR(1) parser generator, as well as CFSM and GLR parser drivers. From an algorithmic perspective, this is one of the most advanced parser generators in existence. <p><b>Release focus:</b> Initial freshmeat announcement </p> <p><b>Changes:</b><br> Python 2.4 is now supported, in addition to Python 2.5. </p> <p><b>Author:</b><br> Jason Evans <a href="/cdn-cgi/l/email-protection#e68c8795898883c3d4d6b9b98792b9b9c3d4d6858788898891879483c3d4d6b9b9828992b9b9c3d4d685898b"> [contact developer]</a> </p> </blockquote> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20070809X_freshmeat_net_project_details_for_parsing_py_parser_generator"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20070809X_using_prolog_to_compile_things_comp_compilers_google_groups" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20070809X_informatik_ii_languages_compilers_and_theory_lecture_1_introduction_and_overview"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4> <a target="_blank" href="https://groups.google.com/group/comp.compilers/browse_thread/thread/2f9d4afffea2f38f/b53e550ca1798814?lnk=st&q=Prolog&rnum=15#b53e550ca1798814"> Using Prolog to Compile Things - comp.compilers Google Groups</a></h4> <blockquote> Newsgroups: <b>comp.compilers</b> From: <b>f<a target="_blank" href="https://groups.google.com/groups/unlock?msg=b53e550ca1798814&_done=/group/comp.compilers/browse_thread/thread/2f9d4afffea2f38f/b53e550ca1798814%3Flnk%3Dst%26q%3DProlog%26rnum%3D15">...</a>@cs.mu.OZ.AU (Fergus Henderson)</b></div> Date: <b>1999/05/21</b></div> Subject: <b>Re: Using Prolog to Compile Things</b></div> <a target="_blank" href="https://groups.google.com/group/comp.compilers/post?inreplyto=b53e550ca1798814&reply_to=author&_done=%2Fgroup%2Fcomp.compilers%2Fbrowse_thread%2Fthread%2F2f9d4afffea2f38f%2Fb53e550ca1798814%3Flnk%3Dst%26q%3DProlog%26rnum%3D15%26&"> Reply to author</a> | <a target="_blank" href="https://groups.google.com/group/comp.compilers/post?inreplyto=b53e550ca1798814&forward=1&_done=%2Fgroup%2Fcomp.compilers%2Fbrowse_thread%2Fthread%2F2f9d4afffea2f38f%2Fb53e550ca1798814%3Flnk%3Dst%26q%3DProlog%26rnum%3D15%26&"> Forward</a> | <a target="_blank" href="https://groups.google.com/group/comp.compilers/msg/b53e550ca1798814?dmode=print"> Print</a> | <a target="_blank" href="https://groups.google.com/group/comp.compilers/msg/b53e550ca1798814"> Individual message</a> | <a target="_blank" href="https://groups.google.com/group/comp.compilers/msg/b53e550ca1798814?dmode=source"> Show original</a> | <a target="_blank" href="https://groups.google.com/groups/abuse?group=comp.compilers&type=message&url=http%3A%2F%2Fgroups.google.com%2Fgroup%2Fcomp.compilers%2Fmsg%2Fb53e550ca1798814&_done=%2Fgroup%2Fcomp.compilers%2Fbrowse_thread%2Fthread%2F2f9d4afffea2f38f%2Fb53e550ca1798814%3Flnk%3Dst%26q%3DProlog%26rnum%3D15%26&"> Report this message</a> | <a target="_blank" href="https://groups.google.com/groups/search?enc_author=Mt_PkQ8AAAARq02jhadOTlU53-9ftQxG&scoring=d"> Find messages by this author</a> <p>Nick Roberts <nickrobe<a target="_blank" href="https://groups.google.com/groups/unlock?msg=b53e550ca1798814&_done=/group/comp.compilers/browse_thread/thread/2f9d4afffea2f38f/b53e550ca1798814%3Flnk%3Dst%26q%3DProlog%26rnum%3D15">...</a>@callnetuk.com> writes: <br> >Has anyone on this ng experience or knowledge of the use of Prolog</b> to <br> >implement a native-code compiler for a typical high-level imperative <br> >language? I am toying with the idea of using Prolog</b> for the lexer, the <br> >parser, the intermediate (library) code generator, and the end-code <br> >generator (and even, in effect, for linking!), i.e. the 'whole shebang'. <br> </div> I have written a couple of compilers in Prolog</b>. In many ways, Prolog</b> <br> is an excellent language for writing compilers, but it does have some <br> important disadvantages. </p> <p>Much of the task of compilation is manipulating trees of various <br> kinds, and this is a task which Prolog</b> and other logic or functional <br> languages do very well. </p> <p>Another advantage of Prolog</b> is the use of unbound variables and <br> partially instantiated data structures. Often during code generation <br> you may want to make several passes over some data structure (e.g. the <br> parse tree), filling in the values of different attributes with each <br> pass. In Prolog</b> you can leave uninitialized attributes as unbound <br> variables, and have each pass bind the appropriate variables. This <br> contrasts with some languages such as ML or Mercury where you would <br> normally initialize the attributes with dummy values and then each <br> pass would make a copy of the parse tree in order to set the new <br> attributes. </p> <p>Prolog</b> does have some significant disadvantages. One is that Prolog</b> <br> is often quite inefficient. For example, it's very difficult to get a <br> lexer written in Prolog</b> to run fast. </p> <p>Another disadvantage is that Prolog</b> doesn't have records with named <br> fields. If you want access fields by name, then you need to write a <br> bunch of named access predicates, which is quite tedious. (Existing <br> Prolog</b> implementations generally don't do inlining, so using named <br> access predicates also exacerbates the efficiency problems.) </p> <p>Another disadvantage, probably more important than the previous two, <br> is that Prolog</b> has very little in the way of static checking. This <br> works OK for small projects, but makes things very difficult when <br> writing large systems. If you plan to write 5000 lines of code or <br> more, then I would very strongly recommend using a language with <br> static type checking and a proper module system (some Prolog</b> systems <br> do have module systems, but they are not standardized and vary <br> significantly between different Prolog</b> systems). And Prolog's</b> support <br> for unbound variables and nondeterminism, although useful, can also <br> cause a lot of problems if you accidentally forget to initialize a <br> variable or if you accidentally introduce nondeterminism. Other logic <br> programming languages such as Mercury and Visual Prolog</b> (which, <br> despite the name, is quite different from Prolog</b>) do a lot better <br> here. </p> <p>If you do use Prolog</b>, then I strongly recommend that you document the <br> types, modes, and determinism of the predicates in your program very <br> carefully. This is especially important if you ever want anyone other <br> than yourself to maintain the program. But compilers are usually not <br> small projects, so I think you would probably be better off choosing a <br> language which has more support for static checking, such as Mercury. </p> <p>Of course, I'm one of the developers of Mercury, so my opinion in that <br> respect is no doubt biased ;-). But Mercury was developed with my <br> experience of implementing compilers in Prolog</b> in mind, and so it was <br> designed to address many of Prolog's</b> faults in that area. The Mercury <br> compiler is written in Mercury, so it has certainly been stress-tested <br> in that area. </p> > I'm particularly interested in the idea of using Prolog's</b> natural <br> > searching abilities to search for truly optimal code. <br> </div> I think this is a mirage. It's pretty easy to express searching <br> algorithms in any language. But finding _feasible_ algorithms to <br> produce "truly optimal code" is going to be difficult in any language. <br> Prolog's</b> searching abilities won't really help much here. <br> -- <br> Fergus Henderson <f<a target="_blank" href="https://groups.google.com/groups/unlock?msg=b53e550ca1798814&_done=/group/comp.compilers/browse_thread/thread/2f9d4afffea2f38f/b53e550ca1798814%3Flnk%3Dst%26q%3DProlog%26rnum%3D15">...</a>@cs.mu.oz.au> <br> WWW: <<a target="_blank" href="http://www.cs.mu.oz.au/~fjh">http://www.cs.mu.oz.au/~fjh</a>> <br> PGP: finger f<a target="_blank" href="https://groups.google.com/groups/unlock?msg=b53e550ca1798814&_done=/group/comp.compilers/browse_thread/thread/2f9d4afffea2f38f/b53e550ca1798814%3Flnk%3Dst%26q%3DProlog%26rnum%3D15">...</a>@128.250.37.3 <p> [It's my impression that in too many cases the only way to find perfectly <br> optimal code would be to enumerate and check an impractically large set <br> of possibilities. -John] </blockquote> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20070809X_using_prolog_to_compile_things_comp_compilers_google_groups"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20070809X_informatik_ii_languages_compilers_and_theory_lecture_1_introduction_and_overview" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20070809X_program_analysis_in_prolog_john_hannan_the_pennsylvania_state"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4> <a target="_blank" href="http://user.informatik.uni-goettingen.de/~fu/teaching/Info-II/SS2003/part6a.pdf"> Informatik II Languages, Compilers, and Theory Lecture 1: Introduction and Overview</a> </h4> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20070809X_informatik_ii_languages_compilers_and_theory_lecture_1_introduction_and_overview"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20070809X_program_analysis_in_prolog_john_hannan_the_pennsylvania_state" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20070809X_prolog3_1new"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[PS] <a target="_blank" href="http://www.cse.psu.edu/~hannan/papers/plilp-tutorial.ps.gz"> Program Analysis in Prolog John Hannan The Pennsylvania State ...</a> </h4> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20070809X_program_analysis_in_prolog_john_hannan_the_pennsylvania_state"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20070809X_prolog3_1new" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20070809X_compiling_little_languages_in_python_aycock_researchindex"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4> <a target="_blank" href="http://www.cs.rutgers.edu/~ryder/515/f05/lectures/Prolog3-1New.pdf"> Prolog3-1New</a></h4> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20070809X_prolog3_1new"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20070809X_compiling_little_languages_in_python_aycock_researchindex" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20070809X_dave_bodenstabs_home_page"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4 align="left"> <a target="_blank" href="http://citeseer.ist.psu.edu/aycock98compiling.html"> Compiling Little Languages in Python - Aycock (ResearchIndex)</a></h4> <blockquote> <p align="left"><font face="Arial"><b> <font size="2">Abstract:</font></b><font size="2"> "Little languages" such as configuration files or HTML documents are commonplace in computing. This paper divides the work of implementing a little language into four parts, and presents a framework which can be used to easily conquer the implementation of each. The pieces of the framework have the unusual property that they may be extended through normal object-oriented means, allowing features to be added to a little language simply by subclassing parts of its compiler.</font></font></p> </blockquote> <p align="left"><b> <a target="_blank" href="http://citeseer.ist.psu.edu/bacon93compiler.html"> Compiler Transformations for High-Performance Computing </a></b>DAVID F. BACON SUSAN L. GRAHAM, AND OLIVER J. SHARP</p> <p align="left"> <a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node7.html"> 1.2 A Brief History of SETL</a> Information about SETL compiler project</p> <blockquote> <p><font size="2" face="Arial">This perspective, as hinted in the first quotation above, sprang from the strong perception in the late 1960s that there was a need for a set-oriented language capable of expressing concisely the kind of set-intensive algorithm that kept arising in studies of compiler optimization, such as those by Allen, Cocke, Kennedy, and Schwartz [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Allen69">5</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#CockeMiller69">43</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Allen70">6</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Cocke70">41</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Allen71">7</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#AllenCocke71">10</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Kennedy71">130</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#AllenCocke72">11</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Allen74a">8</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Allen74b">9</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Kennedy75">131</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Schwartz75a">178</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Schwartz75b">179</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Schwartz75c">180</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#AllenCocke76">12</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Kennedy76">132</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#CockeKennedy77">42</a>]. <i>Programming Languages and their Compilers</i> [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#CockeSchwartz70">44</a>], published early in 1970, devoted more than 200 pages to optimization algorithms. It included many of the now familiar techniques such as redundant code elimination and strength reduction, dealt extensively with graphs of control flow and their partitioning into ``intervals'', and showed how to split nodes in an irreducible flow graph to obtain a reducible one. Many workers in the 1970s and 80s besides those just mentioned identified SETL, directly or indirectly, as a language whose implementation was greatly in need of solutions to difficult compiler optimization problems [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Earley75">80</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#FongKamUllman75">84</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#FongUllman76">85</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#LowRovner76">143</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Fong77">82</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#FongUllman77">86</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#KaplanUllman78">123</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Fong79">83</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#MorelRenvoise79">148</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#MuchnickJones81">149</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#SSS81">174</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Weiss85">208</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#AhoSethiUllman86">3</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#WeissSchonberg86">209</a>]. SETL, while still far from the celestial sphere of pure mathematics, was nonetheless seen as occupying a very high orbit relative to other languages. <font color="#FF0000"><i><b>It was SETL's distance from pure machines that made optimizing its implementations so important and at the same time so difficult. </b></i></font></font></p> <p><font face="Arial" size="2">The synergy between the study of code optimization and the high-level set language used for expressing optimization algorithms led to the SETL compiler project [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#SETLNewsletters">186</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Schwartz75">177</a>], which was itself an abundant source of optimization problems. The SETL project produced, among other things, the SETL optimizer [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Schwartz75a">178</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#FSS83">88</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#DFSS89">77</a>], a 24,000-line prototype written in SETL. Unfortunately, on the machines of the day, it was too large to apply to itself. This was a pity because not only is SETL a language which could benefit greatly from a good optimizer, it is also one whose semantic simplicity makes it particularly amenable to the flow-tracing techniques of machine-independent code optimization. The absence of pointers alone circumvents the issue of aliasing, a huge advantage in this kind of analysis. </font></p> <p><font face="Arial" size="2">The sort of data flow (definition-use) information obtainable from analysis of control flow graphs, and more generally from Schwartz's ``value flow'' tracing [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Schwartz75">177</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Schwartz75a">178</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Low76">144</a>] that could follow objects when they were stored in aggregates and later extracted, was useful in all sorts of ways. It sustained copy optimization [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Schwartz70">175</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Schwartz75a">178</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Schwartz75b">179</a>], where the redundant copying of an object could be suppressed when the only subsequent use of the object also modified it, perhaps incrementally. Value flow analysis provided a dependency framework wherein the types of many variables and expressions could be deduced by a transitive closure process starting from the manifest types of literals and other forms [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Tenenbaum74">196</a>]. This typefinding process in turn enabled the discovery of relationships of set membership and inclusion [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Schwartz75c">180</a>], which was itself a prelude to automatic data structure choice, because the way an object is used has a profound influence on how it should be implemented. Weiss and Schonberg [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Weiss85">208</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#WeissSchonberg86">209</a>] later showed how to do type inference even in the presence of infinite sets of possible types arising from actions such as ``<i>x</i> := {<i>x</i>}''. </font></p> <p><font face="Arial" size="2">Data structure representations had their own sublanguage, the DSRL, which served to annotate, but not otherwise modify, SETL programs coded at an appropriately abstract level. The DSRL was designed to permit a smooth transition from Schwartz's two-level programming regime, in which programmers supplied representational details, to a more fully developed system in which a sophisticated optimizer made the selections [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Schwartz70">175</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#DGLSS79">56</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#SSS81">174</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#FSS83">88</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#DFSS89">77</a>]. An important concept in the DSRL was that of <i>base sets</i>, which were implicitly defined objects that could in principle allow much representational sharing among the objects conceived by the programmer. </font></p> <p><font face="Arial" size="2">Value flow analysis, type inference, copy optimization, and deeper determinations of relationships such as set membership or inclusion between variables preparatory to automatic data structure selection all embody an approach to program analysis described by Sintzoff [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Sintzoff72">189</a>] and called <i>abstract interpretation</i> by Cousot and Cousot [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#CousCous77">47</a>] or <i>symbolic execution</i> in Muchnick and Jones [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#MuchnickJones81">149</a>, p. xv]. The essence of this model is that any program <i>P</i> with well-defined semantics can be projected onto a more abstract program <i>A</i> capturing salient properties of objects in <i>P</i> in a manner susceptible of analysis. For example, the sign of a product can be deduced from the signs of its multiplicands without knowing their specific values. Similarly, result types for known operators can usually be gleaned at compile time from operand types regardless of the actual run-time values of those operands. In abstract interpretation, the abstract program <i>A</i> is exercised at <i>P</i>'s compile time to discover desired properties of objects in <i>P</i>. The symbols in <i>A</i> combine and recombine according to an algebra appropriate for their purpose. If that algebra has been designed with feasible goals in mind, the exercise will converge. It is typical to ensure this termination by taking advantage of the fact that any set generated by inductive definitions (such as data flow equations) can be defined as the lattice-theoretic least fixed point of a monotone function. This often allows global properties to be inferred from local ones by a straightforward process of transitive closure. </font></p> <p><font face="Arial" size="2">The power and generality of abstract interpretation moved Paige and his colleagues to undertake an ambitious study of program <i>transformations</i>, which ultimately led to the APTS project [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#CaiPaige93">33</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Paige94b">161</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#KellerPaige95">126</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Paige96">162</a>]. The first of the main three transformations used in APTS is <i>dominated convergence</i> [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#CaiPaige88">32</a>] for computing fixed points of Tarski [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Tarski55">195</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#CousCous79">48</a>] sequences (<i>f</i><sup><i>i</i></sup>(1) : <i>i</i> = 0, 1, 2, ...for deflationary, monotone <i>f</i>) with reasonable efficiency. The second is <i>finite differencing</i> [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#PaigeSchwartz77">157</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#PaigeKoenig82">164</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Paige86">158</a>], which is a set-theoretic analogue of strength reduction that allows some expensive set operations within loops to be reduced to incremental updates by locating fixed points more quickly through the construction and maintenance of program invariants. The third transformation is <i>real-time simulation</i> [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Paige89">159</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#CFHPS91">30</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Paige94a">160</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#CaiPaige95">34</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#PaigeYang97">166</a>] of an associative memory on an ordinary random-access memory (or with slight additional restrictions a mere pointer-access memory), which effectively automates the tedious programming activity of choosing efficient basings for sets. </font></p> <p><font face="Arial" size="2">Chung Yung has recently used finite differencing in a technique he calls <i>destructive effect analysis</i>, which seeks to incrementalize the copying of aggregates, in his purely functional programming language, <i>EAS</i>, a packaging of the typed <img height="17" alt="$\lambda$" src="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/img1.gif" width="16" align="bottom" border="0">-calculus as extended with homogeneous sets [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Yung97">210</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Yung98">211</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Yung99">212</a>]. </font></p> <p><font face="Arial" size="2">Transformational programming can be regarded as a formalization of Dijkstra's <i>stepwise refinement</i> [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Dijkstra72">57</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Dijkstra76">58</a>]. As Bloom and Paige [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#BloomPaige95">28</a>] point out, the transformational methodology is able to do much more than merely optimize code, or translate a SETL-like language into a C-like one. By helping the algorithm designer reason about time and space complexity in syntactic terms rather than only by means of low-level counting arguments, this technology has actually played a significant role in the invention of several new algorithms with greatly reduced asymptotic complexity compared to previous solutions [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#PaigeTarjanBonic85">165</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#PaigeHenglein87">163</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#CaiPaige88">32</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#CaiPaigeTarjan92">31</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#BloomPaige95">28</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#CaiPaige95">34</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#ChangPaige97">38</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#GoyalPaige97">93</a>], while it has rendered the algorithms themselves more perspicuous both to their inventors and to their students. </font></p> <p><font face="Arial" size="2">The next phase in the development of APTS will seek to improve both its reliability and its performance. Currently, all program transformations in APTS are proved correct (meaning-preserving) by hand, which is slow and error-prone. The hope is to integrate a meta-level proof verifier along the lines of Etna [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#CantoneFerro95">36</a>], an outgrowth of Cantone, Ferro, and Omodeo's work on fast decision procedures for fragments of finite set theory [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#CantoneFerroOmodeo89">37</a>]. Alternatively, the model for an integrated verifier might be the SETL-like NAP [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#KellerPaige95">126</a>] system, itself implemented in the SETL derivative Cantor [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Keller91">127</a>,<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Keller94">124</a>]. Verification of assertions in, say, Hoare logic [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Hoare69">113</a>] would increase confidence in automatically applied transformations. Davis and Schwartz [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#DavisSchwartz79">50</a>] showed how mechanical verification systems could extend themselves with new proof methods without violating soundness or changing the set of statements that could be proved. </font></p> <p><font face="Arial" size="2">The main existing impediment to the speed of APTS is the fact that its database of program property relationships, which is dynamically deduced using a static database of inference rules, must be recomputed after each application of a program transformation. What is being sought is an <i>incremental</i> rule database system that can be used to regenerate the relationship records efficiently after each rewriting operation [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Paige94b">161</a>]. Ultimately, it should be possible to apply APTS to itself for further large gains in speed [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Paige96">162</a>], and to take advantage of the technique of partial evaluation [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#JonesGomardSestoft93">122</a>] to realize a production-grade transformational system. </font></p> <p><font face="Arial" size="2">Recently, Goyal and Paige [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#GoyalPaige98">94</a>] have revisited the copy optimization problem for SETL and other high-level languages that exemplify Hoare's ideal of a pointer-free style of programming. By taking the well-known technique of dynamic reference counting to achieve ``lazy'' copying, and combining that with static liveness determination based on Schwartz's value flow analysis, they are able to optimize the placement of copy operations and of <b> <a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/setl-doc.html#om"> om</a></b> assignments, the latter serving to decrement the reference counts of objects known to have no subsequent uses. They also prove the correctness of their alias propagation analysis and code transformations using formal semantics and abstract interpretation. </font></p> <p><font face="Arial" size="2">Goyal [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Goyal99">91</a>] has obtained a dramatic improvement in the algorithmic complexity of computing intra-procedural <i>may-alias</i> relations, again using dominated convergence and finite differencing. In his dissertation [<a target="_blank" href="http://cs1.cs.nyu.edu/~bacon/phd-thesis/diss/node99.html#Goyal00">92</a>], he develops set-theoretic languages which can express both abstract specifications and low-level implementations in a form which uses a data structure selection method based on a novel type system to preserve the <i>computational transparency</i> that is necessary in order for statements about program efficiency to be meaningful. This is a cornerstone of the general transformational methodology.</font></p> </blockquote> <p align="left"> <a target="_blank" href="http://www.dmst.aueb.gr/dds/pubs/conf/1999-ESREL-SoftRel/html/dsl.html"> Reliable software implementation using domain-specific languages</a> by <b>Diomidis Spinellis </b><i> This material is presented to ensure timely dissemination of scholarly and technical work. Copyright and all rights therein are retained by authors or by other copyright holders. All persons copying this information are expected to adhere to the terms and constraints invoked by each author's copyright. In most cases, these works may not be reposted without the explicit permission of the copyright holder. </i></p> <blockquote> <p><font size="2" face="Arial">The safety and reliability of products, processes, equipment, and installations is often critically affected by the software that controls their design and operation [<a target="_blank" href="http://www.dmst.aueb.gr/dds/pubs/conf/1999-ESREL-SoftRel/html/dsl.html#WCDA98">WCD+98</a>]. Software engineering stands out among other engineering disciplines because of its tight, haphazard, and fluid coupling with other elements of its operating environment. Mechanical, civil, or electrical engineers can base their designs on standardised and well understood specifications and constraints, and can design their implementations based on materials and components of known modalities and properties. In contrast to that, software engineers have to rely on specifications often expressed in the notation most suited to the application domain, design an artefact whose application changes significantly the environment it was designed for [<a target="_blank" href="http://www.dmst.aueb.gr/dds/pubs/conf/1999-ESREL-SoftRel/html/dsl.html#Leh91b">Leh91</a>], and rely on implementors whose output quality can vary up to a factor of 10 [<a target="_blank" href="http://www.dmst.aueb.gr/dds/pubs/conf/1999-ESREL-SoftRel/html/dsl.html#SEG68">SEG68</a>]. These problems are of particular importance for safety critical applications where human life can be put at risk from malfeasant software designs and implementations. </font></p> <p><font face="Arial"><font size="2">Our approach for overcoming those problems is a software process architecture based on <i>domain specific languages</i> (</font><font size="-1"><small><font size="2">DSL</font></small></font><font size="2">s). These allow the specification of critical parts of a software subsystem in the most appropriate formalism for the application domain, thus bridging the gap between the domain expert specifications and the software implementation, providing maintainability, and -- once a particular </font> <font size="-1"><small><font size="2">DSL</font></small></font><font size="2"> has been correctly implemented -- ensuring consistent quality throughout the system's lifecycle. In the following paragraphs we illustrate this concept by detailing the usage of </font><font size="-1"><small> <font size="2">DSL</font></small></font><font size="2">s in the design and implementation of a civil engineering </font><font size="-1"> <small><font size="2">CAD</font></small></font><font size="2"> application. The application is typical for the class described so far: it embodies a large amount of domain knowledge and its failures can lead to reliability and safety problems.</font></font></p> </blockquote> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20070809X_compiling_little_languages_in_python_aycock_researchindex"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20070809X_dave_bodenstabs_home_page" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20050525X_prolog_parsers"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4 align="left"><a target="_blank" href="http://www.bodenstab.org/">Dave Bodenstab's Home Page</a></h4> <li> <blockquote> <h3><a name="YACC"> <font size="2" face="Arial">BYACC which produces Perl/Tcl parsers</font></a></h3> <font size="2" face="Arial">I wanted a set of Tcl/Perl yacc tools that I knew were based on the latest version of byacc that I knew of. I also wanted a <i>minimal diff</i> against that version of byacc. To that end, I've taken the latest versions of tyacc/pyacc that I found: </font> <pre><font face="Arial"> tyacc-0.9.tar.gz perl-byacc1.8.2.tar.gz perl5-byacc-patches-0.5.tar</font></pre> <font size="2" face="Arial">and applied the diff's to FreeBSD's 4.8-RELEASE yacc (which is really byacc.) Each of tyacc/pyacc/p5yacc is a separate tool -- removing the command line option specifying what language (Tcl/Perl) to generate simplified the diff's enormously. Basing the changes on FreeBSD's version of yacc did remove some changes that might be important to some people. The following features were removed: </font> <ul compact> <li><font size="2" face="Arial">portability #ifdef's for STDC (porting back to MSDOS/Amiga/etc.) might need to be re-done </font></li> <li><font size="2" face="Arial">portability for number of bits in a word </font></li> </ul> <font size="2" face="Arial">The Perl versions contain no new functionality or bug fixes. However, the Tcl version has been improved: </font> <ul compact> <li><font size="2" face="Arial">yacc error recovery now works </font></li> <li><font size="2" face="Arial">restored the default action for a production </font></li> <li><font size="2" face="Arial">included working versions of YYABORT/YYREJECT/YYACCEPT/YYERROR </font></li> <li><font size="2" face="Arial">references to "$$" and "$n" are always expanded without a leading "$" in actions </font></li> <li><font size="2" face="Arial">use "\$" to indicate a literal "$" in actions </font></li> <li><font size="2" face="Arial">removed the parse state/tree lists from the generated y.tab.tcl </font></li> <li><font size="2" face="Arial">added a working calculator example using tcLex </font></li> </ul> <p><font size="2" face="Arial">My versions of the Perl/Tcl yacc's can be downloaded <a target="_blank" href="http://www.bodenstab.org/files/PERL-TCL-YACC.tar.gz"> here</a>. </font></p> </blockquote> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20070809X_dave_bodenstabs_home_page"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20050525X_prolog_parsers" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20050314X_key_open_source_programming_tool_due_for_overhaul_tech_news_on_zdnet"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4 align="left">[May 25, 2005] <a target="_blank" href="http://utenti.lycos.it/parsers/">Prolog Parsers</a> </h4> <h5 align="left">A study of the efficiency of various parsing techniches in Prolog, e.g. top-down, bottom-up, oracles, prediction, left-corner, chart. Also a comparison with Lisp. Examples in Prolog and Lisp. </h5> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20050525X_prolog_parsers"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20050314X_key_open_source_programming_tool_due_for_overhaul_tech_news_on_zdnet" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20050202X_compilers_contents"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Mar 14, 2005] <a target="_blank" href="http://news.zdnet.com/2100-3513_22-5615886.html?tag=nl.e539"> Key open-source programming tool due for overhaul Tech News on ZDNet</a></h4> <blockquote> <p><font size="2" face="Arial">Almost all open-source software is built with GCC, a compiler that converts a program's source code--the commands written by humans in high-level languages such as C--into the binary instructions a computer understands. The forthcoming GCC 4.0 includes a new foundation that will allow that translation to become more sophisticated, said Mark Mitchell, the GCC 4 release manager and "chief sourcerer" of a small company called <a target="_blank" href="http://dw.com.com/redir?destUrl=http%3A%2F%2Fwww.codesourcery.com%2F&siteId=22&oId=2100-3513-5615886&ontId=3513&lop=nl.ex"> CodeSourcery</a>. </font></p> <p><font size="2" face="Arial">"The primary purpose of 4.0 was to build an optimization infrastructure that would allow the compiler to generate much better code," Mitchell said. </font></p> <p><font size="2" face="Arial">Compilers are rarely noticed outside the software development community, but GCC carries broad significance. For one thing, an improved GCC could boost performance for the open-source software realm--everything from Linux and Firefox to OpenOffice.org and Apache that collectively compete with proprietary competitors from Microsoft, IBM and others. </font></p> <p><font size="2" face="Arial">For another, GCC is a foundation for an entire philosophy of cooperative software development. It's not too much of a stretch to say GCC is as central an enabler to the free and open-source programming movements as a free press is to democracy. </font></p> <p><font size="2" face="Arial">GCC, which stands for GNU Compiler Collection, was one of the original projects in the <a target="_blank" href="http://dw.com.com/redir?destUrl=http%3A%2F%2Fwww.gnu.org%2F&siteId=22&oId=2100-3513-5615886&ontId=3513&lop=nl.ex"> Gnu's Not Unix</a> effort. Richard Stallman launched GNU and the accompanying <a target="_blank" href="http://dw.com.com/redir?destUrl=http%3A%2F%2Fwww.fsf.org%2F&siteId=22&oId=2100-3513-5615886&ontId=3513&lop=nl.ex"> Free Software Foundation</a> in the 1980s to create a clone of Unix that's free from proprietary licensing constraints. </font></p> <p><font size="2" face="Arial">The first GCC version was released in 1987, and <a title="Open source compiler graduates to 3.0 -- Tuesday, Jun 19, 2001" href="http://news.zdnet.com/2100-9595_22-268658.html?tag=nl"> GCC 3.0 was released in 2001</a>. A company called Cygnus Solutions, an open-source business pioneer acquired in 1999 by Linux seller Red Hat, funded much of the compiler's development. </font></p> <p><font size="2" face="Arial">But improving GCC isn't a simple matter, said Evans Data analyst Nicholas Petreley. There have been performance improvements that came from moving from GCC 3.3 to 3.4, but at the expense of backwards-compatibility: Some software that compiled fine with 3.3 broke with 3.4, Petreley said. </font></p> <p><font size="2" face="Arial">RedMonk analyst Stephen O'Grady added that updating GCC shouldn't compromise its ability to produce software that works on numerous processor types. </font></p> <p><font size="2" face="Arial">"If they can achieve the very difficult goal of not damaging that cross-platform compatibility and backwards-compatibility, and they can bake in some optimizations that really do speed up performance, the implications will be profound," O'Grady said. </font></p> <p><font face="Arial"><b><font size="2">What's coming in 4.0</font></b><font size="2"><br> <a target="_blank" href="http://dw.com.com/redir?destUrl=http%3A%2F%2Fgcc.gnu.org%2Fgcc-4.0%2Fchanges.html&siteId=22&oId=2100-3513-5615886&ontId=3513&lop=nl.ex"> GCC 4.0</a> will bring a foundation to which optimizations can be added. Those optimizations can take several forms, but in general, they'll provide ways that the compiler can look at an entire program. </font> </font></p> <p><font size="2" face="Arial">For example, the current version of GCC can optimize small, local parts of a program. But one new optimization, called scalar replacement and aggregates, lets GCC find data structures that span a larger amount of source code. GCC then can break those objects apart so that object components can be stored directly in fast on-chip memory rather than in sluggish main memory. </font></p> <p><font size="2" face="Arial">"Optimization infrastructure is being built to give the compiler the ability to see the big picture," Mitchell said. The framework is called <a target="_blank" href="http://dw.com.com/redir?destUrl=http%3A%2F%2Fgcc.gnu.org%2Fprojects%2Ftree-ssa%2F&siteId=22&oId=2100-3513-5615886&ontId=3513&lop=nl.ex"> Tree SSA</a> (static single assignment). </font></p> <p><font size="2" face="Arial">However, Mitchell said the optimization framework is only the first step. Next will come writing optimizations that plug into it. "There is not as much use of that infrastructure as there will be over time," Mitchell said. </font></p> <p><font size="2" face="Arial">One optimization that likely will be introduced in GCC 4.1 is called <a target="_blank" href="http://dw.com.com/redir?destUrl=http%3A%2F%2Fgcc.gnu.org%2Fprojects%2Ftree-ssa%2Fvectorization.html&siteId=22&oId=2100-3513-5615886&ontId=3513&lop=nl.ex"> autovectorization</a>, said Richard Henderson, a Red Hat employee and GCC core programmer. That feature economizes processor operations </font></p> </blockquote> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20050314X_key_open_source_programming_tool_due_for_overhaul_tech_news_on_zdnet"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20050202X_compilers_contents" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#n20050120X_tacc_single_processor_optimization_on_the_ibm_power4_system"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Feb 2, 2005] <a target="_blank" href="http://www.scifac.ru.ac.za/compilers/conts.htm"> Compilers - Contents</a> <a target="_blank" href="/cdn-cgi/l/email-protection#93e3bde7f6e1e1ead3e1e6bdf2f0bde9f2">P.D. Terry</a>, Rhodes University, 1996 </h4> <ul> <li> <a target="_blank" href="http://www.scifac.ru.ac.za/compilers/cha02s.htm"> Compilers - Chapter 2</a> very nice introduction</li> </ul> </em></b></i><center><table border="0" width="100"><tr> <td align="center"><a href="#n20050202X_compilers_contents"><img border="0" src="/Images/up.png" width="16" height="16"></a></td> <td align="center"><a name="n20050120X_tacc_single_processor_optimization_on_the_ibm_power4_system" href="#NEWS_TOC"><img border="0" src="/Images/home.gif" width="16" height="18"></a></td> <td align="center"><a href="#NEWS_TOC"><img border="0" src="/Images/down.png" width="16" height="16"></a></td> </tr></table></center> <h4>[Jan 20, 2005] <a target="_blank" href="http://www.tacc.utexas.edu/resources/userguides/power4/optimization/"> TACC Single Processor Optimization on the IBM Power4 System</a></h4> <blockquote> <p>Code optimization is an iterative process requiring an investment of time, energy, and thought on the part of the programmer. Performance tuning is recommended in the following situations: </font></p> <ol> <li><font size="2" face="Arial">production codes that are widely distributed and often used in the research community; </font> </li> <li><font size="2" face="Arial">projects with limited allocation (to maximize available compute hours). </font></li> </ol> <p><font size="2" face="Arial">It is hardly worthwhile to optimize programs that will only be used once or twice, but it is important to optimize often-used application code. In addition, the lack of availability of compute hours is an incentive to decrease the consumption rate of the allocation, and hence will call for increasing the efficiency of one's production code. </font></p> </blockquote> </em></b></i><h2 align="center"><b><a name="2004">2004</a></b></h2> <h4>[Dec 10, 2004] <a target="_blank" href="http://compilers.iecc.com/comparch/article/91-12-023"> Comp.compilers SUMMARY Static analyzers for detecting programming errors</a></h4> <blockquote> <a target="_blank" href="http://compilers.iecc.com/comparch/article/91-11-087"> static analyzers for detecting program errors</a> <i><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f39083979280b39e92819f9a9ddd999086dd969786dd9286">[email protected]</a></i> (1991-11-21)</td> </tr> <tr> <td bgcolor="#80f7ff" border="5"><b> <a target="_blank" href="http://compilers.iecc.com/comparch/article/91-12-023"> SUMMARY: Static analyzers for detecting programming errors</a> <i><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d4b7a4b0b5a794b3a6bba4b1a6fabeb7a1fab1b0a1fab5a1">[email protected]</a></i> (1991-12-05)</b></td> </tr> </table> <hr> <p>| <a target="_blank" href="http://compilers.iecc.com/comparch/index/1991-12"> List of all articles for this month</a> | </p> <hr> <tr> <td><b>Newsgroups: </b></td> <td>comp.compilers</td> </tr> <tr> <td><b>From: </b></td> <td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="92f1e2f6f3e1d2f5e0fde2f7e0bcf8f1e7bcf7f6e7bcf3e7">[email protected]</a> (David Spuler)</td> </tr> <tr> <td><b>Keywords: </b></td> <td>errors, analysis, summary, bibliography</td> </tr> <tr> <td><b>Organization: </b></td> <td>Compilers Central</td> </tr> <tr> <td><b>References: </b></td> <td> <a target="_blank" href="http://compilers.iecc.com/comparch/article/91-11-087"> 91-11-087</a></td> </tr> <tr> <td><b>Date: </b></td> <td>Thu, 5 Dec 91 20:04:26 +1100</td> </tr> </table> <p>I received quite a large number of replies to my request for information<br> about compiler-like static analysis tools. This article is a summary of:<br> </p> <p>1) my work/ideas and<br> 2) responses I received.</p> <p>Hope it's useful.</p> <p>David Spuler<br> </p> <p>MY OWN WORK<br> ===========<br> Here is a summary of my own bug lists and references on the use of static<br> analyzers for detecting program errors. Myself, I implemented a full C<br> checker (better than Lint) as my 4th year Honours project - hence there is an<br> Honours thesis. Naturally, the bug lists and references have a C bias.<br> </p> <p>C Bugs<br> ======<br> Expression Errors<br> -----------------<br> assignment instead of equality (if(x=y) versus if(x==y) )<br> confusing &, | and &&,|| operators<br> null effect statements (x<<1; instead of x<<=1)<br> order of evaluation errors (a[i++]=i)<br> side effects to 2nd/3rd operand of ||, && and ?:<br> </p> <p>Lexical Errors<br> ==============<br> Nested comments<br> Multibyte character constants (novices use 'abc' instead of "abc")<br> </p> <p>Flow of Control Errors<br> ======================<br> unreachable statements<br> use of uninitialized local variables<br> dead assignments<br> function return anomalies - return statements with and without expression<br> function has no return statement on some paths<br> constants in conditional tests (if(1>0)...)<br> accidental empty loops (bad semicolon) for(...); { } <br> missing break in switch statement<br> </p> <p>Library Usage Errors<br> ====================<br> bad formats (and argument type) to printf/scanf/etc</p> <p>Preprocessor Errors<br> ===================<br> missing braces #define swap(i,j) temp =i; i=j; j=temp; <br> precedence - need brackets around whole expresion<br> precedence - need brackets around macro formal parameters<br> side effects in macro arguments<br> </p> <p>Declarations<br> =============<br> unused local variables<br> inner scope redeclarations hiding outer name<br> global problems - inconsistent use of fns etc - Lint does all this stuff<br> </p> <p>REFERENCES (papers from my Thesis bibliography)<br> (some aren't highly relevant to static checking, but the titles tell all)<br> =============================================================================<br> Spuler, D.A. "Check: A Better Checker for C", Honours Thesis, Dept of Computer<br> Science, James Cook University of North Queensland, 4811. AUSTRALIA<br> </p> <p>W. R. Adrion, M. A. Branstad and J. C. Cherniavsky (1990),<br> "Validation, Verification, and Testing of Computer Software",<br> ACM Computing Surveys, Vol. 14, No. 2, pp. 159-192.<br> </p> <p>R. E. Berry and B. A. E. Meekings (1985),<br> "A Style Analysis of C Programs",<br> Communications of the ACM, Vol. 28, No. 1, pp. 80-88.<br> </p> <p>R. E. Fairley (1978),<br> "Static Analysis and Dynamic Testing of Computer Software",<br> IEEE Computer, Vol. 11, No. 4, pp. 14-23.</p> <p>L. D. Fosdick and L. J. Osterweil (1976),<br> "Data Flow Analysis In Software Reliability",<br> ACM Computing Surveys, Vol. 8, No. 3, pp. 305-330.</p> <p>M. T. Harandi and J. Q. Ninq (1990), "Knowledge-Based Program Analysis",<br> IEEE Software, January 1990, pp. 74-81.</p> <p>W. Harrison (1977),<br> "Compiler Analysis of Value Ranges for Variables",<br> IEEE Transactions on Software Engineering, Vol. 3, No. 3, pp. 243-250.</p> <p>W. S. Hecht and J. D. Ullman (1975),<br> "A Simple Algorithm for Global Data Flow Analysis Problems",<br> SIAM Journal of Computing, Vol. 4, pp. 528-532.</p> <p>T. R. Hopkins (1980), "PBASIC - A Verifier for BASIC",<br> Software Practice and Experience, Vol. 10, No. 3, pp. 175-181.</p> <p>W. E. Howden (1982), "Validation of Scientific Programs",<br> ACM Computing Surveys, Vol. 14, No. 2, pp. 193-227.</p> <p>W. E. Howden (1990), "Comments Analysis and Programming Errors",<br> IEEE Transactions on Software Engineering, Vol. 16, No. 1, pp. 72-81.</p> <p>S. C. Johnson (1978), "Lint, a C Program Checker", Bell Laboratories,<br> Murray Hill, NJ, Computer Science Technical Report, July 1978 (also<br> appearing as part of the documentation for many versions/variants of the<br> UNIX operating system, as in: Ultrix Programmers Manual - Supplementary<br> Documents, 1983).</p> <p>W. L. Johnson (1986), Intention-Based Diagnosis of Novice Programming<br> Errors, Pitman.</p> <p>J. Katzenelson and A. Strominger (1987), "Debugging Programs that use<br> Macro-Oriented Data Abstractions", Software Practice and Experience, Vol.<br> 17, No. 2, pp. 79-103.</p> <p>J. C. King (1976), "Symbolic Execution and Program Testing",<br> Communications of the ACM, Vol. 19, No. 7, pp. 385-394.</p> <p>D. E. Knuth (1971), "An Empirical Study of FORTRAN Programs",<br> Software Practice and Experience, Vol. 1, pp 105-133.</p> <p>S. Lauesen (1979), "Debugging Techniques", Software Practice and Experience,<br> Vol. 9, pp. 51-63.</p> <p>T. E. Lindquist and J. R. Jenkins (1988), "Test-Case Generation with IOGen",<br> IEEE Software, January 1988, pp. 72-79.</p> <p>P. G. Moulton and M. E. Muller (1967), "DITRAN - A Compiler Emphasizing<br> Diagnostics", Communications of the ACM, Vol. 10, No. 1, pp. 45-52.</p> <p>S. S. Muchnick and N. D. Jones (1981),<br> Program Flow Analysis: Theory and Applications, Prentice-Hall.</p> <p>L. J. Osterweil and L. D. Fosdick (1976), "DAVE - A Validation, Error<br> Detection and Documentation System for Fortran Programs", Software<br> Practice and Experience, Vol. 6, No. 4, pp. 473-486.</p> <p>K. A. Redish and W. F. Smyth (1986), "Program Style Analysis: A Natural<br> By-Product of Program Compilation", Communications of the ACM, Vol. 29,<br> No. 2, pp. 126-133.</p> <p>B. G. Ryder (1974), "The PFORT Verifier",<br> Software Practice and Experience, Vol. 4, No. 4, pp. 359-377.</p> <p>R. E. Seviora (1987), "Knowledge-Based Program Debugging Systems", IEEE<br> Software, Vol. 4, No. 3, pp. 20-32.</p> <p>N. Suzuki and K. Ishihata (1977), "Implementation of an Array Bound<br> Checker", Fourth ACM Symposium on Principles of Programming Languages, pp.<br> 132-143.</p> <p>C. Wilson and L. J. Osterweil (1985),<br> "Omega - A Data Flow Analysis Tool for the C Programming Language",<br> IEEE Transactions on Software Engineering, Vol. 11, No. 9, pp. 832-838.</p> <p>============================<br> RESPONSES FROM OTHERS<br> ============================</p> <p><i>>From @yonge.csri.toronto.edu:hugh@redvax Thu Dec 5 15:06:51 1991</i><br> </p> <p>I too am interested in static analysis tools. I have produced a C<br> compiler (intended to be commercial) that does extensive lint-like<br> checking.<br> </p> <p>Over a decade ago Fosdick and Osterweil (sp?) at Colorado produced a<br> program to detect "data-flow anomalies" in FORTRAN programs. I thought<br> that work was very interesting. At the time, I prototyped a similar<br> system (theirs was so slow that they recommended it be used only once in<br> the life of a program; mine was fast enough that it would not have<br> noticeably slowed a compiler that had the checks added).<br> </p> <p>Do you know of the PFORT Verifier? I think that it is available for free<br> from Bell Labs. I think that it is sort of a Lint for FORTRAN,<br> emphasizing checking for FORTRAN 77 standard conformance.<br> </p> <p>Again, a decade ago, there was some work at eliminating runtime range<br> checks from Pascal programs. Clearly, this could be turned around into<br> compile-time warnings, perhaps without being annoying. I think Welsh of<br> Queens University of Belfast wrote one of the better papers (dim<br> recollection).<br> </p> <p>Anyway, I would be interested in your bug lists and references.<br> </p> <p>Hugh Redelmeier<br> {utcsri, yunexus, uunet!attcan, utzoo, scocan}!redvax!hugh<br> When all else fails: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d1b9a4b6b991b2a2a3b8ffa5bea3bebfa5beffb4b5a4">[email protected]</a><br> +1 416 482-8253<br> </p> <p>===================================================<br> </p> <p><i>>From <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="315b50525a425e5f715d504352591f5d52421f5c58451f545544">[email protected]</a> Tue Nov 26 03:23:07 1991</i><br> </p> <p>David,</p> <p>Raymie Stata, a fellow graduate in my research group passed me your<br> request from the net.</p> <p>I am completing a thesis on a bug detection scheme I have invented called<br> Aspect. I am attaching some blurb from a paper I have just written. I'm<br> including the bibliography too, which may give you some useful references.</p> <p>If you're interested, I'd be happy to tell you more. There is one paper<br> published that describes the state of Aspect about 1 year ago; it's<br> `Aspect: an Economical Bug Detector', International Conf. On Software<br> Engineering, May 1991.</p> <p>I'd also be very interested in any references or ideas that you have.</p> <p>Regards,<br> </p> <p>--Daniel Jackson</p> <p>About the Aspect Bug Detector:</p> <p>Aspect is an annotation language for detecting bugs in imperative<br> programs. The programmer annotates a procedure with simple assertions<br> that relate abstract components (called `aspects') of the pre- and<br> post-states. A checker has been implemented that can determine<br> efficiently whether the code satisfies an assertion. If it does not,<br> there is a bug in the code (or the assertion is wrong) and an error<br> message is displayed. Although not all bugs can be detected, no<br> spurious bugs are reported....<br> </p> <p>The purpose of a compiler is not just to make it easier to write good<br> programs but also to make it harder to write bad ones. Catching errors<br> during compilation saves testing. It also spares the greater cost of<br> discovering the error later when it is harder to fix.</p> <p>Programming errors can be divided into two classes. {\em Anomalies} are<br> flaws that are apparent even to someone who has no idea what the<br> program is supposed to do: uninitialized variables, dead code,<br> infinite loops, etc. {\em Bugs}, on the other hand, are faults only with<br> respect to some intent. An anomaly detector can at best determine<br> that a program does something right; a bug detector is needed to tell<br> whether it does the right thing.</p> <p>Aspect detects bugs with a novel kind of dataflow annotation.<br> Annotating the code is extra work for the programmer, but<br> it is mitigated by two factors. First, some sort of redundancy is<br> inevitable if bugs, rather than just anomalies, are to be caught.<br> Moreover, Aspect assertions may be useful documentation: they are<br> generally much shorter and more abstract than the code they accompany.<br> Second, no mimimal annotation is demanded; the programmer can choose<br> to annotate more or less according to the complexity of the code or<br> the importance of checking it.</p> <p>A procedure's annotation relates abstract components of objects called<br> `aspects'. The division of an object into aspects is a kind of data<br> abstraction; the aspects are not fixed by the object's representation<br> but are chosen by the programmer.</p> <p>Each assertion of the annotation states that an aspect of the<br> post-state is obtained from some aspects of the pre-state. The<br> checker examines the code to see if such dependencies are plausible.<br> If there is no path in the code that could give the required<br> dependencies, there must be an error: the result aspect was computed<br> without adequate information. An error message is generated saying<br> which abstract dependency is missing.</p> <p>...<br> </p> <p>Many compilers, of course, perform some kind of anomaly analysis, and<br> a variety of clever techniques have been invented (see, e.g.<br> \cite{carre}). Anomaly detection has the great advantage that it<br> comes free to the programmer. Aspect might enhance existing methods<br> with a more precise analysis that would catch more anomalies (using<br> annotations of the built-in procedures alone). But there will always<br> be a fundamental limitation: most errors are bugs and not anomalies.<br> </p> <p>The Cesar/Cecil system \cite{cesar}, like Aspect, uses annotations to<br> detect bugs. Its assertions are path expressions that constrain the<br> order of operations. Errors like failing to open a file before<br> reading it can be detected in this way. Flavor analysis \cite{flavor}<br> is a related technique whose assertions make claims about how an<br> object is used: that an integer is a sum in one place in the code and<br> a mean in another, for instance. Both techniques, however, report<br> spurious bugs in some cases: an error may be signalled for a path that<br> cannot occur. Aspect, on the other hand, is sound: if an error is<br> reported, there is a bug (or the assertion is wrong).<br> </p> <p>Type checking may also be viewed as bug detection when there is name<br> equality or data abstraction. Aspect is more powerful for two<br> reasons. First, since procedures with the same type signature usually<br> have different annotations, Aspect can often tell that the wrong<br> procedure has been called even when there is no type mismatch.<br> Second, type systems are usually immune to changes of state and so, in<br> particular, cannot catch errors of omission. Even models that<br> classify side-effects, such as FX \cite{FX}, do not constrain the<br> order of operations like Aspect.<br> </p> <p>The version of Aspect described here advances previous work<br> \cite{icse} by incorporating alias analysis. It can handle multi-level<br> pointers, whose precise analysis is known to be intractable<br> \cite{Landi}. The alias scheme adopted is most similar to<br> \cite{larus}, but it is less precise and cannot handle cyclic and<br> recursive structures.<br> </p> <p>...<br> </p> <p>\bibitem[BC85]{carre}<br> Jean-Francois Bergeretti \& Bernard A. Carre,<br> `Information-Flow and Data-Flow Analysis of while-Programs',<br> ACM Trans. Programming Languages and Systems, Vol. 7, No. 1, January 1985.<br> </p> <p>\bibitem[CWZ90]{chase}<br> David R. Chase, Mark Wegman \& F. Kenneth Zadeck,<br> `Analysis of Pointers and Structures',<br> Proc. SIGPLAN '88 Conf. Prog. Lang. Design \& Implementation, 1990.<br> </p> <p>\bibitem[GL88]{FX}<br> David K. Gifford \& John M. Lucassen,<br> `Polymorphic Effect Systems',<br> ACM Conf. Principles of Programming Languages, 1988.<br> </p> <p>\bibitem[How89]{flavor}<br> William E. Howden,<br> `Validating Programs Without Specifications',<br> Proc. 3d ACM Symposium on Software Testing, Analysis and Verification (TAV3),<br> Key West, Florida, Dec. 1989.<br> </p> <p>\bibitem[Jac91]{icse}<br> Daniel Jackson,<br> `Aspect: An Economical Bug-Detector',<br> Proc 13th Int. Conf. on Software Engineering,<br> Austin, Texas, May 1991.<br> </p> <p>\bibitem[Lan91]{Landi}<br> William Landi and Barbara G. Ryder,<br> `Pointer-induced Aliasing: A Problem Classification',<br> ACM Conf. Principles of Programming Languages, 1991.<br> </p> <p>\bibitem[LH88]{larus}<br> James R. Larus and Paul N. Hilfinger,<br> `Detecting Conflicts Between Structure Accesses'<br> ACM Conf. Programming Language Design and Implementation,<br> June 1988.<br> </p> <p>\bibitem[OO89]{cesar}<br> Kurt M. Olender \& Leon J. Osterweil,<br> `Cesar: A Static Sequencing Constraint Analyzer',<br> Proc. 3d ACM Symposium on Software Testing, Analysis and Verification (TAV3),<br> Key West, Florida, Dec. 1989.<br> </p> <p>===================================================<br> </p> <p><i>>From <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="afcecbd99aefdcc7cec4dbc681caddc1cadb81c6c1">[email protected]</a> Tue Nov 26 03:17:02 1991</i><br> </p> <p>I am a member of a quality control team in Citicorp Overseas Software Ltd.<br> </p> <p>I do a lot of desk work, to test code validity. <br> </p> <p>Till now I have used manual methods for static analysis of code, using<br> tables of states of variables, and basically sweating it out. I wish to<br> know if you have more information on known bugs or pitfalls in various<br> constructs of a language.<br> </p> <p>I will dig out some information on static analysers, and mail them to you<br> </p> <p>Pankaj Fichadia.<br> </p> <p>===================================================<br> <i>>From @bay.csri.toronto.edu:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6806071a1e0d0404280b1b1a01461c071a07061c07460d0c1d">[email protected]</a> Tue Nov 26 02:04:23 1991</i><br> </p> <p>I'd be very interested in your list of references. Unfortunately I can't<br> find my own list of references to give you in return. Perhaps I didn't<br> type it in yet. I _can_ send you an unpublished paper (complete except<br> for bibliography) on detecting dataflow anomalies in procedural languages.<br> There is also an experimental program that implements the ideas of the<br> paper. The paper can be sent in postscript or dvi and the program in in<br> Turing -- a Pascal type language.<br> </p> <p>Theo Norvell <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9ff1f0ede9faf3f3dffcecedf6b1ebf0edf0f1ebf0b1fafbea">[email protected]</a><br> U of Toronto <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="315f5e4347545d5d71524243581f44455e435e5f455e1f5250">[email protected]</a><br> </p> <p>===================================================<br> <i>>From <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="513034631132243f3829307f32327f323e3d243c3338307f343524">[email protected]</a> Sun Nov 24 21:40:04 1991</i><br> </p> <p>Greetings!<br> </p> <p>I have read your note about error detections in compilers. I have a great<br> interest in this particular field as my final project has to do with the<br> implemetation of expetional handlin in "Small C", a compiler designed on<br> the IBM 8088 and it's sole interest is educational, something equivalent<br> to minix. I would greatly appreciate if you could help me in finding<br> sources that dwell on this subject, anything that would be related to<br> errors and how one might deal with them would be relavant.<br> Many Thanks In Advance<br> --Amiran<br> <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2c4d491e6c4f594245544d024f4f024f434059414e454d02494859">[email protected]</a><br> ===================================================<br> </p> <p><i>>From <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d5a5b4b6ba95b6a6fba7bcb6b0fbb0b1a0">[email protected]</a> Sun Nov 24 04:42:03 1991</i><br> </p> <p>The Convex Application Compiler (TM?) apparently does a pretty good job.<br> Any interprocedural analyzer has to catch a lot of errors just to avoid<br> crashing. They also do pointer tracking, array section analysis, and<br> generally just all-out analysis and optimization. Bob Metzger<br> <<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="533e36272934362113303c3d25362b7d303c3e">[email protected]</a>> et al. have a paper on the pointer tracking in the<br> proceedings of Supercomputing '91, which was held last week.<br> </p> <p>It is alleged that Convex has sold machines, or at least copies of their<br> compiler, just for use in static error checking.<br> </p> <p>Paul Havlak<br> Graduate Student<br> </p> <p>===================================================<br> <i>>From <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="08627e617c6d63486b7b7a265d5e616b264b49">[email protected]</a> Sat Nov 23 11:54:49 1991</i><br> </p> <p>You might be interested in looking at abstract interpretation. It is a<br> technique related to data-flow analysis (you can express data-flow anlyses<br> as abstract interpreation problems) and is quite popular in among the<br> functional programming crowd.<br> </p> <p>There is a number of paper (even books!) on the subject, if you are<br> interested I can provide references.<br> </p> <p>Regards, Jan Vitek/ Graduate Student/ University of Victoria/ BC/ Canada<br> ===================================================<br> </p> <p><i>>From <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1367647a7d60667d3267647a7d60667d3d707c7e327674747661675350403d46505f523d565746">[email protected]</a> Fri Nov 22 07:17:14 1991</i><br> </p> <p>Here's a few references that I've written:<br> </p> <p>Paul Eggert,<br> Toward special-purpose program verification,<br> .i "Proc. ACM SIGSOFT International Workshop on Formal Methods<br> in Software Development",<br> Napa, CA (9-11 May 1990);<br> .i "Software engineering notes"<br> .b 15 ,<br> 4 (September 1990), 25-29.<br> </p> <p>Paul Eggert,<br> An Example of Detecting Software Errors Before Execution,<br> .i "Proc. workshop on effectiveness of testing and proving methods,"<br> Avalon, CA<br> (11-13 May 1982), 1-8.<br> </p> <p>Paul Eggert,<br> Detecting Software Errors Before Execution,<br> UCLA Computer Science Department report CSD-810402 (April 1981).<br> </p> <p> </p> <p>The last reference contains an extensive survey of the pre-1980 literature.<br> I'd be interested in seeing your list of references as well,<br> when you have the time.<br> </p> <p>===================================================<br> <i>>From <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fe9c9b9d95be9d8dd09d918c909b9292d09b9a8b">[email protected]</a> Fri Nov 22 05:31:04 1991</i><br> </p> <p>I'm interested in hearing your list of bugs. I have given some thought to<br> the detection and propagation of error information in a program using<br> dependence information. Propagation of errors uses the idea that any<br> computation on a path which leads only to an error condition is dead<br> unless a side-effect intervenes, and any code after the error is<br> unreachable. Thus one can actually integrate program errors into control<br> flow information as an unstructured jump to the end of the program. In an<br> optimizing compiler, one might be tempted to say that any statement which<br> can be scheduled after the last side effect before the error is dead.<br> Thus, in this fragment:<br> </p> <p>1: x := 2<br> 2: print "hi there"<br> 3: y := z/0<br> </p> <p>statement 1 is actually dead, but statement 2 is not.<br> </p> <p>Micah Beck<br> -- </p> </blockquote> <h4>[Nov 14, 2004] <a onmousedown="return clk(this,'res',9)" href="http://www.cl.cam.ac.uk/users/mr/Cobench/README"> Two Benchmark Tests for BCPL Style Coroutines</a></h4> <blockquote> <p><font size="2" face="Arial">This directory contains various implementions of two benchmark programs to test the efficiency of BCPL style coroutines when implemented in a variety of different languages. <p> Download cobench.tgz (or cobench.zip) and un-tar (or un-zip) it to form the directory Cobench. The enter one of the diectories: bcpl, natbcpl, mcpl, java, c and New Jersey SML and type the command:<br> make. This should compile and run the benchmark, provided you are on a Pentium machine running Linux. You may find you have to re-install the BCPL Cintcode system and you may have to edit one or more of the Makefiles. <p> There are directories for each language and implementation style. They are currently as follows: <p> bcpl The definitive BCPL implementation run using Cintcode<br> natbcpl BCPL compiled (very naively) in machine code<br> c Implementation in C using a coroutine library involving<br> setjmp, longjump and two instructions of inline assembler.<br> nat-c Implemetation in C using a hand written coroutine library<br> in assembler (for the Pentium).<br> java Implementation in Java using a coroutine library based on<br> threads using wait, notify and synchronisation.<br> javadep An incorrect implementation in Java attempting to use the<br> deprecated mesthod suspend and resume.<br> mcpl An interpretive implementation in MCPL<br> smlnj An implementation in Standard ML using New Jersey Continuations.<br> haskell An untested approximation to the benchmark in Haskell. <p> All these implementations can be run under Linux (provided the relevant compilers have been installed). They are typically run use make as follows: <p> make Same as make help<br> make help Display the help infomation<br> make bench Run cobench<br> make bencht Run cobench with tracing<br> make sim Run cosim<br> make simt Run cosim with tracing<br> make test Run cotest<br> make clean Delete any files that can be reconstructed <p> The program cotest tests where the BCPL style coroutines have been implemented correctly. <p> The benchmark: cobench <p> This benchmark program creates a source coroutine, 500 copy coroutines and a sink coroutine. It then causes the source coroutine to transmit 10,000 numbers through all the copy coroutines to be thrown away by the sink coroutine. The numbers are sent one at a time, and all transmission from one coroutine to the next uses a coroutine implementation of Occam channels. <p> Reading and writing are done (in the BCPL version) using coread and cowrite, respectively. These are defined as follows: <p> AND coread(ptr) = VALOF<br> { LET cptr = !ptr<br> TEST cptr<br> THEN { !ptr := 0 // Clear the channel word<br> RESULTIS resumeco(cptr, currco)<br> }<br> ELSE { !ptr := currco // Set channel word to this coroutine<br> RESULTIS cowait() // Wait for value from cowrite<br> }<br> } <p> AND cowrite(ptr, val) BE<br> { LET cptr = !ptr<br> TEST cptr<br> THEN { !ptr := 0<br> callco(cptr, val) // Send val to coread<br> }<br> ELSE { !ptr := currco<br> callco(cowait(), val)<br> }<br> } <p> In both functions, ptr points to a channel word which hold zero (=FALSE) if no coroutine is waiting on the channel. The first coroutine to call coread (or cowrite) puts its own identity into the channel word and then waits. When the second coroutine reaches the corresponding cowrite (or coread) call, it can see the identity of the other coroutine that is waiting. <p> If the writing coroutine arrives at the communication point second, it picks the identity of the reading coroutine out of the channel word, clears the channel word, and then transmits the value to the waiting<br> read coroutine using a simple call of callco. <p> If the reading coroutine arrives at the communication point second, it gives its own identity to the waiting write coroutine then waits for the value to be sent. A little thought will show you why coread uses<br> resumeco to transmit its own identity to the write coroutine. <p> If you are not familiar with BCPL coroutines, you can read about them in the BCPL manual that is available via my home page. <p> This directory currently holds four implementations of the benchmark: bcpl, natbcpl, java and c. When run on a 1 GHz Pentium III they take the following times: <p> BCPL Cintcode byte stream interpreter: 4.78 secs <p> BCPL Native 386 code (unoptimised): 0.81 secs <p> BCPL under Cintpos using an interpreter implemented<br> in C and all debugging aids on turned on: 10 secs <p> MCPL Mintcode byte stream interpreter: 10.51 secs <p> Java j2sdk1.4.0 JIT (using threads): 191.59 secs <p> Java j2sdk1.4.0 JIT (using threads, suspend and resume): 2029.44 secs <p> C using setjmp and longjmp + inline assembler: 1.36 secs <p> C using colib written in assembler 0.61 secs <p> New Jersey SML using continuations: 4.37 secs <p> BCPL Cintcode on a 75Mhz SH3 (HP 620LX Handheld) 115.52 secs <p> The Java implementation was done by Eben Upton and the first of the C versions using setjmp, longjmp and inline assembler by Jeremy Singer. <p> <br> The benchmark: cosim <p> This benchmark is a discrete event simulator that simulates messages passing through a network of nodes. The nodes are numbered 1 to 500 and are each initially given a message to process. The time to process a message is randomly distributed between 0 and 999 units of simulated time. Once a message has been processed it is sent to another node selected at random. The transmission delay is assumed to be ABS(i-j) where i and j are the source and destination node numbers. Nodes can only process one message at a time and so messages may have to be queued. Initially each node is assumed to have just received a message. The simulation starts a time 0 and finishes at time<br> 1,000,000. The result, 501907, is the total count of messages that have been completely processed by the finishing time. This benchmark executes 435,363,350 Cintcode instructions and performs 2,510,520 coroutine changes. The timing results are as follows: <p> BCPL Cintcode byte stream interpreter: 9.02 secs <p> BCPL Native 386 code (unoptimised): 1.11 secs <p> BCPL under Cintpos using an interpreter implemented<br> in C and all debugging aids on turned on: 17 secs <p> MCPL Mintcode byte stream interpreter: ??.?? secs <p> Java j2sdk1.4.0 JIT (using threads, wait and notify): 43.13 secs <p> Java j2sdk1.4.0 JIT (using threads, suspend and resume): 512.03 secs <p> C using setjmp and longjmp + inline assembler: 0.80 secs <p> C using colib written in assembler 0.58 secs <p> New Jersey SML using continuations: 4.08 secs <p> BCPL Cintcode on a 75Mhz SH3 (HP 620LX Handheld) 121.22 secs <p> Martin Richards<br> 20 July 2004</font><br> </p> </blockquote> <h4>[Nov 12, 2004] <a target="_blank" href="http://www.goron.de/~froese/coro/coro.html">C Coroutines</a></h4> <blockquote> <p><font size="2" face="Arial">co_create, co_call, co_resume, co_delete, co_exit_to, co_exit - C coroutine management <p> The <b>coro</b> library implements the low level functionality for coroutines. For a definition of the term <b>coroutine </b> see <u>The Art of Computer Programming</u> by <u>Donald E. Knuth</u>. In short, you may think of coroutines as a very simple cooperative multitasking environment where the switch from one task to another is done explicitly by a function call. And, coroutines are fast. Switching from one coroutine to another takes only a couple of assembler instructions more than a normal function call. <p> This document defines an API for the low level handling of coroutines i.e. creating and deleting coroutines and switching between them. Higher level functionality (scheduler, etc.) is not covered.</font></p> </blockquote> <h4> <a target="_blank" href="http://compilers.iecc.com/comparch/article/95-11-197"> Comp.compilers Re Assembly verses a high-level language.</a></h4> <blockquote> <blockquote> <p><i>From comp.compilers</i></p> </blockquote> <table cellspacing="0" cellpadding="0"> <tr> <td><b>Newsgroups: </b></td> <td>comp.compilers</td> </tr> <tr> <td><b>From: </b></td> <td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="016c606273606a6872416e72672f6e7366">[email protected]</a> (Stavros Macrakis)</td> </tr> <tr> <td><b>In-Reply-To: </b></td> <td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f682999b809f869384b69f8ed898938295999bd895999b">[email protected]</a>'s message of Mon, 20 Nov 1995 03:53:54 GMT</td> </tr> <tr> <td><b>Keywords: </b></td> <td>performance, assembler</td> </tr> <tr> <td><b>Organization: </b></td> <td>OSF Research Institute</td> </tr> <tr> <td><b>References: </b></td> <td> <a target="_blank" href="http://compilers.iecc.com/comparch/article/95-11-166"> 95-11-166</a></td> </tr> <tr> <td><b>Date: </b></td> <td>Wed, 22 Nov 1995 21:21:12 GMT</td> </tr> </table> <p><font size="2" face="Arial"><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c3b7acaeb5aab3a6b183aabbedada6b7a0acaeeda0acae">[email protected]</a> (Tom Powell ) writes:<br> </font></p> <p><font size="2" face="Arial"> How come programs written in assembly are so much faster than any<br> other high-level language. I know that it is a low-level language<br> and that it "speaks" directly to the hardware so it is faster, but<br> why can't high-level languages compile programs just as fast as<br> assembly programs?</font></p> <p><font size="2" face="Arial">First of all, assembler is not an "other" high-level language. It is<br> the low-level language par excellence, lower-level even than C :-).</font></p> <p><font size="2" face="Arial">There are several reasons that assembly programs can be faster than compiled programs:</font></p> <p><font size="2" face="Arial">The assembly programmer can design data structures which take maximum advantage of the instruction set. To a certain extent, you can do this in languages like C if you're willing to write code that is specific to the architecture. But there are some instructions which are so specialized that it is very hard for compilers to recognize that they're the best way to do things; this is mostly true in CISC architectures.</font></p> <p><font size="2" face="Arial">The assembly programmer typically can estimate which parts of the program need the most optimization, and apply a variety of tricks which it would be a bad idea to apply everywhere, because they make the code larger. I don't know of any compilers that allow "turning up" or "turning down" optimization for code fragments, although most will allow it for compilation modules.</font></p> <p><font size="2" face="Arial">The assembly programmer can sometimes use specialized runtime structures, such as for instance reserving some registers globally for things that are often used, or designing special conventions for register use and parameter passing in a group of procedures. Another example is using the top of the stack as a local, unbounded stack without respecting frame conventions.</font></p> <p><font size="2" face="Arial">Some control structures are not widely supported by commonly-usedhigher-level languages, or are too general. For instance, coroutines are provided by very few languages. Many languages now provide threads, which are a generalization of coroutines, but often have more overhead.</font></p> <p><font size="2" face="Arial">The assembly programmer is sometimes willing to do global analysis which most compilers currently don't do.</font></p> <p><font size="2" face="Arial">Finally, the assembly programmer is more immediately aware of the cost of operations, and thus tends to choose more carefully as a function of cost. As language level rises, the cost of a given operation generally becomes less and less predictable.</font></p> <p><font size="2" face="Arial">All this said, there is no guarantee than an assembly program will be faster than a compiled program. A program of a given functionality will take longer to develop in assembler than in a higher-level language, so less time is available for design and performance tuning. Re-design is particularly painful in assembler since many decisions are written into the code. In many programs, large improvements can be made in performance by improving algorithms rather than coding; assembler is a disadvantage here since coding time is larger, and flexibility is less. Finally, it is harder to write reliable assembly code than reliable higher-level language code; getting a core dump faster is not much use.</font></p> <p><font size="2" face="Arial">Compiler writers have tried, over time, to incorporate some of these advantages of assembler. The "coalescing" style of compiler in particular in many ways resembles the work of a good assembly programmer: design your data structures and inner loops together, and early on in the design process. Various kinds of optimization and global analysis are done by compilers, but in the absence of application knowledge, it is hard to bound their runtime. (Another thread in this group talked about the desirability of turning optimization up very high in some cases.)</font></p> <p><font size="2" face="Arial">-s</td> </font></p> </blockquote> <h4><a target="_blank" href="http://www.scifac.ru.ac.za/compilers/">Compilers and Compiler Generators</a> an introduction with C++ © <a target="_blank" href="/cdn-cgi/l/email-protection#b3c39dc7d6c1c1caf3c1c69dd2d09dc9d2">P.D. Terry</a>, Rhodes University, 1996 NEW (12 August 2004) </h4> <blockquote> <p align="left"><font size="2" face="Arial">A complete revision of this book, using C# and Java and the versions of Coco/R for those languages, will be published by Pearson Education in about October 2004. </font> </p> <p align="left"><font size="2" face="Arial">Further details of the date will be published here in due course. </font></p> <p align="left"><font size="2" face="Arial">A feature of the new edition is that it demonstrates the use of Coco/R to implement compilers for the JVM and CLR platforms. </font></p> <p align="left"><font size="2" face="Arial">In the meantime you can preview the contents of the <a target="_blank" href="http://www.scifac.ru.ac.za/resourcekit/">"Resource Kit"</a> which is currently under construction. This contains the preface and table of contents and additional material that will not appear in the published book. When complete it will also contain the source code for the case studies in the book and distributions of Coco/R for C# and Java. </font></p> </font></center> </blockquote> <h4><a target="_blank" href="http://compilers.iecc.com/crenshaw/">Let's Build a Compiler</a> by Jack Crenshaw </h4> <blockquote> <p><font size="2" face="Arial">This fifteen-part series, written from 1988 to 1995, is a non-technical introduction to compiler construction. You can read the parts on-line or download them in a ZIP file.</font></p> </blockquote> <h4> <a target="_blank" href="http://www.personal.kent.edu/~rmuhamma/Compilers/compiler.html"> Compilers</a> short notes and links by Rashid Bin Muhammad. <a target="_blank" href="http://www.cs.kent.edu" target="_blank"><b><i>Department of Computer Science</i></b></a>, <br> <b><a target="_blank" href="http://www.kent.edu" target="_blank"><i>Kent State University</i></a><i>. See also his interesting </i></b> <a target="_blank" href="http://www.cs.kent.edu/~rmuhamma/">Home Page</a></h4> <h4> <a target="_blank" href="http://developers.slashdot.org/article.pl?sid=04/08/13/2356209"> Slashdot Low Level Virtual Machine 1.3 Released</a></h4> <blockquote> <p><b>"VM" in LLVM name does not do it justice</b></a> (Score:4, Interesting) </font><br> by <a target="_blank" href="http://slashdot.org/~truth_revealed">truth_revealed (593493)</a> on Saturday August 14, @10:13AM ( <a target="_blank" href="http://developers.slashdot.org/comments.pl?sid=117940&cid=9966950"> #9966950</a>) </p> <p>The casual Slashdot reader may roll his/her eyes when they see yet another Virtual Machine - but this project is much more than that. It's a complete compiler infrastructure project that will one day surpass GCC. Why? Because it's around ten times easier to understand and written in a modern language (C++) rather than C. An expert C++ programmer could start contributing code to LLVM in under a month; whereas an equivalent learning curve for GCC is at least a year. Writing new compiler passes or complete language front ends for LLVM is very straight-forward, for example. The LLVM AST has the advantage of having strong typechecking and not arcane tree macros as in GCC. LLVM is not burdened with the legal or philosophical wranglings of GCC where they do NOT WANT their compiler to be the backend of a commercial compiler and try their damnedest to obscure and change the programming API from release to release. The GCC "Toy" example language has not worked in many releases for this very reason.<br> GCC recently voted down using C++ in their core code. Perhaps LLVM at the very least will drag GCC into the modern age due to competition.</p> <p><a name="9968783"><b>Speaking as a GCC maintainer, I call bullshit</b></a> (Score:5, Informative) </font><br> by <a target="_blank" href="http://slashdot.org/~devphil">devphil (51341)</a> on Saturday August 14, @02:55PM (<a target="_blank" href="http://developers.slashdot.org/comments.pl?sid=117940&cid=9968783">#9968783</a>) <br> <font size="-1">(<a target="_blank" href="http://www.devphil.com/">http://www.devphil.com/</a>)</font> </p> <p>The very best trolls always start with a grain of truth. (LLVM is much easier to understand than GCC. The GCC infrastructure is very baroque, dating from a time when assuming the presence of an ANSI C bootstrap compiler was too much. One of the major LLVM guys has presented his toolchain work at the annual GCC Summit, and maintains close communication with the rest of the GCC team -- and we wish him well. All very true; no GCC hacker would say any less.)</p> <p>The trolls then move on into wild exaggerations and complete lies. Such as:</p> <blockquote> <p><i>and try their damnedest to obscure and change the programming API from release to release.</i> </p> </blockquote> <p>Pure malicious bullshit. RMS doesn't want proprietary backends to be able to read the GCC IR, and so we don't ever write it out in a machine-readable format. But we've never gone out of our way to obfuscate the internal API.</p> <blockquote> <p><i>GCC recently voted down using C++ in their core code.</i> </p> </blockquote> <p>Again, a complete lie. We asked RMS whether we could make use of C++ in parts of the compiler. While a skilled and brilliant C and LISP hacker, RMS is a reactionary fuckhead when it comes to anything <i>other</i> than C or LISP. In his opinion, all GNU programs should be written in C, and only C, ever.</p> <p>There was no vote.</p> <p><a name="9974914"><b>Re:Speaking as a GCC maintainer, I call bullshit</b></a> (Score:3, Informative) </font><br> by <a target="_blank" href="http://slashdot.org/~devphil">devphil (51341)</a> on Sunday August 15, @02:16PM (<a target="_blank" href="http://developers.slashdot.org/comments.pl?sid=117940&cid=9974914">#9974914</a>) <br> <font size="-1">(<a target="_blank" href="http://www.devphil.com/">http://www.devphil.com/</a>)</font> </p> <p>You're not completely right, and not completely wrong. The politics are exceedingly complicated, and I regret it every time I learn more about them.</p> <p>RMS doesn't have dictatorial power over the SC, nor a formal veto vote.</p> <p>He does hold the copyright to GCC. (Well, the FSF holds the copyright, but he <i>is</i> the FSF.) That's a lot more important that many people realize.</p> <p>Choice of implementation language is, strictly speaking, a purely technical issue. But it has so many consequences that it gets special attention.</p> <p>The SC specifically avoids getting involved in technical issues whenever possible. Even when the SC is asked to decide something, they never go to RMS when they can help it, because he's so unaware of modern real-world technical issues and the bigger picture. It's far, far better to continue postponing a question than to ask it, when RMS is involved, because he will make a snap decision based on his own bizarre technical ideas, and then never change his mind in time for the new decision to be worth anything.</p> <p>He can be convinced. Eventually. It took the SC over a year to explain and demonstrate that Java bytecode could not easily be used to subvert the GPL, therefore permitting GCJ to be checked in to the official repository was okay. I'm sure that someday we'll be using C++ in core code. Just not anytime soon.</p> <p>As for forking again... well, yeah, I personally happen to be a proponent of that path. But I'm keenly aware of the damange that would to do GCC's reputation -- beyond the short-sighted typical<nobr> <wbr></wbr></nobr> <wbr>/. viewpoint of "always disobey every authority" -- and I'm still probably underestimating the problems.</wbr></p> </blockquote> <h4><b> <a target="_blank" href="http://www.ddj.com/documents/ddj0312d/"> Full-Text Searching & the Burrows-Wheeler Transform</a></b> </h4> <body> <script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script></li> <li> <blockquote> <p>Here's an indexing method that lets you find any character sequence in the source text using a structure that can fit the entire source text and index into less space than the text alone.</p> </blockquote> </body> <h4><b> <a target="_blank" href="http://www.ddj.com/documents/ddj0402f/"> Regular Expression Mining</a></b></h4> <body> </li> <li> <blockquote> <p>Regular expressions are convenient devices for identifying patterns in collections of strings.</p> </blockquote> </body> <h4><b> <a target="_blank" href="http://www.ddj.com/documents/ddj0405a/"> C/C++ Compiler Optimization</a></b> </h4> <body> </li> <li> <blockquote> <p>Squeezing the maximum execution speed from C/C++ compilers requires an understanding of optimization switches.</p> </blockquote> </body> <h4> <a target="_blank" href="https://www.amazon.com/exec/obidos/tg/detail/-/059600351X/qid=1086311382/sr=1-55/ref=sr_1_55/102-8500716-1169735?v=glance&s=books"> Shared Source CLI Essentials</a> by <a target="_blank" href="https://www.amazon.com/exec/obidos/search-handle-url/index=books&field-author=Neward,%20Ted/102-8500716-1169735"> Ted Neward</a> , <a target="_blank" href="https://www.amazon.com/exec/obidos/search-handle-url/index=books&field-author=Stutz,%20David/102-8500716-1169735"> David Stutz</a>, <a target="_blank" href="https://www.amazon.com/exec/obidos/search-handle-url/index=books&field-author=Shilling,%20Geoff/102-8500716-1169735"> Geoff Shilling</a></h4> <ul> <li><b>Paperback:</b> 378 pages </li> <li><b>Publisher:</b> O'Reilly & Associates; Book and CD-ROM edition (March 2003) </li> <li><b>ISBN:</b> 059600351X <br> </li> <li><b>Average Customer Review:</b> <img alt="5 out of 5 stars" src="http://g-images.amazon.com/images/G/01/detail/stars-5-0.gif" border="0" width="64" height="12"> Based on 3 reviews.</li> <img alt="5 out of 5 stars" src="http://g-images.amazon.com/images/G/01/x-locale/common/customer-reviews/stars-5-0.gif" border="0" width="64" height="12"> <b>Best source for .NET implementation details</b>, October 28, 2003 <br> <table cellspacing="0" cellpadding="0"> <tr> <td> </td> <td><font face="verdana,arial,helvetica" size="-1">Reviewer: <b>Rick Byers </b>from Toronto, ON Canada </font></td> </tr> </table> <p>This book is the best and most concentrated source of information I've found for understanding how the .NET CLR is implemented (comparable only to Chris Brumme's blog). Even if you never actually build the SSCLI, this book combined with the SSCLI source code can provide a solid understanding of what's going on behind the scenes in the commercial CLR. I have found this level of understanding to be absolutely necessary in understanding and diagnosing some types of unusual behaviour or performance characteristics of .NET. </p> <p>If you're not using the SSCLI on a UNIX machine and have a solid understanding of the Win32 API, you can probably safely skip the last chapter on the PAL as it is somewhat anti-climatic. However, coming from a UNIX programming background myself, I found it to be of value in solidifying my understanding of Win32 specific functionality (eg. structured exception handling) and how its used by the SSCLI. </p> <p>Obviously this book is a must-read for anyone that is actually experimenting with the SSCLI, but I also consider it essential for anyone that wants to fully understand how the commercial version of .NET works. </p> <p> <img alt="5 out of 5 stars" src="http://g-images.amazon.com/images/G/01/x-locale/common/customer-reviews/stars-5-0.gif" border="0" width="64" height="12"> <b>Magnificent!</b>, April 26, 2003 <br> </p> <table cellspacing="0" cellpadding="0"> <tr> <td> </td> <td><font face="verdana,arial,helvetica" size="-1">Reviewer: <b>Jason Whittington </b>from Tucson, AZ USA </font></td> </tr> </table> <p>As someone who has spent a fair amount of time toying with and writing about managed code I have to say that I am in awe of the wisdom and clarity contained in this book. "SSCLI Essentials" transcends its subject matter (a research platform unlikely to be used much outside of academia) to be one of the best books I've ever read on Virtual Execution concepts. Java, the CLR, Smalltalk, and all other such environments ultimately have to solve the same problem (How to turn source code into executing machine instructions?). <i><b>This book uses the SSCLI as a backdrop for exploring decades of VM research and explaining the historical forces influencing how and why this particular implementation (and by implication, Microsoft's commercial CLR) works. </b></i></p> <p>The resulting volume is concise, fascinating, and thorough. Given the increasing importance of virtual environments in the computing world today I think most all working developers (including Java developers!) owe it to themselves to read this book. Even if you never plan to install or use the SSCLI codebase you'll benefit from Dave and friends' lucid explanation of the issues facing modern VM environments and how one particularly popular platform chooses to solve them. </p> </li> </ul> <h4>[May 22, 2004] <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/">lcc, A Retargetable Compiler for ANSI C</a></h4> <ul> <li>A updated, complete description of the <a target="_blank" href="http://www.research.microsoft.com/~drh/pubs/interface4.pdf"> lcc 4.x Code-Generation Interface</a> (<small>PDF 256K</small>). </li> <li>The lcc 4.2 distribution <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/pkg/LOG"> <tt>LOG</tt></a> and <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/pkg/README"> <tt>README</tt></a> files. </li> <li> <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/doc/06.pdf"> A sample chapter</a> from <cite>A Retargetable C Compiler</cite> (<small>PDF 339K</small>). </li> <li> <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/asdl.html"> Using ASDL with lcc 4.1</a>. </li> <li> <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/cdb/"> cdb</a>, a machine-independent debugger. </li> <li>User-contributed software is available in <a target="_blank" href="ftp://ftp.cs.princeton.edu/pub/packages/lcc/contrib"> <tt>/pub/packages/lcc/contrib</tt></a>; its <a target="_blank" href="ftp://ftp.cs.princeton.edu/pub/packages/lcc/contrib/README"> <tt>README</tt></a> lists the contributions and gives instructions for contributors. </li> <li>lcc 3.6 <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/3.6"> source code</a>. </li> <li>A <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/doc/"> bibliography</a> of lcc-related papers and talks. </li> </ul> <p><b><i>Note: Due to the volume of this page previous years of "Old News" was moved to the page <a target="_blank" href="Compilers/sp1999-2003.shtml">Compilers Chronicle 1999-2003</a> ; </i><i>Recommended Links</i><i> section of the page was also moved to a <a href>separate page</a></i></b></p> <h2><a name="Recommended_Links">Recommended Links</a></h2> <table border="0" width="100%" height="220"> <tr> <td width="100%" align="center"> <h3>Google matched content</h3> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-4031247137266443" data-ad-slot="1626659014"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </td> </table> <h3>Softpanorama Recommended</h3> <h3><a name="Top_articles">Top articles</a></h3><h3><a name="Sites">Sites</a></h3> <ul> <li> <p align="left"> <a target="_blank" href="http://www.iturls.com/English/SoftwareEngineering/SE_Complier.asp"> Complier</a> A very extensive collection of links [as of Dec 11, 2007] </p> </li> </ul> <h4 align="center"><a name="Top_Links">Top Links</a></h4> <ul> <li><a target="_blank" href="https://en.wikipedia.org/wiki/Compiler">Compiler - Wikipedia, the free encyclopedia</a></li> <li><a target="_blank" href="https://www.geeksforgeeks.org/error-handling-compiler-design/">Error Handling in Compiler Design - GeeksforGeeks</a></li> <li>***** <a target="_blank" href="http://dmoz.org/Computers/Programming/Compilers/"> Open Directory - Computers Programming Compilers</a> -- not bad but still need work. <ul> <li> <a target="_blank" href="http://dmoz.org/Computers/Programming/Compilers/Lexer_and_Parser_Generators/"> Lexer and Parser Generators</a></li> <li> <a target="_blank" href="http://dmoz.org/Computers/Programming/Compilers/Attribute_Grammar_Systems/"> Attribute Grammar Systems</a></li> <li> <a target="_blank" href="http://dmoz.org/Computers/Programming/Compilers/Code_Generator_Kits/"> Code Generator Kits</a></li> <li> <a target="_blank" href="http://dmoz.org/Computers/Programming/Compilers/Compiler_Construction_Kits/"> Compiler Construction Kits</a></li> <li> <a target="_blank" href="http://dmoz.org/Computers/Programming/Compilers/Cross_Compilers/"> Cross Compilers</a></li> <li> <a target="_blank" href="http://dmoz.org/Computers/Programming/Compilers/Theory/"> Theory</a></li> <li> <a target="_blank" href="http://dmoz.org/Computers/Programming/Compilers/Transformation_Tools/"> Transformation Tools</a><br> </li> </ul> </li> <li><a target="_blank" href="http://www.compilers.net/">Compilers.net</a> -- Looks like a compiler portal. Not much theory... The site has a newsletter and a mailing list</li> <li>***** <a target="_blank" href="http://www.researchindex.com/">ResearchIndex The NECI Scientific Literature Digital Library [Steve Lawrence, Kurt Bollacker, Lee Giles, NEC Research Institute]</a> -- this is the best search engine for compiler related papers. </li> <li> <a target="_blank" href="http://www.cbel.com/Compilers_Programming/"> Compilers Programming ( 124 human selected links )</a> -- nice collection</li> <li> <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/"> lcc, A Retargetable Compiler for ANSI C</a><ul> <li>A updated, complete description of the <a target="_blank" href="http://www.research.microsoft.com/~drh/pubs/interface4.pdf"> lcc 4.x Code-Generation Interface</a> (<small>PDF 256K</small>). </li> <li>The lcc 4.2 distribution <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/pkg/LOG"> <tt>LOG</tt></a> and <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/pkg/README"> <tt>README</tt></a> files. </li> <li> <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/doc/06.pdf"> A sample chapter</a> from <cite>A Retargetable C Compiler</cite> (<small>PDF 339K</small>). </li> <li> <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/asdl.html"> Using ASDL with lcc 4.1</a>. </li> <li> <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/cdb/"> cdb</a>, a machine-independent debugger. </li> <li>User-contributed software is available in <a target="_blank" href="ftp://ftp.cs.princeton.edu/pub/packages/lcc/contrib"> <tt>/pub/packages/lcc/contrib</tt></a>; its <a target="_blank" href="ftp://ftp.cs.princeton.edu/pub/packages/lcc/contrib/README"> <tt>README</tt></a> lists the contributions and gives instructions for contributors. </li> <li>lcc 3.6 <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/3.6"> source code</a>. </li> <li>A <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/doc/"> bibliography</a> of lcc-related papers and talks. </li> </ul> </li> <li><a target="_blank" href="http://www.bloodshed.net/compilers/">Bloodshed Software - Compilers resources</a></li> <li><a target="_blank" href="http://www.mathtools.net/">http://www.mathtools.net/</a> more than 20,000 useful links to programming resources, including books and papers</li> <li> <a target="_blank" href="http://www-124.ibm.com/developerworks/oss/"> developerWorks Open source</a><ul> <li><font face="Arial"><b><font size="2">First-of-its-kind compiler farm</font></b><font size="2">: Members of developerWorks open source projects can now compile their code on the first compiler farm in the OS community that runs on an <a target="_blank" href="http://www-1.ibm.com/servers/eserver/zseries/os/linux/index.html"> IBM eServer zSeries</a> server, the world's first dedicated Linux mainframe. Project administrators can <a target="_blank" href="http://www-106.ibm.com/developerworks/linux/library/l-osfarm.html"> request access</a> for their project team members. </font> </font></li> <li><font face="Arial"><b><font size="2">Eclipse project code donation</font></b><font size="2">: IBM's recent release of $40 million worth of tools to the open source Eclipse project will form the basis of IBM's next generation of WebSphere Studio products. Get an <a target="_blank" href="http://www-106.ibm.com/developerworks/linux/library/os-plat/"> introduction to the Eclipse Platform and how it operates</a>, see the benefits that tool developers can expect in our <a target="_blank" href="http://www-106.ibm.com/developerworks/linux/library/l-erick.html"> interview with OTI marketing lead, Marc Erickson</a>, and learn more about <a target="_blank" href="http://www-106.ibm.com/developerworks/linux/library/l-eclipse.html"> refactoring with Eclipse</a>. You can join the Eclipse community and download the latest builds produced by the Eclipse project at the <a target="_blank" href="http://www.eclipse.org">Eclipse.org</a> site. </font></font></li> <li><font face="Arial"><b><font size="2">New project</font></b><font size="2">: <a target="_blank" href="http://www-124.ibm.com/developerworks/oss/jikesrvm/"> Jikes Research Virtual Machine (Jikes RVM)</a> executes Java<sup>TM</sup> programs that are typically used in research on fundamental virtual machine design issues. It gives academic and research communities a flexible testbed to prototype new virtual machine technologies and experiment with design alternatives. Running on AIX/PowerPC, Linux/PowerPC, and Linux/IA-32 platforms, it includes state-of-the-art virtual machine technologies for dynamic compilation, adaptive optimization, garbage collection, thread scheduling, and synchronization </font></font></li> </ul> </li> <li> <a target="_blank" href="http://www.cs.qub.ac.uk/~D.McKeever/csc303/Reference/Bibliography.html"> Bibliography of Compiler Construction</a></li> <li> <a target="_blank" href="http://liinwww.ira.uka.de/bibliography/Compiler/"> Bibliographies on Programming Languages, Type Theory and Compiler Technology</a></li> <li> <a target="_blank" href="http://editorial.cic.ipn.mx/bibliography/index.html"> Computer Science Bibliography Collection</a>. </li> <li><a target="_blank" href="http://www.compilerconnection.com/">Compiler Connection</a></li> <li><a target="_blank" href="http://www.sygot.hotmail.ru/">Sergey Gorelov's Homepage</a></li> <li> <a target="_blank" href="http://community.borland.com/directory/Computers/Programming/Compilers/"> Borland Directory-Compilers</a></li> <li> <a target="_blank" href="http://www.codesites.com/search/search.cgi?category=Compilers&start=0"> CODESITES/Compilers</a> -- nice collection of links</li> <li><a target="_blank" href="http://www.acm.org/repository/">ACM Computing Research Repository</a> -- great ![July 2, 1999]</li> <li> <a target="_blank" href="http://www.cs.iastate.edu/~leavens/favorite-places/programmingLanguages.html"> Programming Languages</a></li> <li> <a target="_blank" href="http://vismod.www.media.mit.edu/~tpminka/PLE/"> Programming Language Exploration</a></li> <li> <a target="_blank" href="http://www.dml.cs.ucf.edu/~kilby/classes/Classes-Taken/cap5021/index_page.html"> Compiler Construction Info</a></li> <li> <a target="_blank" href="http://www.complang.tuwien.ac.at/nino/cs/compilers.html"> Compilers and Programming Languages</a></li> <li><a target="_blank" href="http://www.box.net.au/~matty/ultra/">The Ultra Programming Language Project</a> - Are you interested in language design or compiler construction? The Ultra project is about developing free tools for supporting programming. The project is looking for members</li> <li> <a target="_blank" href="http://204.49.131.2/usr/marcus/compiler.htm"> Marcus Featherston's <b>Compilers</b>, Languages, and Grammars Page</a> - <b>Compilers</b>, Languages, and Grammars...</li> <li> <a target="_blank" href="http://www.csse.monash.edu.au/mirrors/bibliography/Misc/HBP/PLDI.html"> Bibliography of "ACM SIGPLAN Conference on <b>Programming Language Design</b> and Implementation"</a> </li> <li> <a target="_blank" href="http://researchsmp2.cc.vt.edu/DB/db/conf/pldi/"> PLDI -- SIGPLAN Conference on Programming Language Design and Implementation</a></li> <li> <a target="_blank" href="http://joinus.comeng.chungnam.ac.kr/~dolphin/db/journals/index.html"> Computer Science Journals</a> </li> <li><a target="_blank" href="http://www.dcs.qmw.ac.uk/">QMW - Department of Computer Science</a> </li> <li> <a target="_blank" href="http://www.first.gmd.de/cogent/catalog/alphabetical.html"> Resources for Compiler Writers</a> </li> <li> <a target="_blank" href="http://liinwww.ira.uka.de/bibliography/index.html"> A Collection of Computer Science Bibliographies</a> </li> <li> <a target="_blank" href="http://cuiwww.unige.ch/OSG/Vitek/Compilers/index.html"> Compiler Archive(Comp.compilers)</a> </li> <li> <a target="_blank" href="http://www.cera2.com/softd/compiler.htm">Compiler Internet Resource List</a> (http://www.cera2.com/softd/compiler.htm) </li> <li> <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/"> lcc, A Retargetable Compiler for ANSI C</a> </li> <li><a target="_blank" href="http://www.cs.vu.nl/~dick/PTAPG.html">Parsing Techniques - A Practical Guide</a> </li> <li><a target="_blank" href="http://www.cwi.nl/~steven/pascal.html"> Pascal Implementation(pascal)</a> </li> <li> <a target="_blank" href="http://www.canterbury.ac.nz/~bruce/ErrorRepair.html"> Error Repair in Shift-Reduce Parsers</a> </li> <li> <a target="_blank" href="http://wuarchive.wustl.edu/languages/c/unix-c/languages/pascal/"> Pascal(yacc)</a> </li> <li> <a target="_blank" href="ftp://ftp.idiom.com/pub/compilers-list/free-compilers"> Catalog of Free Compilers and Interpreters.</a> </li> <li> <a target="_blank" href="http://remarque.berkeley.edu/~muir/free-compilers/"> Catalog of Free Compilers and Interpreters(org)</a> </li> <li> <a target="_blank" href="http://www.cs.jcu.edu.au/ftp/users/ASloane/eli/4.0/elionline/syntax_toc.html"> Syntactic Analysis - Table of Contents</a> </li> <li> <a target="_blank" href="http://liinwww.ira.uka.de/bibliography/Compiler/AG.html" last_visit="833693133" add_date="833709110"> (A Machine-readable Bibliography on Attribute Grammars)</a> </li> <li> <a target="_blank" href="http://http.cs.berkeley.edu/~zhendong/cs264/master.html" last_visit="835281338" add_date="835137616"> History-Sensitive Interactive Error Recovery in Incremental Parsers</a> </li> <li> <a target="_blank" href="http://heg-school.aw.com/cseng/authors/wirth/compiler/compiler.html"> AW * Wirth * Compiler Construction *</a></li> <li><a target="_blank" href="http://webster.cs.ucr.edu/">Art of Assembly Language Programming and HLA by Randall Hyde</a> -- HLA is high level assembler that according to the author is the radical new way to write assembly code, faster and easier than ever before...</li> </ul> <hr> <h2 align="center"><a name="Ebooks">Ebooks</a></h2> <p><a target="_blank" href="http://www-old.oberon.ethz.ch/WirthPubl/CBEAll.pdf">Compiler Construction</a> by Niklaus Wirth</p> <blockquote> <p>This is a slightly revised version of the book published by Addison-Wesley in 1996</p> <p>131 pages</p> <p>ISBN 0-201-40353-6</p> <p>Zürich, November 2005</p> </blockquote> <p><a target="_blank" href="https://en.wikibooks.org/wiki/Compiler_construction">Compiler Construction - Wikibooks, collection of open-content textbooks</a></p> <ul> <li> <a title="Compiler Construction/About the Book" href="https://en.wikibooks.org/wiki/Compiler_Construction/About_the_Book"> About the Book</a></li> <li> <a title="Compiler Construction/Introduction" href="https://en.wikibooks.org/wiki/Compiler_Construction/Introduction"> Introducing Compilers and Interpreters</a> <a title="100% developed as of Feb 3, 2005" href="https://en.wikibooks.org/wiki/Help:Development_stages"> <img alt="100% developed as of Feb 3, 2005" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/ce/100%25.svg/9px-100%25.svg.png" width="9" height="9"></a><small> (Feb 3, 2005)</small></li> <li> <a title="Compiler Construction/Describing a Programming Language" href="https://en.wikibooks.org/wiki/Compiler_Construction/Describing_a_Programming_Language"> Describing a Programming Language</a></li> <li> <a title="Compiler Construction/Lexical analysis" href="https://en.wikibooks.org/wiki/Compiler_Construction/Lexical_analysis"> Lexical analysis</a> <a title="0% developed as of Jan 31, 2005" href="https://en.wikibooks.org/wiki/Help:Development_stages"> <img alt="0% developed as of Jan 31, 2005" src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d6/00%25.svg/9px-00%25.svg.png" width="9" height="9"></a><small> (Jan 31, 2005)</small></li> <li> <a title="Compiler Construction/Case Study 1" href="https://en.wikibooks.org/wiki/Compiler_Construction/Case_Study_1"> Case Study 1 - a simple Interpreter</a> <a title="25% developed as of Feb 15, 2005" href="https://en.wikibooks.org/wiki/Help:Development_stages"> <img alt="25% developed as of Feb 15, 2005" src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/34/25%25.svg/9px-25%25.svg.png" width="9" height="9"></a><small> (Feb 15, 2005)</small></li> <li> <a title="Compiler Construction/Syntax Analysis" href="https://en.wikibooks.org/wiki/Compiler_Construction/Syntax_Analysis"> Syntax Analysis</a></li> <li> <a title="Compiler Construction/Case Study 1B" href="https://en.wikibooks.org/wiki/Compiler_Construction/Case_Study_1B"> Case Study 1B - a Compiler/Interpreter front-end written in C using Lex and Yacc</a></li> <li> <a title="Compiler Construction/Semantic Analysis" href="https://en.wikibooks.org/wiki/Compiler_Construction/Semantic_Analysis"> Semantic Analysis</a></li> <li> <a title="Compiler Construction/Intermediate Representation" href="https://en.wikibooks.org/wiki/Compiler_Construction/Intermediate_Representation"> Intermediate Representation</a></li> <li> <a title="Compiler Construction/Dealing with errors" href="https://en.wikibooks.org/wiki/Compiler_Construction/Dealing_with_errors"> Dealing with errors</a> <a title="100% developed as of Jan 27, 2005" href="https://en.wikibooks.org/wiki/Help:Development_stages"> <img alt="100% developed as of Jan 27, 2005" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/ce/100%25.svg/9px-100%25.svg.png" width="9" height="9"></a><small> (Jan 27, 2005)</small></li> <li> <a title="Compiler Construction/Optimization" href="https://en.wikibooks.org/wiki/Compiler_Construction/Optimization"> Optimization</a></li> <li> <a title="Compiler Construction/Code Generation" href="https://en.wikibooks.org/wiki/Compiler_Construction/Code_Generation"> Code Generation</a></li> <li> <a title="Compiler Construction/Run-time Considerations" href="https://en.wikibooks.org/wiki/Compiler_Construction/Run-time_Considerations"> Run-time Considerations</a></li> <li> <a title="Compiler Construction/Known Languages Conceptual Implementations" href="https://en.wikibooks.org/wiki/Compiler_Construction/Known_Languages_Conceptual_Implementations"> Known Languages Conceptual Implementations</a></li> <li> <a title="Compiler Construction/Glossary" href="https://en.wikibooks.org/wiki/Compiler_Construction/Glossary"> Glossary</a> <a title="75% developed as of Feb 15, 2005" href="https://en.wikibooks.org/wiki/Help:Development_stages"> <img alt="75% developed as of Feb 15, 2005" src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/49/75%25.svg/9px-75%25.svg.png" width="9" height="9"></a><small> (Feb 15, 2005)</small></li> <li> <a title="Compiler Construction/External Links" href="https://en.wikibooks.org/wiki/Compiler_Construction/External_Links"> External Links</a></li> <li> <a title="Compiler Construction/References" href="https://en.wikibooks.org/wiki/Compiler_Construction/References"> References</a></li> </ul> <p><a target="_blank" href="http://www.cs.vu.nl/~dick/PTAPG.html">Parsing Techniques - A Practical Guide</a> by Dick Grune and Ceriel J.H. Jacobs. Originally published by Ellis Horwood, Chichester, England, 1990; ISBN 0 13 651431 6 A small but and too formalistic book about parsing</p> <blockquote> <p><font size="2" face="Arial">This 320-page book treats parsing in its own right, in greater depth than is found in most computer science and linguistics books. It offers a clear, accessible, and thorough discussion of many different parsing techniques with their interrelations and applicabilities, including error recovery techniques. Unlike most books, it treats (almost) all parsing methods, not just the popular ones. See <a target="_blank" href="ftp://ftp.cs.vu.nl/pub/dick/PTAPG/preface.ps.gz"> Preface + Introduction</a> and/or <a target="_blank" href="ftp://ftp.cs.vu.nl/pub/dick/PTAPG/contents.ps.gz"> Table of Contents</a> for a quick impression.</font></p> <p align="left">The authors also participates in writing of a newer book <a target="_blank" href="https://www.amazon.com/exec/obidos/ASIN/0471976970/ref=nikolaibezroukov"> Modern Compiler Design</a> <a target="_blank" href="http://www.wiley.co.uk/">John Wiley & Sons, Ltd.</a>, pp. 736 + xviii, 2000; <a target="_blank" href="http://www.wiley.co.uk/wileychi/grune/">ISBN 0 471 97697 0</a></p> </blockquote> <p>Structure and Interpretation of Computer Programs: Written by Hal Abelson, Jerry Sussman and Julie Sussman, this book is the very famous "Wizard Book", a computer science text used in the introductory courses at MIT. Download it from <a target="_blank" href="http://mitpress.mit.edu/sicp/full-text/book/book.html"> http://mitpress.mit.edu/sicp/full-text/book/book.html </a></p> <p>Optimizing C++: Written by Steve Heller, this book focus specially in what its title says: optimization in C++. Though it's not as ground breaking as Abrash's Black Book, it's worthy reading for some interesting algorithms and techniques. Download it from <a target="_blank" href="http://www.steveheller.com/opt/">http://www.steveheller.com/opt/ </a></p> <p>Compiler Construction using Flex and Bison: A small (102 pages) boot by Anthony A. Aaby. Explains step by step the way to program compilers that use Flex and Bison (including very detailed information about both tools). Download it from <a target="_blank" href="http://cs.wwc.edu/~aabyan/464/Book/">http://cs.wwc.edu/~aabyan/464/Book/ </a></p> <p>Compilers and Compiler Generators: <a target="_blank" href="http://scifac.ru.ac.za/compilers/">http://scifac.ru.ac.za/compilers/</a></p> <hr> <h2 align="center"><a name="Web-based Courses">WEB-based materials of University Courses</a></h2> <p align="left">See also: <a target="_blank" href="http://joda.cis.temple.edu/courses-lang.html">A List of Courses in Principles and Implementation of Programming Languages</a> </p> <ul> <li><a target="_blank" href="http://compilers.iecc.com/crenshaw/">Let's Build a Compiler</a> by Jack Crenshaw. This fifteen-part series, written from 1988 to 1995, is a non-technical introduction to compiler construction. You can read the parts on-line or download them in a ZIP file.<ul> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor1.txt"> <font size="2">Part 1: INTRODUCTION</font></a><font size="2"> </font></li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor2.txt"> <font size="2">Part 2: EXPRESSION PARSING</font></a><font size="2"> </font></li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor3.txt"> <font size="2">Part 3: MORE EXPRESSIONS</font></a><font size="2"> </font></li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor4.txt"> <font size="2">Part 4 INTERPRETERS</font></a><font size="2"> </font></li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor5.txt"> <font size="2">Part 5: CONTROL CONSTRUCTS</font></a><font size="2"> </font></li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor6.txt"> <font size="2">Part 6: BOOLEAN EXPRESSIONS</font></a><font size="2"> </font></li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor7.txt"> <font size="2">Part 7: LEXICAL SCANNING</font></a><font size="2"> </font></li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor8.txt"> <font size="2">Part 8: A LITTLE PHILOSOPHY</font></a><font size="2"> </font></li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor9.txt"> <font size="2">Part 9: A TOP VIEW</font></a><font size="2"> </font></li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor10.txt"> <font size="2">Part 10: INTRODUCING "TINY"</font></a><font size="2"> </font></li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor11.txt"> <font size="2">Part 11: LEXICAL SCAN REVISITED</font></a><font size="2"> </font></li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor12.txt"> <font size="2">Part 12: MISCELLANY</font></a><font size="2"> </font></li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor13.txt"> <font size="2">Part 13: PROCEDURES</font></a><font size="2"> </font></li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor14.txt"> <font size="2">Part 14: TYPES</font></a><font size="2"> </font> </li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor15.txt"> <font size="2">Part 15: BACK TO THE FUTURE</font></a><font size="2"> </font></li> <li> <a target="_blank" href="http://compilers.iecc.com/crenshaw/tutor16.txt"> <font size="2">Part 16: UNIT CONSTRUCTION </font></a></li> </ul> <p> </p> </li> <li> <a target="_blank" href="http://garnet.cs.byu.edu/cs431//CompilerText/"> Compiler Theory and Design</a> a decent intro e-book. Copyright 2000 Brigham Young University. As I mentioned before, lexical analyzers are more conveniently to program by hand and that permits to implement some additional nice things like checking the length of comments, quoted literals, etc, so the corresponding chapter can probably be skipped or just browsed. Chapter on syntax analysis explains recursive decent which is a pretty good method for the "language at large" (although for "language at small" like arithmetic expressions and Boolean expressions one can use something different with a better diagnostic capabilities). Code generation is explained using a pseudo-assembler without using a separate pass for address generation. The problems of compilation OO languages are covered although it's not that necessary for an intro course. <i>Suggested by Yavor Kolarov <<a target="_blank" href="/cdn-cgi/l/email-protection#c8a3a7a4a9baa7be88a6adbce5aaafe6a6adbc"><span class="__cf_email__" data-cfemail="117a7e7d70637e67517f74653c73763f7f7465">[email protected]</span></a>><br> </i></li> <li> <a target="_blank" href="http://scifac.ru.ac.za/compilers/index.htm"> Compilers and Compiler Generators</a> -- free electromic book by © <a target="_blank" href="/cdn-cgi/l/email-protection#c8b8e6bcadbabab188babde6a9abe6b2a9">P.D. Terry</a>, Rhodes University, 1996<br> </li> <li><a target="_blank" href="http://www.cs.vu.nl/~dick/PTAPG.html">Parsing Techniques - A Practical Guide</a> by Dick Grune and Ceriel J.H. Jacobs. Originally published by Ellis Horwood, Chichester, England, 1990; ISBN 0 13 651431 6 A small but a good book about parsing, explaining all in an almost academic way. <p><font size="2" face="Arial">This 320-page book treats parsing in its own right, in greater depth than is found in most computer science and linguistics books. It offers a clear, accessible, and thorough discussion of many different parsing techniques with their interrelations and applicabilities, including error recovery techniques. Unlike most books, it treats (almost) all parsing methods, not just the popular ones. See <a target="_blank" href="ftp://ftp.cs.vu.nl/pub/dick/PTAPG/preface.ps.gz"> Preface + Introduction</a> and/or <a target="_blank" href="ftp://ftp.cs.vu.nl/pub/dick/PTAPG/contents.ps.gz"> Table of Contents</a> for a quick impression.</font><br> </p> </li> <li> <a target="_blank" href="http://www.cs.purdue.edu/homes/hosking/502/index.html"> CS502 Information</a> -- Purdue Univ. Compiling and Programming Systems (Hosking)<br> </li> <li> <a target="_blank" href="http://www.cs.utexas.edu/users/novak/cs375.html"> Compilers</a> -- UTexas. Compilers for programming languages, Pascal, PowerPC machine code. Syllabus. Assignments. Study guides. Links to related materials. By Gordon S. Novak Jr, University of Texas at Austin.<br> </li> <li> <a target="_blank" href="http://www.risc.uni-linz.ac.at/people/schreine/courses/types/types.html"> Structure of Programming Languages II: Types, Modules, Classes</a> -- Syntactic and semantic features of modern programming languages and their impact on language design. A rational reconstruction of imperative languages such as Pascal, Ada, and Modula-3 and functional languages such as scheme and ML. Syllabus and lecture notes. By Wolfgang Schreiner, Research Institute for Symbolic Computation, Johannes Kepler University, Linz, Austria.<br> </li> <li> <a target="_blank" href="http://www-wics.stanford.edu/~beach/CodeOp.html"> Code Optimizations- A Quantitative Approach<br> </a>This course will concentrate on state-of-the-art code optimization techniques used in compilers for modern processors, with a quantitative framework for designing and evaluating these techniques. Students will be introduced to a wide range of restructuring transformations and optimization techniques for improving the performance of compiler-generated code. August 12-16, 1996. WICS and Stanford University. <br> </li> <li><a target="_blank" href="http://cs.wwc.edu/~aabyan/464/">CPTR 464 Compiler Design</a> <br> </li> <li> <a target="_blank" href="http://www-osl.cs.umass.edu/%257Emoss/610.html"> CMP SCI 610-410(491A) - Compiler Techniques</a> <br> </li> <li><a target="_blank" href="http://www.clear.rice.edu/comp412/Lectures/">COMP 412 Lecture Notes</a> <b>Keith Cooper </b>Rice university</li> <li></li> <li><a target="_blank" href="http://www.mwc.edu/hunter/compilers/">Compiler Construction Course </a>-- Computer Science Department, Mary Washington College <br> </li> <li> <a target="_blank" href="http://www.cc.gatech.edu/classes/cs4410_97_fall/"> CS 4410 - Compilers </a>-- College of Computing, Georgia Institute of Technology </li> <li> <a target="_blank" href="http://www.algonquinc.on.ca/computerstudies/alleni/cst8152/97s/slides/index.htm"> CST 8152 Compilers </a>-- Algonquin College Computer Studies </li> <li> <a target="_blank" href="http://phoenix.iusb.edu/josh/courses/431/s97/home/home.html"> C431: Assemblers and Compilers -- Spring 1997</a> -- Math and Computer Science Department, Indiana University South Bend </li> <li> <a target="_blank" href="http://www.cs.iastate.edu/~leavens/teaching-prog-lang/home.html"> Iowa State: The Teaching About Programming Languages Project<br> </a>Information about the teaching of the concepts of programming languages, especially undergraduate survey courses and courses about programming language semantics. </li> <li> <a target="_blank" href="http://www.docs.uu.se/docs/undergrad/instances/spring97/kompteo/"> Uppsala University</a> </li> <li> <a target="_blank" href="http://www.cs.rpi.edu/~moorthy/Courses/compiler/Lectures/lectures/lecture1/"> Rensselaer Polytechnic</a> </li> <li> <a target="_blank" href="http://www.cs.princeton.edu/courses/archive/fall95/cs595/"> Princeton University</a> </li> <li> <a target="_blank" href="http://csis.pace.edu/~bergin/Compiler.htm"> Joseph Bergin - Pace University, New York</a></li> <li> <a target="_blank" href="http://www.cogs.susx.ac.uk/local/teach/langcomp/notes/99.html"> Languages and Compilers - notes</a></li> <li> <a target="_blank" href="http://www-suif.stanford.edu/~diwan/243/lecture1html/tsld001.htm"> Lecture 1 Introduction</a></li> </ul> <hr> <h2 align="center"><a name="Papers">Papers</a></h2> <ul> <li> <a target="_blank" href="http://www.linuxgazette.com/issue41/sevenich.html"> Compiler Construction Tools Part II</a></li> <li> <a target="_blank" href="http://www.linuxgazette.com/issue41/lopes/lopes.html"> Compiler Construction Tools Part III</a></li> <li><a target="_blank" href="http://www.idiom.com/free-compilers/">Catalog of Free Compilers and Interpreters</a> </li> <li> <a target="_blank" href="http://www.first.gmd.de/cogent/catalog/">Catalog of Compiler Construction Tools</a></li> <li> <a target="_blank" href="http://www.first.gmd.de/cogent/catalog/">Catalog of Compiler Construction Tools</a> -- extremly good (.de)</li> <li> <a target="_blank" href="http://www.cs.washington.edu/research/projects/cecil/www/Papers/engines.html" add_date="848407248" last_modified="848407242" last_visit="848407242"> Cecil paper: "Frameworks for Intra- and Interprocedural Dataflow Analysis"</a></li> <li> <p align="left"> <a target="_blank" href="http://www.sable.mcgill.ca/soot/">Soot a Java Bytecode Analysis and Transformation Framework</a></p> </li> <li> <p align="left"> <a target="_blank" href="http://www.bearcave.com/software/java/java_compiler.html"> Compiling the Java Programming Language</a></p> </li> </ul> <hr> <h2 align="center"><a name="groups_and_FAQs">Usenet and FAQs</a></h2> <p><a target="_blank" href="http://compilers.iecc.com/">The comp.compilers newsgroup</a> -- this is "must" group to read. It contains a wealth of material unachibale in ant WEB page. In addition the site contains several useful resources. Among them: </p> <ul> <li>Monthly <a target="_blank" href="http://compilers.iecc.com/faq.txt">Frequently Asked Questions</a> message </li> <li>The <a target="_blank" href="http://compilers.iecc.com/annual.txt">printed comp.compilers Annual</a> </li> <li><a target="_blank" href="http://www.idiom.com/free-compilers">Catalog of Free Compilers</a> </li> <li><a target="_blank" href="http://compilers.iecc.com/tools.txt">Directory of commercial compiler tools</a> </li> <li>The <a target="_blank" href="http://www.iecc.com/gclist/">Garbage collection FAQ</a>, maintained by David Chase, with contributions by the members of the garbage collection mailing list. </li> </ul> <p>You can ask questions and often get a highly qualified answer: for example: </p> <blockquote> <p>mark watson <<a target="_blank" href="/cdn-cgi/l/email-protection#523f3320397c253326213d3c12213a33257c3133"><span class="__cf_email__" data-cfemail="026f6370692c756376716d6c42716a63752c6163">[email protected]</span></a>> wrote:<br> </p> <p><i>>I suspect that one doesn't exist, but is there any visualizer or</i><br> <i>>converter for the .v file that YACC produces?</i><br> </p> <p>If the .v file contains the stack state machine (push-down automaton)<br> description, current Bison has a way to visualize it.</p> <p>Hans Aberg * Anti-spam: remove "remove." from email address.<br> ... ... ... </p> <p>Hans Aberg wrote:<br> ><br> > Can somebody give a reference to a description of the LALR(1)<br> > algorithm that Bison uses?<br> ><br> > The file state.h of the Bison sources says that first, a<br> > non-deterministic finite state machine that parses the specified<br> > grammar is created; it is then converted into a deterministic finite<br> > state machine.</p> <p>I don't know what Bison uses, but your description sounds like the algorithm I first came across in:<br> Syntax Analysis and Software Tools K.John Gough Addison-Wesley 1988 chapter 9 Bottom-up parsing<br> The references there point to D.E.Knuth (1965) On the translation of languages from left to right<br> Information and control v8 pp323-350 which apparently covers both this and the "usual" form of the algorithm.</p> </blockquote> <p> <a target="_blank" href="http://saturn.las.ox.ac.uk/internet/news/faq/archive/compilers.construction-tools.html"> compilers/construction-tools</a> Catalog of Compiler Construction Products - Thirteenth Issue </p> <p> <a target="_blank" href="http://saturn.las.ox.ac.uk/internet/news/faq/archive/compilers.faq.html"> compilers/faq</a> comp.compilers monthly message and Frequently Asked Questions </p> <p> <a target="_blank" href="http://saturn.las.ox.ac.uk/internet/news/faq/by_category.compilers.free.html"> compilers/free/* ...</a></p> <hr> <h2 align="center"><a name="People">People</a></h2> <ul> <li> <a target="_blank" href="http://foxnet.cs.cmu.edu/~mleone/language-people.html"> Researchers in Programming Languages and Compilers</a></li> <li><a target="_blank" href="http://suif.stanford.edu/">Stanford U Compiler group</a></li> <li><a target="_blank" href="http://www.cs.columbia.edu/index.html"> Columbia University Department of Computer Science</a> (<a target="_blank" href="http://www.cs.columbia.edu/info/research-guide/html/node2.html" name="tex2html2">Alfred V. Aho</a>)</li> <li> <a target="_blank" href="http://www.lpac.ac.uk/SEL-HPC/Articles/GeneratedHtml/UserHome.comp.html"> home pages of compiler researchers</a></li> <li><a target="_blank" href="http://hypatia.dcs.qmw.ac.uk/SEL-HPC/"> London & South East High Performance Computing Centre</a></li> <li> <blockquote> <p> <a target="_blank" href="http://hypatia.dcs.qmw.ac.uk/SEL-HPC/Articles/CompilersArchive.html"> SEL-HPC Compilers & Interpreters Archive</a></p> </blockquote> </li> <li> <a target="_blank" href="http://foxnet.cs.cmu.edu/afs/cs.cmu.edu/user/wls/www/sbpm/people.html"> Semantics-Based Program Analysis and Manipulation researchers</a></li> </ul> <hr> <h2 align="center"><a name="ACM">ACM</a></h2> <p><a target="_blank" href="http://www.acm.org/sigplan/">SIGPLAN</a> -- a <a target="_blank" href="http://www.acm.org/sigs">Special Interest Group</a> of <a target="_blank" href="http://info.acm.org/">ACM</a> that focuses on Programming Languages. In particular, SIGPLAN explores implementation and efficient use. Pretty closed and SygPlan Notices (see below) has high subscription price. IMHO its best day are in the past. </p> <p><a target="_blank" href="http://www.acm.org/sigplan/">ACM SIGPLAN Web Page at ACM</a> -- <b><font size="+1"> <i>ACM SIGPLAN Notices</i> is an informal monthly publication of the Special Interest Group on Programming Languages (SIGPLAN) of ACM</font>.</b></p> <ul> <li>ISSN 0362-1340 </li> <li>Publisher: Association for Computing Machinery (ACM) <ul> <li><a target="_blank" href="http://info.acm.org/">Association for Computing Machinery (ACM) Web Page</a> </li> </ul> </li> <li>BibTeX bibliography (from Nelson Beebe, Univ. of Utah) <ul> <li> <a target="_blank" href="http://elib.cs.sfu.ca/Collections/CMPT/MajorBibs/beebe-bib/sigplan.bib"> sigplan.bib</a> (last update Jul 20, 1998) </li> <li> <a target="_blank" href="ftp://ftp.math.utah.edu/pub/tex/bib/sigplan.bib"> sigplan.bib</a> from originating site at Utah. </li> </ul> </li> <li> <a target="_blank" href="http://www.informatik.uni-trier.de/~ley/db/journals/sigplan/index.html"> HTML bibliographies (Michael Ley, Universitat Trier) </a></li> <li>Available via the <a target="_blank" href="http://uncweb.carl.org/">CARL UnCover Document Delivery Service</a> (24 hour fax delivery).</li> </ul> <p> <a target="_blank" href="http://info.acm.org/sigplan/conferences.htm">SIGPLAN - Conferences</a></p> <ul> <li><b><a target="_blank" href="http://www.cs.rutgers.edu/pldi99/">ACM SIGPLAN PLDI'99</a> -- 1999 Conference on Programming Language Design and Implementation (PLDI'99)</b></li> <li><b><a target="_blank" href="http://www.daimi.au.dk/~popl01/">The Home Page of POPL 2001</a></b></li> <li><b><a target="_blank" href="http://archi.snu.ac.kr/lctes2000/">LCTES'2000 ACM SIGPLAN 2000 Workshop on Languages, Compilers, and Tools for Embedded Systems</a></b></li> <li><b> <a target="_blank" href="http://ls5-www.cs.uni-dortmund.de/~knoop/PLDI2002/pldi2002_main.html"> PLDI 2002 Home Page</a></b></li> </ul> <hr> <h2 align="center"><b><a name="DSL">DSL</a></b></h2> <p><b> <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=DSLAnnotatedBibliography"> DSLAnnotatedBibliography</a></b></p> <p><i>First quarter, 1999</i> </p> <ul> <li>A. van Deursen, P. Klint and C. Verhoef. Research Issues in Software Renovation. In J.-P. Finance (editor) Fundamental Approaches to Software Engineering, FASE99, LNCS, Springer-Verlag, 1999, pp. 1-21. <a target="_blank" href="http://www.cwi.nl/~arie/papers/etaps99.ps"> http://www.cwi.nl/~arie/papers/etaps99.ps</a> </li> <li>M.G.J. van den Brand, P. Klint & P. Olivier, Compilation and Memory Management of <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=ASF"> ASF</a>+<a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=SDF">SDF</a>. In Stefan Jahnichen (ed.) Proceedings of the 8th International Conference on Compiler Construction CC'99, Volume 1675 of Lecture Notes in Computer Science, pages 198--213, Springer, 1999.</li> <li>M.G.J. van den Brand, H.A de Jong, P. Klint & P. Olivier, Efficient Annotated Terms. Software Practice and Experience 30(3), 259--291, 2000. <a target="_blank" href="http://www.cwi.nl/~markvdb/papers/at.ps">http://www.cwi.nl/~markvdb/papers/at.ps</a> </li> </ul> <p><i>Second quarter, 1999</i> </p> <ul> <li>M. de Jonge, T. Kuipers and J. Visser HASDF: a generalized LR-parser generator for Haskell. Technical Report SEN-R9902, <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=CWI"> CWI</a>, 1999. <a target="_blank" href="ftp://ftp.cwi.nl/pub/CWIreports/SEN/SEN-R9902.ps.Z"> ftp://ftp.cwi.nl/pub/CWIreports/SEN/SEN-R9902.ps.Z</a> </li> <li>M. van den Brand and M. de Jonge. Pretty-printing within the <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=ASF"> ASF</a>+<a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=SDF">SDF</a> Meta-Environment: a generic approach. Technical Report SEN-R9904, <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=CWI"> CWI</a>, 1999. <a target="_blank" href="ftp://ftp.cwi.nl/pub/CWIreports/SEN/SEN-R9904.ps.Z"> ftp://ftp.cwi.nl/pub/CWIreports/SEN/SEN-R9904.ps.Z</a> </li> <li>A. van Deursen and T. Kuipers. Identifying Objects using Cluster and Concept Analysis. In Proceedings 21st International Conference on Software Engineering (ICSE'99). <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=ACM"> ACM</a>, 1999, pp. 246-255. <a target="_blank" href="http://www.cwi.nl/~arie/papers/split.ps">http://www.cwi.nl/~arie/papers/split.ps</a> </li> </ul> <p><i>Third quarter, 1999</i> </p> <ul> <li>T.B. Dinesh, Magne Haveraaen, and Jan Heering. An algebraic programming style for numerical software and its optimization. <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=ACM"> ACM</a> CoRR Preprint Server, 1999. Submitted to Scientific Programming. <a target="_blank" href="http://xxx.lanl.gov/abs/cs.SE/9903002">http://xxx.lanl.gov/abs/cs.SE/9903002</a> </li> <li>A. van Deursen, S. Woods, and A. Quilici. Program Plan Recognition for Year 2000 Tools. Science of Computer Programming, 1999. To appear. <a target="_blank" href="http://www.cwi.nl/~arie/scp99.ps">http://www.cwi.nl/~arie/scp99.ps</a> </li> <li>A. van Deursen and T. Kuipers. Building Documentation Generators. In Proceedings International Conference on Software Maintenance. IEEE Computer Society, 1999. pp. 40-49. <a target="_blank" href="http://www.cwi.nl/~arie/papers/icsm99.pdf"> http://www.cwi.nl/~arie/papers/icsm99.pdf</a> </li> </ul> <p><i>Fourth quarter, 1999</i> </p> <ul> <li>A. van Deursen and L. Moonen. Understanding COBOL Systems using Inferred Types. In S. Woods (ed.) 7th Int. Workshop on Program Comprehension. IEEE Computer Society, 1999, pp. 74-83. Full version submitted to Science of Computer Programming. <a target="_blank" href="http://www.cwi.nl/~arie/papers/iwpc99.pdf"> http://www.cwi.nl/~arie/papers/iwpc99.pdf</a> </li> <li>Jan Heering and Paul Klint, Semantics of programming languages: A tool-oriented approach, <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=ACM"> ACM</a> CoRR Preprint Server cs.PL/9911001 v2, 26 November 1999. Submitted to <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=ACM"> ACM</a> <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=SIGPLAN"> SIGPLAN</a> Notices. <a target="_blank" href="http://www.cwi.nl/~jan/semantics/semantics.html"> http://www.cwi.nl/~jan/semantics/semantics.html</a> </li> <li>S. Bunnig, P. Forbrig, R. Lammel, en N. Seemann. A programming language for design patterns. In Proceedings of the GI-Jahrestagung 1999, Informatik '99, Reihe Informatik aktuell, Springer 1999. <a target="_blank" href="http://www.cwi.nl/~ralf/atps99.ps">http://www.cwi.nl/~ralf/atps99.ps</a> </li> <li>A. van Deursen, P. Klint, and J. Visser. Domain-Specific Languages -- An Annotated Bibliography. 1999. <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=CWI"> CWI</a>, Technical Report, 1999. To appear. Submitted for publication. <a target="_blank" href="http://www.cwi.nl/~arie/dsl-project/annotbib/"> http://www.cwi.nl/~arie/dsl-project/annotbib/</a> </li> <li>R. Oudejans en J. Visser Reverse Engineering and Code Generation -- Feasibility Study. <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=CWI"> CWI</a> / First Result Consulting, December 1999. </li> </ul> <hr> <p><i>First Quarter, 2000</i> </p> <ul> <li>A. van Deursen and L. Moonen. Exploring Legacy Systems Using Types. 7th Working Conference on Reverse Engineering. IEEE Computer Society, 2000. <a target="_blank" href="http://www.cwi.nl/~arie/papers/type-explorer.pdf"> http://www.cwi.nl/~arie/papers/type-explorer.pdf</a> </li> <li>M. van den Brand and J. Scheerder. Development of Parsing Tools for Casl using Generic Language Technology. In D. Bert and C. Choppy (eds.). Proceedings WADT'99. Lecture Notes in Computer Science Vol. 1827, Springer-Verlag, 2000. <a target="_blank" href="http://www.cwi.nl/static/publications/reports/abs/SEN-R0011.html"> http://www.cwi.nl/static/publications/reports/abs/SEN-R0011.html</a> </li> <li>M. de Jonge. A Pretty-Printer for Every Occasion. In Proceedings International Symposion on Construction of Software Engineering Tools. To appear. 2000. <a target="_blank" href="http://www.cwi.nl/~mdejonge/papers/PrettyPrinterForEveryOccasion.ps"> http://www.cwi.nl/~mdejonge/papers/PrettyPrinterForEveryOccasion.ps</a> </li> <li>A. van Deursen, B. Elsinga, P. Klint and R. Tolido. From Legacy to Component: Software Renovation in Three Steps. CAP Gemini White Paper. <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=CWI"> CWI</a> Technical Report, 2000. <a target="_blank" href="http://www.cs.vu.nl/~daan/cwicap/index.html"> http://www.cs.vu.nl/~daan/cwicap/index.html</a> </li> </ul> <p><i>Second Quarter, 2000</i> </p> <ul> <li>Jan Heering and Paul Klint, Semantics of programming languages: A tool-oriented approach, <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=ACM"> ACM</a> <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=SIGPLAN"> SIGPLAN</a> Notices 35(3) (March 2000) 39-48. <a target="_blank" href="http://xxx.lanl.gov/abs/cs.PL/9911001">http://xxx.lanl.gov/abs/cs.PL/9911001</a> </li> <li>Jan Heering, Application software, domain-specific languages, and language design assistants, <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=CWI"> CWI</a> Report SEN-R0010, May 2000; CoRR E-print Server cs.PL/0005002 (invited talk SSGRR 2000) <a target="_blank" href="http://www.cwi.nl/static/publications/reports/abs/SEN-R0010.html"> http://www.cwi.nl/static/publications/reports/abs/SEN-R0010.html</a> </li> <li>Mark van den Brand, Jan Heering, Paul Klint, and Pieter Olivier, Compiling language definitions: The <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=ASF"> ASF</a>+<a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=SDF">SDF</a> compiler, <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=CWI"> CWI</a> Report SEN-R0014, May 2000; CoRR E-print Server cs.PL/0007008 (submitted to <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=ACM"> ACM</a> Transactions on Programming Languages and Systems) <a target="_blank" href="http://arXiv.org/abs/cs/0007008">http://arXiv.org/abs/cs/0007008</a> </li> <li>T. Kuipers, L.M.F. Moonen, Types and concept analysis for legacy systems, In Proc. International Workshop on Program Comprehension, IEEE Computer Society Press, 2000. <a target="_blank" href="ftp://ftp.cwi.nl/pub/kuipers/papers/Types_and_Concept_Analysis_for_Legacy_Systems.pdf"> ftp://ftp.cwi.nl/pub/kuipers/papers/Types_and_Concept_Analysis_for_Legacy_Systems.pdf</a> </li> <li>A. van Deursen, T. Kuipers, L.M.F. Moonen, Legacy to the extreme, In Proc. XP'2000. Addison-Wesley, 2000. To appear. Also published as <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=CWI"> CWI</a> report SEN-R0018, 2000. <a target="_blank" href="ftp://ftp.cwi.nl/pub/kuipers/papers/xp2000.pdf"> ftp://ftp.cwi.nl/pub/kuipers/papers/xp2000.pdf</a> </li> </ul> <p><i>Third Quarter, 2000</i> </p> <ul> <li>M.G.J. van den Brand and J. Vinju. Rewriting With Layout. In N. Dershowitz and C. Krchner (eds), Proceedings First International Workshop on Rule-Based Programming. <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=SIGPLAN"> SIGPLAN</a>, <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=ACM"> ACM</a>, 2000. <a target="_blank" href="http://www.cwi.nl/~jurgenv/publications/rewriting.ps.gz"> http://www.cwi.nl/~jurgenv/publications/rewriting.ps.gz</a> </li> <li>M.G.J. van den Brand and C. Ringeissen. <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=ASF"> ASF</a>+<a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=SDF">SDF</a> Parsing Tools applied to ELAN. In Third International Workshop on Rewriting Logic and its Applications, WRLA'2000, Japan. <a target="_blank" href="http://www.cwi.nl/~markvdb/papers/elan.ps"> http://www.cwi.nl/~markvdb/papers/elan.ps</a> </li> <li>A. van Deursen, P. Klint, and J. Visser. Domain-Specific Languages -- An Annotated Bibliography. <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=ACM"> ACM</a> <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=SIGPLAN"> SIGPLAN</a> Notices 35(6), June 2000. <a target="_blank" href="http://www.cwi.nl/~arie/papers/dslbib.pdf"> http://www.cwi.nl/~arie/papers/dslbib.pdf</a> </li> <li>A. van Deursen, P. Klint, and J. Visser. Domain-Specific Languages. In the Encyclopedia of Micro-Computers. Marcel Dekker, Inc, New York, 2001. To appear. </li> <li>R. Laemmel, J. Visser and J. Kort. Dealing With Large Bananas. Workshop on Generic Programming. In J. Jeuring, editor, Proceedings Workshop on Generic Programming. Technical Report Utrecht University. <a target="_blank" href="http://www.cwi.nl/~jvisser/papers/dwlb00.pdf"> http://www.cwi.nl/~jvisser/papers/dwlb00.pdf</a> </li> <li>R. Laemmel and J. Visser. Type-safe functional strategies. In Proceedings Scottish Functional Programming Workshop, St Andrews, July 2000. <a target="_blank" href="http://www.cwi.nl/~jvisser/papers/tsfs-in-book.pdf"> http://www.cwi.nl/~jvisser/papers/tsfs-in-book.pdf</a> </li> </ul> <p><i>Fourth Quarter, 2000</i> </p> <ul> <li>M. de Jonge en J. Visser. Grammars as Contracts. In Proceedings Generative and Component-based Software Engineering (<a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=GCSE2000">GCSE2000</a>). Lecture Notes in Computers Science, Springer Verlag, 2000. To appear. <a target="_blank" href="http://www.cwi.nl/~jvisser/papers/GrammarsAsContracts.pdf"> http://www.cwi.nl/~jvisser/papers/GrammarsAsContracts.pdf</a> </li> <li>M. de Jonge, E. Visser en J. Visser. <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=XT"> XT</a>: a bundle of program transformation tools. <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=CWI"> CWI</a>, 2000. Submitted for publication to <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=LDTA2001"> LDTA2001</a>. <a target="_blank" href="http://www.cwi.nl/~jvisser/papers/xt-paper.pdf"> http://www.cwi.nl/~jvisser/papers/xt-paper.pdf</a> </li> <li>M. de Jonge. Bundling free software components. <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=CWI"> CWI</a>, 2000. Submitted for publication to <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=LDTA2001"> LDTA2001</a>. <a target="_blank" href="http://www.cwi.nl/~mdejonge/papers/BundlingFreeSoftwareComponents.pdf"> http://www.cwi.nl/~mdejonge/papers/BundlingFreeSoftwareComponents.pdf</a> </li> <li>M. de Jonge and R. Monajemi. Grammar Re-Engineering for Language Centered Software Engineering. <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=CWI"> CWI</a>, 2000. Submitted for publication. <a target="_blank" href="http://www.cwi.nl/~mdejonge/papers/GrammarReengineeringforLCSE.pdf"> http://www.cwi.nl/~mdejonge/papers/GrammarReengineeringforLCSE.pdf</a> </li> <li>T. Kuipers and J. Visser. Object-oriented tree traversal with <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=JJForester"> JJForester</a>. <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=CWI"> CWI</a>, 2000. Submitted for publication to <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=LDTA2001"> LDTA2001</a>. <a target="_blank" href="http://www.cwi.nl/~jvisser/papers/JJForester.pdf"> http://www.cwi.nl/~jvisser/papers/JJForester.pdf</a> </li> <li>P. Olivier. A Framework for Debugging Heterogeneous Applications. <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=PhD"> PhD</a> Thesis, University of Amsterdam, December 2000. </li> <li>M.G.J. van den Brand, A. van Deursen, J. Heering, H.A. de Jong, M. de Jonge, T. Kuipers, P. Klint, L. Moonen, P.A. Olivier, J. Scheerder, J.J. Vinju, E. Visser, and J. Visser, The <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=ASF"> ASF</a> + <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=SDF"> SDF</a> Meta-Environment: a Component-Based Language Development Environment. in: Proceedings of Compiler Construction (CC'01). <a target="_blank" href="http://www.cwi.nl/~markvdb/papers/metademo.ps"> http://www.cwi.nl/~markvdb/papers/metademo.ps</a> </li> </ul> <hr> <p><i>First Quarter, 2001</i> </p> <ul> <li>M. de Jonge and J. Visser. <a target="_blank" href="http://www.cwi.nl/htbin/dsl/wiki/wiki?browse=XT"> XT</a> capita selecta. In Proceedings of the Second Stratego Users Day. Utrecht Universtiy, February 20. <a target="_blank" href="http://www.cwi.nl/~mdejonge/papers/SUD2.pdf01"> http://www.cwi.nl/~mdejonge/papers/SUD2.pdf01</a>. </li> <li>M. de Jonge and R. Monajemi. Cost-effective maintenance tools for proprietary languages. In International Conference on Software Maintenance, ICSM2001. IEEE Computer Society, 2001. <a target="_blank" href="http://www.cwi.nl/~mdejonge/papers/CostEffectiveMaintenanceToolsforProprietaryLanguages.pdf"> http://www.cwi.nl/~mdejonge/papers/CostEffectiveMaintenanceToolsforProprietaryLanguages.pdf</a> </li> <li>A. van Deursen and L. Moonen. An empirical Study Into Cobol Type Inferencing. <i>Science of Computer Programming</i> 40(2-3):189-211, July 2001 2001. <a target="_blank" href="http://www.cwi.nl/~arie/papers/scp2001.pdf"> http://www.cwi.nl/~arie/papers/scp2001.pdf</a> </li> </ul> <hr> <h2 align="center"><a name="Tools">Tools</a></h2> <ul> <li> <a target="_blank" href="http://dmoz.org/Computers/Programming/Compilers/Compiler_Construction_Kits/"> Open Directory - Computers Programming Compilers Compiler Construction Kits</a></li> <li> <a target="_blank" href="http://dynamo.ecn.purdue.edu/~hankd/PCCTS/Index.html"> Index for PCCTS</a> - PCCTS, the Purdue Compiler <b>Construction</b> Tool Set, is a set of public-domain software tools designed to facilitate the <b>construction</b> of <b>compilers</b> and other translation systems. </li> <li><a target="_blank" href="ftp://ftp.gmd.de/GMD/cocktail/">Compiler <b>construction</b> assembly line</a> - Compiler <b>construction</b> assembly line (set of integrated tools) written in Modula-2. Works with both C and Modula-2. </li> <li><a target="_blank" href="http://www.idiom.com/free-compilers/">Catalog of Free <b>Compilers</b>, Interpreters and Language Tools</a> </li> <li> <a target="_blank" href="http://www.cs.columbia.edu/~royr/tools.html"> Lex and Yacc</a></li> <li> <a target="_blank" href="http://i44www.info.uni-karlsruhe.de/~assmann/optimix.html"> Optimizer generator</a></li> </ul> <hr> <h2 align="center"><a name="Parsing">Parsing</a></h2> <ul> <li> <a target="_blank" href="https://en.wikipedia.org/wiki/Parsing">Parsing - Wikipedia, the free encyclopedia</a></li> <li><a target="_blank" href="https://en.wikipedia.org/wiki/Recursive_descent_parser"> Recursive descent</a></li> <li>LL<ul> <li><a target="_blank" href="https://en.wikipedia.org/wiki/LL_parser">LL parser - Wikipedia, the free encyclopedia</a></li> <li> <a target="_blank" href="http://www.antlr.org/wiki/display/~admin/LL(*)+grammar+analysis"> LL() grammar analysis - Terence Parr - ANTLR Project</a></li> </ul> </li> <li><a target="_blank" href="http://dickgrune.com/Books/PTAPG_1st_Edition/">Parsing Techniques - A Practical Guide</a></li> <li> <a target="_blank" href="http://www.uni-paderborn.de/fachbereich/AG/agkastens/compiler/parsdemo/index.html"> Demonstration of Parsing Algorithms</a></li> <li> <a target="_blank" href="http://www.netline.com/tutorial/main.html"> Compiler Overview</a></li> <li> <a target="_blank" href="http://www.prolangs.rutgers.edu/refs/ccanal.html"> C/C++ Analysis</a></li> <li> <a target="_blank" href="http://www.prolangs.rutgers.edu/refs/incr.html"> Incremental Data Flow Analysis</a></li> <li> <a target="_blank" href="http://www.prolangs.rutgers.edu/refs/OO.html"> Analysis of O-O Languages</a></li> <li> <a target="_blank" href="http://www.prolangs.rutgers.edu/refs/paradfa.html"> Parallel Data Flow Analysis</a></li> <li> <a target="_blank" href="http://www.prolangs.rutgers.edu/refs/fdns.html"> Foundations of Data Flow Analysis</a></li> <li> <a target="_blank" href="http://www.prolangs.rutgers.edu/refs/expl.html"> Analysis of Explicitly Parallel Programs</a></li> </ul> <hr> <h2 align="center"><a name="Memory management">Memory management</a></h2> <p><a target="_blank" href="http://www.harlequin.com/mm/reference/">The Memory Management Reference</a></p> <p> </p> <hr> <h2 align="center"><a name="Graph analysis">Graph analysis</a></h2> <p> <a target="_blank" href="http://citeseer.nj.nec.com/cifuentes96structuring.html"> Structuring Decompiled Graphs - Cristina Cifuentes (1996)</a> <font face="Arial,Helvetica,Geneva" size="-1"> </font> </p> <blockquote> <p><font size="-1"><b>Abstract:</b> . A structuring algorithm for arbitrary control flow graphs is presented. Graphs are structured into functional, semantical and structural equivalent graphs, without code replication or introduction of new variables. The algorithm makes use of a set of generic high-level language structures that includes different types of loops and conditionals. Gotos are used only when the graph cannot be structured with the structures in the generic set. This algorithm is adequate for the control flow analysis required when decompiling programs, given that a pure binary program does not contain information on the high-level structures used by the initial high-level language program (i.e. before compilation). The algorithm has been implemented as part of the dcc decompiler, an i80286 decompiler of DOS...</font></p> <p>......only by the code generator, and no labels are placed on the graph on the earlier control flow analysis phase. <b>7 Previous Work Most structuring algorithms have concentrated on the removal of goto statements from control flow graphs at the expense of introduction of new boolean variables <!--cite--><font color="red">[8, 29, 22, 28, 6, 13]</font>, code replication [17, 27, 29], the use of multilevel exits [7, 24], or the use of a set of high-level structures not available in commonly used languages [25].</b> None of these methods are applicable to a decompiler because: the introduction of new boolean variables modifies the semantics of the ...... <p> <font color="#999999">13. A.M. Erosa and L.J. Hendren. <i>Taming control flow: A structured approach to eliminating goto statements</i>. In Proceedings of the International Conference on Computer Languages, Universit'e Paul Sabatier, Toulouse, France, May 1994. IEEE Computer Society.</font></p> </blockquote> <p> <a target="_blank" href="http://gatekeeper.dec.com/pub/DEC/SRC/technical-notes/SRC-1997-028-html/glew.html"> <b>Control</b> <b>Flow</b> <b>Graphs</b> for Java Bytecode</a><font size="-1"> Neal Glew, Cornell...<br> </font> <a target="_blank" href="http://www.cs.colostate.edu/~cs553/project/cfgs.html"> CS-553 Compiler Project - <b>Control</b> <b>Flow</b> <b>Graphs</b></a><font size="-1"><br> </font> <a target="_blank" href="http://www.doc.ic.ac.uk/project/9900/summer/g00t6/public_html/cfgraphs-intro.html"> Introduction to <b>Control</b> <b>Flow</b> <b>Graphs</b></a></p> <p> <a target="_blank" href="http://www.doc.ic.ac.uk/project/9900/summer/g00t6/public_html/cfgraphs-dataflow.html"> <b>Control</b> <b>Flow</b> <b>Graphs</b> for Data Analysis</a></p> <p> <a target="_blank" href="http://citeseer.nj.nec.com/context/123749/90096"> Taming <b>control</b> <b>flow</b>: A structured approach to</a><font size="-1">.goto statements from <b>control</b> <b>flow</b> <b>graphs</b> at the expense of......potentially unstructured <b>control</b>-<b>flow</b> <b>graphs</b>. <br> </font> <a target="_blank" href="http://www.cacs.usl.edu/~jmg/Wolf/CFGdoc.html"> WolfPack v1.0 <b>Control</b> <b>Flow</b> <b>Graphs</b></a><font size="-1">...WolfPack v1.0 <b>Control</b> <b>Flow</b> <b>Graphs</b> Table of Contents......extension code for <b>control</b> <b>flow</b> <b>graphs</b> found in version 4.0...</font></p> <p>Rastislav Bodik and Sadun Anik. Path-sensitive value-flow analysis.<br> In <i>25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Diego, California}, pages 237--251. ACM, January 1998.</i><br> <tt> <a target="_blank" href="http://www.cs.wisc.edu/~bodik/research/popl98.ps"> http://www.cs.wisc.edu/~bodik/research/popl98.ps</a></tt></p> <p>Uwe Assmann. How to Uniformly Specify Program Analysis and Transformation. In P. Fritzson, editor, <i>Compiler Construction (CC)</i>. Springer, 1996. <tt> <a target="_blank" href="http://i44s11.info.uni-karlsruhe.de:80/~assmann/"> http://i44s11.info.uni-karlsruhe.de:80/~assmann/</a></tt> </p> <p>Rastislav Bodik and Sadun Anik. Path-sensitive value-flow analysis. In <i>25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Diego, California}, pages 237--251. ACM, January 1998. </i><tt> <a target="_blank" href="http://www.cs.wisc.edu/~bodik/research/popl98.ps"> http://www.cs.wisc.edu/~bodik/research/popl98.ps</a></tt></p> <p> <a target="_blank" href="http://citeseer.nj.nec.com/duesterwald98practical.html"> A Practical Framework for Demand-Driven Interprocedural Data Flow Analysis - Duesterwald, Gupta, Soffa (ResearchIndex)</a></p> <p> <a target="_blank" href="http://www.dcs.ed.ac.uk/home/mic/skeletons.html"> Skeletal Parallelism Homepage</a></p> <p><a target="_blank" href="http://exile.ucc.ie/dataflow/">Choose a Format for Viewing the Dataflow Web Pages</a></p> <p> <a target="_blank" href="http://www.cs.cmu.edu/afs/cs.cmu.edu/user/mleone/web/language-research.html"> Resources for Programming Language Research</a></p> <p> <a target="_blank" href="http://foxnet.cs.cmu.edu/~mleone/language/new.9.94.html"> What's New on the Language Research Pages</a></p> <p><a target="_blank" href="http://www.cwi.nl/eapls/">EAPLS Home Page</a> -- European Association for Programming Languages and Systems</p> <p> <a target="_blank" href="http://rbse.jsc.nasa.gov/virt-lib/soft-eng.html"> WWW Virtual Library - Software Engineering</a></p> <p><a target="_blank" href="http://www.first.gmd.de/cogent/catalog/">Catalog of Compiler Construction Tools</a></p> <p><a target="_blank" href="http://iecc.com/compilers/">Archive of comp.compilers</a></p> <p> <a target="_blank" href="http://www.lpac.ac.uk/SEL-HPC/Articles/index.html"> SEL-HPC Article Archive</a></p> <p> <a target="_blank" href="http://www.cs.cmu.edu/afs/cs.cmu.edu/project/scandal/public/www/parallel-lang.html"> Reading list on parallel languages</a></p> <p> <a target="_blank" href="http://www.cs.iastate.edu/~leavens/teaching-prog-lang/home.html"> The Teaching About Programming Languages Project</a></p> <p> <a target="_blank" href="http://www.cis.temple.edu/courses-lang.html">A List of Courses in Principles and Implementation of Programming Languages</a></p> <hr> <hr> <h2 align="center"><a name="Tree-based Code optimization">Tree-based Code optimization</a></h2> <ul> <li> <a target="_blank" href="http://citeseer.nj.nec.com/mcconnell92treebased.html"> Tree-Based Code Optimization - McConnell (ResearchIndex)</a><font size="-1" face="Arial"><b> Abstract:</b> Nearly all algorithms for code optimization use a control flow graph. In this thesis, I will show that with very minor restrictions on program structure, an abstract syntax tree can be used instead, leading to algorithms that are often much simpler than their graphbased counterparts. The conclusion is that abstract syntax trees, not control flow graphs, should be the fundamental data structure in code optimization. 1 Introduction Most optimizing compilers consist of a front-end that does syntactic and semantic analysis, and a back-end that does optimization and machine code generation [ASU86]. The main data structure in the front-end is an abstract syntax tree (AST), while in the..</font></li> <li> <a target="_blank" href="http://www.informatik.hu-berlin.de/~mueller/compiler.html"> Compilerbau and Codeoptimierung (Compiler Construction and Code Optimization)</a></li> <li> <a target="_blank" href="http://www.ibc.wustl.edu/perl5/nmanual/pod/perlguts.html"> perlguts - Perl's Internal Functions</a></li> <li> <a target="_blank" href="http://www.ccs.neu.edu/home/will/com3356/"> COM 3356 Optimizing Compilers</a></li> <li> <a target="_blank" href="http://www.cs.wisc.edu/~fischer/cs701/readings.html"> CS 701 Reading Assignments and Research Papers</a></li> <li> <a target="_blank" href="http://www.uwosh.edu/faculty_staff/perrie/431/431.html"> 34-431 Compiler Writing Techniques</a></li> </ul> <hr> <h2 align="center"><a name="Performance and Benchmarks">Performance and Benchmarks</a></h2> <ul> <li> <p align="left"> <a target="_blank" href="http://www.nullstone.com/htmls/results.htm"> http://www.nullstone.com/htmls/results.htm</a> -- Benchmark Resources, Nullstone Compiler Performance Analysis</p> </li> <li> <p align="left"> <a target="_blank" href="http://www.compilerconnection.com/benchmarks/benchmarks.htm"> http://www.compilerconnection.com/benchmarks/benchmarks.htm</a> -- KAI Benchmarks</p> </li> <li> <p align="left"> <a target="_blank" href="http://www.kai.com/benchmarks/ftp.html">http://www.kai.com/benchmarks/ftp.html</a> <a target="_blank" href="http://www.research.att.com/~orost/bench_plus_plus.html"> http://www.research.att.com/~orost/bench_plus_plus.html</a></p> </li> <li> <p align="left"> <a target="_blank" href="http://citeseer.nj.nec.com/did/110203">Peephole Log Optimization - Huston, Honeyman (ResearchIndex)</a></p> </li> <li> <p align="left"> <a target="_blank" href="http://www.musi-cal.com/~skip/python/spam7/optimizer.html"> A Peephole Optimizer for Python</a></p> </li> <li> <p align="left">[Kist] Kistler, Thomas. "Dynamic Runtime Optimization", UC Irvine Technical Report 96-54, November 1996. <a target="_blank" href="http://www.ics.uci.edu/~kistler/ics-tr-96-54.ps"> http://www.ics.uci.edu/~kistler/ics-tr-96-54.ps</a></p> </li> <li> <p align="left">[Cham] Chambers, Craig. "<a target="_blank" href="http://self.sunlabs.com/papers/chambers-thesis/">The Design and Implementation of the Self Compiler, an Optimizing Compiler for Object-Oriented Programming Languages</a>". Ph. D. dissertation, Computer Science Department, Stanford University, March 1992.</p> </li> </ul> <hr> <h2 align="left"><a name="Program Analysis">Program Analysis and Transformations</a></h2> <ul> <li> <p align="left"> <a target="_blank" href="http://www.ddj.com/documents/ddj0103b/">VALUE LATTICE STATIC ANALYSIS </a>by William Brew and Maggie Johnson. William and Maggie examine "value lattice," a new approach to static analysis that finds the most dangerous defects that tend to slip through testing. Additional resources include <a target="_blank" href="http://www.ddj.com/ftp/2001/2001_03/lattice.txt"> lattice.txt</a> (listings).</p> </li> <li> <p align="left"> <a target="_blank" href="http://www.cis.ksu.edu/~santos/paste2002/"> Program Analysis for Software Tools and Engineering (PASTE'02)</a></p> </li> </ul> <hr> <h2 align="left"><a name="Code generation">Code generation</a></h2> <ul> <li> <p align="left"> <a target="_blank" href="http://www.cs.vu.nl/~dick/MCD.html">Modern Compiler Design</a></p> </li> <li> <p align="left"> <a target="_blank" href="http://www.first.gmd.de/gccs/">Online Book The GENTLE Compiler Construction System</a></p> </li> <li> <p align="left"> <a target="_blank" href="http://focus.ti.com/docs/tool/list.jhtml?FamilyId=44&ToolTypeId=3"> Code Generation Tools - Compilers-Assemblers-Linkers for DSP</a></p> </li> <li> <p align="left"> <a target="_blank" href="http://www.pcengines.com/tp3.htm">Turbo Pascal 3.0 compiler and code generation internals</a></p> </li> <li> <p align="left"> <a target="_blank" href="http://www.pdos.lcs.mit.edu/~engler/pldi96-abstract.html"> vcode- a retargetable, extensible, very fast dynamic code generation system</a></p> </li> <li> <p align="left"> <a target="_blank" href="http://www.ece.purdue.edu/~eigenman/EE663/syllabus.pdf"> EE663 Compiler Code Generation, Optimization (syllabus)</a></p> </li> <li> <p align="left"> <a target="_blank" href="http://www.javaworld.com/javaworld/jw-11-2001/jw-1102-codegen.html"> Reflection vs. code generation</a></p> </li> <li> <p align="left"> <a target="_blank" href="http://www.mathworks.com/access/helpdesk/help/toolbox/rtw/tlc_ref/cp_archi.shtml"> Code Generation Architecture (Target Language Compiler)</a></p> </li> <li> <p align="left"> <a target="_blank" href="http://citeseer.nj.nec.com/context/314980/0"> Retargetable compiler code generation </a></p> </li> <li> <p align="left"> <a target="_blank" href="http://www-sor.inria.fr/publi/DCG_piumarta-thesis.html"> Delayed Code Generation in a Smalltalk-80 Compiler</a></p> </li> </ul> <hr> <h2 align="left"><a name="C compilers">C compilers</a></h2> <ul> <li> <p align="left"> <a target="_blank" href="http://ou800doc.caldera.com/SDK_cprog/CTOC-CLangCompilers.html"> C language compilers</a></p> </li> <li> <p align="left"> <a target="_blank" href="http://www.cs.princeton.edu/software/lcc/"> lcc, A Retargetable Compiler for ANSI C</a></p> </li> <li> <p align="left"> <a target="_blank" href="http://gcc.gnu.org/onlinedocs/gccint/">GNU Compiler Collection (GCC) Internals</a></p> </li> <li> <p align="left"> <a target="_blank" href="http://www.la.utexas.edu/lab/software/devtool/gcc-docs.html"> Documentation for the GCC Compiler Collection</a></p> </li> </ul> <hr> <h2 align="center">XML Complilers</h2> <p align="left"><a name="Soumen Sarkar experience using XSLT">Soumen Sarkar</a> <font size="2"> XSLT is typically used in document transform (XML to WML or HTML) scenario and this misses the point that<font color="#FF0000"><i><b> it could be used very flexibly in "template driven code generation". </b></i></font>Here is how the author describes his experience: </font></p> <blockquote> <p align="left"><font size="2" face="Arial">Soumen Sarkar, has successfully used XSLT to achieve source code generation in his Java application software project at ATOGA Systems Inc.. Out of approximately 2,480 Java files in the project 1, 520 were generated. In other words, 61% of the Java code is generated. SQL and XML files are also generated. He has the following publications on this topic: <p> Model Driven Programming, published in XML journal of SYS-CON media, August 2002, Volume 3, Issue 8. The article proposed an extension of Model View Controller (MVC) architecture and showed how to implement in software development projects. <p> <a target="_blank" href="http://www.sys-con.com/xml/pdf/trees.pdf">http://www.sys-con.com/xml/pdf/trees.pdf</a> <p> Code generation using XML based document transformation, a technical article published in J2EE expert site theserverside.com, November 2001. The URL is <a target="_blank" href="http://www.theserverside.com/resources/article.jsp?l=XMLCodeGen"> http://www.theserverside.com/resources/article.jsp?l=XMLCodeGen</a> .<br> Application of this technique to Atoga NMS development resulted in 60% code<br> generation. <p> <a target="_blank" href="http://www.theserverside.com/resources/articles/XMLCodeGen/xmltransform.pdf"> http://www.theserverside.com/resources/articles/XMLCodeGen/xmltransform.pdf</a> </font></p> </blockquote> <p align="left"> <a target="_blank" href="http://www.cis.ohio-state.edu/~harrold/research/papers.html"> Postscript Versions of Selected Papers</a></p> <p align="left"> <a target="_blank" href="http://www.sable.mcgill.ca/soot/">Soot a Java Bytecode Analysis and Transformation Framework</a></p> <p align="left"> <a target="_blank" href="http://www.haverford.edu/cmsc/CS-departments.html"> Computer Science Department Web Servers</a></p> <dl> <dt> <a target="_blank" href="http://www.ace.nl/products/cosy" add_date="845878592" last_modified="845878585" last_visit="845878585"> ACE: CoSy Compilation System</a> </dt> <dt> <a target="_blank" href="http://www.cs.washington.edu/homes/pardo/sim.d/index2.d/Index.html"> Instruction-Set Simulation and Tracing</a> </dt> <dt> <a target="_blank" href="http://www.cs.washington.edu/homes/pardo/rtcg.d/index.html"> Runtime Code Generation (RTCG)</a> </dt> <dt> <a target="_blank" href="http://www.cs.cornell.edu/Info/People/jgm/"> Faculty Research Interests : Greg Morrisett</a> </dt> <dt> <a target="_blank" href="http://www.uni-karlsruhe.de/~ae59/ANDF.html"> ANDF Reference Guide</a> </dt> <dt> <a target="_blank" href="http://www.cwi.nl/~gipe/language_prototyping/" add_date="849250861" last_modified="849250846" last_visit="849514266"> Language Prototyping: An Algebraic Specification Approach</a> </dt> <dt> <a target="_blank" href="http://gatekeeper.dec.com/pub/DEC/SRC/research-reports/abstracts/src-rr-120.html" add_date="843196179" last_modified="843196151"> Dynamic Typing in Polymorphic Languages</a> </dt> <dt> <a target="_blank" href="http://www.idiom.com/free-compilers/" add_date="844232152" last_modified="844232145" last_visit="844232145"> Catalog of Free Compilers and Interpreters: introduction</a> </dt> <dt> <a target="_blank" href="http://www.first.gmd.de/cogent/catalog/" add_date="844232211" last_modified="844232205" last_visit="844232205"> Catalog of Compiler Construction Tools</a> </dt> <dt> <a target="_blank" href="http://www.csd.uu.se/~hakanm/pli.html" add_date="840813643" last_modified="840813632" last_visit="844784731"> http://www.csd.uu.se/~hakanm/pli.html</a> </dt> <dt> <a target="_blank" href="http://www.nullstone.com/htmls/connections.htm" add_date="834410815" last_modified="834410811" last_visit="834410811"> The Compiler Connection</a> </dt> <dt> <a target="_blank" href="http://www.cs.princeton.edu/~appel/graphdata/" add_date="832569532" last_modified="832569527" last_visit="833864441"> Graphs to color</a> </dt> <dt> <a target="_blank" href="http://hopeless.mess.cs.cmu.edu:8001/HyperNews/get/dag.html" add_date="833519912" last_modified="833519266" last_visit="833864268"> dag</a> </dt> <dt> <a target="_blank" href="http://infopad.eecs.berkeley.edu/CIC/" add_date="830972599" last_modified="830972596" last_visit="830972596"> CPU Info Center</a> </dt> <dt> <a target="_blank" href="ftp://ftp.netcom.com/pub/hb/hbaker/hakmem/hakmem.html" add_date="829818916" last_modified="829818883" last_visit="829819011"> HAKMEM -- CONTENTS -- DRAFT, NOT YET PROOFED</a> </dt> <dt> <a target="_blank" href="http://www.computer.org/conferen/proceed/iccd95/abstract.htm" add_date="830257073" last_modified="830256263" last_visit="830413378"> ICCD '95</a> </dt> <dt> <a target="_blank" href="http://www.iecc.com/compilers/" add_date="829823082" last_modified="829819233" last_visit="848991513"> The comp.compilers newsgroup</a> </dt> <dt> <a target="_blank" href="http://www.first.gmd.de/cogent/catalog/" add_date="830242367" last_modified="830234494" last_visit="844232204"> Catalog of Compiler Construction Tools</a> </dt> <dt> <a target="_blank" href="http://www.idiom.com/free-compilers/" add_date="829546050" last_modified="829546030" last_visit="844232145"> Catalog of Free Compilers and Interpreters: introduction</a> </dt> <dt> <a target="_blank" href="http://www.eg3.com/compiler.htm" add_date="828506624" last_modified="828506614" last_visit="828514844"> Compiler Internet Resource List</a> </dt> <dt> <a target="_blank" href="ftp://csg.uwaterloo.ca/pub/peter/" add_date="836394887" last_modified="836394860" last_visit="836394860"> re2c</a> </dt> <dt> <a target="_blank" href="http://www.gac.edu/~max/prior-semesters/Spring-96/MC97/spr.ps" add_date="843629106" last_modified="0" last_visit="0"> Lazy code motion handouts</a> </dt> <dt> <a target="_blank" href="http://gatekeeper.dec.com/pub/DEC/SRC/research-reports/abstracts/src-rr-047.html" add_date="843196059" last_modified="843196043" last_visit="844404773"> Dynamic Typing in a Statically Typed Language.</a> </dt> <dt> <a target="_blank" href="http://kaka.cosc.canterbury.ac.nz/~bruce/ErrorRepair.html" add_date="845271770" last_modified="845271763" last_visit="845271763"> Error Repair in Shift-Reduce Parsers</a> </dt> <dt> <a target="_blank" href="http://www.cs.cmu.edu/afs/cs.cmu.edu/user/mleone/web/research.html" add_date="845272694" last_modified="845272691" last_visit="845272691"> Mark Leone's Research</a> </dt> <dt> <a target="_blank" href="http://www.cs.wustl.edu/~cytron/pldi97/call.html" add_date="845359673" last_modified="845359398" last_visit="845359743"> ACM Symposium: PLDI '97 Call for papers</a></dt> </dl> <p> <a target="_blank" href="http://www.avhohlov.narod.ruAndrei%20Khohklov%20homepage%3C/a%3E%3C/font%3E%3C/p%3E%3Cp%3E%3Ca%20href=" http://www.acm.org/crossroads"> Architectures and Compilers to Support Reconfigurab</a></p> <p><a target="_blank" href="http://www.compilerjobs.com">Compiler Jobs</a></p> <h2 align="left"><a name="Humor">Humor</a></h2> <pre> Top 10 reasons computers are male =========================== 10. They have a lot of data but are still clueless. 9. A better model is always just around the corner. 8. They look nice and shiny until you bring them home. 7. It is always necessary to have a backup. 6. They'll do whatever you say if you push the right buttons. 5. The best part of having either one is the games you can play. 4. In order to get their attention, you have to turn them on. 3. The lights are on but nobody's home. 2. Big power surges knock them out for the night. 1. Size does matter Here's the quid pro quo: Top 10 reasons compilers must be female: ======================================== 10. Picky, picky, picky. 9. They hear what you say, but not what you mean. 8. Beauty is only shell deep. 7. When you ask what's wrong, they say "nothing". 6. Can produce incorrect results with alarming speed. 5. Always turning simple statements into big productions. 4. Smalltalk is important. 3. You do the same thing for years, and suddenly it's wrong. 2. They make you take the garbage out. 1. Miss a period and they go wild</pre> <blockquote> </blockquote> <hr> <!------------------------------------------> <hr noshade color="#FF0000" size="5"> <h2><a name="Etc">Etc</a></h2> <p><b>Society</b></p> <blockquote> <p><b><a href="/Skeptics/groupthink.shtml"><font size="2">Groupthink</font></a><font size="2"> : <a href="/Skeptics/Political_skeptic/Two_party_system_as_poliarchy/index.shtml">Two Party System as Polyarchy</a> : <a href="/Skeptics/Financial_skeptic/Casino_capitalism/Corruption_of_regulators/index.shtml"> Corruption of Regulators</a> : <a href="/Social/Bureaucracy/index.shtml">Bureaucracies</a> : <a href="/Social/Toxic_managers/Micromanagers/understanding_micromanagers.shtml">Understanding Micromanagers and Control Freaks</a> : <a href="/Social/Toxic_managers/index.shtml">Toxic Managers</a> : <a href="/Skeptics/Pseudoscience/harvard_mafia.shtml">Harvard Mafia</a> : <a href="/Social/Toxic_managers/Communication/diplomatic_communication.shtml">Diplomatic Communication</a> : <a href="/Social/Toxic_managers/surviving_a_bad_performance_review.shtml">Surviving a Bad Performance Review</a> : <a href="/Skeptics/Financial_skeptic/index.shtml">Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime</a> : <a href="/Skeptics/index.shtml">PseudoScience</a> : <a href="/Skeptics/Political_skeptic/index.shtml">Who Rules America</a> : <a href="/Skeptics/Political_skeptic/Neoliberalism/index.shtml">Neoliberalism </a> : <a href="/Skeptics/Political_skeptic/Elite_theory/iron_law_of_oligarchy.shtml">The Iron Law of Oligarchy</a> : </font><a href="/Skeptics/Political_skeptic/libertarianism.shtml"> <font size="2">Libertarian Philosophy</font></a></b></p> </blockquote> <p><b>Quotes</b></p> <blockquote> <p><b><font size="2" face="Arial"> <a href="/Skeptics/Quotes/war_and_peace_quotes.shtml">War and Peace</a> </font> <font face="Arial"><font size="2">: <a href="/Skeptics/Quotes/financial_quotes.shtml">Skeptical Finance</a> : <a href="/Skeptics/Quotes/famous_galbraith_quotes.shtml">John Kenneth Galbraith</a> :<a href="/Skeptics/Quotes/talleyrand_quotes.shtml">Talleyrand</a> : <a href="/Skeptics/Quotes/oscar_wilde_quotes.shtml">Oscar Wilde</a> : <a href="/Skeptics/Quotes/bismarck_quotes.shtml">Otto Von Bismarck</a> : <a href="/Skeptics/Quotes/keynes_quotes.shtml">Keynes</a> : <a href="/Skeptics/Quotes/george_carlin.shtml">George Carlin</a> : <a href="/Skeptics/skeptical_quotes.shtml">Skeptics</a> : <a href="/Skeptics/Quotes/propaganda.shtml">Propaganda</a> : <a href="/SE/quotes.shtml">SE quotes</a> : <a href="/Lang/quotes.shtml">Language Design and Programming Quotes</a> : <a href="/Bulletin/quotes.shtml">Random IT-related quotes</a> : <a href="/Skeptics/Quotes/somerset_maugham.shtml">Somerset Maugham</a> : <a href="/Skeptics/Quotes/marcus_aurelius.shtml">Marcus Aurelius</a> : <a href="/Skeptics/Quotes/kurt_vonnegut_quotes.shtml">Kurt Vonnegut</a> : <a href="/Skeptics/Quotes/eric_hoffer.shtml">Eric Hoffer</a> : <a href="/Skeptics/Quotes/churchill_quotes.shtml">Winston Churchill</a> : <a href="/Skeptics/Quotes/napoleon_quotes.shtml">Napoleon Bonaparte</a> : <a href="/Skeptics/Quotes/ambrose_bierce.shtml">Ambrose Bierce</a> : <a href="/Skeptics/Quotes/bernard_shaw.shtml">Bernard Shaw</a> : </font> <a href="/Skeptics/Quotes/mark_twain_quotes.shtml"><font size="2">Mark Twain Quotes</font></a></font></b></p> </blockquote> <p><b>Bulletin:</b></p> <blockquote> <p><b><font face="Arial"><a href="http://softpanorama.biz/Bulletin/Sp2013_v25/bulletin25_12.shtml"> <font size="2">Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis</font></a><font size="2"> : <a href="http://softpanorama.biz/Skeptics/Political_skeptic/Bulletin/political_skeptic2013.shtml"> Political Skeptic Bulletin, 2013</a> : <a href="http://softpanorama.biz/Skeptics/Financial_skeptic/Unemployment/Bulletin/unempoyment2010.shtml"> Unemployment Bulletin, 2010</a> : <a href="http://softpanorama.biz/Bulletin/Sp2011_v23/bulletin23_10.shtml"> Vol 23, No.10 (October, 2011) An observation about corporate security departments</a> : <a href="http://softpanorama.biz/Skeptics/Political_skeptic/Fifth_column/Color_revolutions/Euromaydan/Bulletin/euromaydan14_06.shtml"> Slightly Skeptical Euromaydan Chronicles, June 2014</a> : <a href="http://softpanorama.biz/Skeptics/Financial_skeptic/Casino_capitalism/12_Apostols_of_deregulation/Greenspan/Bulletin/greenspan_bulletin2008.shtml"> Greenspan legacy bulletin, 2008</a> : <a href="/Bulletin/Sp2013_v25/bulletin25_10.shtml">Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A)</a> : <a href="/Bulletin/Sp2013_v25/bulletin25_08.shtml">Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs</a> : <a href="http://softpanorama.biz/Skeptics/Financial_skeptic/Humor/Bulletin/financial_humor2010.shtml"> Financial Humor Bulletin, 2010</a> : <a href="http://softpanorama.biz/Skeptics/Financial_skeptic/Inequality/Bulletin/inequality2009.shtml"> Inequality Bulletin, 2009</a> : <a href="http://softpanorama.biz/Skeptics/Financial_skeptic/Humor/Bulletin/financial_humor2008.shtml"> Financial Humor Bulletin, 2008</a> : <a href="http://softpanorama.biz/Copyright/Bulletin/copyleft_problems2004.shtml">Copyleft Problems Bulletin, 2004</a> : <a href="http://softpanorama.biz/Skeptics/Financial_skeptic/Humor/Bulletin/financial_humor2011.shtml"> Financial Humor Bulletin, 2011</a> : <a href="http://softpanorama.biz/Skeptics/Financial_skeptic/Energy/Bulletin/energy_bulletin2010.shtml"> Energy Bulletin, 2010</a> : <a href="http://softpanorama.biz/Malware/Bulletin/malware2010.shtml"> Malware Protection Bulletin, 2010</a> : <a href="/Bulletin/Sp2014_v26/bulletin26_01.shtml">Vol 26, No.1 (January, 2013) Object-Oriented Cult</a> : <a href="http://softpanorama.biz/Skeptics/Political_skeptic/Bulletin/political_skeptic2011.shtml"> Political Skeptic Bulletin, 2011</a> : <a href="/Bulletin/Sp2011_v23/bulletin23_11.shtml">Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories</a> : <a href="/Bulletin/Sp2013_v25/bulletin25_05.shtml">Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method</a> : </font><a href="/Bulletin/Sp2013_v25/bulletin25_06.shtml"> <font size="2">Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law</font></a></font></b></p> </blockquote> <p align="left"><b>History:</b></p> <blockquote> <p><b><font face="Arial"><a href="/History/index.shtml"><font size="2">Fifty glorious years (1950-2000): the triumph of the US computer engineering</font></a><font size="2"> : <a href="/People/Knuth/index.shtml">Donald Knuth</a> : <a href="/People/Knuth/taocp.shtml">TAoCP and its Influence of Computer Science</a> : <a href="/People/Stallman/index.shtml">Richard Stallman</a> : <a href="/People/Torvalds/index.shtml">Linus Torvalds</a> : <a href="/People/Wall/index.shtml">Larry Wall </a> : <a href="/People/Ousterhout/index.shtml">John K. Ousterhout</a> : <a href="/History/ctss.shtml"> CTSS</a> : <a href="/History/multix.shtml">Multix OS</a> <a href="/History/Unix/index.shtml">Unix History</a> : <a href="/People/Shell_giants/introduction.shtml">Unix shell history</a> : <a href="/Editors/Vimorama/history.shtml">VI editor</a> : <a href="/Scripting/Piporama/history.shtml">History of pipes concept</a> : <a href="/Solaris/solaris_history.shtml">Solaris</a> : <a href="/History/dos_history.shtml">MS DOS</a> : <a href="/History/lang_history.shtml">Programming Languages History</a> : <a href="/Lang/pl1.shtml">PL/1</a> : <a href="/Lang/simula67.shtml">Simula 67</a> : <a href="/Lang/Cilorama/history.shtml">C</a> : <a href="/People/Stallman/history_of_gcc_development.shtml">History of GCC development</a> : <a href="/People/Scripting_giants/scripting_languages_as_vhll.shtml">Scripting Languages</a> : <a href="/Scripting/Perlbook/Ch01/perl_history.shtml">Perl history </a> : <a href="/History/os_history.shtml">OS History</a> : <a href="/Mail/history.shtml">Mail</a> : <a href="/DNS/history.shtml">DNS</a> : <a href="/Net/Application_layer/SSH/ssh_history.shtml">SSH</a> : <a href="/History/cpu_history.shtml">CPU Instruction Sets</a> : <a href="/Hardware/Sun/history_of_sparc.shtml">SPARC systems 1987-2006</a> : <a href="/OFM/Paradigm/Ch03/norton_commander.shtml">Norton Commander</a> : <a href="/Windows/Norton_utilities/history.shtml">Norton Utilities</a> : <a href="/Windows/Ghosting/ghost_history.shtml">Norton Ghost</a> : <a href="/Office/Frontpage/history.shtml">Frontpage history</a> : <a href="/Malware/Malware_defense_history/index.shtml">Malware Defense History</a> : <a href="/Utilities/Screen/history.shtml">GNU Screen</a> : </font> <a href="/OSS/oss_early_history.shtml"><font size="2">OSS early history</font></a></font></b></p> </blockquote> <p><b>Classic books:</b></p> <blockquote> <p><b><font face="Arial"><a href="/Bookshelf/Classic/peter_principle.shtml"><font size="2">The Peter Principle</font></a><font size="2"> : <a href="/Bookshelf/Classic/parkinson_law.shtml">Parkinson Law</a> : <a href="/Bookshelf/Classic/nineteen_eighty_four.shtml">1984</a> : <a href="/Bookshelf/Classic/tmmm.shtml">The Mythical Man-Month</a> : <a href="/Bookshelf/Classic/polya_htsi.shtml">How to Solve It by George Polya</a> : <a href="/Bookshelf/Classic/taocp.shtml">The Art of Computer Programming</a> : <a href="/Bookshelf/Classic/teops.shtml">The Elements of Programming Style</a> : <a href="/Bookshelf/Classic/unix_haters_handhook.shtml">The Unix Hater’s Handbook</a> : <a href="/Bookshelf/Classic/jargon_file.shtml">The Jargon file</a> : <a href="/Bookshelf/Classic/true_believer.shtml">The True Believer</a> : <a href="/Bookshelf/Classic/programming_pearls.shtml">Programming Pearls</a> : <a href="/Bookshelf/Classic/good_soldier_svejk.shtml">The Good Soldier Svejk</a> : </font> <a href="/Bookshelf/Classic/power_elite.shtml"><font size="2">The Power Elite</font></a></font></b></p> </blockquote> <p><b>Most popular humor pages:</b></p> <blockquote> <p><font face="Arial"><b><a href="/Bulletin/Humor/Slackerism/it_slacker_manifest.shtml"> <font size="2">Manifest of the Softpanorama IT Slacker Society</font></a><font size="2"> : <a href="/Bulletin/Humor/Slackerism/ten_commandments_of_software_slackerism.shtml">Ten Commandments of the IT Slackers Society</a> : <a href="/Bulletin/Humor/index.shtml">Computer Humor Collection</a> : <a href="/Bulletin/Humor/bsd_logo_story.shtml">BSD Logo Story</a> : <a href="/Bulletin/Humor/cuckoo_egg.shtml">The Cuckoo's Egg </a>: <a href="/Bulletin/Humor/slang.shtml">IT Slang</a> : <a href="/Lang/Cpp_rama/humor.shtml">C++ Humor</a> : <a href="/Bulletin/Humor/Archive/humor059.shtml">ARE YOU A BBS ADDICT?</a> : <a href="/Bulletin/Humor/Archive/humor092.shtml">The Perl Purity Test</a> : <a href="/Bulletin/Humor/Archive/humor065.shtml">Object oriented programmers of all nations</a> : <a href="/Skeptics/Financial_skeptic/Humor/financial_humor.shtml">Financial Humor</a> : <a href="/Skeptics/Financial_skeptic/Humor/Bulletin/financial_humor2008.shtml">Financial Humor Bulletin, 2008</a> : <a href="/Skeptics/Financial_skeptic/Humor/Bulletin/financial_humor2010.shtml">Financial Humor Bulletin, 2010</a> : <a href="/Editors/humor.shtml">The Most Comprehensive Collection of Editor-related Humor</a> : <a href="/Lang/programming_languages_humor.shtml">Programming Language Humor</a> : <a href="/Skeptics/Financial_skeptic/Casino_capitalism/Systemic_instability_of_financial_sector/TBTF/Goldman_Sachs/humor.shtml"> Goldman Sachs related humor</a> : <a href="/Skeptics/Financial_skeptic/Casino_capitalism/Twelve_apostles_of_deregulation/Greenspan/greenspan_humor.shtml"> Greenspan humor</a> : <a href="/Lang/Cilorama/humor.shtml">C Humor</a> : <a href="/Scripting/humor.shtml">Scripting Humor</a> : <a href="/Bulletin/Humor/real_programmers_humor.shtml">Real Programmers Humor</a> : <a href="/WWW/humor.shtml">Web Humor</a> : <a href="/Copyright/humor.shtml">GPL-related Humor</a> : <a href="/OFM/ofm_humor.shtml">OFM Humor</a> : <a href="/Skeptics/Political_skeptic/humor.shtml">Politically Incorrect Humor</a> : <a href="/Security/IDS/humor.shtml">IDS Humor</a> : <a href="/Bulletin/Humor/linux_sucks.shtml"> "Linux Sucks" Humor </a>: <a href="/Links/Russian/Culture/Music/russian_musical_humor.shtml">Russian Musical Humor</a> : <a href="/Bulletin/Humor/best_russian_programmer_humor.shtml">Best Russian Programmer Humor</a> : <a href="/Bulletin/Humor/Archive/humor070.shtml">Microsoft plans to buy Catholic Church</a> : <a href="/People/Stallman/rms_related_humor.shtml">Richard Stallman Related Humor</a> : <a href="/Admin/humor.shtml">Admin Humor</a> : <a href="/People/Wall/perl_related_humor.shtml">Perl-related Humor</a> : <a href="/People/Torvalds/linus_torvalds_related_humor.shtml">Linus Torvalds Related humor</a> : <a href="/Skeptics/humor.shtml">PseudoScience Related Humor</a> : <a href="/Net/net_humor.shtml">Networking Humor</a> : <a href="/Scripting/Shellorama/humor.shtml">Shell Humor</a> : <a href="/Skeptics/Financial_skeptic/Humor/Bulletin/financial_humor2011.shtml">Financial Humor Bulletin, 2011</a> : <a href="/Skeptics/Financial_skeptic/Humor/Bulletin/financial_humor2012.shtml">Financial Humor Bulletin, 2012</a> : <a href="/Skeptics/Financial_skeptic/Humor/Bulletin/financial_humor2013.shtml">Financial Humor Bulletin, 2013</a> : <a href="/Lang/Javarama/humor.shtml">Java Humor</a> : <a href="/SE/humor.shtml">Software Engineering Humor</a> : <a href="/Solaris/humor.shtml">Sun Solaris Related Humor</a> : <a href="/Education/humor.shtml">Education Humor</a> : <a href="/Admin/Tivoli/ibm_humor.shtml">IBM Humor</a> : <a href="/Lang/Asmorama/humor.shtml">Assembler-related Humor</a> : <a href="/Editors/Vimorama/vim_humor.shtml">VIM Humor</a> : <a href="/Malware/humor.shtml">Computer Viruses Humor</a> : <a href="/Bulletin/Humor/Archive/humor034.shtml">Bright tomorrow is rescheduled to a day after tomorrow</a> : <a href="/Bulletin/Humor/classic_computer_humor.shtml">Classic Computer Humor</a> </font></b></font></p> </blockquote> <p align="left"><b><a href="/Bulletin/Humor/last_but_not_least.shtml">The Last but not Least</a> </b> <em>Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D</em></p> <hr size="5" noshade color="#FF0000"><font face="Verdana" size="1"> <p><i><b>Copyright © 1996-2021 by </b></i><b><i>Softpanorama Society</i></b>. <a target="_blank" href>www.softpanorama.org</a> was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (<a target="_blank" href="http://www.un.org/Depts/dhl/sflib/">SDNP</a>) without any remuneration. This document is an industrial compilation designed and <b>created exclusively for educational use</b> and is distributed under the <a href="/license.shtml">Softpanorama Content License</a>. Original materials copyright belong to respective owners. <i><b>Quotes are made<font color="#FF0000"> for educational purposes only</font> in compliance with the fair use doctrine. </b></i> </p> <p><em><b>FAIR USE NOTICE</b> </em>This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.</p> <p><b>This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language.</b> Grammar and spelling errors should be expected. <b>The site contain some broken links as it develops like a living tree...</b></p> <table border="0" width="100%"> <tr> <td> <p align="center"><font face="Verdana" size="1"> <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> </font></td> <td><font face="Verdana" size="1">You can use PayPal to to buy a cup of coffee for authors of this site </font></td> </tr> </table> <p><b>Disclaimer:</b> </p> <p><i>The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the Softpanorama society.</i> <i>We do not warrant the correctness of the information provided or its fitness for any purpose. </i>The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. <em>This site is perfectly usable without Javascript.</em> </font></p> <p><i>Last modified: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%B %d, %Y" startspan -->September 14, 2020<!--webbot bot="Timestamp" i-checksum="37973" endspan --></i></p> </li> </body> <script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script></html>