Contact Information

If you encounter any difficulties accessing Online Courses Handbook information you should contact the student registry:

If you require further details in relation to academic content you should contact the appropriate academic department directly.

Breadcrumbs

C.SC254 : Languages and Compilation

Year:11/12
Department:Computing and Communications (School of)
Level:Part II (any yr)
Learning Hours:150
Credit Points:15
Weight:0.5
Course Convenor:Dr JA Mariani
Status:Live

Assessment Rules

back to top
  • 70% Exam
  • 30% Coursework

Curriculum Design: Outline Syllabus

back to top
 

Formal Languages; introduction to syntax and semantics.  The Chomsky Hierarchy.  Parsing.  Ambiguity in Context Free grammars and its implications.  Languages and abstract machines.  Computation; Turing's thesis; Alternative models of computation (functional languages, etc).  Applications of abstract machine representations.

 

Introduction to the compilation process.  Lexical analysis.  Syntactic analysis: recursive descent and SLR techniques.  The use of the tools JLex and CUP.  Semantic analysis and the symbol table.  The synthesis phase: intermediate representations. Target languages and structures.  Code generation; an introduction to code optimisation. Just in Time compilation. Virtual Machines (e.g. Java Virtual Machine and Microsoft Common Language Runtime)

Educational Aims: Subject Specific: Knowledge, Understanding and Skills

back to top
 

To introduce students to the theory of formal languages, and how it relates to programming languages.  To study the relationship between formal languages and abstract machines, and how it relates to compilation.

 

To give students a basic understanding of the compilation process for a high-level programming language, both analysis (lexical, syntactic and semantic) and synthesis.  To show how the techniques of lexical and syntactic analysis are useable in other areas of Computer Science

Learning Outcomes: Subject Specific: Knowledge, Understanding and Skills

back to top
 

On completing this course the student will have a clear understanding of the role of formal grammars for both languages and computers.  The student will

 

-        be able to recognise and classify the four different types of phrase structure grammar (regular, context-free, context-sensitive and unrestricted) according to the Chomsky Hierarchy

-        be able to construct and use the abstract machine appropriate to each grammar (finite state recogniser, pushdown recogniser, Turing Machine) and use this to check the validity of strings

-        appreciate key principles of languages, grammars and machines such as syntax, semantics, ambiguity, equivalence, determinism and non-determinism and how this relates to real life situations such as compilers

-        be able critically to evaluate each grammar or machine and understand the various limitations of each

-        have a basic understanding of the concept of well-specified problems that cannot be solved, in particular the Halting Problem.

-        be able to describe the general features of the compilation process (lexical analysis, syntactic analysis, semantic analysis, code generation and optimisation) in the context of a typical procedural language

-        understand and be able to implement a simple lexical analyzer

-        be able to describe the general features of, and constraints on, the syntactic analysis phase of a compiler

-        be able to create a recursive descent parser for a simple programming language, making changes to the grammar as appropriate

-        be able to create and use SLR(1) parsing tables for a simple context-free grammar, explaining how to recognise that a grammar is not SLR(1)

-        be able to explain the basic features of the JLex and CUP tools for creating lexical and syntax analysers

-        be able to describe the basic features of the semantic analysis phase and the synthesis section of a compiler, particularly as applied to modern programming languages such as Java and C#

Curriculum Design: Select Bibliography

back to top
 

[A] A.P. Parkes, "Introduction to Languages, Machines and Logic" Springer 2002.

ISBN 1852334649

 

[A] J.P. Bennett, "Introduction to Compiling Techniques" McGraw-Hill (2nd edition 1996)

ISBN 0-07-709221-X

Lancaster University
Bailrigg
LancasterLA1 4YW United Kingdom
+44 (0) 1524 65201