Finished task 1

This commit is contained in:
Michael Chen 2022-06-15 22:03:06 +02:00
parent 37750c2395
commit ffea41af73
No known key found for this signature in database
GPG Key ID: 1CBC7AA5671437BB

View File

@ -5,6 +5,16 @@
\usepackage{listings}
\usepackage{enumitem}
\usepackage{subcaption}
\usepackage[acronym]{glossaries}
\newacronym{dnf}{DNF}{disjunctive normal form}
\newacronym{utp}{UTP}{unique true point}
\newacronym{nfp}{NFP}{near false point}
\newacronym{pc}{PC}{predicate coverage}
\newacronym{cc}{CC}{clause coverage}
\newacronym{acc}{ACC}{active clause coverage}
\newacronym{icc}{ICC}{inactive clause coverage}
\usepackage{pgf}
\usepackage{tikz}
@ -63,8 +73,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\name{[Add name here]}
\def\group{[Add group here]}
\def\name{Michael Chen}
\def\group{Group 01 (fastjson)}
\begin{document}
\projectinfo{4}{Software Testing - Logic Coverage\small}{\today}{\name}{\group}
@ -78,32 +88,32 @@
\begin{enumerate}
\item \textit{Predicate}, \textit{Clause}, \textit{Literal}, and \textit{Term}
\begin{answer}
[TODO: Add answer here]
A predicate from a functional perspective is a function with arbitrary inputs and boolean output containing one or more clauses that are combined with logical operators. A clause is also a kind of predicate, but in it's atomar form, in that it does not contain any further logical operators. Clauses can be built from operations of the programming language, variables and literals. Literals are clauses or their negations. A term is a conjunction of literals. Predicates that are disjunctions of terms are in their \gls{dnf}.
\end{answer}
\item \textit{Unique True Point} and \textit{Near False Point}
\begin{answer}
[TODO: Add answer here]
A \gls{utp} of a \gls{dnf} is a truth assignment where exactly one of its implicants is true. Given a clause, an \gls{nfp} is a truth assignment where the predicate is false, but if the clause is inverted it's implicant, and thus the predicate, become true.
\end{answer}
\item \textit{Prime Implicant} and \textit{Redundant Implicant}
\begin{answer}
[TODO: Add answer here]
An term is a prime implicant when all it's literals are necessary to make the predicate true, i.e. if you were to remove any single literal of the term it would no longer be an implicant. The opposite of that is a term where all it's literals could be removed and the predicate value would stay the same, making the implicant redundant.
\end{answer}
\end{enumerate}
\item What is the difference between \textit{Semantic} and \textit{Syntactic Logic Coverage}? Explain both approaches, as well as \textit{one} concrete criterion for each of them.
\begin{answer}
[TODO: Add answer here]
\Gls{pc} and \gls{cc} are examples for semantic logic coverage criteria, which are based on the meaning of the expressions. Here the test requirements are built from the evaluations of parts of the predicate. \Glspl{utp} is an example for syntactic logic coverage, which are based on forms of the expressions. This specific criterion is based on the fact that it's predicates are in \gls{dnf} form and thus implicants can be easily identified.
\end{answer}
\item Explain the terms \textit{Reachability} and \textit{Controllability}. What are their consequences for a source-code based logic coverage approach?
\begin{answer}
[TODO: Add answer here]
Reachability and controllability are concerned with the selection of input values to satisfy specific test requirements. The former is concerned with choosing inputs in a way that the program flow evaluates the expression under test. Controllability is concerned with assigning the inputs such that, given the flow of the program until the expression, internal variables are assigned correctly, because not all literals of expressions are necessarily direct input variables.
\end{answer}
\item Both \textit{Active Clause Coverage} (ACC) and \textit{Inactive Clause Coverage} (ICC) feature a \textit{General} and a \textit{Restricted} version of their concepts. Briefly describe the changes that both variations introduce to the basic concept.
\begin{answer}
[TODO: Add answer here]
In the general version of these criteria the minor clauses allowed to change for different requirements, while in the restricted version they have to stay the same for dífferent valuations of the current major clause.
\end{answer}
\end{enumerate}