CSCI 2320:
Principles of Programming Languages


Spring 2025

 

What's this course about?

CSCI 2320 studies design principles and paradigms of programming languages. Different paradigms of languages correspond to distinct ways of thinking about problem solving. For example, functional languages (such as Haskell) focus attention on the behavioral aspects of a problem; object-oriented languages (such as Ruby) focus attention on data--how to model and manipulate it. Despite their differences, a common set of principles often guide language design. Covers principles of language design and implementation including syntax, semantics, type systems, control structures, and compilers. Also covers various paradigms of languages including imperative, object-oriented, web, and functional languages.

Instructors

Mohammad T. Irfan
Email: mirfan@bowdoin.edu
Office hours:
Tue 2:30-5pm
Fri 10-11:55am
Office room: Mills 209
LA hours:
Wed 7-9pm (Mills 127): Sebastian Sanchez
Thu 7:30-9:30pm (Mills 105): Ian Stebbins
Sun 7-9pm (Mills 105): Sebastian Sanchez

Time & Place

Lectures: MW 10:05--11:30
Mills 210
Final Exam: No final exam
Midterm Exams: In class

Course Outline

Learning Goals:

Even after 5 years:

  • Know:
    • The building blocks of language design.
    • Diverging paradigms of languages: their differences and philosophies.
  • Be able to do:
    • Design and implement an interpreter for a C-like language.
    • Choose an "appropriate" language for a given problem.
      • Examples of these paradigms are imperative (e.g., C), object-oriented (e.g., Ruby, C++, Java, Python), functional (e.g., Haskell), etc. Also covered is how some of these paradigms are used in web programming (e.g., Ruby on Rails).
  • Find value in:
    • Convergence of design principles but divergence of language paradigms!
    • What goes behind the scene at various stages of your coding.

Textbook: Languages by Tucker and Noonan (2nd Edition).

Evaluation:

  • 20% Points: Exams.Two brief (around 45 minutes) in-class exams. Each exam carries 10%.

  • 50% Points: Summative assessment: There will be several programming assignments. These assignments will carry different weights depending on the difficulty level.

  • 30% Points: Formative assessment and class participation: This includes formative assignments, attendance, and active class participation. Taking handwritten class notes is highly recommended for its many benefits. Students will report the status of their note taking at the beginning of the two exams.

  • Points to letter grade conversion: 94% A, 90% A-, 85% B+, 80% B, 75% B-, 70% C+, 65% C, 60% C-, 55% D, below 55% F

Programming Assignments:

  • There will be a number of programming assignments. Some of the assignments would be project-type. For the assignments in the first part of the course, the preferred programming language is Python 3 and the preferred IDE is Visual Studio Code.

Late Policy:

  • Late submissions will be accepted up until 24 hours after the deadline with a penalty. Each hour after the deadline would cost 4% of the points for that assignment. Extensions will be given if there is any health or other emergency situation.

Software Installation:

Outline of Topics:

Week Topics Reading Notes, Slides, Video
1 (1/22) Introduction Ch 1
1. Slides- Intro
2. Links:
Tiobe Index of PL
PL in big data
Video on Ada Lovelace
Bjarne Stroustrup video
2 (1/27, 1/29) Syntax Ch 2 Slides- Syntax
3 (2/3, 2/5) Syntax (cont.) Ch 2 EBNF of C++ (Canvas)
4 (2/10, 2/12) 1. Lexical analysis
2. Finite state automata: NFA and DFA
Project 1 out
Ch 3
1. Slides- Lexical Analysis
2. Video: NFA -> DFA
5 (2/17, 2/19) Syntactic analysis & parsing algorithms
1. Ch 3
2. Handout: Finite state automata - Scott (Canvas)
3. Handout: left recursion and left factoring (Canvas)
Slides- Syntactic Analysis
6 (2/24, 2/26) Parsing algorithms (continued)
Project 2 out
1. LL(1) parser generator
2. Prof. Irfan's class notes on LL(1) parsing
7 (3/3, 3/5) Names
Exam 1 on 3/3
Ch 4 Slides- Names
Spring Break      
8 (3/24, 3/26) Types
Ch 5, 6 Slides- Types
9 (3/31, 4/2) 1. Types (continued)
2. Semantics and semantic analysis
Project 3 out
Ch 7, 8 Slides- Semantics
10 (4/7, 4/9) Functions & memory management
Ch 9, 11 1. Slides- Functions & Memory Management
2. Heap in Python: Overview, more details
3. Heap in Java: Oracle blog
11 (4/14, 4/16) 1. Functions & memory management (cont.)
2. Imperative vs Object-Oriented PL
3. OOP paradigm: Ruby
  1. Slides- OOP
2. Interview of Larry Wall (Designer of Perl)
12 (4/21, 4/23) OOP paradigm: Ruby
Exam 2 on 4/21 4/23
  Slides- Ruby
13 (4/28, 4/30) Web programming - Ruby on Rails
  Slides- Rails
14 (5/5, 5/7) Functional programming - Haskell
Project 4 out
  Slides- Haskell


Github Policy:

Making assignment solutions publicly available through Github or other media will constitute a violation of the honor code for this course.


Collaboration Policy:

Please read the Computer Science collaboration policy and Bowdoin's Academic Honor Code. The specific level of collaboration will be mentioned in every assignment. In general, you are encouraged to discuss ideas and techniques broadly with your classmates, but not specifics of assigned problems. Discussions should be limited to questions that can be asked and answered without using any written medium (e.g. pencil and paper or email). This means that at no time should a student read any code written by another student. Sharing of code or intermediate designs is expressly prohibited. Violation of this policy is grounds for me to initiate an action that would be filed with the Dean's office and would come before the Conduct Review Board. If you have any questions about this policy, PLEASE do not hesitate to contact Prof. Irfan. This is a College-wide zero-tolerance policy.

It is permissible to use software and materials available from other sources (understanding that you get no credit for using the work of others on those parts of your projects) as long as: (1) You acknowledge explicitly which aspects of your assignment were taken from other sources and what those sources are. (2) The materials are freely and legally available. (3) The material was not created by a student at Bowdoin as part of this course this year or in prior years. To be absolutely clear, if you turn in someone else's (human or AI) work you will not receive credit for it - on the other hand, if you acknowledge it at least you will not go to the Conduct Review Board.

All code, write-ups, reviews, documentation, and other written material must be original and may not be derived from other sources, including AI tools like ChatGPT, Claude, etc., unless directed otherwise. Not using AI tools is crucial for learning the principles of programming languages by doing the implementation on your own.

If in the future you provide your work to other students, this will also constitute a violation of Bowdoin's honor code.

If Winter comes, can Spring be far behind? -- Percy Bysshe Shelley