This commit is contained in:
Josep Silva 2019-12-05 13:10:59 +00:00
parent f29182fed4
commit 326c39cc7e
2 changed files with 11 additions and 9 deletions

View file

@ -231,13 +231,13 @@ dependencies are \added{represented with }black \added{arcs}, data dependencies
\item[Correctness.] The solution excludes all statements that do not affect
the slicing criterion. Most solutions are complete, but the degree of correctness is
what sets them apart, as solutions that are more correct will produce smaller slices, which will execute fewer instructions to compute the same values, decreasing the executing time and complexity.
\item[Features covered.] Which features \josep{(polymorphism, global variables, arrays, etc.)} or language a slicing algorithm
\item[Features covered.] Which features \josep{(polymorphism, global variables, arrays, etc.)} or language\josep{s/paradigms} a slicing algorithm
covers. Different approaches to slicing cover different programming
languages and even paradigms. There are slicing techniques (published or
commercially available) for most popular programming languages, from C++
to Erlang. Some slicing techniques only cover a subset of the targeted
language, and as such are less useful for commercial applications, but
can be a stepping stone in the betterment of the field.\sergio{Tambien estan las valen para todos los lenguajes, ORBS entraria en ese caso no Josep?}
can be a stepping stone in the betterment of the field.\sergio{Tambien estan las valen para todos los lenguajes, ORBS entraria en ese caso no Josep?}\josep{si, hay algunas tecnicas que son independiente del paradigma, entre ellas ORBS. A cambio pagan un precio que suele ser una perdida de precision. Yo no me extenderia en ese tema, pero si estaria bien meter una cita a ORBS y sus semejantes al decir lo de even paradigms}
\item[Speed.] Speed of graph generation and slice creation. As previously
stated, slicing is a two-step process: building a graph and traversing it \sergio{esta frase hace parece que hacer slicing es dibujo libre... darle algo de importancia hablando de traducir el codigo a una representacion en forma de grafo con un estructura de datos compleja bla bla bla...}.
The traversal is a linear two--pass analysis of a graph in most proposals, with small variations.
@ -259,11 +259,11 @@ dependencies are \added{represented with }black \added{arcs}, data dependencies
the source of the bug.
\item[Forward static.] Used to obtain the lines affected by a statement,
used to identify dead code, to check the effects a line has on the rest
of the program.
of the program.\josep{la principal aplicacion de forward slicing es software maintenance: Predecir a que partes del programa va a afectar un cambio.}
\item[Chopping static.] Obtains both the statements affected by and the
statements that affect the selected statement.
\item[Dynamic.] Can be combined with any of the previous variations, and
limits the slice to an execution log, only including statements that
limits the slice to an execution log\josep{history}, only including statements that
have run in a specific execution. The slice produced is much smaller and
useful.
\item[Quasi--static.] \added{In this slicing method s}\deleted{S}ome input values are given, and some are left
@ -278,6 +278,7 @@ dependencies are \added{represented with }black \added{arcs}, data dependencies
\item
\carlos{añadir más quizá???}
\sergio{a mi me parecen suficientes, puedes decir una frasecita de 2 o 3 lineas diciendo que hay mas y algun uso de alguno de los otros que queden asi a lo general, pero yo los veo suficientes.}
\josep{suficientes. Añade un p\'arrafo diciendo que existen otras dimensiones que dan lugar a otras tecnicas y que en [16] se puede encontrar una an\'alisis de las diferentes dimensiones que pueden usarse para clasificar tecnicas de slicing}
\end{description}
\section{Exception handling in Java}
@ -480,6 +481,6 @@ double safe_sqrt(double x, int ref) {
\item[Assembly.] Assembly is a representation of machine code, and each computer architecture has its own instruction set, which makes an analysis impossible. In general, though, no unified exception handling is provided. \carlos{complete with more info on kinds of error handling at the processor level or is this out of scope???}\sergio{Si metes una explicacion asi breve que se entienda bien, si va a ser muy tecnico yo pararia aqui. Diria que las excepciones se manejan a nivel de procesador o lo que sea asi por encima y matizao}
\end{description}
\footnotetext{For more details on Go's design choices, see \url{https://golang.org/doc/faq\#exceptions}. \carlos{Possible transformation to citation???}\sergio{No creo que nos vaya a hacer falta. Con el state of the art y la intro tendremos bastantes.}}
\footnotetext{For more details on Go's design choices, see \url{https://golang.org/doc/faq\#exceptions}. \carlos{Possible transformation to citation???}\sergio{No creo que nos vaya a hacer falta. Con el state of the art y la intro tendremos bastantes.}\josep{mantenlo como footnote}}
% vim: set noexpandtab:tabstop=2:shiftwidth=2:softtabstop=2:wrap

View file

@ -6,6 +6,7 @@
\carlos{Review if we want to call nodes ``Enter'' and ``Exit'' or ``Start'' and ``End'' (I'd prefer the first one).}
\sergio{Enter o Entry?}
\josep{No es una decision nuestra, coge la misma palabra que Orwitz en el paper del SDG}
\section{First definition of the SDG}
\label{sec:first-def-sdg}
@ -38,11 +39,11 @@ to the result of evaluating the conditional expression in the guard of the
predicate.
\begin{definition}[Control Flow Graph \carlos{add original citation}]
A \emph{control flow graph} $G$ of a program\sergio{program o method?} $P$ is a directed graph, represented as a tuple $\langle N, E \rangle$, where $N$ is a set of nodes, composed of a method's\sergio{method o program?} statements plus two special nodes, ``Start'' and ``End''; and $E$ is a set of edges of the form $e = \left(n_1, n_2\right) | n_1, n_2 \in N$.
\josep{Esto es una definicion. No pueden haber opinion ni contenido vago. O defines que Start y End son nodos o no lo defines. Pero no diugas lo que han hecho otros en una definicion. Lo que sigue yo lo quitaría}
Most algorithms\added{, in order} to generate the SDG\added{,} mandate the ``Start'' node to be the only source and \added{the} ``End'' \added{node} to be the only sink in the graph. \carlos{Is it necessary to define source and sink in the context of a graph?}\josep{quitalo}.
\label{def:cfg}
A \emph{control flow graph} $G$ of a program\sergio{program o method?} $P$ is a directed graph, represented as a tuple $\langle N, E \rangle$, where $N$ is a set of nodes, composed of a method's\sergio{method o program?} statements plus two special nodes, ``Start'' and ``End''; and $E$ is a set of edges of the form $e = \left(n_1, n_2\right) |~n_1, n_2 \in N$. Most algorithms\added{, in order} to generate the SDG\added{,} mandate the ``Start'' node to be the only source and \added{the} ``End'' \added{node} to be the only sink in the graph. \carlos{Is it necessary to define source and sink in the context of a graph?}.
Edges are created according to the possible execution paths that exist; each statement is connected to any statement that may immediately follow it. Formally, an edge $e = (n_1, n_2)$ exists if and only if there exists an execution of the program where $n_2$ is executed immediately after $n_1$. In general, expressions are not evaluated \added{when generating the CFG}; so a\deleted{n \texttt{if}}\added{ conditional} instruction \added{will have}\deleted{has} two outgoing edges \added{regardless the condition value being} \deleted{even if the condition is} always true or false, e.g.\added{,} \texttt{1 == 0}.
\josep{desde aqui}Edges are created according to the possible execution paths that exist; each statement is connected to any statement that may immediately follow it. Formally, \josep{hasta aqui sacalo fuera de la definicion, para explicarla., Pero no tiene sentido que digas algo informal en una defincicion y dentro incluso de la definicion digas formally, Debe ser TODO formally por definicion (valga la redundancia)}an edge $e = (n_1, n_2)$ exists if and only if there exists an execution of the program where $n_2$ is executed immediately after $n_1$. \josep{de nuevo, no puedes decir in general. O defines que si se evaluan o que no, pero no digas lo que se suele hacer. Aqui estas definiendo}In general, expressions are not evaluated\added{when generating the CFG}; so a\deleted{n \texttt{if}}\added{ conditional} instruction \added{will have}\deleted{has} two outgoing edges \added{regardless the condition value being} \deleted{even if the condition is} always true or false, e.g.\added{,} \texttt{1 == 0}.
\end{definition}
To build the PDG and then the SDG, there are two dependencies based directly on the CFG's structure: data and control dependence. \sergio{But first, we need to define the concept of postdominance in a graph necessary in the definition of control dependency:}\sergio{no me convence mucho pero plantearse si poner algo aqui o dejarlo como esta.}