Skip to content

Commit b09677b

Browse files
author
potanin
committed
Now down to 21 pages. Aiming for 10. :-)
1 parent 66fe249 commit b09677b

File tree

13 files changed

+442
-781
lines changed

13 files changed

+442
-781
lines changed

papers/ACSC2017/background.tex

Lines changed: 105 additions & 137 deletions
Large diffs are not rendered by default.

papers/ACSC2017/conclusion.tex

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,3 @@ \section{Conclusion}\label{C:con}
77
At the moment the provided tool supports renaming of local and global variables, fields, function arguments, structs, enum and functions (or methods). Beyond renaming, it also allows reification and elision of lifetime parameters for functions and methods and has preliminary support for inlining of local variables. These refactorings in particular highlight the idiosyncrasies of Rust, ensuring that the analyses performed here are some of the first of its kind. The complete limitations of these refactorings are not yet fully known, but there exists a current suite of tests to ensure that there are no obvious flaws in the approach. The presence of bugs in the compiler is a real problem to generality, but without real world use and more contribution to testing, finding these corner cases appears to be difficult.
88

99
At the moment, Rust lacks significant refactoring tool-support and evidently requires more work particularly within the compiler to enable further, valuable progress. Although a preliminary tool has been provided, there are many avenues for continuing work and the hope is that this first investigation provides useful insight for future efforts. Understanding the required context and the necessary infrastructure has been a major part of this work. In particular, learning and understanding Rust has been incredibly challenging, as it introduces concepts rarely used elsewhere. Continuation of this work should allow greater focus on implementing a more difficult and comprehensive set of refactorings for Rust.
10-
11-
\section{Appendix}\label{C:appen}
12-
\section{Eclipse refactorings}
13-
\begin{center}
14-
\begin{figure}
15-
\scalebox{0.9}{
16-
\begin{tabular}{ l | l | l }
17-
Rename &
18-
Move &
19-
Extract Method \\
20-
Extract Local Variable &
21-
Extract Constant &
22-
Inline \\
23-
Move Type to New File &
24-
Extract Superclass &
25-
Extract Interface \\
26-
Push Down &
27-
Pull Up &
28-
Extract Class \\
29-
Introduce Indirection &
30-
Introduce Factory &
31-
Introduce Parameter \\
32-
Encapsulate Field &
33-
Generalize Declared Type &
34-
Migrate JAR File \\
35-
Change Method Signature &
36-
Convert Anon. Class to Nested &
37-
Convert Local Variable to Field \\
38-
Use Supertype Where Possible &
39-
Introduce Parameter Object &
40-
Infer Generic Type Arguments
41-
\end{tabular}
42-
}
43-
\caption{List of refactorings supported by Eclipse}
44-
\label{Fig:eclipse}
45-
\end{figure}
46-
\end{center}

papers/ACSC2017/evaluation.tex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ \subsection{Validity of refactorings}\label{S:validity}
1818
\subsubsection{Validity of renamings}
1919
The testing suite attempts to test both the cases where a renaming should occur, and cases where it should not due to the variations in conflict types as outlined in Section \ref{S:different}. Currently there around 60 tests specifically written to test renaming, spread across the different classes of renaming. In particular, tests try to cause conflicts between the different classes, e.g. variable names with type names. We can examine a generic rename in Figure \ref{Fig:walk}. When running any of the renaming refactorings, name resolution will run to find any super-block conflict or some cases same-block conflicts. Afterwards, any sub-block conflicts will be caught in a compilation run. In some cases, the `use' import graph is then rebuilt to identify same-block conflicts which were missed by name resolution. By convincing ourselves that all the conflict types are covered, in addition the having test cases to show that it works, there can be confidence that the overall approach works.
2020

21-
\begin{figure}
21+
\begin{figure*}
2222
{\verb|let a = 2; // 1. Super-block conflict: caught by name resolution|}
2323

2424
{\verb| {|}
@@ -32,7 +32,7 @@ \subsubsection{Validity of renamings}
3232
{\verb| }|}
3333
\caption{Examining a tentative rename in red}
3434
\label{Fig:walk}
35-
\end{figure}
35+
\end{figure*}
3636

3737
\paragraph{Local and global variables (and generally function arguments and fields)}
3838
At the moment there exists several tests for const, static and normal local variables, both in successful and non-successful situations. In terms of the ability for this class of renamings to fail unexpectedly, the chances appear slight since variables lack the most dynanism and complexity (no dynamic dispatch for instance), particularly for local variables. As long as name resolution works correctly and the compilation process, few of these renamings should cause issues. During the process of testing, it was found that `static mut' global variables did not record their spans correctly due to an error in the save-analysis code. In particular, the span was recorded for the `mut' identifier as opposed to the actual name of the variable. Fixing this required a minor patch to the Rust compiler and this patch was upstreamed prior to the release of Rust 1.0.
@@ -233,9 +233,9 @@ \subsubsection{Comparing the timings between the types of refactorings}
233233

234234
\begin{figure}[h]
235235
\begin{center}
236-
\scalebox{0.8}{
237-
\includegraphics{refactorings}
238-
}
236+
237+
\includegraphics[width=8cm]{refactorings}
238+
239239
\caption{Graph displaying results of the different refactorings}
240240
\label{Fig:compareref}
241241
\end{center}
@@ -268,9 +268,9 @@ \subsubsection{Varying the number of refactoring locations or usages}
268268

269269
\begin{figure}[h]
270270
\begin{center}
271-
\scalebox{0.8}{
272-
\includegraphics{scaling}
273-
}
271+
272+
\includegraphics[width=8cm]{scaling}
273+
274274
\caption{Graph displaying results of varying the number of usages}
275275
\label{Fig:comparerefs}
276276
\end{center}

papers/ACSC2017/garming.bib

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ @misc{docmod15
5656
@misc{openhub15,
5757
author = "{Black Duck Open HUB}",
5858
title = {{Rust (programming language)}},
59-
howpublished = {\url{http://code.openhub.net/project?pid=&ipid=301463}},
59+
howpublished = {\url{code.openhub.net/project?pid=&ipid=301463}},
6060
year=2015,
6161
}
6262

@@ -177,7 +177,7 @@ @phdthesis{brown2008tool
177177
@article{baumer2001integrating,
178178
title={Integrating refactoring support into a Java development tool},
179179
author={B{\"a}umer, Dirk and Gamma, Erich and Kiezun, Adam},
180-
journal={OOPSLA01 Companion},
180+
journal={OOPSLA'01 Companion},
181181
year={2001}
182182
}
183183

0 commit comments

Comments
 (0)