hws/hw08.tex
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Fri, 28 Nov 2014 13:47:32 +0000
changeset 314 7dd5797a5ffa
parent 292 7ed2a25dd115
child 359 db106e5b7c4d
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
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
\begin{enumerate}
292
7ed2a25dd115 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    10
\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
    11
      the factorial function.
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    12
292
7ed2a25dd115 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    13
\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
    14
      compiling a WHILE-program?
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 102
diff changeset
    15
292
7ed2a25dd115 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    16
\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
    17
      (as processed by Jasmin) and Java Byte Code?
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 102
diff changeset
    18
292
7ed2a25dd115 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    19
\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
    20
      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
    21
      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
    22
      sequence of tokens as input to the parser?
7ed2a25dd115 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    23
      
59
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
\end{enumerate}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
\end{document}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
%%% Local Variables: 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
%%% mode: latex
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
%%% TeX-master: t
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
%%% End: