diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2018-06-25 17:45:03 +0200 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2018-06-25 17:45:03 +0200 |
commit | 784a2bf8e361e91ae9dc01ad2ee1b04d002c0d7d (patch) | |
tree | 4395f966faf7f5814c6e47428e90109bb568854f /aied2018/presentation/motivation.tex | |
parent | 3ccd4a85989d1b2cb463151c5f0f7bc571a3812c (diff) |
Diffstat (limited to 'aied2018/presentation/motivation.tex')
-rw-r--r-- | aied2018/presentation/motivation.tex | 50 |
1 files changed, 27 insertions, 23 deletions
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. |