- (6 May 2005).
Marks for assignment 5 and the
test cases used for evaluation.
Marks for assignment 6 and the
test cases used for evaluation.
- (5 May 2005).
Grades for cs324 and
group-wise marks for cs394 as well as
final grades are available.
- (13 April 2005). As your TAs are finding time, the remaining marks are trickling in!
Marks for Assignment 4. These
test cases submitted by the class have been used
for this assignment.
- (12 April 2005). Phew!! End of the lectures!
- (12 April 2005). Some of you wanted the optimization lecture slides. They are
available for limited circulation only.
- (5 April 2005). Here is a
summary of cs324 marks so far. If there is any discrepancy, please
bring it to my notice. Corrected answer sheets of quizzes 2, 3, and 4 can be collected
tomorrow (Wednesday 6 April) between 12:30 to 13:30 hours.
- (3 April 2005).
latest referenced implemenation after removing the order related
problems.
Note that the file name is same so this overwrites the implementation in the earlier
links too. Clicking on the links in earlier announcements too would give you the
latest version.
- (2 April 2005). Here's the
latest referenced implemenation fixed by Sameera. She has
taken care of the following:
- Problems with allocation of temporaries in outer level functions.
- Problems with the order of actual parameters.
- Problems with passing let-in-end quilt expressions as actual parameters.
Please let me know if there are pending bugs.
None of these were conceptual problems. They
were bugs in implementation arising out of flaws in data structure design. Cince
- (29 March 2005). This is a problem case I was trying to
create. Observe that due to nested LETs, the declarations of temporaries in the high
level C code are confined to VAL code. This contradicts our desire that
the declarations be pushed to outer level. Low level code assumes that these declarations
have actually been pushed to quiltMain and hence no allocation is done in the
respective function. But no allocation happens in quiltMain too (offsets remain -999).
The solution is to ensure that all temporaries are chained to the list of the symbols
in quiltMain so that offsets can be allocated to all of them (in quiltMain).
If I can debug this in next two days and come up with a clean strategy,
I will explain it to the class. If that does not happen, we will ignore such errors.
- (28 March 2005). I have created yet another intermediate level of abstraction
between the high level and the low level C codes. In this abstract code, we
can explicate the nestings of named blocks which introduce new scope level.
These files show the nestings of the
demo elq programs (see the announcement below).
- (28 March 2005). We will study access links for little quilt tomorrow.
Please go through the following
quilt examples and study their high level and low level
C programs before tomorrow's lecture. I have removed a bug in setting access link
and have cleaned up the use of access links in the generated low level code.
Please use the latest
implemenation.
Please note that this does not
affect assignment 5 specification in anyway.
- (25 March 2005). We will have a quiz
some time in the week beginning Monday 28 March
on Friday 1 April at 4:00.
This quiz will involve enhanced little quilt and its translations in C. In particular,
please practice solving the following kinds of problems:
- Generating high level C program with declarations in appropriate functions
for a given enhanced little quilt program.
- Discovering an enhanced little quilt program from a given
low level C program.
- Showing the exact stack contents (with all the details of all activation records)
at a given program point in a given
high level C program.
- (25 March 2005).
The programs which we used in one of the lectures for illustrating
array layout in C.
- (24 March 2005). There has been some confusion about the quads file generated. Partly
this confusion has been because of the internal use of quads which is
largely influenced by the design of the rest of the compiler.
I have cleaned up the printed quad code to suppress the internal
dependencies. The latest version of the
reference implementation is available via the same link.
- I am relaxing the requirement of printing the quadruple to match the
reference implementation so you can choose your own design and print it
in your own way. The printed quad code will not be used for assessment if the 3aCode and the
generated C codes match.
- You can see my design of quadruples.
- (24 March 2005). Some startup code from function main has also been
removed. Please use the
latest reference implementation.
- (22 March 2005). Here are the
test cases which I have been using for my implementation.
- (20 March 2005).
Reference 5 implementation is no longer available and
has been superseded by reference 6 implementation.
For assignment 5, use reference 6 implementation and generate high level C
code by making -hC as the default option.
The low level C code generated by the reference implementation
should be ignored for assignment 5.
- (19 March 2005). Some of you still seem to have some doubts
about quadruples and the implications of scoping rules in enhanced
Little Quilt. I am willing to hold a special session to answer such
doubts. The sooner we do it the better it is. Pradeep, Parijat,
please find a suitable time ASAP. Let's have this session
some time on Monday (21 March), if possible.
- (19 March 2005). The complete
reference implementation for final
assignment is now available. It generates textual 3 address code,
quadruples, (relatively) high level C code, and low level C code.
Note that the high level C code is not compilable (Why?). The
low level C code is compilable. Please test it and let me know
if there are any bugs.
The deadline for submitting Assignment 6 is 23:59, Monday 10 April 2005.
- (19 March 2005). Finally, here are the
marks for 2nd assignment and the
test cases used for
evaluation. For the 3rd assignment also, the
marks and the
test cases are available.
These test cases are mostly the ones submitted by various groups.
For the purpose of awarding marks, we have discounted identical test
cases.
There are few groups which have perhaps not submitted the
assignments. Such groups are requested to see me.
- (13 March 2005). We now have two more assignments in pipeline which build on what you have
already done. The work requires incremental change and if your previous implementations
have clean design, the incremental work should be orthogonal.
The reference implementation for 5th assignment can be used to
see if you need to make any changes in your current design. Observe how the code is
moved around and how the scope rules have been translated into generated C program.
Please use the quadruple form as produced by the reference implementation.
The deadline for submitting Assignment 5 is 23:59, Monday 28 March 2005.
Assignement 6 will involve transforming the C code output of assignment 5 to create
activation records for storing local variables, passing parameters, and returning
results. Thus all variable references will be translated to accesses on control
stack with appropriate offsets from the frame pointer.
- (13 March 2005). Important. Note that unlike the announcements dated
2 March 2005, higher order functions have been excluded from ehnaced little quilt. The
reference implementation also does not allow it.
For the submission due on 17 March, the subject of the email should be "Asignment 4"
and the name of the executable should be e3gen.
- (5 March 2005). One more bug in the
reference implementation
has been fixed. This is not a change in the specifications.
This is just to help you understand subtle apsects of the desired translation scheme.
Here are some
extremal test cases
which helped me to uncover the bugs.
- (3 March 2005). Discover the specifications of this assignment too from its
reference implementation. Observe how
code has been flattened by name mangling. The first number in the suffix
denotes the nesting level while the second number denotes the
(sequential) block number in the nesting level. Together they define the scope.
- (2 March 2005). Extend assignment 3 to include the let-in-end
construct in its full glory. This means that we can have
nested functions and value declarations.
Besides, functions can be passed as arguments and returned as results.
This phase concentrates on
- the validating the input program, and
- generating its intermediate representation in text
More details of the output will be made available shortly.
Some of you have not stored the intermediate representation
but have emitted it directly on-the-fly as the analysis
proceeds. Please change this to store the intermediate
representation in the form of quadruples (see section 8.1 in Aho-Sethi-Ullman) stored as an
in-memory data structure. Define appropriate 3-address
statements for the purpose.
The deadline for submitting Assignment 4 is 23:59, Thursday 17 March 2005.
- (18 Feb 2005). The mid semester examination will be a closed notes examination.
- (18 Feb 2005). The recursive descent parser which we discussed in the class today.
- (5 Feb 2005). The calculator program we discussed in the class.
- (2 Feb 2005). Assignment 3 requires you to implement a front end for
enhanced little quilt programs without the let-in-end
environment. This
automatically excludes fun and val
declarations. (They will have to be included in a subsequent assignment.)
Discover the specifications of this assignment from the
reference implementation. Your implementation
should have the same behaviour as the reference implementation (ignoring
blank lines and spurious spaces in the output).
If this implementation produces an un-intuitive output for some input,
please bring it to my notice ASAP.
The deadline for submitting Assignment 3 is 23:59, Thursday 17 February 2005.
- (27 Jan 2005). The marks for 1st assignment have been announced. The table refers to these test cases used for grading.
- (27 Jan 2005). The name of the executable should be "qparse".
The subject of the mail should be "Quilt Parser".
- (27 Jan 2005). The reference implementation which was provided earlier was rejecting
EQ. Here's the updated reference parser.
- (19 Jan 2005). Quiz on scanning on Monday (24 Jan 2004).
- (17 Jan 2005). The example programs for yacc used in today's lecture.
- (15 Jan 2005). Assignment 2. This assignment requires you to write a scanner and a
parser for enhanced quilt language supporting its full syntax. Functionally,
it should match the
reference implementation.
Deadline for submitting Assignment 2 is 23:59, Thursday 27 January 2005.
- (13 Jan 2005). Here are some additional clarifications.
The following identities are allowed.
- sew(EQ,q) = sew(q,EQ) = q
- turn(EQ) = EQ
Note that head and tail operations on EQ are disallowed.
- (13 Jan 2005). Some clarifications announced in the lab. .
- (12 Jan 2005). Please use the group id's from this list.
If your name is missing
from the list, please get back to me ASAP.
- (11 Jan 2005). We meet tomorrow at 11:30 for general lecture on RCS, debugging etc.
The venue is Seminar Hall.
- (11 Jan 2005). Here is a program to generate
LaTeX files corresponding to a
quilt. It accepts the matrix representation. You can run
latex
and then
dvips
to generate the ps files containing the pictures
of quilts. Read the lex specification of a scanner to read the
matrix representation. See how start states are being used.
- (7 Jan 2005). An
important point about code sharing
which was missing in yesterday's
announcement.
- (6 Jan 2005). In order to
simplify testing your submission, I am constrained to enforce
a standard header file
for assignment 1 and I have chosen the C style interface.
In case you have already
implemented the functions, please use appropriate
wrapper functions to ensure a common interface.
- (6 Jan 2005).
Some useful information on programming
.
- (6 Jan 2005).
Rules of the game for CS 394 assignments.
- (5 Jan 2005). Follow this link to see the
overall structure of GCC as a compiler generation framework
and this link to see the
pass structure of the generated compiler.
- (3 Jan 2005). The lab work requires you to implement a language processor for
Little Quilt language.
- (3 Jan 2005). Assignment 1.
The first assignment is to write a C or C++ callable library for
all quilt operations. This library will be used in subsequent assignments and
should support the following:
- Declaring a quilt variable (using struct or struct pointer in C or class in C++).
- Creating special quilts : empty quilt
EQ,
constant quilts
a, and
b.
- Reading in a quilt specified in
matrix form
into a quilt variable.
- Printing a given quilt in
matrix form.
- Relational operations
== and
!=.
- Operations to manipulate quilts :
turn(q),
sew(q1,q2),
hdRow(q),
hdCol(q),
tlRow(q),
and
tlCol(q).
You may choose C or C++ but it is preferable to use C++ from the view point
of long term value addition. Do not use Java because the final output of the
project is to emit a very low level C code (see
LANCE
or
CIL
for examples of low level C IR).
Deadline for submitting Assignment 1 is 23:59 hours, Thursday 13 January 2005.
Mode of the submission will be announced soon.
Please see the rules of the game!