Design Patterns for Teaching Type Checking in a Compiler Construction Course

A course in compiler construction seeks to develop an understanding of well-defined fundamental theory and typically involves the production of a language processor. In a graduate degree in software engineering, the development of a compiler contributes significantly to the developer's comprehension of the practical application of theoretical concepts. Different formal notations are commonly used to define type systems, and some of them are used to teach the semantic analysis phase of language processing. In the traditional approach, attribute grammars are probably the most widely used ones. This paper shows how object-oriented design patterns represented in unified modeling language (UML) can be used to both teach type systems and develop the semantic analysis phase of a compiler. The main benefit of this approach is two-fold: better comprehension of theoretical concepts because of the use of notations known by the students (UML diagrams), and improvement of software engineering skills for the development of a complete language processor.

[1]  A.P.W. Eliëns Principles of Object-Oriented Software Development, 2nd Edition , 2000 .

[2]  Charles N. Fischer,et al.  Crafting a Compiler , 1988 .

[3]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[4]  Tobias Nipkow,et al.  Term rewriting and all that , 1998 .

[5]  C. A. R. Hoare,et al.  Ambiguities and insecurities in pascal , 1977, Softw. Pract. Exp..

[6]  Christopher Strachey,et al.  Fundamental Concepts in Programming Languages , 2000, High. Order Symb. Comput..

[7]  William G. Griswold Teaching Software Engineering in a Compiler Project Course , 2002, JERC.

[8]  Jr. Allen B. Tucker,et al.  The Computer Science and Engineering Handbook , 1997 .

[9]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[10]  Andrew W. Appel,et al.  Modern Compiler Implementation in Java , 1997 .

[11]  Paliath Reviewer-Narendran Book review: Term Rewriting and all that by Franz Baader and Tobias Nipkow (Cambridge Univ . Press, 313 pages) , 2000 .

[12]  Anton Eliëns Principles of Object-Oriented Software Development , 1994 .

[13]  Michael L. Scott,et al.  Programming Language Pragmatics , 1999 .

[14]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[15]  Jukka Paakki,et al.  Attribute grammar paradigms—a high-level methodology in language implementation , 1995, CSUR.

[16]  David Galles Modern Compiler Design , 2004 .

[17]  Robert W. Sebesta,et al.  Programming Language Processors in Java: Compilers and Interpreters: AND Concepts of Programming Languages , 2000 .

[18]  H. Liu Software engineering practice in an undergraduate compiler course , 1993 .

[19]  Donald E. Knuth,et al.  Semantics of context-free languages , 1968, Mathematical systems theory.

[20]  Paul Klint,et al.  Compiling language definitions: the ASF+SDF compiler , 2000, TOPL.

[21]  Andrew M. Pitts,et al.  Operational Semantics and Program Equivalence , 2000, APPSEM.

[22]  Acm Ieee-Cs Joint Curriculum Task Force Computing Curricula 2001: Computer Science , 2002 .

[23]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.