From 784a2bf8e361e91ae9dc01ad2ee1b04d002c0d7d Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Mon, 25 Jun 2018 17:45:03 +0200 Subject: Remove words --- aied2018/presentation/motivation.tex | 50 +++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 23 deletions(-) (limited to 'aied2018/presentation/motivation.tex') diff --git a/aied2018/presentation/motivation.tex b/aied2018/presentation/motivation.tex index 69db435..6d6b95f 100644 --- a/aied2018/presentation/motivation.tex +++ b/aied2018/presentation/motivation.tex @@ -1,27 +1,31 @@ - What is wrong with the following Python program that prints all divisors? - \begin{columns} - \begin{column}{0.50\textwidth} -\begin{Verbatim} +What is wrong with the following program that prints all divisors? + +\vspace{0.5cm} + +\begin{Verbatim}[xleftmargin=6mm] \textbf{def} divisors(n): - \textbf{for} d \textbf{in} range(1, \red{n}): + \textbf{for} d \textbf{in} range(1,\red{n}): \textbf{if} n % d == 0: - \textbf{print}(d) + print(d) \end{Verbatim} + +\vspace{0.5cm} - \end{column} - \begin{column} {0.50\textwidth} - Answer: \texttt{range(1,n)} generates values up to \texttt{n-1}, so \texttt{n} is not printed. Instead, \texttt{range(1,n+1)} is better. - \end{column} - \end{columns} - - \vspace{2cm} - Teachers can often spot such erroneous patterns without test cases. Can we represent their knowledge and use it to: - \begin{itemize} - \item generate automatic feedback in tutoring systems or - \item find programs with similar approach / error? - \end{itemize} - Two research questions arise: - \begin{itemize} - \item RQ1: How can we encode patterns in programs? - \item RQ2: How can we automatically extract relevant patterns from student solutions? - \end{itemize} \ No newline at end of file +Answer: \texttt{range(1,n)} only generates values up to \texttt{n-1}, so \texttt{n} is not printed. +Instead, \texttt{range(1,n+1)} should be used. + +\vspace{1cm} + +An experienced teacher can spot such errors easily, without having to run the program. Can we discover that knowledge automatically? +More specifically: + +\vspace{1cm} + +\begin{itemize} +\item How do we encode distinctive program features? +\item Can we discern which features are relevant to some error or solution? +\end{itemize} + +\vspace{1cm} + +We address these questions by using abstract-syntax-tree (AST) patterns to encode program features, and machine-learned rules to discover common errors and solution strategies for beginner Python programs. -- cgit v1.2.1