2025SP - PRIN PROG LANGUAGES 01:198:314

Principles of Programming Languages.  

Programming Languages serve as the duct tape, bricks, mortar, and steel of the information age. Throughout the past three decades, a variety of languages boasting distinct features have arisen, each reflecting unique viewpoints on the concept of computation. Novel programming languages continue to make their debut. However, in CS 314, our emphasis isn't solely on the selection of programming languages. Instead, the course's objective is to intricately explore the underpinnings of designing, implementing, and comprehending programming languages. We wish to help students become superb programmers who can design, implement, and reason about software that is elegant, efficient, and correct, and whose code can be maintained and reused.

To demonstrate the fundamental concepts of languages, we will mainly use a member of the ML family of programming languages: Objective Caml (OCamlLinks to an external site.). OCaml is a modern functional language with advanced type systems. The functional programming paradigm of OCaml underlies the core of almost any high-level programming language. It's crucial to note that our focus isn't on OCaml itself, but rather on leveraging OCaml as a practical framework to fulfill the course objectives. Additionally, the course will also revisit the imperative programming paradigm through PythonLinks to an external site. By conducting a comparative analysis of functional and object-oriented programming, our intention is to elucidate the merits and capabilities of distinct programming paradigms.

List of Topics (subject to change)

The following list of lecture topics will vary according to the pace of the lecture.

  • Functional programming (OCaml)
    • Lists and recursion
    • Type inference and polymorphism
    • Higher-order functions and closures
    • Static (lexical) vs. dynamic scoping
    • Modularity and abstraction
  • Operational Semantics
  • Type Inference
  • Context-free grammars and parsing
  • Imperative Programming (Python)
    • Objected-oriented programming
    • Dynamic vs. static typing

Basic Information

Instructor He Zhu
Class

Wednesday 10:20 AM - 11:40 AM

Friday 3:50 PM - 5:10 PM

Location BE-100
Office hours Tuesday, 3:30 pm -4:30 pm EST 
Forum Piazza

Recitation: 

Sec TA Email Office Hours Office Hours Location

Tung-che Chang

tc1064@cs.rutgers.edu

Mondays

12:30pm - 1:30pm

https://rutgers.zoom.us/j/91699126617?pwd=a0olE3xECyn63uId5a5Wsn1VudU6bh.1

Wensen Mao

wm300@cs.rutgers.edu

Wednesday 13:30-14:30 zoom link: https://rutgers.zoom.us/my/wm300?pwd=RXpFeTlmVjZuOGdEZGVydUl3anV1dz09

* There is no recitation class in the first week of the semester.

Schedule

Slides Comments
1 Course Introduction
2 OCaml Introduction  [Chapter 2 CS3110 text book]Links to an external site.
3 Working with OCaml [Chapter 2 CS3110 text book]
4 OCaml Expressions and Functions [Chapter 2 CS3110 text book]
OCaml List and Polymorphic Types [Chapter 3 CS3110 text book]
6 OCaml Lets, Tuples, and Records [Chapter 3 CS3110 text book]
7 OCaml Higher-order Functions [Chapter 4 CS3110 text book]
8 Tail Recursion [Chapter 4 CS3110 text book]
9 Datatypes [Chapter 3 CS3110 text book]
10 OCaml Closures [Chapter 4 CS3110 text book]
11 Operational Semantics [Chapter 9 CS3110 text book]
12 Type Checking Type Checking Note
13 Type Inference Type Inference Note
14 Type Systems How does OCaml type checker works?
15 Context-free Grammar Context-free Grammar
16 Parsing Parsing Note
17 Python Introduction (1), (2)  
18 Python OO Programming  
19 Polymorphic Type Inference  
20

Dafny IntroHoare Logic,

Hoare Proofs

 

Grading (subject to change)

Item Due Weight (%)
Assignment 1 2/16 6
Assignment 2 3/6 10
Assignment 3 4/2 18
Assignment 4 4/18 20
Assignment 5 5/5 25
Take-home Exams 5/13 21

Your projects will be graded based on test cases not provided in advance.  Programs that cannot be compiled will receive a zero grade. It is your responsibility to verify that your code works before submitting. Any "hard coding" in a project assignment may result in a score of zero for that project and is considered a bad-faith effort. Hard coding refers to attempting to make a program appear as if it works correctly, when in fact it does not. One example of hard coding would be printing the desired output instead of computing it. This is only one example, and if you have any questions as to what constitutes hard coding, be sure to ask ahead of time.

Any request for reconsideration of any grading on coursework must be submitted within one week of when it is returned.

Final course grades will be curved as necessary, based on every student's performance at the end of the semester.

Textbooks

  • Real World OCaml, by Yaron Minsky, Anil Madhavapeddy and Jason Hickey. The book is freely available at dev.realworldocaml.org..
  • Functional Programming in OCaml, Cornell CS3110 textbook. Freely available here.
  • Other OCaml Books

Resources

OCaml Setup (Method I)

OCaml Setup (Method II)

  • Note:  Although you may set up OCaml on your local machine via the above links, we recommend you use iLab.  

OCaml Standard Library

OCaml Standard Modules

OCaml Manual

OCaml TextEditors

99 OCaml Practice Problems

Outside-of-class communication with course staff

We will interact with students outside of class in primarily three ways: during office hours, electronically via Piazza, and electronically via e-mail. The large majority of communication should employ the first two methods, reserving e-mail for personal (presumably rare) circumstances.

Personalized assistance will be provided during office hours. Please note that you are responsible for developing and debugging your own programs. Do not rely on the instructional staff to make your project work. If you come in with a question, expect to be pointed in the right direction, but it will be up to you to finish solving the problem on your own.

Additional assistance will be provided via the Piazza web forum. You may use this forum to ask general questions of interest to the class as a whole, e.g., administrative issues or project clarification questions. Please do not post publicly any information that would violate the university academic integrity policy (e.g., project code).

Piazza allows students to post private questions that are only visible to instructors. Please use this feature if you wish to ask specific questions concerning your project solutions.

Personal e-mails to instructors or TAs should be reserved for issues that cannot be handled by the above methods.

Important announcements will be made in class or on the class web page, and via piazza.

Academic Integrity

You’re in college; you’re expected and encouraged to discuss your work with others. That said, everything you write for this course (code, written assignments, and everything else) must be your own original work. Violating academic integrity may lead to a course grade of F.

  • For learning the course concepts (including the programming languages), students are welcome to study together or to receive help from anyone else. You may discuss with others the project requirements, the features of the programming languages used, what was discussed in class and in the class web forum, and general syntax errors.
  • When it comes to actually writing a project assignment, other than help from the instructional staff a project must solely and entirely be your own work. Working with another student or individual, or using anyone else's work in any way is a violation of the code of academic integrity. When writing projects you are free to use ideas or short fragments of code from published textbooks or publicly available information, but the specific source must be cited in a comment in the relevant section of the program.

Violations of the Code of Academic Integrity may include, but are not limited to:

  1. Failing to do all or any of the work on a project by yourself, other than assistance from the instructional staff.
  2. Using any ideas or any part of another person's project, or copying any other individual's work in any way.
  3. Giving any parts or ideas from your project, including test data, to another student.
  4. Allowing any other students access to your program on any computer system.
  5. Posting solutions to your projects to publicly accessible sites.
  6. Transferring any part of a project to or from another student or individual by any means, electronic or otherwise.

Right to Change Information

Although every effort has been made to be complete and accurate, unforeseen circumstances arising during the semester could require the adjustment of any material given here. Consequently, given due notice to students, the instructors reserve the right to change any information on this syllabus or in other course materials.

Course Summary:

Course Summary
Date Details Due