Comp 524: Programming Languages

Course Overview

The objective of this course is to introduce students to the fundamental concepts that differentiate alternative programming paradigms. These alternatives emerged initially in different languages, but some of them have been combined in the same language. It will be assumed students understand grammars and regular expressions (Comp 455), Java (Comp 401), and as C (Comp 411). The course has several related goals: (1) Identify differences between the two familiar languages - C and Java - based on modularity, data types, type binding, scope, parameter evaluation, and parameter passing. (2)  Introduce new languages/paradigms that are alternatives to those seen so far in C and Java including functional programming, logic programming, type inference, OS-level programming, parallel programming, distributed programming, programming by example, and machine learning. (3) Provide am implementation-level understanding of some of these concepts through relevant assignments. (4)  Present a formal description of some of these concepts through the familiar concepts of regular expressions and grammars and new concepts of attribute grammars and Hoare axioms.

The specific languages/systems/libraries that will be used to illustrate these concepts are Lisp and Java lambda expressions (Functional programming), Prolog (logic programming), ML (type inference), OpenMP and Java threads (concurrent programming), Java and C sockets (distributed programming), Weka clustering and decision tree (programming by example/machine learning).

I have not yet decided on the assignments but some of the required/extra-credit assignments I am thinking of are:

The exact nature of the assignments is yet to be determined, but here are some initial thoughts:

Implement a Lisp Interpreter in Java by extending a recursive-descent evaluator of nested prefix expressions.

Implement a Lisp Interpreter server and write a Java client for it.

Write C and bash clients for the Lisp Interpreter.

Extend the Lisp interpreter (server) to a parallelized one that supports eager evaluation.

Extend the Lisp interpreter (server) to support lazy evaluation.

Implement a Lazy Lisp interpreter  in Prolog (extra credit)

Implement a Prolog interpreter in ML (extra credit)

Use Weka to detect programming difficulty (extra credit)

Tentatively, exams will be worth 50-60% of the grade and assignments 40-50%.

Syllabus Handout in UNC Format


Prasun Dewan

Office: FB 150


Office Hours:

Tue, Thu 3:15-4:15pm

Getting Help and Class Discussion

We will be using Piazza for class discussion and submitting videos and diaries. The system is highly catered to getting you help fast and efficiently from classmates and instructors. Rather than emailing technical questions, please post public questions to Piazza. Material containing private information should be posted as a private question on Piazza. If you do not get a response within a day or two on Piazza, please send email.

Before posing a question, please check if this question has been asked before. This will reduce post clutter and reduce our burden. Repeat questions will be ignored.

Piazza allows anyone to respond. So if you see a question that you think you can respond to, please do so, as that will reduce my burden and help you "teach" your fellow students. In fact, my responses will be delayed to give the fellow students a chance to respond first.

 Find our class page at:



Searchable PDF of All Slides with Hyperlinked Table of Contents

YouTube 524 Play List: Videos of Lectures


Room: GS 200

Time: TR 12:30-1:45pm

Exam Schedule


October 15, 2019 in class


12pm on Friday Dec 6 (in class)

Old Exams

Exam 1


Exam 2



Github Repositories





Shared Google Drive Folder



Programming Language Pragmatics


LISP Tutorials



A Gentle Introduction to ML

Programming in Standard ML




Learn Prolog Now!

Lisp Interpreter

The Lisp Interpreter

(How to Write a (Lisp) Interpreter (in Python)) - Peter Norvig

GitHub - rui314/minilisp: A readable lisp in less than 1k lines of C

Learn C • Build Your Own Lisp

Lisp interpreter in 90 lines of C++ · GitHub


















8/22 -