CS152 Fall 2021 Sec3 Home Page/Syllabus
Programming Language Paradigms
To take this class you must have taken:
Texts and Links
First from the catalog: Programming language syntax and semantics. Data types and type checking. Scope, bindings, and environments. Functional and logic programming paradigms, and comparison to other paradigms. Extensive coverage of a functional language. At a high level, a programming language is a formal language for telling a computer to do something. This class studies the design and implementation of programming languages. To formalize a programming language, we need to say what strings of characters constitute a valid program. This is called the syntax of the language. We will look at techniques to specify syntax using regular expressions and context free grammars. The next step in specifying a language is choosing what the core building blocks for a program should be and what those building blocks should mean. Semantics is a fancy word for meaning. To specify language semantics for almost any programming language, you need to be able to say how variables work. So we will look at how to specify the space of possible values a variable is allowed to have (its type), how assignment of variables to values works (binding), how to check if value is bound to variable is of the correct type (type checking), and what variables are visible to the running program at any given point in its execution (visibility and environment). Beyond variables, we will look historically at what building blocks that have been considered in the past to create a programming language and what were their pro's and con's. Two important types of programming languages functional languages and logic programming languages will be discussed. Finally, we describe what it takes to write a program that takes as input a string in programming language and then outputs a sequence of low level instructions for the computer (machine code). I.e., a compiler or interpreter. We will consider top-down and bottom-up compilers/interpreters with an emphasis on the latter. To summarize, the two main goals for this class are for students to understand programming language design and to achieve competence in a functional programming language.
Course Learning Outcomes (CLOs)
By the end of this course, a student should be able to:
CLO1 -- Recognize the history of programming languages.
CLO2 -- Discuss and distinguish the procedural, object-oriented, functional, and logic programming paradigms.
CLO3 -- Explain the roles of interpreters, compilers, and virtual machines.
CLO4 -- Critique the design of a programming language.
CLO5 -- Read and produce context-free grammars.
CLO6 -- Write recursive-descent parsers for simple languages.
CLO7 -- Understand variable scoping and lifetimes.
CLO8 -- Write interpreters for simple languages that involve arithmetic expressions, bindings of values to names, and function calls.
CLO9 -- Understand type systems.
CLO10 -- Understand the implementation of procedure calls and stack frames.
CLO11 -- Produce programs in a functional programming language.
Below is a tentative time table for when we'll do things this quarter:
Grades will be calculated in the following manner: The person or persons with the highest aggregate score will receive an A+. A score of 55 will be the cut-off for a C-. The region between this high and low score will be divided into eight equal-sized regions. From the top region to the low region, a score falling within a region receives the grade: A, A-, B+, B, B-, C+, C, C-. If the boundary between an A and an A- is 85, then the score 85 counts as an A-. Scores below 55 but above 50 receive the grade D. Those below 50 receive the grade F.
If you do better than an A- in this class and want me to write you a letter of recommendation, I will generally be willing provided you ask me within two years of taking my course. Be advised that I write better letters if I know you to some degree.
Course Requirements, Homework, Quiz Info, and In-class exercises
This semester we will have five homeworks, weekly quizzes, and weekly in-class exercises.
Every Monday this semester, except the first day of class, the Midterm Review Day, and holidays, there will be a quiz on the previous week's material. The answer to the quiz will either be multiple choice, true-false, or a simple numeric answer that does not require a calculator. Each quiz is worth a maximum of 1pt with no partial credit being given. Out of the total of twelve quizzes this semester, I will keep your ten best scores.
On Wednesday's, we will spend 15-20 minutes of class on an in-class exercise. You will be asked to post your solution to these exercises to the class discussion board. Doing so is worth 1 "insurance point/pre-point" towards your grade. An "insurance point/pre-point" can be used to get one missed point back on a midterm or final, up to half of that test's total score. For example, if you scored 0 on the midterm and have 10 insurance points, you can use your insurance points, so that your midterm score is a 10. On the other hand, if you score 18/20 on the midterm, you can use at most 1 insurance point since half of what you missed (2pts) on the midterm is 1pt.
Links to the current list of homeworks and quizzes can be found on the left hand side of the class homepage. After an assignment has been returned, a link to its solution (based on the best student solutions) will be placed off the assignment page. Material from assignments may appear on midterms and finals. For homeworks you are encouraged to work in groups of up to three people. Only one person out of this group needs to submit the homework assignment; however, the members of the group need to be clearly identified in all submitted files.
Homeworks for this class will be submitted and returned completely electronically. To submit an assignment click on the submit homework link for your section on the left hand side of the homepage and filling out the on-line form. Hardcopies or e-mail versions of your assignments will be rejected and not receive credit. Homeworks will always be due by midnight according to the departmental web server on the day their due. Late homeworks will not be accepted and missed quizzes cannot be made up; however, your lowest score amongst the five homeworks and your quiz total will be dropped.
When doing the programming part of an assignment please make sure to adhere to the specification given as closely as possible. Names of files should be as given, etc. Failure to follow the specification may result in your homework not being graded and you receiving a zero for your work.
I will start lecturing close to the official start time for this class modulo getting tangled up in any audio/visual presentation tools I am using. Once I start lecturing, please refrain from talking to each other, answering your cell phone, etc. If something I am talking about is unclear to you, feel free to ask a question about it. Typically, on practice tests days, you will get to work in groups, and in so doing, turn your desks facing each other, etc. Please return your desks back to the way they were at the end of class. This class has an online class discussion board which can be used to post questions relating to the homework and tests. Please keep discussions on this board civil. This board will be moderated. Class and discussion board participation, although not a component of your grade, will be considered if you ask me to write you a letter of recommendation.
The midterm will be during class time on: Oct 13.
The final will be: Monday, December 13 from 5:15-7:30 PM.
All exams are closed book, closed notes and in this classroom. You will be allowed only the test and your pen or pencil on your desk during these exams. The final will cover material from the whole semester although there will be an emphasis on material after the last midterm. No make ups will be given. The final exam may be scaled to replace a midterm grade if it was missed under provably legitimate circumstances. These exams will test whether or not you have mastered the material both presented in class or assigned as homework during the quarter. My exams usually consist of a series of essay style questions. I try to avoid making tricky problems. The week before each exam I will give out a list of problems representative of the level of difficulty of problems the student will be expected to answer on the exam. Any disputes concerning grades on exams should be directed to me, Professor Pollett.
If you believe an error was made in the grading of your program or exam, you may request in person a regrade from me, Professor Pollett, during my office hours. I do not accept e-mail requests for regrades. A request for a regrade must be made no more than a week after the homework or a midterm is returned. If you cannot find me before the end of the semester and you would like to request a regrade of your final, you may see me in person at the start of the immediately following semester.
University Policies and Procedures
Per University Policy S16-9, university-wide policy information relevant to all courses, such as student class time requirements expectations, academic integrity, accommodations, etc. will be available on Office of Graduate and Undergraduate Programs' Syllabus Information web page at http://www.sjsu.edu/gup/syllabusinfo/. Below are some brief comments on some of these policies as they pertain to this class.
For this class, you should obviously not cheat on tests. For homeworks, you should not discuss or share code or problem solutions between groups! At a minimum a 0 on the assignment or test will be given. A student caught using resources like Rent-a-coder will receive an F for the course. Faculty members are required to report all infractions to the Office of Student Conduct and Ethical Development.
If you need a classroom accommodation for this class, and have registered with the Accessible Education Center, please come see me earlier rather than later in the semester to give me a heads up on how to be of assistance.