CS6371: Advanced Programming Languages

Mon,Wed 11:30-12:45 PM

Classroom: ECSS 2.201

http://www.utdallas.edu/~gupta/courses/apl


Instructor and TA

Instructor: Gopal Gupta, ECSS 4.907, 972-883-4107, gupta@utdallas.edu

                        Office hours: MW 10:00AM-11:00AM

Teaching Assistant: Bogdan Armaselu; Email: bxa120530@utdallas.edu

                       


Homework Link: click here


Goal

This course will deal with Advanced Concepts in Programming Languages. The following are the course learning objectives:
  1. Learn Lambda Calculus and functional programming
  2. Learn Logic Programming and Prolog
  3. Learn Denotational Definition of Programming Languages
  4. Learn Fixpoints; Program Verification
  5. Learn Operational Semantics & Axiomatic Semantics
  6. Learn Partial Evaluation; Interpretation & Automatic Compilation of Languages
We will first cover functional programming, followed by logic programming. Then we will switch to studying semantics of programming languages (Operational, Denotational and Axiomatic). We will also study basics of program verification. Good understanding of set theory, discrete mathematics, and data structures is required for this course. In the semantics part, significant amount of time will be devoted to denotational semantics.


Outcomes

This course will help in considerably improving your understanding of the process of programming and the structure of computation. You will also learn how to rapidly implement interpreters and compilers for imperative programming languages. You will also see the close relationship between language semantics and correctness of programs. Your understanding of declarative programming will also improve.


Prerequisites

  1. Discrete Structures (CS5333 or CS3305 or equivalent). You must have taken this course or possess knowledge equivalent to this course (i.e., you should not have a deficiency for Discrete Math on your record).
  2. Algorithm Analysis and Data Structures (CS 3345 or CS5343 or equivalent). You must have taken this course or possess knowledge equivalent to this course (i.e., you should not have a deficiency for Data Structures/Algorithms on your record).
  3. Automata Theory (CS 4384 or CS5349). You must have taken this course or possess knowledge equivalent to this course (i.e., you should not have a deficiency for Automata Theory on your record).
If you have not taken one of these classes, you should drop this course. No exceptions.

Text and References

Denotational Semantics by D.A. Schmidt (out of print, but available here electronically).

(Reference) Elements of ML Programming, Jeffrey D. Ullman, ML97 Edition. You can find a free tutorial on ML here

(Reference) The Art of Prolog, L. Sterling and E. Shapiro. Free books on Prolog are available online:

Course notes will be available (see below).


Software Used

We will be using the Standard ML of New Jersey for ML programming and SWI Prolog or Sicstus Prolog for Prolog programming.

SML can be found in: /usr/local/bin/sml

SWI Prolog can be found in: /usr/local/bin/pl

Sicstus Prolog can be found in: /usr/local/bin/sicstus

Of course, we'll learn in this course how to use these systems.

You can also download personal versions of SWI Prolog and Standard ML of NJ for your PC:


Approach

This will be a lecture/discussion oriented course. Home assignments will consist of exercises and readings from the text (homework assignments can be found here). You are allowed to discuss the assignments with other students but the work should be your own. Homework solutions should be submitted in hardcopy along with sample runs of your programs (click here for details). There will be programming assignments throughout the course (in Prolog and ML). We will cover fundamentals of functional programming and logic programming and chapter 1 through 5 and parts of chapter 6 in Schmidt's book. Anything that is not covered in CS 5333, 5343, and 5349, will be covered in class (in other words, no prior knowledge regarding the course material will be assumed). The list of topics is as follows:

Programming with Functions; Lambda Calculus and ML programming; Logic programming; Unification and backtracking; Search tree; Programming in Prolog;

Abstract Syntax; Definite Clause Grammars; Grammar Classifications; Sets, functions, domains; Domain Theory: Primitive and Compound Domains; Denotational Definition of Programming Languages; Semantics of Imperative Languages; Recursive Functions; Monotonicity, Continuity, and Fix-points;

Introduction to semantics of Logic Programming Languages, Verification of Programs, Partial Evaluation; Interpretation and Automatic Compilation;

Axiomatic Semantics: Hoare's Axiomatization of partial correctness of programs;

We will be programming the semantics of the various systems we study in Prolog to obtain interpreters and compilers (the technique of Partial Evaluation will be used to automatically generate compiled code). Partial Evaluation will be covered in this course. Definite Clause Grammars will also be covered.

We will also see some practical applications of Programming Language Semantics, e.g., to Software Engineering and Verification.


Grading

Your grade will be based on homework assignments, a mid-semester exam, a project, and a final exam. Homework Assignments will also involve programming. You need to turn in all the programming assignments to get a passing grade. There will be a comprehensive final. Instructor reserves the right to alter these weights or make changes as he sees fit. The grade I will be given only under truly exceptional circumstances. An I will not be given to avoid an F. Your grades will be based on a curve, but at least 90% will be required for an A, 80% for a B, 70% for a C. The weights are as follows:
 
Assignments 20%
Midterm 30%
Final 40%
Instructor Discretion 10%
Total 100%


Tentative Schedule

 
Lecture 1: Outline of the course; Introduction. 
Lecture 2 Functional Programming with ML; Types; Operators; Expressions; 
Lecture 3 Functions; More Functions; ML examples More ML examples
Lecture 4 Lists and recursion; 
Lecture 5 Lambda calculus (author unknown).  A Short Tutorial by Raul Rojas of FU Berlin
Lecture 6 Lambda calculus (author unknown).cont'd. 
Lecture 7 Logic Programming; Programming a database; 
Lecture 8 Lists and recursion in logic programming;
Lecture 9 Lists and recursion in logic programming (cont'd)
Lecture 10 Non-deterministic programming and applications;
Lecture 11 Non-deterministic programming and applications;
Lecture 12 Abstract Syntax; Definite Clause Grammars (handout in class)
Lecture 13 Definite Clause Grammars: (class example);(extended example);
Exam 1 Midterm Exam (Exam date is not firm, it may be moved around by (+ or -) 1 to 2 weeks) 
Lecture 14 Sets, functions, domains;  Plesae read the background material: see here and here.
Lecture 15 Semantic Algebras
Lecture 16 Semantic Algebras (cont'd)
Lecture 17 Semantics of a Calculator Language
Lecture 18 Semantics of a Calculator Language (cont'd)
Lecture 19 Semantics of Imperative Languages; 
Lecture 20 Semantics of Imperative Languages (cont'd) Horn Logic Denotation Paper;
Lecture 21 Partial Evaluation (handout); Automatic Compilation (brief intro);
Lecture 22 Fix-points of recursive functions
Lecture 23 Fix-points of recursive functions (cont'd)
Lecture 24 Fix-points of recursive functions (cont'd)
Lecture 25 Software Verification; Language Interoprability
Lecture 26 Hoare Axioms for Partial Correctness;
In class final Date: TBA

The ML notes are due to Jonathan Cook of New Mexico State University. The notes on denotational semantics are due to Wolfgang Schreiner of RISC-Linz, Austria.


Final Exam

The final exam will be held on date TBA in the classroom (ECSS 2.201) Please do not make any travel reservations prior to this date ;

Course Withdrawals

If you decide to withdraw from the course, you are responsible for ensuring that all steps are taken to formally withdraw. Do not assume that you will be dropped automatically.


I Grades

The grade of I (incomplete) may be given only if you are unable to complete the course due to documented circumstances beyond your control that develop after the last day to withdraw from the course. Appropriate circumstances include illness and death or crisis in your immediate family. In no case will an I grade be assigned to avoid a grade of F in the course.


Homework Deadlines

Ample time will be given for doing the homework assignments. A 20% penalty will be charged per day for late homework. Homework submission policy can be found here. Do not email your homework solution to the instructor under any circumstance.


Student Conduct and Discipline

The University of Texas System and The University of Texas at Dallas have rules and regulations for the orderly and efficient conduct of their business. It is the responsibility of each student and each student organization to be knowledgeable about the rules and regulations which govern student conduct and activities. General information on student conduct and discipline is contained in the UTD publication, A to Z Guide, which is provided to all registered students each academic year. The University of Texas at Dallas administers student discipline within the procedures of recognized and established due process. Procedures are defined and described in the Rules and Regulations, Board of Regents, The University of Texas System, Part 1, Chapter VI, Section 3, and in Title V, Rules on Student Services and Activities of the university's Handbook of Operating Procedures. Copies of these rules and regulations are available to students in the Office of the Dean of Students, where staff members are available to assist students in interpreting the rules and regulations (SU 1.602, 972/883-6391). A student at the university neither loses the rights nor escapes the responsibilities of citizenship. He or she is expected to obey federal, state, and local laws as well as the Regents' Rules, university regulations, and administrative rules. Students are subject to discipline for violating the standards of conduct whether such conduct takes place on or off campus, or whether civil or criminal penalties are also imposed for such conduct.

Academic Integrity

The faculty expects from its students a high level of responsibility and academic honesty. Because the value of an academic degree depends upon the absolute integrity of the work done by the student for that degree, it is imperative that a student demonstrate a high standard of individual honor in his or her scholastic work. Scholastic dishonesty includes, but is not limited to, statements, acts or omissions related to applications for enrollment or the award of a degree, and/or the submission as one's own work or material that is not one's own. As a general rule, scholastic dishonesty involves one of the following acts: cheating, plagiarism, collusion and/or falsifying academic records. Students suspected of academic dishonesty are subject to disciplinary proceedings. Plagiarism, especially from the web, from portions of papers for other classes, and from any other source is unacceptable and will be dealt with under the university's policy on plagiarism (see general catalog for details). This course will use the resources of turnitin.com, which searches the web for possible plagiarism and is over 90% effective.

Email Use

The University of Texas at Dallas recognizes the value and efficiency of communication between faculty/staff and students through electronic mail. At the same time, email raises some issues concerning security and the identity of each individual in an email exchange. The university encourages all official student email correspondence be sent only to a student's U.T. Dallas email address and that faculty and staff consider email from students official only if it originates from a UTD student account. This allows the university to maintain a high degree of confidence in the identity of all individual corresponding and the security of the transmitted information. UTD furnishes each student with a free email account that is to be used in all communication with university personnel. The Department of Information Resources at U.T. Dallas provides a method for students to have their U.T. Dallas mail forwarded to other accounts.

Withdrawal from Class

The administration of this institution has set deadlines for withdrawal of any college-level courses. These dates and times are published in that semester's course catalog. Administration procedures must be followed. It is the student's responsibility to handle withdrawal requirements from any class. In other words, I cannot drop or withdraw any student. You must do the proper paperwork to ensure that you will not receive a final grade of "F" in a course if you choose not to attend the class once you are enrolled.

Student Grievance Procedures

Procedures for student grievances are found in Title V, Rules on Student Services and Activities, of the university's Handbook of Operating Procedures. In attempting to resolve any student grievance regarding grades, evaluations, or other fulfillments of academic responsibility, it is the obligation of the student first to make a serious effort to resolve the matter with the instructor, supervisor, administrator, or committee with whom the grievance originates (hereafter called "the respondent"). Individual faculty members retain primary responsibility for assigning grades and evaluations. If the matter cannot be resolved at that level, the grievance must be submitted in writing to the respondent with a copy of the respondent's School Dean. If the matter is not resolved by the written response provided by the respondent, the student may submit a written appeal to the School Dean. If the grievance is not resolved by the School Dean's decision, the student may make a written appeal to the Dean of Graduate or Undergraduate Education, and the deal will appoint and convene an Academic Appeals Panel. The decision of the Academic Appeals Panel is final. The results of the academic appeals process will be distributed to all involved parties. Copies of these rules and regulations are available to students in the Office of the Dean of Students, where staff members are available to assist students in interpreting the rules and regulations.

Incomplete Grade Policy

As per university policy, incomplete grades will be granted only for work unavoidably missed at the semester's end and only if 70% of the course work has been completed. An incomplete grade must be resolved within eight (8) weeks from the first day of the subsequent long semester. If the required work to complete the course and to remove the incomplete grade is not submitted by the specified deadline, the incomplete grade is changed automatically to a grade of F.

Disability Services

The goal of Disability Services is to provide students with disabilities educational opportunities equal to those of their non-disabled peers. Disability Services is located in room 1.610 in the Student Union. Office hours are Monday and Thursday, 8:30 a.m. to 6:30 p.m.; Tuesday and Wednesday, 8:30 a.m. to 7:30 p.m.; and Friday, 8:30 a.m. to 5:30 p.m. The contact information for the Office of Disability Services is: The University of Texas at Dallas, SU 22
PO Box 830688
Richardson, Texas 75083-0688
(972) 883-2098 (voice or TTY)
Essentially, the law requires that colleges and universities make those reasonable adjustments necessary to eliminate discrimination on the basis of disability. For example, it may be necessary to remove classroom prohibitions against tape recorders or animals (in the case of dog guides) for students who are blind. Occasionally an assignment requirement may be substituted (for example, a research paper versus an oral presentation for a student who is hearing impaired). Classes enrolled students with mobility impairments may have to be rescheduled in accessible facilities. The college or university may need to provide special services such as registration, note-taking, or mobility assistance. It is the student's responsibility to notify his or her professors of the need for such an accommodation. Disability Services provides students with letters to present to faculty members to verify that the student has a disability and needs accommodations. Individuals requiring special accommodation should contact the professor after class or during office hours.

Religious Holy Days

The University of Texas at Dallas will excuse a student from class or other required activities for the travel to and observance of a religious holy day for a religion whose places of worship are exempt from property tax under Section 11.20, Tax Code, Texas Code Annotated. The student is encouraged to notify the instructor or activity sponsor as soon as possible regarding the absence, preferably in advance of the assignment. The student, so excused, will be allowed to take the exam or complete the assignment within a reasonable time after the absence: a period equal to the length of the absence, up to a maximum of one week. A student who notifies the instructor and completes any missed exam or assignment may not be penalized for the absence. A student who fails to complete the exam or assignment within the prescribed period may receive a failing grade for that exam or assignment. If a student or an instructor disagrees about the nature of the absence [i.e., for the purpose of observing a religious holy day] or if there is similar disagreement about whether the student has been given a reasonable time to complete any missed assignments or examinations, either the student or the instructor may request a ruling from the chief executive officer of the institution, or his or her designee. The chief executive officer or designee must take into account the legislative intent of TEC 51.911(b), and the student and instructor will abide by the decision of the chief executive officer or designee. Off-Campus Instruction and Course Activities Off-campus, out-of-state, and foreign instruction and activities are subject to state law and University policies and procedures regarding travel and risk-related activities. Information regarding these rules and regulations may be found at the website address given below. Additional information is available from the office of the school dean. (http://www.utdallas.edu/Business Affairs/Travel_Risk_Activities.htm)


These descriptions and timelines are subject to change at the discretion of the Professor.