Download
fca parser n.
Skip this Video
Loading SlideShow in 5 Seconds..
FCA Parser PowerPoint Presentation

FCA Parser

195 Vues Download Presentation
Télécharger la présentation

FCA Parser

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. FCA Parser Presented by: SamiaAzhar(06-0155) ShahzadiSamia(06-0112)

  2. About FCA Parser • FCA Parser is a tool that parses java files to generate input for the Concept Explorers, ConExp or Galicia. • The concept Explorer generates the concept lattice which can be used to compare the results produced by the various techniques the tool supports. • The user can either select a package containing multiple java files or a single file followed by selection of technique to be applied, binary file storage, selection of the concept Explorer and lattice generation at the end.

  3. User Interface

  4. Functionalities • Select a Java package: If the user selects this button, he is prompted to browse for the Java package that contains the software source code.

  5. Functionalities (continued…) • Select a Technique: This choice group lets user select one of the four techniques he wants to apply • Select a Class/Multiple Classes: Using this button the user can select either a single java file or multiple java files, depending on what he wants to analyze. • Select an Explorer: It represents a choice group that enables the user to select one of the two explorers, ConExp and Galicia. The reason for adding Galicia to the interface was that for large number of classes having lots of methods and attributes, ConExp generates a huge lattice which makes it difficult to study. Galicia on the other hand displays only meaningful information which makes the lattice easier to analyze. • Save Output File As: This button generates the binary file in the format supported by the concept explorer previously chosen and lets the user save the generated file to a path of his choice.

  6. Functionalities (continued) • Start Concept Explorer: This button launches a concept explorer, depending on what the user has chosen from the choice group. In the image shown below, ConExp has been launched.

  7. Alerts • No file Selected: If the user does not select any package of file and selects "Save Output File As" button, this alert is generated.

  8. Alerts • No technique Selected: This alert is generated if the user presses "Save Output As" button without selecting any technique • No Explorer Selected: This alert is generated if the user presses "Save Output As" or "Start Concept Explorer" button without selecting any technique.

  9. Confirmation Message • Exit Confirmation Message: This confirmation dialog appears whenever the user closes the application uses the close button at the top right corner.

  10. Techniques Supported • Method Attribute • Common Properties • Class Coupling • Client Code. • Class Association • Principle Class Views

  11. Method Attribute • It examines relationship between attributes and methods in a class. • Its FCA context is as follows: O = All methods within a class A = Attributes of the current class R = method accesses an attribute • This technique helps in detecting the degree of cohesion in a class and various code smells such as long method, large class etc.

  12. Method Attribute

  13. Common Members • Detects hierarchies among multiple classes by finding common methods and attributes. • Its FCA context is as follows: O = A class A = Common attributes and methods among class R = A class contains an attribute or method • To correct hierarchical defects detected various refactoring such as Extract Class, Extract subclass or Extract super class can be applied.

  14. Common Members

  15. Class Coupling • Determines the methods invoked and attributes accessed among multiple classes. • Its FCA context is as follows: O = A class A = Attributes and Methods of classes. R = A class invokes a method or accesses an attribute of another class

  16. Class Coupling

  17. Client Code • It analyzes a class hierarchy by examining the objects behavior in client code and suggests possible refactoring. • Its FCA context is as follows: O = An object declared in client code. A = Attribute accessed or method invoked on the object. R = Object accesses an attribute or invokes a method .

  18. Client Code

  19. Class Association • Its FCA context is as follows: O = All methods within a class A = Attributes of the current class and Classes it references. R = method accesses an attribute or references another class. • It helps us to examine the behavior of a particular class and the degree of coupling to other classes. • Various refactoring such as Extract method, Extract Class, Move Method can be applied to deal with the problems encountered

  20. Class Association

  21. Principle Class • The group of methods and the type that these methods access and modify is known as a principal class. • We consider only end user Types, primitive types are not considered. • All methods that read from, write to or call the methods of a particular type are associated with the principle class of that type.

  22. Java Code Principle Classes Derived

  23. Views • Three views can be extracted using FCA called fundamental, interaction and association. • These views help in detecting class hierarchies by examining principal classes. • These also help in reducing structure and information provided by the concept lattices generated for the classes. • These views are explained as follows.

  24. Fundamental view • For fundamental view that formal Context would be as follows: O = All Methods within principal class. A = Attributes of the user-defined type associated to principal class. R = Method m reads or modifies an attribute of its associated type. • It helps to provide a hierarchy of methods using attributes in a principal class.

  25. Fundamental View Principle Classes Lattice for principle Class A Lattice for principle Class B

  26. Common Interactions View For this view, we define the FCA context as follows: O = All Methods within principal class A = Method invocations R = method m calls method n. • This helps understanding the interaction of various methods present within the principal classes for their possible categorization as interface methods or functionality provider.

  27. Common Interaction View Principle Classes Lattice for principle Class A Lattice for Principle Class B Lattice for principle Class C

  28. Association View • FCA context is as follows: O = All methods within a current principal class A = Attributes of the current principal class, and other principal classes (except those linked by composition) R = m accesses an attribute of its type or accesses principal class (pc). • This view depicts the degree of usage of a principal class within methods of the current principal and hence its place within the hierarchy of the principal class.

  29. Association View Principle Classes Lattice for Principle class A Lattice for principle Class B

  30. References • Fernandez-Manjon, B. and Fernandez-Valmayor, A. 1998. Building Educational Tools Based on Formal Concept Analysis. Education and Information Technologies 3, 3-4 (Dec. 1998), 187-201. • Formica, A. 2008. Concept similarity in Formal Concept Analysis: An information content approach. Know.-Based Syst. 21, 1 (Feb. 2008), 80-87. • Dekel, U. and Gil, Y. 2003. Revealing Class Structure with Concept Lattices. In Proceedings of the 10th Working Conference on Reverse Engineering (November 13 - 17, 2003). WCRE. IEEE Computer Society, Washington, DC, 353. • Bhatti, M. U., Ducasse, S., and Huchard, M. 2008. Reconsidering Classes in Procedural Object-Oriented Code. In Proceedings of the 2008 15th Working Conference on Reverse Engineering - Volume 00 (October 15 - 18, 2008). WCRE. IEEE Computer Society, Washington, DC, 257-266. • Moha, N. 2007. Detection and correction of design defects in object-oriented designs. In Companion To the 22nd ACM SIGPLAN Conference on Object-Oriented Programming Systems and Applications Companion (Montreal, Quebec, Canada, October 21 - 25, 2007). OOPSLA '07. ACM, New York, NY, 949-950. • Ar´evalo, G., Ducass, S., Nierstrasz O., Understanding Classes using XRay Views Institutf¨urInformatik und angewandteMathematik, University of Bern 3012 - Bern, Switzerland • Streckenbach, M. and Snelting, G. 2004. Refactoring class hierarchies with KABA. In Proceedings of the 19th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (Vancouver, BC, Canada, October 24 - 28, 2004). OOPSLA '04. ACM, New York, NY, 315-330.