# HG changeset patch # User Christian Urban # Date 1758910190 -3600 # Node ID ef63ae3586b88328f1c7f5e1f1d57f2eb9cc81b1 # Parent aa976b429904a26245fd2e0af2daaaba16e816c7 updated diff -r aa976b429904 -r ef63ae3586b8 handouts/graphs.pdf Binary file handouts/graphs.pdf has changed diff -r aa976b429904 -r ef63ae3586b8 handouts/graphs.tex --- a/handouts/graphs.tex Fri Sep 19 18:41:04 2025 +0100 +++ b/handouts/graphs.tex Fri Sep 26 19:09:50 2025 +0100 @@ -1,13 +1,69 @@ \documentclass{article} -\usepackage{../style} -\usepackage{../langs} -\usepackage{../graphics} -\usepackage{../data} +\usepackage{tikz} +\usepackage{pgf} +\usepackage{pgfplots} + +\pgfplotsset{compat=1.15} + + +%% DATA for the graphs: first x coordinate, second y coordinate +\begin{filecontents}{re-python2.data} +1 0.033 +5 0.036 +10 0.034 +15 0.036 +18 0.059 +19 0.084 +20 0.141 +21 0.248 +22 0.485 +23 0.878 +24 1.71 +25 3.40 +26 7.08 +27 14.12 +28 26.69 +\end{filecontents} + +\begin{filecontents}{re-java.data} +5 0.00298 +10 0.00418 +15 0.00996 +16 0.01710 +17 0.03492 +18 0.03303 +19 0.05084 +20 0.10177 +21 0.19960 +22 0.41159 +23 0.82234 +24 1.70251 +25 3.36112 +26 6.63998 +27 13.35120 +28 29.81185 +\end{filecontents} + +\begin{filecontents}{re3a.data} +1 0.00003 +500001 0.22527 +1000001 0.62752 +1500001 0.88485 +2000001 1.39815 +2500001 1.68619 +3000001 1.94957 +3500001 2.15878 +4000001 2.59918 +4500001 5.90679 +5000001 13.11295 +5500001 19.15376 +6000001 40.16373 +\end{filecontents} + \begin{document} - \section*{Benchmarks for $(a^*)^* b$ and $a^{?\{n\}} a^{\{n\}}$} \mbox{}\bigskip @@ -42,19 +98,16 @@ \begin{axis}[ xlabel={$n$}, x label style={at={(1.1,0.0)}}, - %%xtick={0,1000000,...,5000000}, ylabel={time in secs}, enlargelimits=false, ymax=35, ytick={0,5,...,30}, axis lines=left, - %scaled ticks=false, width=6.5cm, height=5cm, legend entries={Derivative matcher}, legend pos=north east, legend cell align=left] -%\addplot[green,mark=square*,mark options={fill=white}] table {re2a.data}; \addplot[black,mark=square*,mark options={fill=white}] table {re3a.data}; \end{axis} \end{tikzpicture} @@ -103,7 +156,6 @@ legend entries={Derivative matcher}, legend pos=north east, legend cell align=left] -%\addplot[green,mark=square*,mark options={fill=white}] table {re2.data}; \addplot[black,mark=square*,mark options={fill=white}] table {re3.data}; \end{axis} \end{tikzpicture} @@ -111,13 +163,6 @@ \end{center} -\subsubsection*{Sources} - - -\url{http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.java}\medskip - -\noindent -\url{http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.py} \end{document} diff -r aa976b429904 -r ef63ae3586b8 hws/hw01.pdf Binary file hws/hw01.pdf has changed diff -r aa976b429904 -r ef63ae3586b8 hws/hw02.pdf Binary file hws/hw02.pdf has changed diff -r aa976b429904 -r ef63ae3586b8 hws/hw03.pdf Binary file hws/hw03.pdf has changed diff -r aa976b429904 -r ef63ae3586b8 hws/hw04.pdf Binary file hws/hw04.pdf has changed diff -r aa976b429904 -r ef63ae3586b8 hws/hw05.pdf Binary file hws/hw05.pdf has changed diff -r aa976b429904 -r ef63ae3586b8 hws/hw06.pdf Binary file hws/hw06.pdf has changed diff -r aa976b429904 -r ef63ae3586b8 hws/hw07.pdf Binary file hws/hw07.pdf has changed diff -r aa976b429904 -r ef63ae3586b8 hws/hw08.pdf Binary file hws/hw08.pdf has changed diff -r aa976b429904 -r ef63ae3586b8 hws/hw09.pdf Binary file hws/hw09.pdf has changed diff -r aa976b429904 -r ef63ae3586b8 slides/slides01.pdf Binary file slides/slides01.pdf has changed diff -r aa976b429904 -r ef63ae3586b8 slides/slides01.tex --- a/slides/slides01.tex Fri Sep 19 18:41:04 2025 +0100 +++ b/slides/slides01.tex Fri Sep 26 19:09:50 2025 +0100 @@ -241,7 +241,7 @@ \begin{tabular}{@ {}c@ {}} \\[-3mm] \LARGE Compilers and \\[-1mm] - \LARGE Formal Languages\\[-5mm] + \LARGE Formal Languages\\[-3mm] \end{tabular}} %\begin{center} @@ -254,10 +254,10 @@ \begin{center} \begin{tabular}{ll} Email: & christian.urban at kcl.ac.uk\\ - Office Hour: & Fridays 12 -- 14\\ + Office Hour: & Fridays 11:30 -- 12:30\\ Location: & N7.07 (North Wing, Bush House)\\ Slides \& Progs: & KEATS\\ - Pollev: & \texttt{\alert{https://pollev.com/cfltutoratki576}}\\ + %Pollev: & \texttt{\alert{https://pollev.com/cfltutoratki576}}\\ \end{tabular} \end{center} @@ -637,13 +637,33 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {\setbeamercolor{background canvas}{bg=cream} \begin{frame}[c] +\frametitle{How to study for CFL?} + +My recommendation for each week: + +\begin{itemize} +\item read the handout +\item watch the videos +\item re-read the handout +\item do the HW to be discussed at the SGT +\item later on do the CW +\end{itemize} + + +\end{frame}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +{\setbeamercolor{background canvas}{bg=cream} +\begin{frame}[c] \frametitle{Some Housekeeping} \textbf{Exam will be computer-based, invigilated in some big examination hall:}\bigskip \begin{itemize} -\item final exam in January (\xout{35\%} \textbf{40\%}) -\item coursework (\xout{65\%} \textbf{60\%- very first part is now optional}) +\item final exam in January (\textbf{40\%}) +\item coursework (\textbf{60\%- the first part is optional}) \end{itemize}\bigskip\bigskip\pause @@ -666,10 +686,7 @@ Until 3 years ago: I did not give out solutions; students sent emails to me and I responded to them individually.\bigskip\\ -Now: We will review the homework mainly during the SGTs.\bigskip\\\pause - -I will still choose the questions from the HW for the exam, but there might be -some larger amount of deviation.\bigskip\pause +Now: TAs will review the homework mainly during the SGTs.\bigskip\\\pause Do not harass your TAs for the solutions! @@ -684,8 +701,8 @@ \begin{center} \begin{tikzpicture} - \begin{axis}[symbolic x coords={2016,2017,2018,2019,2020,2021,2022,2023,2024}, - width = 1.1\textwidth, + \begin{axis}[symbolic x coords={2016,2017,2018,2019,2020,2021,2022,2023,2024,2025}, + width = 1.2\textwidth, height = 5cm, bar width=8mm, nodes near coords, @@ -699,16 +716,7 @@ ] \only<1>{\addplot[ybar,style={rred,fill=rred!75,mark=none},text=black] coordinates { -(2024,136) -(2023,169) -(2022,111) -(2021,98) -(2020,59) -(2019,38) -(2018,20) -(2017,22) -(2016,8)}}; -\only<2>{\addplot[ybar,style={rred,fill=rred!75,mark=none},text=black] coordinates { +(2025,181) (2024,173) (2023,169) (2022,111) @@ -734,39 +742,51 @@ \begin{frame}[c] \frametitle{Some Housekeeping} -\textbf{Coursework (4 parts accounting for 60\%; submission deadline \underline{2nd January}):}\bigskip +\textbf{Coursework (4 parts accounting for 60\%; submission deadline \underline{5th January 2026}):}\bigskip \begin{itemize} -\item matcher \xout{(5\%)}\;\;\textcolor{red}{optional from this year} +\item matcher \xout{(5\%)}\;\;\textcolor{red}{optional} \item lexer (10\%) -\item parser / interpreter (10\%) +\item parser / interpreter (15\%) \item JVM compiler (15\%) -\item LLVM compiler (25\%) -\end{itemize}\bigskip\pause - -you can use \alert{any} programming language you like (Haskell, Rust, Swift)\\\pause -you can use any code I show you and is uploaded to KEATS\ldots\textbf{BUT NOTHING ELSE!} - +\item LLVM compiler (20\%) +\end{itemize} \end{frame} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% { \setbeamercolor{background canvas}{bg=cream} -\begin{frame}[c,fragile] -\end{frame} +\begin{frame}[c] +\frametitle{Some Housekeeping} + +\begin{itemize} +\item you can use any code I show you and is uploaded to KEATS; therefore + most students use Scala/Ammonite +\item but you can use \alert{any} programming language you like (Haskell, Rust, Swift\ldots you have to show me how to run your code) +\pause +\item \textcolor{red}{\textbf{you can even use AI for CW}}\pause\bigskip +\item \textbf{BUT YOU CANNOT COPY FROM OR COLLABORATE WITH OTHER STUDENTS!} +\end{itemize} +\end{frame} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%{ +%\setbeamercolor{background canvas}{bg=cream} +%\begin{frame}[c,fragile] +%\end{frame} +%} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% { \setbeamercolor{background canvas}{bg=cream} \begin{frame}[c,fragile] %%\frametitle{Scala 3} -I will show you all my code in Scala 3 +I will show you all my code in Scala 3\bigskip \begin{minipage}{1.4\textwidth} \begin{lstlisting}[language={},numbers=none,basicstyle=\ttfamily\small] -$ scala-cli -Welcome to Scala 3.5.0 (21.0.4, Java OpenJDK 64-Bit Server VM). +$ scala +Welcome to Scala 3.7.3 (21.0.8, Java OpenJDK 64-Bit Server VM). Type in expressions for evaluation. Or try :help. scala> 1 + 2 @@ -775,17 +795,17 @@ \end{minipage}\medskip \pause -Since Scala 3.5.0, scala-cli is included in "plain" Scala - -\begin{minipage}{1.4\textwidth} -\begin{lstlisting}[language={},numbers=none,basicstyle=\ttfamily\small] -$ scala -Welcome to Scala 3.5.1 (21.0.4, Java OpenJDK 64-Bit Server VM). -Type in expressions for evaluation. Or try :help. - -scala> -\end{lstlisting} %% $ -\end{minipage} +%Since Scala 3.5.0, scala-cli is included in "plain" Scala +% +%\begin{minipage}{1.4\textwidth} +%\begin{lstlisting}[language={},numbers=none,basicstyle=\ttfamily\small] +%$ scala +%Welcome to Scala 3.5.1 (21.0.4, Java OpenJDK 64-Bit Server VM). +%Type in expressions for evaluation. Or try :help. +% +%scala> +%\end{lstlisting} %% $ +%\end{minipage} \end{frame} } @@ -802,21 +822,21 @@ \begin{lstlisting}[language={},numbers=none,basicstyle=\ttfamily\small] $ amm Loading... -Welcome to the Ammonite Repl 3.0.0-M2 (Scala 3.3.3 Java 21.0.4) -scala> 1 + 2 +Welcome to the Ammonite Repl 3.0.2 (Scala 3.3.5 Java 21.0.8) +@ 1 + 2 res0: Int = 3 \end{lstlisting} %% $ \end{minipage}\medskip \pause -Do not use Amm + Scala 2! +Do not use Amm + Scala 2! Do not use sbt! \begin{minipage}{1.4\textwidth} \begin{lstlisting}[language={},numbers=none,basicstyle=\ttfamily\small] $ amm2 Loading... Welcome to the Ammonite Repl 2.5.9 (Scala 2.13.11 Java 17.0.7) -scala> +@ \end{lstlisting} %% $ \end{minipage} \end{frame} @@ -827,11 +847,10 @@ \setbeamercolor{background canvas}{bg=cream} \begin{frame}[c] \frametitle{For Install Problems} - + \begin{itemize} -\item Harry Dilnot (harry.dilnot@kcl.ac.uk) \\ - \;\;Windows expert -\item Oliver Iliffe (oliver.iliffe@kcl.ac.uk) +\item Flavio Melinte Citea\\ (flavio.melinte\_citea@kcl.ac.uk)\bigskip \\ +\item Zishan Rahman\\ (zishan.rahman@kcl.ac.uk) \end{itemize} \end{frame} @@ -2036,13 +2055,10 @@ \begin{tabular}{lll} - SGT TAs: & Flavio Melinte Citea & (was a KURF two summers ago)\\ - & Zishan Rahman\\ - & Harry Dilnot\\ - & Opale Sjostedt\medskip\\ - Amm Helpers & Harry Dilnot & (harry.dilnot@kcl.ac.uk)\\ - & Oliver Iliffe & (oliver.iliffe@kcl.ac.uk)\medskip\\ - & \multicolumn{2}{l}{\hspace{5mm}(was a KURF last summer)}\\ + SGT TAs: & Flavio Melinte Citea\\ + & Zoltan Meszaros\bigskip\\ +Amm Helpers & Flavio Melinte Citea & (flavio.melinte\_citea@kcl.ac.uk)\\ + & Zishan Rahman & (zishan.rahman@kcl.ac.uk)\medskip\\ \end{tabular} \mbox{} \end{frame}