This commit is contained in:
Josep Silva 2019-11-18 09:30:09 +00:00
parent 16730f0f11
commit 9c2b222f66

View file

@ -7,14 +7,14 @@
\section{Motivation}
\label{sec:motivation}
Program slicing~\cite{Wei81} is a debugging technique which, given a line of
code and a variable of a program, simplifies such program so that the only parts
left of it are those that affect the value of the selected variable.
Program slicing~\cite{Wei81} is a debugging technique \deleted{which}\added{that}, given a line of
code and a \added{set of} variable\added{s} of a program, simplifies such program so that the only parts
left of it are those that affect \added{or are affected by} the value\added{s} of the selected variable\added{s}.
\begin{example}[Program slicing in a simple method]
If the following program is sliced on line 5 (variable \texttt{x}), the
result would be the program of the right, with the \texttt{if} block
skipped, as it doesn't affect the value of \texttt{x}.
If the following program is sliced on \added{(line 5, variable \texttt{x})} \deleted{line 5 (variable \texttt{x})}, the
result would be the program of\josep{at?} the right, with the \texttt{if} block
skipped, as it \added{does not}\deleted{doesn't} affect the value of \texttt{x}.
\label{exa:program-slicing}
\begin{center}
\begin{minipage}{0.49\linewidth}
@ -40,8 +40,8 @@ void f(int x) {
\end{center}
\end{example}
Slices are an executable program whose execution will produce the same values
for the specified line and variable as the original program, and are used to
Slices are \deleted{an} executable program\added{s} whose execution \deleted{will} produce\added{s} the same values
for the specified line and variable as the original program, and \added{they} are used to
facilitate debugging of large and complex programs, where the data flow may not
be easily understandable.