Fundamentals of Programming Languages
Dr. Lutz Hamel
Tyler Hall 251
Office hours: Monday 11-noon Tyler 251, Wednesday 1-2pm Tyler 251, or by appointment
Tuesday : 2:00 -3:00 pm
Friday: 11:00 -12:00 pm
Tyler Room 136.
Thursday 1:00- 2:00
[12/9/16] posted assignment# 13
[12/7/16] Solution to the factorial problem given in class today. We need to extend our
grammar for Language ONE with the factorial operator which is a high precedence operator:
<exp>* ::= <exp> + <mulexp> | <mulexp>
<mulexp> ::= <mulexp> * <rootexp> | <rootexp>
<rootexp> ::= (<exp>) | <constant> | <rootexp>!
<constant> ::= <all valid integer constants>
We now need to extend our semantic Prolog rules:
Value is XValue + YValue.
Value is XValue * YValue.
val1(const(X),Value) :- Value = X.
Note: Prolog does not have a factorial operator so we have to write our own:
T is N - 1,
NF is N*TF.
[12/7/16] there is a bootcamp today Wed 12/7 on programming language semantics
[12/2/16] posted assignment #12
[11/28/16] Posted assignment #11
[11/17/16] posted assignment #10
[11/16/16] There will be a bootcamp today on Prolog
[11/15/16] Posted assignment #9
[11/9/16] here is a driver class you can use for assignment #8:
/* driver class for the Java Calculator.
* You give it an expression in double quotes and it will print out the value:
* $ java Calc "1+1"
* value = 2.0
public class Calc
public static void main(String  args)
CalcParser parser = new CalcParser(args);
// TODO: This should be changed from value to stack machine code
System.out.println("value = " + parser.getValue());
[11/14/16] posted assignment #9 -- NO LATE SUBMISSIONS ACCEPTED
[11/9/16] posted the midterm solutions on the solutions page
[11/4/16] posted assignment #8
[11/2/16] posted all solutions 1-7
[10/28/16] posted assignment #7
[10/19/16] posted assignment #6
[10/14/16] posted assignment #5
[10/7/16] posted assignment #4
[10/7/16] posted solutions #3
[9/26/16] posted assignment #3
[9/21/16] posted the boot camp solutions
[9/21/16] posted assignment #2 due Friday, no late assignments accepted.
[9/16/16] Posted assignment #1 -- see below
[9/14/16] Posted solutions for the grammar part of session 1 - see bootcamp sessions
[9/7/16] NOTE: do NOT update the Ubuntu OS. I do not know if all the packages I installed work with the new version of the OS.
[9/2/16] The Linux virtual machine is now available for download:
Download this file (careful ~2.5GB) and import this into VirtualBox using the file->import appliance menu point.
Once imported you can start the machine by double clicking on UbuntuBox.
[9/2/16] Please install
Virtual Box on your computer.
Language enables thought. In this course we study a class of
formal languages known as programming languages. Similar to
natural languages, these formal languages enable us to to reason about
algorithms and procedures to solve computational problems on computers.
However, their formal nature restricts the kind of meanings
particular language constructs can assume and therefore makes them
amenable for the execution on a computer.
Over the years many different programming language dialects have
evolved to address particular technical issues, e.g. object-oriented
languages, real-time languages, database query languages, logic
languages, etc. Here we
study the major structures of modern programming languages.
Understanding not only the syntax of a language but also the semantics
and implementation techniques of this language will allow you to design
better programs. Having deeper insights into the design of a
programming language will also enable you to learn new programming
languages much faster. Having a thorough understanding of today's
languages allows you to design the programming languages of tomorrow.
Upon completion of this course
- You will be able to discern and contrast the major programming language paradigms in use today.
- You will be able to pick an appropriate language for the job at hand.
- You will have deeper insights into the evolution of programming languages.
Documents of Interest:
Email submissions are NOT
acceptable for assignments.
For programming assignments
you will need to submit your source code and proof that
your program runs on sample input, e. g., screen shot or cut and paste
results of the run into a MS Word document. Also, please
follow the instructions for each problem
Handwritten work will not be accepted
as programming assignments.