Programming Languages
Lecturer:
Prof. Daniel R. Schlegel, 395 Shineman Center, daniel.schlegel@oswego.edu
Office/Lab hours: T: 8-9am, W: 8-9am, Th: 12:15-1:15pm, F: 9-10am, and by appointment
Section 800: MWF 12:40-1:35pm, Shineman 170
Course Description:
This course introduces programming language concepts including design, syntax, semantics, pragmatics, implementation, and evaluation. Students will become familiar with the different categories of languages, including procedural, functional, object-oriented, logic, and concurrent programming paradigms. Theoretical topics will be covered in class, and students will complete projects on their own in several languages. The intention is that after this course the student will be able to quickly begin using new languages simply from an understanding of the syntax and a list of concepts used in that language.
Course Objectives:
To write programs in each of several languages primarily supporting different approaches to programming
To write programs to process some representation of code for some purpose, such as an interpreter, an expression optimizer, or a documentation generator
To use the specifications of a given language to determine the syntax and semantics of supported constructions
To explain and follow the rules governing the use of a given type in a given language
To obtain the effects of constructions of one language in other languages
To identify coding errors that lead to insecure programs in non-type-safe languages
To choose among language-supported approaches to concurrency in a given context, including data-parallelism, message-passing, and explicit threads with shared mutable state
Textbooks:
Required: Scott, Michael L., Programming Language Pragmatics 4e. Morgan Kaufmann, 2016
Recommended: Tate, Bruce, Seven Languages in Seven Weeks: A Pragmatic Guide to Learning Programming Languages. Pragmatic Bookshelf, 2010
Useful Resources:
C
C Tutorial at tutorialspoint
C FAQ
C Language at cppreference
Advanced C Programming on Lynda.com
Clojure
Clojure for the Brave and True
Reference Materials at Clojure.org
Clojure – Getting Started
Clojure API
ClojureDocs
Clojure on Lynda.com
Scala
Scala Tutorials
Scala for Java Programmers
Scala on Lynda.com
Prolog
Using the SWI-Prolog REPL
SWI Prolog Reference Manual
Clocksin, W.F, and C.S. Mellish, Programming in Prolog 5e, 2003 – Chapter 1 (see Blackboard)
Prolog Tutorial
Python
Python 2.7 Tutorial [But avoid 2.7 if you can!]
Python 3 Tutorial
Moving to Python from Other Languages
Python Projects on Lynda.com (includes Eclipse PyDev setup tutorial)
Attendance and Participation:
As per college policy, attendance in all sessions is obligatory. If you cannot attend a class meeting due to religious, athletic, health related circumstance, or circumstance of particular hardship, please notify me in advance via email. Please be ready to present proof, if necessary. It is expected that each person actively engage in each class session.
Classroom Etiquette:
A positive learning environment relies upon creating an atmosphere where all students feel welcome. Classroom discussion is meant to allow us to hear a variety of viewpoints. This can only happen if we respect each other and our differences. Hostility and disrespectful behavior is not acceptable.
Cell phones and headphones should not be out or used during lecture, and laptops should only be used for taking notes (I don’t recommend this). If use of any electronics becomes distracting to other students I reserve the right to discontinue the allowance of their use.
Grading:
Grades will be comprised of assignments, progress reports, and exams, according to the below percentages.
Projects | 55% |
Micro-Projects | 10% |
Progress Reports | 5% |
Midterm Exam | 10% |
Final Exam | 20% |
The default grading for the course will be along the university’s standard grading curve:
A: 93-100 | C+: 77-79 |
A-: 90-92 | C: 73-76 |
B+: 87-89 | C-: 70-72 |
B: 83-86 | D+: 67-69 |
B-: 80-82 | D: 60-66 |
E: 0-59 |
A more generous curve may be used, but should not be expected.
Assignments:
All assignments will be completed alone, but working together without writing or sharing code to come up with general solutions is encouraged. There will be 5 large projects, due typically two weeks after assignment. Each project will have an associated microproject, due before the larger project, meant to exhibit the use of some language features important to the larger project. Progress reports will be in-class discussions of progress, and happen roughly halfway between the date the assignment is given out, and the date it is due. The assignments are difficult, and I recommend starting work on them early, avoiding any tendency toward procrastination. You should plan on spending at least 10 hours per week on course work outside of class.
Projects must be satisfactorily demoed in person, then submitted on Blackboard, to receive any credit. Partial solutions will not receive any credit. The late penalty will be 5% per day. Microprojects must be submitted via Blackboard, and will not be accepted late (they do not need to be demoed).
Exams:
There will be two exams, a midterm and a final. The midterm will be during week 7, and the final during finals week.
Each exam question will be assigned a point value (generally some multiple of 3 depending on difficulty), where the following scheme will be used in grading it:
0 – Did not attempt / No serious attempt
1 – Mostly incorrect solution
2 – Somewhat incorrect solution
3 – Perfect solution
If the problem is a multiple of 3, then intermediate scores will be given as appropriate. The total points received on all questions will then be summed and divided by the points possible and scaled as appropriate according to the percentages given above.
Schedule/Outline:
During the semester we aim to cover the following topics:
Language Specification and Implementation
Syntax and Semantics
Names, Scope and Binding
Control Flow
Type Systems and Type Safety
Subroutines
Language Paradigms (including imperative, logic, functional, scripting, concurrent, and object oriented)
This syllabus and the course schedule are subject to change by the instructor. All changes and related justification will be announced in class, and updates will be reflected in this web version.
Lecture slides will be maintained on Blackboard, but many lectures will include use of the whiteboard which may not be reflected in notes elsewhere.
Week | Day | Date | |
---|---|---|---|
1 | Monday | 1/28 | First day of class Syllabus, Overview How to be successful in CSC344 Readings: PLP Chapter 1 |
Wednesday | 1/30 | A Brief History of PLs Readings: Continue Reading PLP Chapter 1; Dijkstra - Go To Statement Considered Harmful |
|
Friday | 2/1 | How PLs Work Introduction to C Readings: PLP 8.5-8.5.2 on pointers; Useful Resources on C |
|
2 | Monday | 2/4 | C Introduction, continued Pointers and memory allocation Reading: Continue reading Useful Resources on C |
Wednesday | 2/6 | Add deadline C introduction, continued Strings and Arrays Reading: Continue reading Useful Resources on C; brush up on Turing Machines (e.g., read chapter 5 of Foundations of Computation) |
|
Friday | 2/8 | C, concluded Class code Assignment 1 due (demoed) 2/27; Microproject due on Blackboard 2/13, as long as it's 2/13 somewhere on Earth. |
|
3 | Monday | 2/11 | BNF and Parsing Reading: PLP Section 2.1 |
Wednesday | 2/13 | A few notes on buffer overflows C BNF C Operator Precedence |
|
Friday | 2/15 | Drop deadline Functional Programming Introduction |
|
4 | Monday | 2/18 | Lambda Calculus |
Wednesday | 2/20 | Clojure and other Lisps Progress Report 1 Reading: PLP Chapter 11 through 11.3; Begin reading Clojure for the Brave and True |
|
Friday | 2/22 | Higher Order Functions Monty Hall Simulation |
|
5 | Monday | 2/25 | Snow Day! |
Wednesday | 2/27 | Monty Hall Simulation, concluded Substitute and Deep Substitute Assignment 2 due (demoed) 3/15; Microproject due on Blackboard 3/3, as long as it's 3/3 somewhere on Earth. |
|
Friday | 3/1 | Deep Substitute, concluded Discussion on Assignment 2 Reading: PLP 7.1-7.2 |
|
6 | Monday | 3/4 | Introduction to Types |
Wednesday | 3/6 | Types, continued | |
Friday | 3/8 | Optional Type Propositions as Types |
|
7 | Monday | 3/11 | Optional, revisited Type Inference |
Wednesday | 3/13 | Progress Report 2 Discuss midterm exam |
|
Friday | 3/15 | Midterm Exam Reading: Over break, read Scala for Java Programmers Assignment 3 due (demoed) |
|
8 | Monday | 3/18 | Spring Break - No Class |
Wednesday | 3/20 | Spring Break - No Class | |
Friday | 3/22 | Spring Break - No Class | |
9 | Monday | 3/25 | Scala Introduction |
Wednesday | 3/27 | Parsers: Recursive Descent, Parser Combinators | |
Friday | 3/29 | Names, Scopes, and Bindings Intro Readings: PLP 3.1-3.3 |
|
10 | Monday | 4/1 | Scope, continued |
Wednesday | 4/3 | Quest - No Class | |
Friday | 4/5 | Logic Programming Introduction Prolog Ancestor Example Progress Report 3 Withdraw Deadline |
|
11 | Monday | 4/8 | Prolog, continued Reading: Begin Reading Prolog Tutorials |
Wednesday | 4/10 | Recursion + Lists in Prolog | |
Friday | 4/12 | State space problem solving in Prolog Farmer, Goat, Wolf, Cabbage Problem Assignment 4 due (demoed) 4/26, microproject due 4/17 |
|
12 | Monday | 4/15 | Pattern Matching |
Wednesday | 4/17 | Unification Return to discussing scope |
|
Friday | 4/19 | Easter Weekend - No Class | |
13 | Monday | 4/22 | Progress Report 4 Declaration Scope |
Wednesday | 4/24 | Dynamic Scope Scripting Languages |
|
Friday | 4/26 | Scripting Languages, concluded Assignment 5 due (demoed) 5/17, 4:30pm, microproject due 5/3 |
|
14 | Monday | 4/29 | Object Orientation Intro Generics / Templates Readings: PLP 10.1, 10.4 |
Wednesday | 5/1 | Object Orientation, continued | |
Friday | 5/3 | Object Orientation, continued | |
15 | Monday | 5/6 | Progress Report 5 Concurrency |
Wednesday | 5/8 | Guy Steele & Richard Gabriel - 50 in 50 | |
Friday | 5/10 | Guy Steele & Richard Gabriel - 50 in 50 Last day of class Final Exam Study Guide |
|
Finals Week | Friday | 5/17 | Final Exam - 10:30am - 12:30pm |
Academic Integrity:
While it is acceptable to discuss general approaches with your fellow students, the work you turn in must be your own. You may not turn in code found on the internet. If you have any problems doing the assignments, consult the instructor. Please be sure to read the webpage, “Academic Integrity“, which spells out all the details of this, and related policies. See my page on plagiarism for an explanation of what I consider cheating.
Accessibility:
If you have a disabling condition which may interfere with your ability to successfully complete this course, please contact Accessibility Resources located at 155 Marano Campus Center, phone 315.312.3358, access@oswego.edu