diff options
Diffstat (limited to 'aied2018/rules.tex')
-rw-r--r-- | aied2018/rules.tex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/aied2018/rules.tex b/aied2018/rules.tex index 3da87ea..ff47939 100644 --- a/aied2018/rules.tex +++ b/aied2018/rules.tex @@ -24,6 +24,7 @@ We use the same constraints as in the case of n-rules and learn rules for correc \section{Interpreting rules} +\label{sec:interpreting-rules} Learned rules can be used to analyze student programing. This section describes several rules induced for two Python exercises: \textsf{Fahrenheit to Celsius}, which reads a value from standard input and calculates the result, and \textsf{Greatest Absolutist}, one of the introductory exercises for functions. @@ -77,7 +78,7 @@ The two most accurate n-rules with missing patterns in their conditions are: \end{Verbatim} \noindent -Pattern \textsf{P0} matches programs with a call to function \texttt{print}. A program without a \texttt{print} is always incorrect, since it will not output anything. +Pattern \textsf{P0} matches programs with a call to function \texttt{print}. A program without a \texttt{print} is always incorrect, since it will not output anything. The second rule covers programs with \textsf{P1} missing and \textsf{P16} present. \textsf{P16} matches programs with a call to the \texttt{print} function, where the argument contains a formula which subtracts 32 from a variable and then further multiplies the result. \textsf{P1} describes a call to the function \texttt{float} as the first item in an expression, i.e. \texttt{= float(...)}. This rule therefore represents programs that have the formula in the \texttt{print} function (\textsf{P16} is present), however fail to cast input from string to float (\textsf{P1} is missing). |