Skip to main content

/EDUCATION/COMP2212

COMP2212: Programming Language Concepts

Second Year, 2024/25 · Semester 2

Overall mark 85%

Language syntax, type systems, and semantics, with a team project building a CSV query language and interpreter.

SKILLS Language Design · Lexing and Parsing · Interpreter Development · Type Systems

TECHNOLOGIES Haskell · Alex · Happy · Stack

What the module covered

This module explored how programming languages are defined and implemented, covering binding and scope, grammars, lexing, parsing, type systems, and operational and denotational semantics.

For the group coursework, we designed CQL, a SQL-inspired language for manipulating CSV data, and implemented its interpreter in Haskell with Alex and Happy. It supported loading and saving tables, selections, filters, joins, and insertions, with checks for invalid comparisons, inconsistent table widths, and out-of-range references. The project also included a language manual and a VS Code syntax-highlighting extension.

What I took from it

The project connected a language’s syntax to its behaviour: recognising a valid statement was only the first step, followed by deciding how to evaluate it and report invalid operations. Our evaluation also highlighted limitations in the design, including rigid statement composition and an evaluator that loaded whole tables into memory.