CSc 372 — Comparative Programming Languages
0: Administrivia
Christian Collberg
Department of Computer Science
University of Arizona
collberg@gmail.com
Copyright c 2011 Christian Collberg
September 13, 2011
1 Contact Information
Class : 372 — Comparative Programming Languages
Instructor : Christian Collberg
WWW : http://www.cs.arizona.edu/~collberg/Teaching/372/2011
Office : Gould-Simpson 758
Office Hours : Tuesday 09:00-10:00
Phone : 621-6612
Lectures : TTh 12:30-13:45, Saguaro Hall 202
Honor’s section : Wed 15:00-15:50, GLD-S 942 (may change, see me!)
2 Course Communication
Here are ways to communicate with me and the rest of the class:
• Email: collberg@gmail.com.
• Sign up for the class on d2l.arizona.edu.
3 Teaching Assistants
• Anjana Sasidharan, Harsha Rajendran
• Email: harshavardhan.rajendran@gmail.com,anjanasasidharan@email.arizona.edu.
• Office: Harsha Rajendran: GS 725A; Anjana Sasidharan: GS 918
• Office hours: Harsha Rajendran: Tue/Wed 3:30pm-4:30pm; Anjana Sasidharan: Mon 1:30pm-2:30pm,
Thu 3:30pm-4:30pm.
1
4 Course Outline
• Introduction to several major high-level programming languages and their characteristics.
• This semester we will study three languages: Haskell, Prolog, and Ruby.
• At the end of the course you should
1. be familiar with functional, logic, and string programming language paradigms;
2. be competent programmers in Haskell, Prolog, and Ruby.
3. no longer be daunted by the prospect of having to learn new languages and formalisms.
5 Textbooks
The books are not mandatory (I give out comprehensive notes), but they are helpful:
• William Clocksin and Christopher Mellish, Programming in Prolog.
• Dave Thomas with Chad Fowler and Andy Hunt: Programming Ruby: The Pragmatic Programmers’
Guide, Second Edition.
• Graham Hutton: Programming in Haskell.
• Various web resources.
• Lecture notes.
6 Syllabus
You are responsible for reading
and understanding this syllabus.
If you have any concerns or issues
about the information in this document
you should bring them up during the
first week of class.
7
Course Description
8 Description of Course
• Introduction to several major high-level programming languages and their characteristics.
• Programming projects are required in at least three languages.
This semester we will study the languages: Haskell, Prolog, and Ruby. The official course description is at
http://www.cs.arizona.edu/courses/descriptions.html\#CSC372
2
9 Exam-schedule
1. The midterm exam is scheduled for Thu Oct 13. This may change, so pay attention in class and check
the web site.
2. The final exam is scheduled for Tuesday 12/13/11 10:30am-12:30pm.
10 Course Objectives
• At the end of the course you should be familiar with functional, logic, and string programming language
paradigms;
• You should be competent programmers in Haskell, Prolog, and Ruby.
• You should no longer be daunted by the prospect of having to learn new languages and formalisms.
11 Course Methodology
• It is important in this class to allot significant time outside of class to programming in the new languages
we will study.
• You cannot pass this class by cramming before the final. You must be a confident programmer in each
language to pass the tests and exam, and such skills can only be acquired by daily hands-on practice.
12 Course Methodology. . .
• The languages we will study have free implementations. If you own your own computer it’s a good
idea to download and install the interpreters so that you can work at home.
• Just doing the programming assignments may not be enough to become a good programmer in the
new languages. You should spend time outside class working programming exercises on your own.
• Bring a laptop to class if you can!
13 Required extracurricular activities
• Programming assignments.
• Working programming exercises on your own.
14 Special materials required for the class
• None.
15 Assignment Format
• Assignments will be mostly in the form of programming problems.
3
• You may work the assignments on any machine you want, but before you hand them in you should
test the code on lectura! The TA(s) will grade the assignments on lectura, and if they don’t work
there, he/she won’t debug them for you! There can be subtle problems with code that’s developed on
a Windows machine, for example, when it is run on a Unix machine. For example, the two systems
use different newline characters.
16 Prerequisites, Required Knowledge
• Prerequisites: CSC 127B or CSC 227.
• You need to be a competent programmer in a procedural/object-oriented language, such as Java or C.
17
Assessment Scheme
18 Tests, Quizzes, and Assignments
There will be
1. one mid-term test worth a total of 20%;
2. one comprehensive final exam, worth a total of 30%;
3. five quizzes, where the lowest score will be dropped, worth a total of 10% — date of quizzes will be
announced in class and on the website!;
4. three assignments on Haskell, worth a total of 15%;
5. three assignments on Prolog, worth a total of 15%;
6. two assignments on Ruby, worth a total of 10%.
19 Late Assignments
• Assignments handed in no more than 24 hours late will incur a 10% penalty.
• Assignments handed in more than 24 but no more than 48 hours late will incur a 20% penalty.
• Assignments handed more than 48 hours after the deadline will receive a grade of 0.
20 Making up Tests
You cannot make up the midterm or final exam unless
1. you have notified the instructor in writing (email is fine) or by phone prior to the test that you will be
absent, and
2. you receive permission from the instructor to take the test at a later date.
Quizzes will be given the first 10-15 minutes of class and cannot, under any circumstance, be made up at a
later date.
4
21 Curving
• All grades (for exams, quizzes, and assignments) will be curved up by throwing away the highest grade
in the class and scaling up such that the second highest grade is 100.
• The curving is done to adjust for particularly difficult tests/assignments, and to prevent an outlier
from skewing the grade distribution.
• You cannot, after scaling, receive more than 100 on any exam, quiz, or assignment.
22 Grade Assignment
• You will fail the class if you get less than 50 (after curving) on the final exam.
• Otherwise, a curved total grade of [90,100] gives you an A, [80,89] a B, [70,79] a C, [60,69] a D, and 59
and below an E.
23 Incomplete work policy
• Except under exceptional circumstances I will not assign incomplete grades.
• I decide what is an exceptional circumstance.
24 Detailed Grading Scheme
• To avoid any ambiguities, I have formalized the informal rules given above.
• The rules below should be considered minimum requirements to achieve a particular grade. The
instructor reserves the right to do additional adjustments, as necessary.
• Any contradictions, omissions, errors, or ambiguities in the grading scheme will be resolved by the
instructor.
• Any issues or concerns regarding the grading scheme should be brought to the attention of the instructor
within the first week of class.
25 Details — Curving
• All raw scores range from 0 to 100.
• Each individual score (final, midterm, quizzes, assignments) will be curved using the function
curve(x̄, s) = min(100, (100.0/ max(x̄ − max(x̄)))x̄s )
where x̄ is a set of scores (for an assignment, a test, etc.) and s is a student.
• Note: − is set subtraction.
• curve(x̄, s) returns s’s score, curved up by 100.0/2nd highest class score.
5
26 Details — Curving. . .
• For example, assume the following final exam scores:
34 45 66 88 98
After the curve has been applied, the scores will be
38.6 51.1 75 100 100
27 Details — Exams
final exam:
• Let f¯ be the set of final exam scores.
• Let f¯s be the final exam score for student s.
• Let W f be the weight of the final exam (30%).
• t̄sf = curve(f¯, s)W f is the curved final score for s.
midterm exam:
• Let m̄ be the set of midterm exam scores.
• Let m̄s be the midterm exam score for student s.
• Let W m be the weight of the midterm exam (20%).
• t̄sf = curve(m̄, s)W m is the curved midterm score for s.
28 Details — Quizzes
• Let q̄i be the set of scores for the i:th quiz.
• Let q̄is be the score for student s on the i:th quiz.
• Let Wiq be the weight of the i:th quiz (Wiq = 10%/4).
• We throw away each student’s lowest quiz score (note: − is set subtraction):
s
q¯′ = q̄ s − min(q̄ s )
• t̄sq =
P ¯′ q
i (curve(qi , s)Wi ) is the total curved quiz score for student s.
29 Details — Assignments
• Let āi be the set of scores for the i:th assignment.
• Let āsi be the score for student s on the i:th assignment.
• Let Wia be the weight of the i:th assignment ( i Wia = 40%).
P
• Let ᾱsi be the assignment score after late penalties have been applied:
s
ā if the assignment is handed in on time
i s
0.9ā if the assignment is > 0 and ≤ 24 hours late
ᾱsi = i
s
0.8ā i if the assignment is > 24 and ≤ 48 hours late
0 if the assignment is > 48 hours late
6
30 Details — Assignments. . .
• t̄sa = a
P
i (curve(ᾱi , s)Wi ) is the total curved assignment score for student s.
• If, for whatever reason, the actual number of assignments is less than the planned number, the Wia ’s
will be scaled up uniformly.
31 Details — Total Scores
• The raw total score for student s is
t̄s = t̄sf + t̄sm + t̄sq + t̄sa
• We round up to the nearest integer:
totals = ⌈t̄s ⌉
32 Details — Grade Assignment
• The final grade assignment for student s is
if tsf < 50
E
A if totals ∈ [90, 100]
B if totals ∈ [80, 89]
grades =
C if totals ∈ [70, 79] otherwise
D if totals ∈ [60, 69]
E if totals < 60
• In other words, a student with a curved final exam score tsf < 50 will fail the class, regardless of their
results on the other assessment categories.
33
Policies
34 Office hours
• Office hours: Tuesday 09:00-10:00
• I use an open door policy:
7
35 Collberg’s Café
• Please come and see me to chat, ask questions, or snack:
36 Attendance Policy
• My goal is to keep class attendance high so that we can get good discussions going in the class.
• You are not required to attend lectures, but. . .
you cut class at your own risk.
Anything covered in class or in any of the required readings is fair game on tests and exams.
• To encourage class attendance and participation there will be five quizzes during the semester.
37 Attendance Policy. . .
• All holidays or special events observed by organized religions will be honored for those students who
show affiliation with that particular religion. Absences pre-approved by the UA Dean of Students (or
Dean’s designee) will be honored.
38 Subject to Change Policy
• The information contained in this course syllabus, other than the grade and absence policies, may be
subject to change with reasonable advance notice, as deemed appropriate by the instructor.
• The instructor reserves the right to
1. add, drop, or change topics;
2. change exam or homework dates, etc.
• Changes will be announced in class and on the class web site! You are responsible for checking this site
regularly.
8
39 Notification of Objectionable Materials
• There is no objectionable material in this class.
40 Handicapped Accessibility
Students with disabilities who require reasonable accommodations to fully participate in course activities
or meet course requirements must register with the Disability Resource Center. If you qualify for services
through DRC, bring your letter of accommodations to me as soon as possible. See http://www.salt.
arizona.edu/.
41 Student Code of Academic Integrity
• Assignments in this course require individual attention and effort to be of any benefit. All work is
expected to be that of each student alone. You may not consult with others, except in ways specifically
authorized by the course instructor. You also may not plagiarize another person’s work or copy another
person’s code.
42 Student Code of Academic Integrity. . .
• Students are responsible for understanding and complying with the University’s Code of Academic
Integrity. A synopsis of the Code is attached; the full text is available from the Office of the Dean of
Students in Room 203 Old Main. Among other provisions, the Code demands that the work you submit
is your own, and that graded papers and exams will not subsequently be tampered with. Copying of
another student’s programs or data, or writings is prohibited when they are part of a published class
assignment; it is immaterial whether the copying is by computer, xerox, pen or other means. Witting
collaboration in allowing such copying is also a Code violation.
43 Student Code of Academic Integrity. . .
• Assignments in this course require individual attention and effort
• Violations of the Code will, at minimum, result in loss of credit for a graded item. An egregious first
violation or any second violation will minimally result in failure of the entire course.
• See also http://studpubs.web.arizona.edu/policies/cacaint.htm the University of Arizona Code
of Academic Integrity.
I take academic integrity seriously! I will report every violation!
44 Expected classroom behavior
• Be courteous and treat others in the class with respect.
• Please be courteous to other students by refraining from talking, playing loud music in your headphones,
etc.
• Silence cell phones, pagers, etc.
• We come to class to learn: don’t read the newspaper, solve cross-word puzzles, etc.
9
• Treat the TAs with respect: they do their best to grade your assignments on time, help you with
software installation problems, help you with assignments, etc. But they have their own class work to
attend to, too.
45 Policies against threatening behavior
• Read and abide by the following link: http://policy.web.arizona.edu/~policy/threaten.shtml.
46 Now What?
Let’s Have Fun!!! 1
1 That’s right — learning new languages is fun!
10