FCA Parser

30
FCA Parser Presented by: Samia Azhar(06-0155) Shahzadi Samia(06-0112)

description

FCA Parser. Presented by: Samia Azhar (06-0155) Shahzadi Samia (06-0112). About FCA Parser. FCA Parser is a tool that parses java files to generate input for the Concept Explorers, ConExp or Galicia. - PowerPoint PPT Presentation

Transcript of FCA Parser

FCA Parser

FCA ParserPresented by:Samia Azhar(06-0155)Shahzadi Samia(06-0112)

About FCA ParserFCA 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.

User Interface

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

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.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.

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.

AlertsNo 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.

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

Techniques SupportedMethod Attribute Common Properties Class CouplingClient Code.Class AssociationPrinciple Class Views

Method AttributeIt 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.

Method Attribute

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

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

Class Coupling

Client CodeIt 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 .

Client Code

Class AssociationIts FCA context is as follows:O = All methods within a classA = 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 encounteredClass Association

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.

Java Code

Principle Classes DerivedViewsThree 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.Fundamental viewFor 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.Fundamental View

Principle Classes

Lattice for principle Class ALattice for principle Class BCommon Interactions ViewFor this view, we define the FCA context as follows: O = All Methods within principal classA = Method invocationsR = 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.26Common Interaction View

Principle Classes

Lattice for principleClass ALattice for Principle Class BLattice for principle Class CAssociation ViewFCA context is as follows:O = All methods within a current principal classA = 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.Association View

PrincipleClasses

Lattice for Principle class ALattice for principle Class BReferencesFernandez-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. Arevalo, G., Ducass, S., Nierstrasz O., Understanding Classes using XRay Views Institut fur Informatik und angewandte Mathematik, 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.