F29LP Language Processors

Dr Jamie GabbayDr Mohammad Hamdan

Course co-ordinator(s): Dr Jamie Gabbay (Edinburgh), Dr Mohammad Hamdan (Dubai).

Aims:

  • To develop skills in programming language definition
  • To develop skills in programming language implementation

Detailed Information

Course Description: Link to Official Course Descriptor.

Pre-requisite course(s): F28PL Programming Languages .

Location: ALP, Dubai, Edinburgh.

Semester: 2.

Syllabus:

Language definition:

  • lexicon: non-terminal & terminal symbols, type 3 grammars, regular expressions, finite state automata, Moore & Mealey machines, left & right recursion
  • concrete syntax: type 2 grammars & BNF, factoring grammars, converting left to right recursion, LL(K) & LR(K) grammars, push down automata, parsing
  • abstract syntax: abstract syntax from concrete syntax
  • static semantics: types
  • dynamic semantics: overviews of axiomatic, denotational & operational semantics; introduction to structural operational semantics (SOS) for declarations, expressions, statements

Language implementation:

  • lexical analysis
  • syntax analysis: recursive descent for LL(1)
  • abstract syntax tree (AST) construction
  • AST pretty printing
  • overview of interpreter/abstract machine
  • AST interpretation
  • static analysis of AST: e.g. type checking, identifier resolution

code generation e.g.: register/memory allocation, structured constructs as test/jump, structured data as structured memory sequences, stack discipline for

  • blocks/subroutines, parameter passing
  • run time environment: e.g. heap allocation, garbage collection, debugging support
  • compiler construction tools e.g. Lex, Yacc, JavaCC based on simple imperative language

Learning Outcomes: Subject Mastery

Understanding, Knowledge and Cognitive Skills Scholarship, Enquiry and Research (Research-Informed Learning)

  • Ability to construct & manipulate lexical & syntactic definitions
  • Understanding of relationship between grammars & automata
  • Ability to construct lexical & syntactic analysers from definitions
  • Familiarity with static & dynamic semantics, and associated formalisms
  • Ability to generate & traverse ASTs
  • Ability to construct AST-based analysers, interpreters & code generators for simple languages
  • Understanding of run-time environments
  • Ability to use compiler construction tools

Learning Outcomes: Personal Abilities

Industrial, Commercial & Professional Practice Autonomy, Accountability & Working with Others Communication, Numeracy & ICT

  • Appreciation of problem solving as language definition & implementation
  • Ability to apply appropriate language oriented formalisms, tools & techniques in solving problems
  • Skills in engineering complex software artefacts

Assessment Methods:

Assessment: Examination: (weighting – 60%) Coursework: (weighting – 40%)
Re-assessment: Examination: (weighting – 100%)

SCQF Level: 9.

Credits: 15.