1 / 17

Aspect Browser Plus Ling Neil Patricia

Aspect Browser Plus Ling Neil Patricia. Motivation. When modifying code it is important to find all dependencies Backtracing is helpful when learning new code. Scenario. Find all references to a member function called getName that is in a class called Class Looking for:

brook
Download Presentation

Aspect Browser Plus Ling Neil Patricia

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Aspect Browser Plus Ling Neil Patricia

  2. Motivation • When modifying code it is important to find all dependencies • Backtracing is helpful when learning new code

  3. Scenario • Find all references to a member function called getName that is in a class called Class • Looking for: • classNew.getName() • myClass.getName() • anything.getName() • As long as it is of type Class

  4. How to do this with AB • Create getName() aspect: • May result in a lot of false positives • Create Class aspect and note all variables that have this type. Search for variable.getName() • Tedious • Detracts from task at hand • Won’t find implicit this references • Take advantage of naming conventions • No guarantee

  5. Goals • Keep Aspect Browser language independent • Minimize modification to AB • Modularize language dependent portion

  6. How did we do it? • Language dependent component creates a “database” • Can use any method desired to populate file • Aspect Browser uses database when Aspect Plus Aspects are created • getName@@Class

  7. Demo • Want to modify getName() function of a class called Class

  8. What went right? • Modularization was almost perfect • I still have no idea how Patricia’s code works • Patricia and Ling have never seen my modifications • Integration with Aspect Browser was almost trivial. • AspectPlus inherited from Aspect • Factory created AspectPlus based on string parse

  9. What went wrong? • We couldn’t use this on Aspect Browser itself because of AspectJ. Bummer! • Emacs interface is not perfect

  10. What’s next? • Support for another language (c++) • Support member variable references as well • Support RegExp matches • Fix bug with emacs’ highlighting

  11. Questions?

  12. Extra Slides Time Permitting

  13. Call Data Collection Implementation • Java bytecode based collector. Requires pre-compiled files. • Uses Apache BCEL to read and parse class files. • Extracts source file, line number, target type, and function name for each call.

  14. Call Collection Issues • Requires optional line number and local variable tables. Debug compile generates them. • Compilation and collection should be automated. • Virtual calls - currently indicates only match to compile time type.

  15. Function of AspectPlusDatabase • User Interface calls findAspect with sFile, sType and sFunction. • findAspect goes through the Database and returns the line for every occurrence of them.

  16. Implementation1 • AspectPlusDatabase goes through the Database once and saves all the information in a hashmap for later uses.

  17. Implementation2 • AspectPlusDatabase finds the vector by key sFile, then finds sType and sName in the vector.

More Related