|
|
|
@ -5,6 +5,9 @@
|
|
|
|
|
\usepackage{listings}
|
|
|
|
|
\usepackage{enumitem}
|
|
|
|
|
\usepackage{subcaption}
|
|
|
|
|
\usepackage{amsmath}
|
|
|
|
|
\usepackage{float}
|
|
|
|
|
\usepackage{hyperref}
|
|
|
|
|
|
|
|
|
|
\usepackage{pgf}
|
|
|
|
|
\usepackage{tikz}
|
|
|
|
@ -135,32 +138,62 @@
|
|
|
|
|
\item The distinction between valid and invalid divisions / modulo operations is a possible functionality-based partition for the input parameters \textit{a} and \textit{b}. Come up with another functionality-based characteristic and the corresponding partition.
|
|
|
|
|
\end{enumerate}
|
|
|
|
|
\begin{answer}
|
|
|
|
|
[TODO: Add answer here]
|
|
|
|
|
See table~\ref{tab:characteristics}.
|
|
|
|
|
\begin{table}
|
|
|
|
|
\centering
|
|
|
|
|
\begin{tabular}{llll}
|
|
|
|
|
\hline
|
|
|
|
|
Characteristic & Eq-Class 1 & Eq-Class 2 & Eq-Class 3 \\
|
|
|
|
|
\hline
|
|
|
|
|
$q_1 = \text{"\texttt{int} values"}$ & $\{a,b=\texttt{int.Max}\}$ & $\{a,b=\texttt{int.Min}\}$ & remaining \\
|
|
|
|
|
$q_2 = \text{"signedness"}$ & $\{a,b>0\}$ & $\{a,b<0\}$ & $\{a,b=0\}$ \\
|
|
|
|
|
$q_3 = \text{"valid \texttt{mod}"}$ & $\{b\neq{}0\}$ & $\{b=0\}$ \\
|
|
|
|
|
$q_4 = \text{"divisor"}$ & $\{(a \mod b) = 0\}$ & $\{(a \mod b) \neq 0\}$ \\
|
|
|
|
|
\hline
|
|
|
|
|
\end{tabular}
|
|
|
|
|
\caption{Equivalence classes for different characteristics}
|
|
|
|
|
\label{tab:characteristics}
|
|
|
|
|
\end{table}
|
|
|
|
|
\end{answer}
|
|
|
|
|
|
|
|
|
|
\item Can you identify any non-valid combinations of blocks from your characteristics? Develop the required constraints that prevent these combinations.
|
|
|
|
|
\begin{answer}
|
|
|
|
|
[TODO: Add answer here]
|
|
|
|
|
A simple invalid block combination is the valid modulo operation in combination with the signedness of $b$. We can mitigate that by disallowing $b$ to be zero. Also, when $a$ or $b$ is fixed at the maximum or minimum integer value we cannot combine this with all $q_4$ blocks.
|
|
|
|
|
\end{answer}
|
|
|
|
|
|
|
|
|
|
\item Derive one representative value for each of the blocks of the exemplary and your own characteristics. Which approach did you choose to select the values?
|
|
|
|
|
\begin{answer}
|
|
|
|
|
[TODO: Add answer here]
|
|
|
|
|
See table~\ref{tab:testvalues}.
|
|
|
|
|
\begin{table}
|
|
|
|
|
\centering
|
|
|
|
|
\begin{tabular}{llll}
|
|
|
|
|
\hline
|
|
|
|
|
Characteristic & Val-Class 1 & Val-Class 2 & Val-Class 3 \\
|
|
|
|
|
\hline
|
|
|
|
|
$q_1 = \text{"\texttt{int} values"}$ & $(\texttt{int.Max},b)$ & $(\texttt{int.Min},b)$ & $(1,b)$ \\
|
|
|
|
|
$q_2 = \text{"signedness"}$ & $(1,b)$ & $(-1,b)$ & $(0,b)$ \\
|
|
|
|
|
$q_3 = \text{"valid \texttt{mod}"}$ & $(5,1)$ & $(5,0)$ \\
|
|
|
|
|
$q_4 = \text{"divisor"}$ & $(20,5)$ & $(21,5)$ \\
|
|
|
|
|
\hline
|
|
|
|
|
\end{tabular}
|
|
|
|
|
\caption{Examplary test values for different characteristics}
|
|
|
|
|
\label{tab:testvalues}
|
|
|
|
|
\end{table}
|
|
|
|
|
\end{answer}
|
|
|
|
|
|
|
|
|
|
\item Read the \texttt{acts\_user\_guide} to get a basic understanding of how to create a system for ACTS and how to generate test vector sets of this system.
|
|
|
|
|
\begin{answer}
|
|
|
|
|
[TODO: Add answer here]
|
|
|
|
|
See \texttt{Phase02\_Task2\_ACTS\_System.txt} file.
|
|
|
|
|
\end{answer}
|
|
|
|
|
|
|
|
|
|
\item Create a system named \textit{Phase02\_Task2\_ACTS\_System.txt} based on your characteristics and their representative block values. You can use the \texttt{Enum} type with meaningful names for any characteristics not representable as \texttt{Boolean}, \texttt{Number} or \texttt{Range}. Use ACTS in command line mode to generate the set of test vectors without constraints.
|
|
|
|
|
\begin{answer}
|
|
|
|
|
[TODO: Add answer here]
|
|
|
|
|
ACTS generated $81$ tests covering $411$ tuples in $0.6$ seconds.
|
|
|
|
|
\end{answer}
|
|
|
|
|
|
|
|
|
|
\item In the \texttt{Constraint} section of your system file, add the constraints you identified for valid combinations of blocks, and generate a new set of test vectors. Compare the number of test vectors of the unconstrained and constrained system. Check if the new set of test vectors still contains non-valid combinations, and adapt your constraints if necessary.
|
|
|
|
|
\begin{answer}
|
|
|
|
|
[TODO: Add answer here]
|
|
|
|
|
Now ACTS generated $83$ tests covering $312$ tuples in $12.9$ seconds and due to the constraints more than $50$ tuples were forbidden.
|
|
|
|
|
\end{answer}
|
|
|
|
|
|
|
|
|
|
\end{enumerate}
|
|
|
|
|