From 9c434e39a99e0945ee964b105fc7d4c23e706637 Mon Sep 17 00:00:00 2001
From: Martin Mozina <martin.mozina@fri.uni-lj.si>
Date: Wed, 20 Jun 2018 12:10:16 +0200
Subject: Small changes to rules and conclusions section.

---
 aied2018/presentation/rules.tex | 32 +++++++++++++++++++++++---------
 1 file changed, 23 insertions(+), 9 deletions(-)

(limited to 'aied2018/presentation/rules.tex')

diff --git a/aied2018/presentation/rules.tex b/aied2018/presentation/rules.tex
index 994e3a0..f2a31c7 100644
--- a/aied2018/presentation/rules.tex
+++ b/aied2018/presentation/rules.tex
@@ -20,7 +20,7 @@ $\vdotswithin{S_4}$ & & $\vdotswithin{1}$ & & & $\vdotswithin{correct}$ \\
 	\end{itemize}
 \end{column}
 \end{columns}
-\vspace{1cm}
+\vspace{2cm}
 
 
 \begin{columns}
@@ -33,12 +33,12 @@ $\vdotswithin{S_4}$ & & $\vdotswithin{1}$ & & & $\vdotswithin{correct}$ \\
 			\item \emph{p-rules} describe necessary patterns for programs to be correct: \\IF $condition$ THEN $correct$.
 		\end{itemize}
 	    \vspace{0.5cm}
-		\textbf{Example:} Implement a function that returns the element with the largest absolute value.
+		\textbf{Example: Greatest Absolutist}
 		\begin{itemize}
 			\item 155 submissions (57 correct, 98 incorrect)
-			\item 8298 patterns, 15 n-rules and 6 p-rules.
+			\item 8298 patterns, 15 n-rules and 6 p-rules
 		\end{itemize}		
-		\textbf{Correct solution:}
+		\underline{\smash{A solution:}}
 		\begin{Verbatim}
 \textbf{def} max_abs(l):
   vmax = l[0]
@@ -48,7 +48,7 @@ $\vdotswithin{S_4}$ & & $\vdotswithin{1}$ & & & $\vdotswithin{correct}$ \\
   \textbf{return} vmax
 		\end{Verbatim}
 		\vspace{0.5cm}
-		\textbf{Two sample learned n-rules:}
+		\underline{\smash{Two sample learned n-rules:}}
 				\begin{itemize}
 			\item \textsf{P64 ⇒ incorrect } (covers 22)
 			\item \textsf{P2 ∧ P70 ⇒ incorrect} (covers 17)
@@ -58,12 +58,13 @@ $\vdotswithin{S_4}$ & & $\vdotswithin{1}$ & & & $\vdotswithin{correct}$ \\
 	\begin{column}{0.40\textwidth}
 		\fbox{
 		\begin{minipage}[t]{0.94\textwidth}
+		\vspace{0.5cm}
 		\textbf{How useful are patterns?}
 		\begin{itemize}
 			\item Compare accuracies of Random Forest and Majority Classifier.
 			\item Three types of exercises (basic, loops, functions)
 		\end{itemize}
-		\vspace{1cm}
+		\vspace{0.5cm}
 		\begin{center}
 		\begin{tabular}{l|rr}
 		\textbf{Problem} &  Maj & RF \\
@@ -89,8 +90,12 @@ $\vdotswithin{S_4}$ & & $\vdotswithin{1}$ & & & $\vdotswithin{correct}$ \\
 		\end{minipage}}
 	\end{column}
 \end{columns}
-\vspace{1.0cm}
-\textbf{Vizualizations of patterns}; left program contains pattern \textsf{P64}, right program contains pattern \textsf{P2} (red) and \textsf{P70} (blue) that matches the call to \textsf{abs} in an assignment statement nested within a for loop and an if clause.
+\vspace{1.5cm}
+\underline{\smash{Vizualizations of rules / patterns}}
+\begin{itemize}
+	\item \textsf{P64} (blue left) matches functions returning variable compared in the \textsf{if} clause.
+	\item \textsf{P2} (red right) matches functions that return the variable used in an assignment statement within a for-if block;	\textsf{P70} (blue) matches the call to \textsf{abs} in an assignment statement nested within a for loop and an if clause.
+\end{itemize}
 \begin{Verbatim}
 \textbf{def} max_abs(l):         \textbf{def} max_abs(l):
   vmax = 0                vmax = None 
@@ -98,6 +103,15 @@ $\vdotswithin{S_4}$ & & $\vdotswithin{1}$ & & & $\vdotswithin{correct}$ \\
     \textbf{if} \blue{vmax} < abs(l[i]):     \textbf{if} vmax==None or vmax<v:
       vmax = l[i]               \red{vmax} = \blue{abs}(v)
   \textbf{return} \blue{vmax}             \textbf{return} \red{vmax}
-\end{Verbatim}		
+\end{Verbatim}
+
+%\begin{Verbatim}
+%\textbf{def} max_abs(l):         \textbf{def} max_abs(l):
+%vmax = 0                vmax = None 
+%\textbf{for} i \textbf{in} range(len(l)): \textbf{for} v \textbf{in} l:
+%\textbf{if} \blue{vmax} < abs(l[i]):     \textbf{if} vmax==None or vmax<v:
+%vmax = l[i]               \red{vmax} = \blue{abs}(v)
+%\textbf{return} \blue{vmax}             \textbf{return} \red{vmax}
+%\end{Verbatim}		
 
 
-- 
cgit v1.2.1

