Title image Spring 2018

Course Information for Spring 2018

Time: MWF 11-11:50am
Place: Davis 117

Instructor Information

Prof. Bruce A. Maxwell
Office: Davis 112
Phone: 859-5854

Office hours: M 9:30pm-late, R 7:30pm-late
Any time my door is open. Good times this semester are M-F before 11am.


Course Description

This course is a survey of programming languages and paradigms. We will focus on the design of programming languages and compare and contrast different language familes including imperative, object-oriented, functional, and logic paradigms. Topics include syntax, context-free grammars, parsing, semantics, abstract representations of programming processes and structures, memory management, and exceptions. Students will undertake small programming projects in various languages and more extensive projects in two languages of their choice. Students will present the characteristics of their chosen languages to their peers at the end of the term.

Prerequisite: CS 231

Textbooks

Useful Links

Languages

Programming Language Tools


Source Code Examples

  • trycatch.java: Try/catch exception handling in Java.
  • trycatch.py: Try/catch exception handling in Python.
  • signal.c: Example of signal handling in C.
  • signal-inf.c: Another example of signal handling in C.
  • sumthread.c: Example of using threads to sum an array. Includes code for timing the operation. To compile, use
    gcc -o sumthread sumthread.c -lpthread
  • mutex-simple.c: Example of a mutex lock to control access to a counter variable. Compile with the pthread library, as above.
  • prodcons.c: Example of using a mutex lock to implement producer and consumer threads. Compile with the pthread library, as above.
  • dualsumT.java: Example of using threads in Java. The code tests a single thread versus two threads to sum an array.
  • dualsumT.py: Example of using threads in Python. The code compares timing for a single thread versus two threads to sum an array.
  • mygate.vhd: VHDL example of a simple gate.
  • testmygate.vhd: VHDL testbench for the simple gate.
  • swap.vhd: VHDL example of two 1-bit registers.
  • testswap.vhd: VHDL testbench for the swap example.
  • puzzle.pl: Example of using Prolog to solve the logic problem in the textbook.
  • puzzle2.pl: Example of using Prolog to solve this logic problem.