Transcript PPT

CSE-321 Programming Languages
Overview
박성우
POSTECH
March 3, 2011
Language = Frame of Thought
• The language defines the frame of thought.
– what you can communicate to others
– what concepts you are able to think over
– how you think
• Big question:
"Does the programming language define the frame
of thought in the course of programming?"
2
C Exercise: Integration
• Specification
– input: function f from int to int
range a and b
– output: f(a) + f(a + 1) + ... + f(b)
• Solution?
int integral(int (*f)(int), int a, int b) {
int i, sum = 0;
for (i = a; i <= b; i++)
sum += f(i);
return sum;
}
• Question: what if there were no function pointer?
3
C Exercise: Derivative
• Specification
– input: function f from float to float
– output: derivative f' of f such that
f'(x) = (f(x + ) - f(x)) / 
• Solution?
4
Question for You
• What is your favorite language?
– Assembly, Basic, Pascal, C, C++, C#, Java, Perl, Python,
Ruby, Prolog, Lisp, SML, Haskell, Scheme, ...
• What is its strength?
• What is its weakness?
• What is its limitation?
• Do you think your language defines the frame of thought?
5
Course Overview
Topics to Be Covered
• Basic programming language theory
– inductive reasoning
– -Calculus
– basic type theory
– modular programming (assignment)
– object-orientation (lecture, assignment)
– parallelism/concurrency (tentative)
7
Grading
• 50% assignments (heart of this course)
– 8 programming assignments, all in Standard ML
• 10% quizzes
– 8 quizzes (substitute for written assignments)
• 20% midterm
• 20% final
• Absolute grading system
• Attendance +10%
8
No Cheating
• Read the document on the disciplinary policy.
• 2006
– 7 students cheated (out of 46 students)
– 2 suspicious cases
• We will check your programs at the end of the semester.
– all your programs + those submitted in the previous years
• Cheating will not be tolerated.
– Cheating will expel you from class and get you an F.
9
Homework by Thursday
• Visit the course webpage.
– http://www.postech.ac.kr/~gla/cs321/
• Visit the discussion board.
– telnet pl.postech.ac.kr, board 321
• Install
– Standard ML 110.58.
– AFS client software.
• Read articles for fun.
– A Critical Look at Programming Languages
– The Free Lunch is Over: A Fundamental Turn Toward Concurrency in
Software
– Software and the Concurrency Revolution
– Beating the Average
10
Assignment 1
• Assignment 1 will be out tonight.
– Due at 11:59pm, March 10 (next Thursday)
– Details of the instruction are all in the handout.
– If you don't find your handin directory, email
[email protected].
11
Final Words
• This course is not about:
– functional programming, or SML
– learning new programming languages
– learning the history of programming languages
• This course is about:
– programming language theory
– with a heavy focus on type theory
12