Programming Languages
Lecturer:
Prof. Daniel R. Schlegel, 395 Shineman Center, daniel.schlegel@oswego.edu
Office/Lab hours: M 4-5pm; W 7-8am; Th 11:30-12:30; or by appointment
Section 810: MWF 10:20-11:15am, Shineman 175
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.
If you have not received a C- or better in both CSC241 and CSC221 I do not recommend taking this course.
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
Advanced C Programming on Lynda.com
Clojure
Clojure for the Brave and True
Reference Materials at Clojure.org
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 Policy and Classroom Etiquette:
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. 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 districting to other students I reserve the right to discontinue the allowance of their use.
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. 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.
Grading:
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).
It is expected that each person participate during each class. As discussed above, attendance is required.
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 below.
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.
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 | 8/27 | First day of class Syllabus, Overview Readings: PLP Chapter 1 Be sure to answer office hours survey! |
Wednesday | 8/29 | A Brief History of PLs Readings: Continue Reading PLP Chapter 1 |
|
Friday | 8/31 | How PLs Work Reading: PLP Section 2.1 |
|
2 | Monday | 9/3 | No Class - Labor Day |
Wednesday | 9/5 | Representing PL Syntax: BNF Reading: Begin working through C tutorials |
|
Thursday | 9/6 | Add Deadline | |
Friday | 9/7 | BNF Concluded Introduction to C Assignment 1 due (demoed) Reading: Continue working through C tutorials |
|
3 | Monday | 9/10 | No Class - Rosh Hashanah |
Wednesday | 9/12 | Pointers | |
Friday | 9/14 | Quick look at CLion visual debugger Heap Allocation Progress Report 1 |
|
4 | Monday | 9/17 | Garbage Collection Garbage Collection Visualizations Reading: PLP chapter 11 through end of 11.3 |
Wednesday | 9/19 | No Class - Yom Kippur | |
Thursday | 9/20 | Drop Deadline | |
Friday | 9/21 | Introduction to Functional Programming | |
5 | Monday | 9/24 | Lambda Calculus Reading: Begin reading Clojure for the Brave and True |
Wednesday | 9/26 | Clojure Introduction Assignment 2 due (demoed) 10/12; Microproject due on Blackboard 10/1, 11:59pm |
|
Friday | 9/28 | Monty Hall Simulation in Clojure Substitute and Deep Substitute Readings: PLP 3.3-3.6 |
|
6 | Monday | 10/1 | Substitute / Deep Substitute concluded Names, Scopes and Bindings intro |
Wednesday | 10/3 | Scope / Static Scope | |
Friday | 10/5 | Static Scope | |
7 | Monday | 10/8 | Scope of Declarations / Dynamic Scope Reading: PLP 7.1-7.2 |
Wednesday | 10/10 | Types Introduction Reading: Scala for Java Programmers |
|
Friday | 10/12 | No Class - Dan sick | |
8 | Monday | 10/15 | Scala Intro |
Wednesday | 10/17 | Writing Parsers in Scala Class Code Assignment 3 due (demoed) |
|
Friday | 10/19 | No Class - Fall Break Mid Term Grades Posted |
|
9 | Monday | 10/22 | Exam 1 |
Wednesday | 10/24 | Type Inference Reading: Clocksin, W.F, and C.S. Mellish, Programming in Prolog 5e, 2003 – Chapter 1 (see Blackboard) |
|
Friday | 10/26 | Progress Report 3 Introduction to Logic Programming Withdraw Deadline |
|
10 | Monday | 10/29 | Prolog, continued. Prolog Ancestor Example Annotated Scala Microproject Solution |
Wednesday | 10/31 | State-space problem solving in Prolog Assignment 4, due (demoed) |
|
Friday | 11/2 | Pattern Matching (Panopto on Blackboard) Dan at AMIA Annual Symposium |
|
11 | Monday | 11/5 | Guest Lecture: Doug Lea - Concurrency Dan at AMIA Annual Symposium |
Wednesday | 11/7 | On your own: Watch Propositions as Types on Blackboard. Expect at least one exam questions about this... Dan at AMIA Annual Symposium |
|
Friday | 11/9 | Work day! Dan at AMIA Annual Symposium |
|
12 | Monday | 11/12 | Q&A Day! |
Wednesday | 11/14 | Object Orientation Intro Readings: PLP 10.1, 10.4 |
|
Friday | 11/16 | Scripting Languages | |
13 | Monday | 11/19 | Scripting Languages, continued Python intro Assignment 5, due (demoed) 12/14 by 4PM, Microproject due on Blackboard 12/3, 11:59pm |
Wednesday | 11/21 | No Class - Thanksgiving Break | |
Friday | 11/23 | No Class - Thanksgiving Break | |
14 | Monday | 11/26 | Inheritance and Method Binding |
Wednesday | 11/28 | Multiple Inheritance | |
Friday | 11/30 | Mixins / Traits | |
15 | Monday | 12/3 | Progress Report 5 Modules |
Wednesday | 12/5 | Guy Steele & Richard Gabriel - 50 in 50 Final Exam Study Guide |
|
Friday | 12/7 | Last Day of Class Guy Steele & Richard Gabriel - 50 in 50, concluded. |
|
Finals Week | Monday | 12/10 | 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.
Disability Statement:
If you have a disabling condition, which may interfere with your ability to successfully complete this course, please contact the Office of Disability Services at dss@oswego.edu and x3358.