| Professor | David Bremner |
| Office | GWC115 |
| Phone | 447-3300 |
| bremner ATSIGN unb.ca | |
| Lectures | Tuesday/Thursday 11:30 - 12:50, ITC317 |
| Tutorial | Monday 08:30, ITC415 |
| Professor | David Bremner |
| Office | GWC115 |
| Phone | 447-3300 |
| bremner ATSIGN unb.ca | |
| Lectures | Tuesday/Thursday 11:30 - 12:50, ITC317 |
| Tutorial | Monday 08:30, ITC415 |
The following topics are planned for this term.
| Topic | Understand | Demonstrate |
| Operational Semantics | Semantics of simple languages using interpreters or abstract machines. | Trace the execution of code including scoping, recursion, conditionals |
| Syntax | EBNF or equivalent notation for grammars. Concrete and abstract syntax | Parse using a grammar. Define and use a data type for abstract syntax. |
| Higher Order Programming | Functions as first class values. Function composition and combinators, generic functions. | Write folds and other generic functions. Implement simple list operations using folds. |
| Scope | Lexical and dynamic scope. Environments. | Trace code using different scoping rules. |
| Laziness | Eager and lazy evalution. Applications of infinite lists. Substitution and dataflow based laziness. | Trace code under lazy and eager evaluation. |
| State and Mutatation | Appropriate uses for state. Modelling state. The store. Variables. References and aliasing. | Trace code under pass by value and pass by reference. Implement store passing. |
| Types | Types, basic type inference/checking | Implement a simple type checker |
Time permitting, we may look at some of the following.
| Monads | Combinators, injecting and unwrapping. Haskel do notation'' | Write simple programs using monads to model mutable state and short-circuit control flow. Translate between core combinator syntax and Haskell do notation. |
| Efficient Recursion | Iteration and Tail Recursion. Accumulators and Invariants. Recursive data structures (lists and trees). | Design and implement efficient recursive algorithms for lists and trees. |
| Memory Management | Reference Counting, Garbage Collection. | Trace the lifecycle of a linked set of language objects. |
The main course text will be Programming Languages: Application And Interpretation
An accessible textbook for learning Scheme (and Racket) is How To Design Programs
The second edition of How to Design Programs is also available on line.
A good reference for Haskell is Real World Haskell
A student recommended site/book is Learn You A Haskell
| Component | Weight |
|---|---|
| Assignments | 30% |
| Midterm | 20% |
| Final Exam | 50% |
There will be a registrar scheduled final exam in this course. You are responsible for making sure your travel plans are compatible with the scheduling of the final exam. You must pass the final exam to receive better than a D grade in this course.
The Faculty of Computer Science Linux labs are the only supported computing facility for this course. All software required for this course is installed on these systems.
You are welcome to install the relevant software on your own computer and work on your assignments there; however, you are solely responsible for any technical difficulties, and for testing that your completed assignment works in FCS labs. In no case will failure of your personal computer be an excuse for late or missing assignment. Make sure you back up your work.
The main software used in the course will be DrRacket, an integrated programming environment for racket.
See the instructions for mandatory customization of DrRacket.
For running racket programs from the command line, you can use the
racket and gracket
(gracket for graphical programs) commands.
We may also use ghc implementation of Haskell to explore lazy evaluation and type systems.
We might use gcc as a C Compiler.
The following policy applies to all undergraduate and graduate courses taught by me in academic year 2011/2012. Nothing in this policy should be read as encouraging you come class or use UNB labs when you are unwell. Remember that your first priority should be your health and that of your classmates. If you are going to miss a significant amount of lectures, an assignment or a test, contacting me by email beforehand will make things easier for both of us.
No late assignments will be accepted without a medical or compassionate reason. The first late assignment will be dealt with on the honour system; after that documentation from Student Services or a medical professional is required. Note that because UNB provides you lab facilities, that technical difficulties with your own computers are not grounds for an extension.
Students will receive 0 for any missed in class tests unless they provide a medical or compassionate reason. All missed tests require documentation from Student Services or a medical professional.
Extensions for assignments will not normally be given for more than the period of illness or other incapacitation, starting from the due date, not from when the student contacts the instructor. It is the student's responsibility to contact the instructor as soon as possible.
In no case will extensions for assignments be given beyond the date and time when the marked assignments are handed back or a solution is posted, or presented in class or tutorial.
In exceptional circumstances, the weight of a missed assignment may be transferred to the final exam. See point (7) below.
The weight of missed class tests may be transferred to the final exam (assuming satisfactory documentation). See point (7) below.
No request to transfer weight to the final exam will be approved until the student has demonstrated (in the judgement of the instructor) that they have learned the missed material to a "pass" level. It is the student's responsibility to arrange this demonstration with the instructor as soon as possible, but in all cases before the last day of classes.
In the event of a public health crisis or similar events, this policy, particularly requirements for documentation, may be relaxed at the discretion of the instructor.
Technology like laptops and smartphones can be a useful part of the learning experience, but it can also be distracting. In this course, I'm going to allow the use of laptops in the classroom; part of what we will do in lectures is work through examples in various programming environments. On the other hand, to help you resist the temptations of non-course related uses of your laptop, I reserve the right to observe what you are using your laptop for, and ask you to stop, or leave the class if I consider it inappropriate or distracting to other students. If you consider this draconian or an invasion of your privacy, you are welcome to leave your gadgets packed away during the lecture.
Note: Consideration of a request to withdraw from a course or courses involved in an academic offence will not be given until the case is resolved
Academic offences include, but are not limited to, the following:
Plagiarism includes:
NOTE: In courses which include group work, the instructor must define and warn against plagiarism in group work. Unless an act of plagiarism is identified clearly with an individual student or students, a penalty may be imposed on all members of the group.
In the case of plagiarism, the instructor must make every reasonable effort to discuss the case with the student or group and follow one of two courses of action.
In the case of plagiarism resulting from genuine misunderstanding, the instructor may permit the student to submit a genuine piece of work to be graded in place of the one plagiarized. If the student does not appeal, the time allowed for submission of work is three weeks from the date of the Registrar's letter of notification. In the case of an appeal, where the instructor's decision is upheld, the period of time allowed for submission is as determined by the appropriate Committee.
In a case of deliberate plagiarism, the penalties are:
First Offence: If the student does not appeal, or if, on appeal, the Committee upholds the instructor's decision:
Subsequent Offence:In cases where the Committee considers that the student has plagiarized again:
The instructor and, where applicable, the invigilator or other appropriate person shall, where practical, discuss the matter with the student concerned.
The instructor or the instructor's representative, satisfied in their view that an academic offence has been committed shall complete an academic offence incident report, and the instructor or the instructor's representative shall submit the academic offence incident report and attached information to the Registrar. Where applicable, the Registrar shall report it to the Chair of the Department and the Dean of the Faculty concerned. Each case will be referred by the Registrar to the appropriate Committee for review and appropriate action. The Registrar shall inform the student by registered letter of the referral to the Committee, the student's right to respond and the wish of the Committee that the student be present when the case is heard. The Registrar shall also include, with this registered letter, a copy of the academic offence incident report and attached information. The student is urged to submit to the Committee a written statement regarding the case. A student responding to the decision, shall do so in writing within three weeks of the date of the Registrar's letter of notification.
A student who is found guilty of an academic offence will have two penalties imposed:
One of the following penalties may also be imposed: