coursework/cw01.tex
author Christian Urban <urbanc@in.tum.de>
Tue, 26 Sep 2017 12:47:25 +0100
changeset 538 456d1d6676f9
parent 521 34775227c84f
child 558 86334134abe5
permissions -rw-r--r--
update
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
520
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
\documentclass{article}
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
\usepackage{../style}
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
\usepackage{array}
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
\begin{document}
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
\newcolumntype{C}[1]{>{\centering}m{#1}}
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
\section*{Coursework 7CCSMSEN}
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
This coursework is worth 4\% and is due on 19 October at
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
16:00. You are asked to implement a regular expression matcher
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
and submit a document containing the answers for the questions
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
below. You can do the implementation in any programming
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
language you like, but you need to submit the source code with
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
which you answered the questions, otherwise a mark of 0\% will
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
be awarded. You can submit your answers in a txt-file or pdf.
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
Code send as code.
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
\subsubsection*{Disclaimer}
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
It should be understood that the work you submit represents
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
your own effort. You have not copied from anyone else. An
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
exception is the Scala code I showed during the lectures or
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
uploaded to KEATS, which you can freely use.\bigskip
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
\subsection*{Task}
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
521
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    32
A Unix directory might look as follows:
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    33
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    34
\begin{center}
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    35
\begin{verbatim}
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    36
$ ls -ld . * */*
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    37
drwxr-xr-x 1 ping staff  32768 Apr  2 2010 .
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    38
-rw----r-- 1 ping students  31359 Jul 24 2011 manual.txt
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    39
-r--rw--w- 1 bob students   4359 Jul 24 2011 report.txt
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    40
-rwsr--r-x 1 bob students 141359 Jun  1 2013 microedit
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    41
dr--r-xr-x 1 bob staff  32768 Jul 23 2011 src
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    42
-rw-r--r-- 1 bob staff  81359 Feb 28 2012 src/code.c
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    43
-r--rw---- 1 emma students    959 Jan 23 2012 src/code.h
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    44
\end{verbatim}
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    45
\end{center}
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    46
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    47
with group memberships assigned as follows:
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    48
\begin{center}
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    49
\begin{tabular}{ll}
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    50
Members of group staff: & ping, bob, emma\\ 
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    51
Members of group students: & emma\\
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    52
\end{tabular}
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    53
\end{center}
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    54
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    55
The file microedit is a text editor, which allows its users to open, edit and 
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    56
save files. Note carefully that microedit has set its setuid flag. 
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    57
Fill in the access control matrix below that shows for each of the above five files, 
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    58
whether ping, bob, or emma are able to obtain the right to read (R) or replace (W) its 
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    59
contents using the editor microedit.\bigskip
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    60
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    61
\begin{center}
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    62
\begin{tabular}{r|c|c|c|c|c}
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    63
        & manual.txt & report.txt & microedit & src/code.c & src/code.h \\\hline
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    64
ping & & & & &\\\hline
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    65
bob & & & & &\\\hline
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    66
emma   & & & & &\\
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    67
\end{tabular}
34775227c84f updated
Christian Urban <urbanc@in.tum.de>
parents: 520
diff changeset
    68
\end{center}
520
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    71
\end{document}
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    73
%%% Local Variables: 
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    74
%%% mode: latex
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    75
%%% TeX-master: t
bd25d9f9d9dc updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
%%% End: