author | Christian Urban <urbanc@in.tum.de> |
Thu, 10 Oct 2019 21:04:38 +0100 | |
changeset 652 | 4642e2073808 |
parent 577 | 7a437f1f689d |
child 726 | fba480bbc9f7 |
permissions | -rw-r--r-- |
59 | 1 |
\documentclass{article} |
292
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
2 |
\usepackage{../style} |
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
3 |
\usepackage{../graphics} |
59 | 4 |
|
5 |
\begin{document} |
|
6 |
||
75
898c25a4e399
tuned
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
60
diff
changeset
|
7 |
\section*{Homework 8} |
59 | 8 |
|
359
db106e5b7c4d
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
292
diff
changeset
|
9 |
\HEADER |
db106e5b7c4d
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
292
diff
changeset
|
10 |
|
59 | 11 |
\begin{enumerate} |
292
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
12 |
\item Write a program in the WHILE-language that calculates |
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
13 |
the factorial function. |
77
49c0beef79a1
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
14 |
|
292
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
15 |
\item What optimisations could a compiler perform when |
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
16 |
compiling a WHILE-program? |
206
85b961f1eee9
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
102
diff
changeset
|
17 |
|
292
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
18 |
\item What is the main difference between the Java assembler |
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
19 |
(as processed by Jasmin) and Java Byte Code? |
206
85b961f1eee9
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
102
diff
changeset
|
20 |
|
292
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
21 |
\item Parser combinators can directly be given a string as |
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
22 |
input, without the need of a lexer. What are the |
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
23 |
advantages to first lex a string and then feed a |
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
24 |
sequence of tokens as input to the parser? |
530 | 25 |
|
26 |
\item Explain what is meant by the terms lazy evaluation and eager |
|
577 | 27 |
evaluation. |
28 |
||
29 |
\item \POSTSCRIPT |
|
59 | 30 |
\end{enumerate} |
31 |
||
32 |
\end{document} |
|
33 |
||
34 |
%%% Local Variables: |
|
35 |
%%% mode: latex |
|
36 |
%%% TeX-master: t |
|
37 |
%%% End: |