Presentation is loading. Please wait.

Presentation is loading. Please wait.

8th Workshop "Software Engineering Education and Reverse Engineering", Durres RFAgent – an eLearning Supporting Tool Asya Stoyanova-Doycheva University.

Similar presentations


Presentation on theme: "8th Workshop "Software Engineering Education and Reverse Engineering", Durres RFAgent – an eLearning Supporting Tool Asya Stoyanova-Doycheva University."— Presentation transcript:

1 8th Workshop "Software Engineering Education and Reverse Engineering", Durres RFAgent – an eLearning Supporting Tool Asya Stoyanova-Doycheva University of Plovdiv Bulgaria

2 8th Workshop "Software Engineering Education and Reverse Engineering", Durres Introduction Refactoring Learning Environment (rLE) is intended to analyze and assess the code, written by students in real time, as well as to recommend to them changes in code structure, if needed, in order to improve its quality. The analysis and assessment are made by an intelligent assistant – Refactoring Agent (RA) in compliance with the rules for refactoring for the programming language Java.

3 8th Workshop "Software Engineering Education and Reverse Engineering", Durres rLE Architecture Front-end subsystem (FES) – the environment, which is used by the students for the development, compilation and testing of the source code; Back-end subsystem (BES) – the Refactoring Agent (RA), which is an intelligent agent that assists the students during the code development. Refactoring Agent sensors effectors Local Control Refactoring Rules Base RAnalyzer FES (IDE)BES (JADE)

4 8th Workshop "Software Engineering Education and Reverse Engineering", Durres rLE Architecture The Refactoring Agent is an autonomous software application that analyzes and assesses uninterruptedly the code that is developed in FES. Consequently, from the RA point of view FES is its environment. The Rafactoring Agent communicates with its environment by means of its sensors and effectors. Via the sensors RA accesses the complete source code. This implies not only the files, being edited, but also the completed ones that were not opened in FES for editing. The role of the effectors is to bring about different events that assist the students by the accomplishment of their tasks in FES, where they are working. The collaboration of the sensors and effectors is coordinated by the local control of the agent which is based both on the information, incoming from the sensors and the refactoring rules, stored in the Refactoring Rules Base (RRB) of the agent The Local Control works together with the Analyzer, who is responsible for finding the correct refactoring method – based on the knowledge in RRB. Refactoring Agent sensors effectors Local Control Refactoring Rules Base RAnalyzer FES (IDE)BES (JADE)

5 8th Workshop "Software Engineering Education and Reverse Engineering", Durres Where is a difference? The environment is a prototype and is intended, first of all, for teaching students; The code analysis is done in real time, i.e. already during the development of the code the students could be assisted in improving its quality; An agent-oriented architecture is suggested.

6 8th Workshop "Software Engineering Education and Reverse Engineering", Durres Agent Functionality The main task of the RA consists in checking the code, which is being developed by the students in FES and displaying in an appropriate manner instructions for improving its quality, in case this is necessary. Depending on the refactoring method, which should be applied, the agent could react in three different ways: Automatic Refactoring; Refactoring Proposal; Refactoring Questionarie.

7 8th Workshop "Software Engineering Education and Reverse Engineering", Durres Automatic Refactoring Apply automatically the method after receiving confirmation from the user - Move Method, Move Field, Extract Class, Extract Method etc.

8 8th Workshop "Software Engineering Education and Reverse Engineering", Durres Refactoring Proposal Refactoring Agent display detailed instructions, explaining to the user where and how the particular refactoring method should be applied. Some of the proper refactoring methods that belong to this category are Replace Conditional with Polymorphism, Replace Delegation with Inheritance, Replace Inheritance with Delegation etc.

9 8th Workshop "Software Engineering Education and Reverse Engineering", Durres Refactoring Questionarie RA ask the user additional questions in order to clarify the conditions and define the appropriate refactoring method. Example: The agent finds out that a given class contains numeric type code, but could not determine if this code changes the behavior of the class; The agent displays a question to the user, asking him whether this type code influences on the behavior of the class; If the answer is “no”, the agent offers to the user to apply the method Replace Type Code with Class; If the answer is “yes”, the agent asks the user whether the type code attribute changes during the lifecycle of the object; If the user`s answer is “no”, the agent offers the user to apply the method Replace Type Code with Subclass; Otherwise, the agent offers Replace Type Code with State/Strategy

10 8th Workshop "Software Engineering Education and Reverse Engineering", Durres Agent Functionality

11 8th Workshop "Software Engineering Education and Reverse Engineering", Durres Implementation As a development environment we chose Eclipse It is open source It supports a powerful mechanism for interaction with external components in the form of plugins. This could be considered as a significant advantage of this particular environment which simplifies the integration of the Refactoring Agent (RA) in the development environment. The sensors and effectors of the agent will be realized in JADE and they will use existing plugins in Eclipse. For realization of the RAnalyzer existing plugins in Eclipse will be used (JDT). The agent itself is implemented by means of the JADE environment. The main question is how will be realized connection between Jade and Eclipse?

12 8th Workshop "Software Engineering Education and Reverse Engineering", Durres Eclipse platform and its Plug-ins Eclipse starts… Plug-in Plug-ins are loaded… Initializes Plug-in JDT Plug-in Allows other Plug-ins to access to the hierarchical model of the java code. Resource Plug-in Allows other Plug-ins to access the eclipse workspace, projects, files, etc… Refactoring Plug-in

13 8th Workshop "Software Engineering Education and Reverse Engineering", Durres Combining Jade and Refactoring Plug-in Eclipse JDT Plug-in Resource Plug-in Other Plug-ins 1. When the Plug-in initializes, it starts a Jade container. Refactoring Plug-in Jade container 2. The Jade container receives Refactoring Agent’s class name at startup and instantiates it. Refactoring Agent Behavior 1Behavior 2RAnalyzerREffector 3. Behaviors are java classes that are part of the Refactoring Plug-in and therefore can access APIs that other Plug-ins provide.


Download ppt "8th Workshop "Software Engineering Education and Reverse Engineering", Durres RFAgent – an eLearning Supporting Tool Asya Stoyanova-Doycheva University."

Similar presentations


Ads by Google