CS 241 Foundations of Sequential Programs


Objectives

To describe the relationship between high-level programming languages and the computer architecture that underlies their implementation.

Intended Audience

CS 241 is a required course for all academic plans in the Department of Computer Science and is normally completed in a student's 1B or 2A term.

Related Courses

Prerequisites: CS 134 or 136 (minimum grade of 60%) or 138 or 145; Honours Mathematics or Software Engineering students only.

Antirequisites: CS 230, GENE 344.

Successors: CS 240, 246.

Hardware/Software

Used in Course: Java, Scheme, UNIX.

Assumed Background: Programming skills including object-oriented programming and generics.

References

Modern Compiler Implememtation in Java 2nd ed by Andrew Appel, Computer Organization and Design, 4th ed., by D. Patterson and J. Hennessy, Morgan Kaufmann; and Unix in a Nutshell, 4th ed. by A. Robbins, O'Reilly, 1999 are recommended.

Schedule

3 hours of lectures and a 1 hour tutorial per week. Normally available in Fall, Winter and Spring.

Notes

  1. CS 241 and CS 251 are designed to be taken together. However, students who began their studies with CS 134 should take CS 241 in their 1B term followed by CS 251 and CS 246 in their 2A term so their math courses can be completed in a timely manner.

Outline

Scanning (4 hours)

Compiler architecture. Syntax vs. semantics. Introduction to formal languages. Regular languages, regular expressions and finite state machines.

Debugging in the Small (1 hr)

The logical analysis of program misbehaviour, interactive source-level debugging.

Parsing (7 hours)

Context-free grammars, derivations, derivation trees, ambiguous grammars. Introduction to top-down and bottom-up parsing, LL(1) and LR(1) grammars. Tool-based parser generation.

Semantic Analysis (4 hours)

Simple code. Constructing parse trees.

Basic Machine Architecture (6 hours)

Functional components of a computer: memory, control unit, arithmetic/logic unit, input/output devices. Data representation. Machine language: operation codes, addressing modes, indexing, base registers, register designation.

Assemblers, Linkers and Loaders (4 hours)

Mnemonic op-codes, pseudo-ops, symbolic constants and addresses, literals. Assembler algorithm, linker and loader algorithms.

C++ (9 hours)

Brief introduction to the non-object oriented features of C++ with an emphasis on pointers, references, and memory management.


Campaign Waterloo

David R. Cheriton School of Computer Science
University of Waterloo
Waterloo, Ontario, Canada N2L 3G1

Tel: 519-888-4567 x33293
Fax: 519-885-1208

Contact | Feedback: cs-uops@cs.uwaterloo.ca | David R. Cheriton School of Computer Science | Faculty of Mathematics


Valid HTML 4.01!Valid CSS! Last modified: Monday, 26-Oct-2009 09:08:08 EDT


Menu:ShowHide