hws/hw08.tex
author Christian Urban <christian.urban@kcl.ac.uk>
Fri, 03 Dec 2021 22:07:11 +0000
changeset 857 2b11eb06af76
parent 726 fba480bbc9f7
child 876 771396fa6cc4
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
59
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     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
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
\begin{document}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
75
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 60
diff changeset
     7
\section*{Homework 8}
59
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     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
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    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
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
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
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 102
diff changeset
    20
530
cec95ad3a837 updated
cu
parents: 359
diff changeset
    21
cec95ad3a837 updated
cu
parents: 359
diff changeset
    22
\item Explain what is meant by the terms lazy evaluation and eager
577
7a437f1f689d updated
Christian Urban <urbanc@in.tum.de>
parents: 530
diff changeset
    23
  evaluation.
7a437f1f689d updated
Christian Urban <urbanc@in.tum.de>
parents: 530
diff changeset
    24
7a437f1f689d updated
Christian Urban <urbanc@in.tum.de>
parents: 530
diff changeset
    25
\item \POSTSCRIPT    
59
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
\end{enumerate}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
\end{document}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
%%% Local Variables: 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
%%% mode: latex
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
%%% TeX-master: t
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
%%% End: