CSE647: Testing and Verification Homework 6 (ver. 18 Oct, 18:50) Due 26 Oct 2000 Scott Stoller 1. In lecture on 16 October, we mentioned two ways of organizing the class hierarchy in the wrapper approach to intercepting method invocations and method terminations: "one hierarchy" "separate hierarchies" C C CSS / \ / / C1 CSS C1 C1SS / \ / / C2 C1SS C2 C2SS \ C2SS Note: On the chalkboard, I wrote C' instead of CSS. Compare the advantages and disadvantages of these two organizations. Consider the effects on how method calls and field accesses are intercepted. Remember that the same piece of code (e.g., a method invocation or field access) might sometimes be executed on an unshared object and sometimes on a shared object. 2. In lecture, we proposed to use the wrapper approach to intercept method invocations and method terminations for call sites of the form "invokevirtual C.m" (i.e., we introduce a wrapper class CSS and a wrapper method CSS.m. and we do not modify the call site or the body of C.m). This approach does not quite work for call sites of the form "invokespecial C.m". Describe how to transform such call sites using the outside approach (mentioned in lecture). Be reasonably detailed about what the transformed bytecode looks like. Don't forget about method arguments and exceptions.