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