Syllabus
CSCI 6220
Topics in Programming Languages: Declarative Programming
Section 001
Fall 2005

Class meeting 11:00am-11:50 Austin 304
Instructor Karl Abrahamson
Office C-113 Science and Technology
Office hours M-Th 2:00-3:15 or by appointment
Phone 328-9689
Email karl@cs.ecu.edu
Course web page www.cs.ecu.edu/~karl/6220/fall05/
My web page www.cs.ecu.edu/~karl/
Text Haskell: The Craft of Functional Programming by Simon Thompson


Prerequisites

You should have completed a course in data structures and be familiar with at least one higher level programming language. Prior study of programming languages will be helpful but is not required.


Introduction

Programming languages are broadly broken into two categories, the imperative languages and the declarative languages.

Imperative languages include C, C++, Java, Ada, Pascal, Basic, and many more. The defining feature of imperative language is that a program is based on commands (often called statements) that call for changing something, such as the value of a variable.

The defining feature of a declarative language is the absence of commands. Instead, a declarative program consists of a collection of facts. Examples of declarative languages are Standard ML, Haskell and Prolog.

Many languages contain aspects of declarative and imperative programming mixed together. You can use one or the other, or mix as you like.

Declarative languages have some advantages over imperative languages.

  1. Declarative programs are often (but not always) easier to write than imperative programs, and consequently declarative programs tend to be less costly to develop than imperative programs. Because of this, techniques of declarative programming are gradually finding their way into more traditional settings.

  2. There are common kinds of errors that imperative programs can make that can never be made in a declarative language. This contributes to reliability of programs.

  3. The semantics (meaning) of declarative languages are generally easier to explain precisely. Fundamental concepts of programming language semantics are rooted in ideas that are mathematical and close to the way that declarative programs work.

  4. Declarative programs encourage the programmer to think in more conceptual, or abstract terms, and the best thought-out abstraction mechanisms are present in declarative languages. Learning to program in a declarative style helps in understanding abstraction, and helps to understand programming in an imperative setting. An understanding of declarative programming helps immensely in understanding all programming languages.

Declarative programs are generally either functional or logical. We will cover material from both kinds of declarative programming, including the following topics.

  1. Fundamentals of functional programming. Functions and data in a functional setting. Writing definitions of functions.

  2. Higher order functions.

  3. Reasoning about programs.

  4. The formal underpinnings of functional programming.

  5. Advanced concepts in functional programming. Monads.

  6. Fundamentals of logic programming.

  7. The formal underpinnings of logic programming, including first-order logic.

The student will learn not only the fundamental concepts, but also will learn to write working programs.


Grading

Grading will be on the basis of two midterm exams (14% each), a final exam (25%), programming assignments (32%) and written homework (15%).


Attendance policy

I will not take attendance. You are expected to attend class. You are responsible for announcements and assignments given in class. If you miss a class, it is up to you to obtain notes and any other information that was provided in the class. Excuses that you did not know about something because you did not come to class and did not obtain the information will not count for anything at all.

Those who do not attend class can count on doing poorly in this course. If you choose not to attend class, then you must live with the consequences of that decision, however bad they are.


Incompletes

No incompletes will be issued in this course except for extraordinary circumstances, and even then only if you are nearly done already, and have done work of acceptable quality that it is realistic that you can pass the course. An incomplete will not be given simply because a student could not find the time to do the course work. By registering for this course, you are committing to finding time to do the work.


Recommendations for success

  1. Attend class. Arrive on time.

  2. Do not allow yourself to fall behind. Work on the homework early. Do not wait until just before the deadline.

  3. Schedule time to work outside of class.

  4. Read your notes and the book twice. Take a break (like a whole day) in between. You will learn much more this way.

  5. Get adequate sleep. Sleep is important both before and after you learn new concepts. Sleep before enables you to concentrate, and sleep afterwards is critical for moving new information into permanent memory.

  6. If you are having trouble, seek help soon. Do not wait until it is too late.


Student conduct

Smoking is not permitted in classrooms. Please turn off telephones while in class.

Students are expected to abide by the university's Student Honor Code. The homework that you do is a critical part of your education. Each student is expected to do his or her own work. That does not mean you are not allowed to discuss your ideas with other students. Working groups can be beneficial, and I encourage you to talk through ideas with other students. But outright copying is plagiarism, and is unacceptable. Students who copy other students' work, or who allow their work to be copied, or who copy their work from other sources, such as the internet, will receive no credit.


Weather emergencies

In the event of a weather emergency, information about ECU can be accessed through the following sources:

ECU emergency notices http://www.ecu.edu/alert
ECU emergency information hotline 252-328-0062


Students with disabilities

East Carolina University seeks to comply fully with the Americans with Disabilities Act. Students requesting accommodations based on a covered disability must go to the Department for Disability Support Services, located in Brewster A-114, to verify the disability before any accommodations can be made. The telephone number is 252-328-6799.