CS 310 - Principles of Programming Languages

K. Subramani LDCSEE, West Virginia University, Morgantown, WV ksmani@csee.wvu.edu

1 General Information

1. Meeting Times: Tu-Th 2:00 pm - 3:15 pm Location: 109 MER.

2. Contact Information: 749 ESB, ksmani@csee.wvu.edu

3. Office Hours: MT 09:00 am -10:00 am

4. Textbook - [Lou02] (Main) and [GJ97] (Auxilliary).

5. URL - http://www.csee.wvu.edu/˜ ksmani/courses/sp04/pl/pl.html

6. Assessment:

(a) Homeworks (2) - You will be handed a homework on January 27, due on February 3 and a second homework on March 30, due on April 6. Each homework is worth 15%, for a total of 30% of your grade.

(b) Quizzes (2) - The first quiz will be held on February 10, while the second quiz will be held on April 13. Each quiz is worth 15% (for a total of 30%) of your grade and is closed-book.

(c) Midterm - The midterm will be held on March 2 (in-class, closed book) and is worth 20% of your grade.

(d) Final - The final will be held on May 4 (in-class, closed book, 08 : 00 − 10 : 00 am) and is worth 20%

of your grade.

7. Grade Boundaries (a) A: 75 and up

(b) B: 60 − 74

(c) C: 50 − 59

(d) D: 45 − 49

(e) F: 0 − 44

Grades will be curved, as per the policy discussed in class.

8. Makeup Policy - If for some reason, you are unable to attend a test or an exam, please meet me at the earliest and I will set an alternate date.

2 Syllabus Sketch

2.1 Introduction to Programming Languages

Computational Paradigms, Language Definition and Translation, Language Design, Early History, The Future. (3 Lectures.)

2.2 Language Design Principles

History and Design Criteria, Efficiency, Regularity, Case Study. (4 Lectures.)

2.3 Syntax

Lexical Structure of Programming Languages, CFGs and BNFs, Parse Trees and Abstract Syntax Trees, Ambiguity, Associativity and Precedence, EBNFs and Syntax Diagrams. (4 Lectures.)

2.4 Basic Semantics

Attributes, Binding and Semantic Functions, Declarations, Blocks and Scope, The Symbol Table, Name Resolution and Overloading, Allocation, Lifetimes and the Environment, Variables and Constants, Aliases, Dangling References and Garbage. (6 Lectures.)

2.5 Data Types

Data Types and Type Information, Simple Types, Type Constructors, Type Nomenclature in Sample Languages, Type Equivalence, Type Checking, Type Conversion, Polymorphic Type-Checking, Explicit Polymorphism. (4 Lectures.)

2.6 Control - Expressions and Statements

Expressions, Conditional Statements and Guards, Loops and Variation on WHILE, The GOTO Controversy, Exception Handling. (4 Lectures.)

2.7 Control - Procedures and Environments

Procedure Definition and Activation, Procedure Semantics, Parameter Passing Mechansisms, Procedure Environments, Activations and Allocation, Dynamic Memory Management, Exception Handling and Environments. (4 Lectures.)

2.8 Functional Programming (If Time Permits)

Programs as Functions, Lisp, ML, Haskell, Recursive Functions, Lambda Calculus. (3 Lectures.)

I would like to reiterate that this is a sketch of the topics that we will be covering. For various reasons, I may choose to drop a mentioned topic or cover a new topic. In such cases, advance notice will be given.

3 Social Justice Statement

West Virginia University is committed to social justice. I concur with that commitment and expect to foster a nurturing learning environment, based upon open communication, mutual respect and non-discrimination. Our University does not discriminate on the basis of race, sex, age, disability, veteran status, religon, sexual orientation, color or national origin. Any suggestions to further such a positive and open environment in this class will be appreciated and given serious consideration. If you are a person with a disability and anticipate needing any type accommodation, in order to participate in this class, please advise me of the same and make appropriate arrangments with Disability Services (293 − 6700).

If you feel that you are being treated inappropriately or unfairly in any way, please feel free to bring your concerns to my attention; rest assured that doing so will not prejudice the grading process. In return, I expect you to behave professionally and ethically.

References

[GJ97] Carlo Ghezzi and Mehdi Jazayeri. Programming Language Concepts. John Wiley & Sons, 3^{rd} edition, 1997.

[Lou02] Kennenth C. Louden. Programming Languages: Principles and Practice. Brooks/Cole, 2002.