]> git.uio.no Git - ifi-stolz-refaktor.git/commitdiff
Thesis: illegal statements
authorErlend Kristiansen <erlenkr@ifi.uio.no>
Mon, 14 Apr 2014 16:30:59 +0000 (18:30 +0200)
committerErlend Kristiansen <erlenkr@ifi.uio.no>
Mon, 14 Apr 2014 16:39:59 +0000 (18:39 +0200)
thesis/master-thesis-erlenkr.tex

index 69ee2bdb713284b591e2926924eea5354803ad4e..6657d03fa76414dd4a818c36261bc9f56a4e7afd 100644 (file)
@@ -1732,6 +1732,30 @@ Therefore we must examine the selection for assignments to local variables that
 are referenced after the text selection. Then we must verify that not more than 
 one such reference is done, or zero if any return statements are found.
 
+\subsection{Illegal statements}
+An illegal statement may be a statement that is of a type that is never allowed, 
+or it may be a statement that is only allowed if certain conditions are true.
+
+Any use of the \var{super} keyword is prohibited, since its meaning is altered 
+when moving a method to another class.
+
+For a \emph{break} statement, there are two situations to consider: A break 
+statement with or without a label. If the break statement has a label, it is 
+checked that whole of the labeled statement is inside the selection. If the 
+break statement does not have a label attached to it, it is checked that its 
+innermost enclosing loop or switch statement also is inside the selection.
+
+The situation for a \emph{continue} statement is the same as for a break 
+statement, except that it is not allowed inside switch statements.
+
+Regarding \emph{assignments}, two types of assignments are allowed: Assignments 
+to non-final variables and assignments to array access. All other assignments 
+are regarded illegal.
+
+\todoin{Expand with more illegal statements and/or conclude that I did not have 
+time to analyze all statements types.}
+
+
 
 \chapter{Refactorings in Eclipse JDT: Design, Shortcomings and Wishful 
 Thinking}\label{ch:jdt_refactorings}
@@ -3115,6 +3139,7 @@ is thrown.
 %on\ldots)}
 
 \subsection{The IllegalStatementsChecker}
+\todoin{Contains duplicate text from semantic section}
 This checker is designed to check for illegal statements.
 
 Any use of the \var{super} keyword is prohibited, since its meaning is altered