Syllabus
Computer Science 3675
Organization of Programming Languages
Section 001
Fall 2018
(Revised)

Class meeting 2:00–2:50pm MWF Austin 306
Instructor Karl Abrahamson
Office Sci. & Tech. C-113
Office hours
MW 3:00–3:50pm and 5:00-5:50pm
F 3:00–3:50pm
or by appointment
Phone 328-9689
Email abrahamsonk@ecu.edu
Course web page www.cs.ecu.edu/~karl/3675/fall18/
My web page www.cs.ecu.edu/~karl/
Text Concepts of Programming Languages: A Unified Approach (August 2018) by Karl Abrahamson

Contents

  1. Prerequisites
  2. Introduction and course objectives
  3. Grading
  4. Attendance policy
  5. Incompletes
  6. Recommendations for success
  7. Lecture schedule and reading assignments
  8. Ethical issues
  9. Additional information

Prerequisites

You should have had a course in data structures and be familiar with at least one procedural or object-oriented programming language, such as Java, C or C++. You should be a proficient computer programmer.

Introduction and course objectives

Introduction

Programming languages are the notation in which programmers express their creations. It is said that natural language influences how people think. Whether or not that is true, it is certainly the case that programming languages strongly influence how programmers and software developers think.

This course explores different kinds of programming languages: their philosophies, components, structure, advantages and disadvantages. It also covers issues such as type checking, specification of syntax and semantics of languages and how programming languages are implemented.

Student competencies

After successfully completing this course, students will have the following abilities.

Grading

Exams

There will be 5 midterm exams, on the following dates.

  1. Friday, September 21
  2. Friday, October 5
  3. Friday, October 26
  4. Friday, November 9
  5. Friday, November 28
  6. Cancelled

There will be no makeups for missed exams.

You can bring one prepared 8.5x11" piece of paper, written on both sides, to each exam. I will not collect those papers.

Final exam

The final exam is Monday, December 10 from 2:00pm to 4:30pm in Austin 306.

You can bring two prepared 8.5x11" piece of paper, written on both sides, to the final exam. I will not collect those papers.

Computing your grade

I will drop your lowest midterm grade, leaving 4 exams.

Grading will be on the basis of eight programming assignments (36%), four exams (40%) and a comprehensive final exam (24%).

Tentative cutoffs for grades will be as follows. These cutoffs will not be raised.

Grade cutoffs
A 93% C+ 76%
A– 90% C 72%
B+ 87% C– 68%
B 83% D+ 64%
B– 80% D 60%
    D– 56%

Grading of programming assignments

Each programming assignment will count for the same amount, 4.5% of your total grade.

There are two important rules that I will employ in grading programming assignments.

  1. Programming assignments will be graded out of 100. If I believe that you have plagiarized an assignment, your grade for that assignment will by −50. Yes, that's right. Your grade for a plagiarized assignment will be negative. If you believe that I am incorrect, you can appeal the grade to me.

    If you share your solution to an assignment with a classmate, expect that classmate to submit your solution with his or her name on it. Both of you will receive grades of −50.

  2. I expect you to submit working programs. That means that you must test your programs. If your program does not compile without fatal errors, then I know that you have not tested it even once. Accordingly, a program that does not compile without fatal errors automatically receives a grade of 0, regardless of how small a change is needed to make it compile without fatal errors.

Attendance policy

I will not take attendance. It is up to you 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 under extraordinary circumstances, and even then only if you are nearly done already, and have done work of acceptable quality so 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. Do not skip class either because you think that you already understand the material or for the opposite reason, that you think you cannot get it.

  2. Do not bring distractions to class. If you read your email, listen to music, or engage in other distracting activities during class, you will get very little out of class. It has been conclusively shown that multitasking does not work; it only ensures that you do a poor job on each task.

  3. Ask questions in class. If you do not understand something, ask a question about it.

  4. Ask questions outside of class. Your best bet is to use email. If you have a question about an assignment, attach all of your files to the email message. Do not just copy the part that you think is wrong into the email message. Ask questions early. Do not wait until the last minute.

    Please use a subject indicating that you are asking a question for CSCI 3675, and always include your name in your email. A reasonable subject for a question about assignment 3 is

    CSCI 3675 question about assignment 3
    Please send email to the address listed on the first page of this syllabus. Do not expect immediate answers. Give yourself time to get answers.

  5. Do not allow yourself to fall behind. Work on the homework early. Do not wait until just before the deadline. If you start to fall behind, work right away to catch up. If you are falling behind because you do not understand something, ask for help. Do not just give up!

  6. Schedule time to work outside of class.

  7. Read material twice. Take a break (like a whole day or longer) in between. Work the exercises. Later in the term, go back over things that you looked at earlier in the term. You will learn much more that way.

  8. 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.

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

Lecture schedule and reading assignments

Here is a tentative and approximate lecture schedule. It might need to be adjusted as we go to.

Reading is in the textbook. Exercises are for your benefit. I will not collect or grade them. If you do the exercises your performance on quizzes and the final exam will be much better than if you do not do the exercises. If you have a question about an exercise, please ask.

Date Topics Reading
Fundamental concepts
M. 8/20 Assn. 1 assigned.
Syllabus and introduction.
Form and function.
Encapsulations.
Reading: 1.1, 3.1.
Exercises: 1.12, 3.1–3.3, 3.6, 3.7.
W. 8/22 Data.
"And" vs "Or" data.
Data implementation.
Mutable data. Arrays.
Persistent data. Lists.
Strings.
Reading: 4.1–4.4, 4.9.
Exercises: 4.1, 4.3, 4.7, 4.9, 4.13, 4.18, 4.24.
F. 8/24 Sets.
Tables, dictionaries.
Trees.

Data types.
Static type checking.
Dynamic type checking.
Sources of type information.
Reading: , 6.2, 12.1.
Exercises: 4.5, 4.6, 12.1–12.3, 12.5.
Specifying algorithms I
M. 8/27 Procedural programming.
Flowgraphs. Fortran.
Structured programming. Algol 60.
Reading: 2.1, 2,2, 5.1–5.3.
Exercises: 5.5, 5.6, 5.8.
W. 8/29 Equational programming.
Substitution.
Pattern matching.
Recursion.
Reading: 9.1–9.6.
Exercises: 9.9–9.13.
F. 8/31 Equational programming with lists.
Reading: 9.7–9.9.
Exercises: 9.1–9.5, 9.7.
M. 9/3 Holiday  
W. 9/5 Assn. 1 due.
Assn. 2 assigned.
More equational programming with lists.
List comprehensions.
Reading: 9.10.
Exercises: 9.14–9.19, 9.24(a), 9.27.
Language implementation
F. 9/7 Compilers and interpreters.
Reasons for preferring a compiler or interpreter.
Interacting with an operating system in a static way.
Reading: 7.1–7.6.
M. 9/10 Memory management.
Garbage collection.
Implementation strategies for garbage collection.
Reading: 8.1.1, 8.1.3, 8.1.4.
Exercises: 8.1, 8.4–8.8.
W. 9/19 Run-time stack.
Implementation of the run-time stack.
Tail recursion and tail calls.
Nested functions.
Static links.
Function closures.
Reading: 8.1.3, 8.2.
Exercises: 8.10–8.16, 8.22.
F. 9/21 Exam 1.  
Specifying algorithms II
M. 9/24 Polymorphism.
Type variables.
Polymorphic types.
Ad-hoc polymorphism.
Parametric polymorphism.
Reading: 12.3, 13.1–13.3, 13.5, 13.6.
Exercises: 12.9, 13.1–13.3, 13.5, 13.6.
W. 9/26 Assn. 2 due.
Assn. 3 assigned.
Higher-order functions.
Examples of higher-order functions.
Reading: 10.1, 10.3.
Exercises: 10.1–10.7, 10.9–10.13.
F. 9/28 Curried functions.
Lazy and eager evaluation.
Implementation of lazy evaluation.
Reading: 10.2, 10.5.
Exercises: 10.15–10.19, 10.23, 10.24.
M. 10/1 The Lisp family. Scheme.
Scheme syntax.
Lists in Scheme.
Reading: 11.1–11.3.
Exercises: 11.1, 11.15, 11.16.
W. 10/3 More Scheme.
Functions.
Boolean values.
Conditionals.
Examples of function definitions.
Reading: 11.4–11.6.
Exercises: 11.2, 11.4, 11.5, 11.7–11.9, 11.17.
F. 10/5 Exam 2.  
M. 10/8 and T. 10/9 Fall break.  
W. 10/10 More Scheme.
Dynamic type checking.
First-class functions
let and let*.
Reading: 11.7–11.9.
F. 10/12 Error checking with status values.
Exception handling.
Implementation of exception handling.
Reading: 16.1, 16.2, 16.4.1.
Exercises: 16.2, 16.3, 16.6, 16.7.
M. 10/15 Assn. 3 due.
Assn. 4 assigned.
Backtracking.
Implementation of backtracking.
Trailing changes.
Reading: 16.3–16.5.
Exercises: 16.1, 16.7, 16.13, 16.14.
W. 10/17 Free algebras.
Unification.
Occur check
Reading: 13.4.3, 17.6.
Exercises: 17.7.
F. 10/19 Logic programming.
Clausal logic.
Goal-directed proofs.
Reading: 17.1–17.7.
Exercises: 17.1–17.5.
M. 10/22 Assn. 4 due.
Assn. 5 assigned.
Examples in logic programming.
Predicate modes.
Reading: 17.8–17.11.
Exercises: 17.6, 17.7, 17.12–17.17, 17.20, 17.23, 17.25–17.27, 17.33.
W. 10/24 Prolog.
Prolog syntax.
Examples of Prolog.
Reading: 17.12, 17.15, 18.1, 18.6.
Exercises: 18.1–18.4.
F. 10/26 Exam 3.  
M. 10/29 Cuts and negation.
Arithmetic in Prolog.
Computing functions.
Reading: 17.16, 18.7–18.10.
Exercises: 18.9–18.13, 18.15, 18.16, 18.19.
Types
W. 10/31 Assn. 5 due.
Assn. 6 assigned.
Type abbreviations.
Defining new types.
Defining functions for new types.
Reading: 14.1, 14.2
Exercises: 14.1–14.3.
F. 11/2 Types with variants.
Recursive types.
Primitive recursion.
Reading: 14.4, 14.5.
Exercises: 14.5, 14.7. 14.9, 14.14.
M. 11/5 Type inference with parametric polymorphism.
Generics.
Reading: 13.4.1, 13.4.2, 13.4.4, 14.9.
Exercises: 13.6, 13.7, 13.14, 13.15.
Program organization
W. 11/7 Scope.
Modules.
Import and export control.
Need for long names.
Reading: 1.4, 6.1.
Exercises: 1.6–1.9.
F. 11/9 Exam 4.  
M. 11/12 Assn. 6 due.
Assn. 7 assigned.
Object-based programming.
Object-oriented programming.
Classes.
Object representation.
Reading: 19.1,19.2.
Exercises: 19.1, 19.6–19.8, 19.11, 19.16.
W. 11/14 Inheritance.
Method dispatching.
Implementation of method dispatching.
Reading: 20.1–20.3.
Exercises: 19.17, 19.19, 20.2, 20.3, 20.7, 20.9.
F. 11/16 Virtual methods and abstract classes.
Using inheritance to simulate type variants.
Reflection.
Smalltalk.
Reading: 20.6, 21.1, 21.13.
Exercises: 20.10, 20.12, 20.16, 20.17, 21.2.
Specification and verification
M. 11/19 Describing syntax.
Lexemes and tokens.
Specifying lexemes and tokens.
Lexical rules.
Reading: 3.1, 3.2.1,.
Exercises: 3.8–3.12.
W. 11/21 Assn. 7 due.
Assn. 8 assigned.
 
W. 11/21 to F. 11/23 Thanksgiving break.  
M. 11/26 Context-free grammars.
Parse trees.
Erasing productions.
Reading: 3.2.2–3.2.4.
Exercises: 3.13–3.16.
W. 11/28 Exam 5.  
F. 11/30 Ambiguity.
Eliminating ambiguity.
Extensions to context-free grammars.
Syntax diagrams.
Reading: 3.2.5–3.2.8.
Exercises: 3.17, 3.18, 3.23–3.25.
M. 12/3 Assn. 8 due. Review.  
T. 12/4 Reading day.  
M. 12/10 Final exam, 2:00pm–4:30pm.  

Ethical issues

You can feel free to get help from anyone on the following issues concerning programming assignments.

  1. Understanding the problem description.
  2. Using system software and hardware.
  3. Understanding the source of compile errors.
  4. Understanding broad issues of program or algorithm design for the problem.

But, other than from the instructor or graduate student tutor, it is considered cheating to obtain assistance for the following.

  1. Writing your program. This means any discussion about writing code or specifying algorithmic details.
  2. Fixing your program beyond syntax errors except for having someone ask you questions about your code. You must figure out how to change your code when errors are discovered (or talk to the instructor).

Never submit someone else's work as your own. That is plagiarism. Do not get a copy of a function definition from someone else and insert it into your program. Violations of these policies will be handled in a manner consistent with official university policy.

Note. To avoid problems with people stealing your work, do not recycle printouts of your program code in a place whether other students can pick them up.

Additional information

For information about

please see the auxiliary information at http://www.cs.ecu.edu/~karl/3675/fall17/syllabus-aux.html.