hws/hw08.tex
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Mon, 22 Sep 2014 13:42:14 +0100
changeset 257 70c307641d05
parent 206 85b961f1eee9
child 292 7ed2a25dd115
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}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
\usepackage{charter}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
\usepackage{hyperref}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
\usepackage{amssymb}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
\usepackage{amsmath}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
\usepackage{tikz}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
\usetikzlibrary{automata}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
\newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
\begin{document}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
75
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 60
diff changeset
    13
\section*{Homework 8}
59
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
\begin{enumerate}
77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    16
\item Write a program in the WHILE-language that calculates the factorial function.
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 76
diff changeset
    17
206
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 102
diff changeset
    18
\item What optimisations could a compiler perform when compiling a WHILE-program?
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 102
diff changeset
    19
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 102
diff changeset
    20
\item What is the main difference between the Java assembler (as processed by Jasmin) and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 102
diff changeset
    21
Java Byte Code?
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 102
diff changeset
    22
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 102
diff changeset
    23
\item Parser combinators can directly be given a string as input, without the need of a lexer. What are
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 102
diff changeset
    24
the advantages to first lex a string and then feed a sequence of tokens as input to the parser? 
59
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
\end{enumerate}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
\end{document}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
%%% Local Variables: 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
%%% mode: latex
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
%%% TeX-master: t
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
%%% End: