CS 310 - Principles of Programming Languages

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

1 General Information

1. Meeting Times: MWF 11:00 am - 11:50 am Location: 801 ESB.

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

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

4. Grader: Rakesh Devineni.

5. Contact Information: rdevinen@mix.wvu.edu.

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

7. URL - http://www.csee.wvu.edu/^{∼}ksmani/courses/sp08/pl/pl.html

8. Assessment:

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

(b) Quizzes (2) - The first quiz will be held on February 15, while the second quiz will be held on April 18. 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 3 (in-class, closed book) and is worth 20% of your grade.

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

A maximum of 5 bonus points is reserved for class performance.

9. Grade Boundaries (a) A: 80 and up

(b) B: 65 − 79

(c) C: 50 − 64

(d) D: 45 − 49

(e) F: 0 − 44

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

10. 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.

11. Course Objectives - The objectives of this course are as follows:

(a) Introducing the fundamental principles of language design.

(b) Introducing formal syntax and semantics.

(c) Discussing control structures and abstractions.

(d) Introducing data typing and abstractions.

12. Learning Outcomes - Upon successful completion of this course, students will be able to:

(a) Apply principles of language design towards requirements.

(b) Understand the differences between data and control.

(c) Understand and appreciate the different paradigms of programming languages.

(d) Write the formal syntax for a specification.

(e) Understand data typing and control strucures.

2 Syllabus Sketch and Weekly Schedule

2.1 Introduction to Programming Languages

Computational Paradigms, Language Definition and Translation, Language Design. These topics will be covered from Chapter 1 of [Lou02]. (2 Lectures.)

2.2 History (Self-Study)

Early history, the first programming languages, explosion in programming languages, Simplicity, New Directions, Consolidation, Libraries and scripting, The Future. See Chapter 2 of [Lou02].

2.3 Language Design Principles

History and Design Criteria, Efficiency, Regularity, Case Study. These topics will be covered from Chapter 3 of [Lou02]. (3 Lectures.)

2.4 Syntax

Lexical Structure of Programming Languages, CFGs and BNFs, Parse Trees and Abstract Syntax Trees, Ambiguity, Associativity and Precedence, EBNFs and Syntax Diagrams. These topics will be covered from Chapter 4 of [Lou02]. (5 Lectures.)

2.5 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. These topics will be covered from Chapter 5 of [Lou02]. (6 Lectures.)

2.6 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. These topics will be covered from Chapter 6 of [Lou02]. (6 Lectures.)

2.7 Control - Expressions and Statements

Expressions, Conditional Statements and Guards, Loops and Variation on WHILE, The GOTO Controversy, Exception Handling. These topics will be covered from Chapter 7 of [Lou02]. (5 Lectures.)

2.8 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. These topics will be covered from Chapter 8 of [Lou02]. (6 Lectures.)

2.9 Functional Programming

Programs as Functions, Lisp, ML, Haskell, Recursive Functions, Lambda Calculus. These topics will be covered from Chapter 11 of [Lou02]. (5 Lectures.)

2.10 Logic Programming

Logic and Logic Programs, Horn Clauses, Resolution and Unification, Prolog, Problems with Logic Programming, Constraint Logic Programming. These topics will be covered from Chapter 12 of [Lou02]. (4 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.