E-mail : t a r a u@cs.unt.edu
WWW : http://www.cs.unt.edu/~tarau
Address: Department
of Computer Science, University of North Texas,
P.O. Box 311366, Denton,
Texas 76203, USA
Phone : Tel : +1-940-565-2806, +1-940-565-2767
Fax : +1-940-565-2799
An advanced programming language course, with emphasis on programming paradigms and language processors - and some of their formal models like Predicate Logic and Lambda Calculus and exhibiting actual implementations of key concepts (recursion, inheritance, unification, backtracking, type inference, infinite and lazy data objects, threads, event-driven and concurrent/distributed programming). The course also provides a glimpse at salient features of modern object oriented languages and an overview of language implementation techniques, run-time systems, garbage collection, interpreters, compilers with emphasis on addressing and memory management in efficient procedural languages like C.
Recommended books:
NEW ASSIGNMENTS:
Assignment 1: due Oct 4 at noon.
Write a go language program that implements queue of integers as a combination of two dynamic stacks. An example in C is at http://logic.cse.unt.edu/tarau/teaching/ProgLang/2010/p1/. If you have trouble installing go, you can try using http://golang.org/doc/playground.html.
Assignment due Nov 29: write a simple “dropbox” emulation in Java that synchronizes two folders on a local area network.
Final project: send not later than Wed Dec 1 a one page description of a programming language project that you propose. The project should be submitted to the grader not later than Dec 10 at midnight.
Final exam: Wed Dec.
15 at 1:30pm.
OLD ASSIGNMENTS FROM PREVIOUS SEMESTERS:
========================================================================================
Assignment 1:
Implement a basic arbitrary length arithmetics
package in C, supporting addition and multiplication
of arbitrary size natural numbers as well as two functions converting them
to/from strings representing
decimal numbers.
Assignment 2:
Implement a Sudoku 9x9 solver in Prolog.
Assignment 3:
Implement a Sudoku 4x4 solver and completed puzzle generator in
Mathematica.
Assignment 3: Due Mon. Nov 16, at noon
Implement a multithreaded Sudoku 9x9 solver in Java. A number of
different threads should be launched to search for a solution using different
methods. The first that finds it should notify all the others to stop, then return the answer. Input should be in the database
format given http://units.maths.uwa.edu.au/~gordon/sudokumin.php
i.e. something like
000000010400000000020000000000050407008000300001090000300400200050100000000806000
Final Project:
Please schedule demos in class with the grader either Mon Dec 7 or Wed Dec 9. Final code due to the grader on Sun Dec 13, noon. Slides-presentation on what
the project achieved and grading during the Final Exam slot.
Port your Sudoku
9x9 solver to the Android 2.0 platform. Display the solution on a 9x9 grid. You
can be creative
With
various extra features. Multithreading is not required and input can be
directly on the grid.
----------------------------------------------------------------------------------------------------
Parsing Assignment (1): n
Using parser.hs shown in class as a starting point,
write a reader and a printer in Haskell
that reads/prints a data object of type Tree:
data Tree = Atom String | Term String [Tree]
from/to a list of characters as in the following examples:
f(one,g(two,three),h3(four))
term1(atom1,term2(atom2,atom3))
To keep things simple, the tokens are defined as follows:
everything except "(" and ")" is considered a valid
identifier.
GA Assignment (2): Using the Haskell problem ga.hs as a specification implement a genetic Algorithm
shell of similar functionality in Prolog.
Due: Wed. Oct 22 at noon.
Socket+Threads assignment: Write a
small client/server Java program that connects a number of client processes to
a server. You should be able to type text into the client processes windows and
the server should display each complete line as it receives it. Deadline: Wed.
Nov 5, at noon
Ruby Assignment: Write a Ruby program that closely emulates the
functionality of the following Prolog program.
Deadline: Thursday Nov 22, at noon.
FINAL PROJECT to be submitted to the grader
not later than Dec. 7 and demoed to the grader on Dec. 10 at 1:30pm: In a
language of your choice among those studied in class or presented by students,
propose a project that would use some new and language features that you have
found particularly interesting. A short and informal project proposal (1-2
slides) is due Wed. Nov 19.
Assignment 1: An integer partion of N is a
list of numbers that sum up to N exactly. For instance 1+1+2+5 is an integer
partition of 9. Write a Haskell function that given a number N generates the
list of all integer partitions of N.
Assignment 2: Write a Prolog program that converts a boolean
expression containing *,+,~ (and,or,not)
into an optimal BDD (binary decision diagram) obtained by trying out all permunations of the variables in the formula and all
simplifications of a BDD.
Assignment 3. Using the JavaProject
API discussed in class as a starting point design a simple scripting language
allowing you to create and animate object of your choice. The script should be
read from a file and executed by your runtime system.
Assignment 4. Write a Ruby program that closely
emulates the functionality of the Haskell program
explained here.
Hint: if hesitating about data representations, you might want to use this Ruby program as a
starting point. Deadline: Thursday March 27, at noon.