refactoring tool challenges in a strongly typed language (poster session)  this poster examines the challenges of developing a refactoring tool for a weakly typed language such as smalltalk as opposed to a strongly typed language such as java. to explore this, we will compare the push up field refactoring in each language. this refactoring was selected because it is relatively simple conceptually, but difficult to implement for java.  in a weakly typed language such as smalltalk, push up field is simple. the user simply determines that the parent class needs the variable. the refactoring tool moves the field to the parent class. then the tool searches all the subclasses of the parent class, if the classes have a variable with the same name, the refactoring tool removes the variable from the subclass. the task is complete.  for java, a description of classes and types is necessary. let's start with a base class a. a has a number of child classes, b, c, d, e, f, and g. each of b-g has a single instance variable named var. the only difference between the classes is the type of var. b and c both have a variable named var with type x. d has a variable named var with a type y. e has a variable named var with type w. f has a variable named var with a type of z. and g has a variable named var with the type int. w, x, y, and z are classes. w is the base class, x is a subclass of w, and y is a subclass of x. z is unrelated to all of the other classes. since all subclasses of a have a variable named var, a programmer might suspect that they could reduce the amount of code by moving the variable into the parent class a.  let's move the field named var from class b into class a. like in smalltalk, the java refactoring tool can remove the variable var from b and c, since the var variable in both classes have the same type. the source file for a would get the declaration of type x named var. the source file for a might also gain an import for the type x. let's postpone the discussion of the scope of the variable var.  the refactoring tool can remove var from d since the storage in a is sufficient. however, the impact on the source code depends on whether there is a difference between the interface of x and y. if there are methods or fields added in y that are not in x, then by removing the variable var from d, the refactoring tool must be sure to cast var back to a y in code that refers to var in a way that accesses the differences. for instance, if x and y have a method m, then in d the invocation var.m() remains unchanged. if y has a method n and no similar method is present in x or a parent class of x, then d must change the code that looks like var.n(); to ((y) var).n();  the refactoring tool cannot remove var from e, since a variable of type w can not be stored in a class x. a refactoring tool might change the type of the object in class a to w. the effect of casting var to an x or a y type would be more widespread.  to remove var from f, the refactoring tool would need to change the variable var's type to object, since object is the base class for all classes thus would be a common storage type for ws and zs. everywhere that var is used in any source files, it must be cast to the appropriate type, eliminating the benefit of compile time type checking.  removing var from g is even more difficult, since a primitive type such as int does not derive from object, the refactoring tool must find a way to store var for g. java provides a series of immutable types that store the primitive types, i.e. java.lang.integer. to access the variable's value, "var" would be replaced with "var.intvalue()". to set var, the tool would create a new instance of the integer class, and assign it to var. since multithreaded programming is encouraged, any operation that replaces an atomic action with a series of steps must be considered very carefully. in this instance, the assignment of a value to var is atomic, but now includes the creation of an integer object followed by an assignment. object instantiation is not atomic, therefore if might be necessary to wrap the assignment of var in an appropriate synchronized block. synchronized blocks are computationally very expensive, and should not be used indiscriminately. therefore, an automated tool should not remove the variable var from g as a result of pushing var from b to a instead, a refactoring tool might recommend renaming the variable var in g.  christopher seguin