Description: 

Programming languages can be studied from three different perspectives: as a programmer, as a designer, and as a developer. In this course, they are studied from the point of view of the language developer. Implementing a language means “writing” a compiler or interpreter for it. The course covers techniques related to compilation as well as the characteristics that define different programming languages.

Type Subject
Tercer - Obligatoria
Semester
Second
Course
3
Credits
6.00

Titular Professors

Previous Knowledge: 

Object oriented programming and design

Advanced programming and data structure

Digital systems and microprocessors

Objectives: 

The basic foundations for the formal definition of programming languages are understood. The techniques for the implementation of programming languages are also understood.

Contents: 

  • Module: Programming Languages

    1. History. Statistics
    2. Classification
      1. Paradigms. Essence. Examples
      2. Levels. Definition. Examples.
      3. Compiled/Interpreted/ Definition. Examples
    3. Features/Attributes of a Good language
    4. PL components. Perspectives/Roles.
    5. Programmer, Designer, Implementer
    6. Study cases
  • Module: Formal Languages
    1. Languages. Grammars. Machines.
    2. Chomsky’s classification. Regular languages, context-free, context-sensitive and unrestricted.
    3. Grammars. Derivation. Syntactic tree. Generated language.
    4. Regular languages. Regular expressions. Regular grammars.
    5. Finite state machines. Deterministic and nondeterministic. Implementation. Applications.
    6. Context-free languages. Context-free grammars.
    7. Stack automaton. Deterministic and nondeterministic. Implementation. Applications.
    8. Semantics. Attribute grammar. Implementation. Applications.
  • Module: Compilers and Interpreters
    1. Compilers and interpreters. Compiler’s structure. Interpreter’s structure.
    2. Compiler execution process. Interpreter execution process.
    3. Lexicographical analysis.
    4. Syntactic analysis.
    5. Semantic analysis. Syntax-driven translation.
    6. Code generation

Methodology: 

Programming Languages course intention is to teach basic knowledge regarding programming languages and their foundation and design. Also, this course aims to emphasize the importance of critical thinking and for this reason the student will contact programming language research environment. This course combines lectures and discussions/debates about different class-related topics with group projects in order to settle all theory as well as student?s autonomy and group work capabilities. Some topics (or research papers) will be proposed by the teacher so students can explore and debate these materials.

Evaluation: 

The subject has a duration of one semester and consists of two differentiated parts: the knowledge part and the practical part. The evaluation of knowledge and project will be independent. To pass the subject, it will be necessary to pass both the knowledge and the project independently.

Evaluation Criteria: 

It will be assessed:
- The correct understanding and application of the fundamental theoretical concepts covered in class
- The ability to analyze and define the characteristics of a programming language
- The ability to design and implement a modern compiler with its corresponding modules/phases
- The ability to justify software design decisions
- The ability to produce high-quality technical documentation consistent with the implemented project

Basic Bibliography: 

Aho, Alfred. Compilers: Principles, Techniques, and Tools (2006)

Additional Material: 

Mozota, María Antonia. Teoria de la compilació: Anàlisi Lèxic i Sintàctic. Guia d’estudi. Creative Commons Licence Deed (2009)
Mozota, María Antonia. Teoria de la compilació: L’Anàlisi Semàntica i la Generació del codi. Guia d’estudi. Creative Commons Licence Deed (2009)
Larus, James R.. Assemblers, Linkers, and the SPIM Simulator. Appendix A
Pratt, Terrence W. and Zelkowitz, Marvin V. Programming Languages: Design and Implementation (Fourth edition). Prentice-Hall. 2001.
MacIntyre, Peter B. PHP: the good parts. O'Reilly (2010)
Flanagan, David and Matsumoto, Yukihiro. The ruby programming language. O'Reilly (2008)
Phoenix, Tom Schwartz, Randal L. and Foy, Brian D. Learning Perl. O'Reilly (2008)
Lutz, Mark. Learning Python. O'Reilly (2009)
Lutz, Mark. Programming Python. O'Reilly (2010)