Upload
bathsheba-booth
View
219
Download
0
Tags:
Embed Size (px)
Citation preview
JAAF+T: A Framework to Implement Self-Adaptive Agents that Apply Self-Test
Andrew Diniz da Costa
2© LES/PUC-Rio
Outline
• Motivation
• Related Works
• JAAF+T
• Case Study: Creation of Susceptibility Maps
• Conclusion and Future Works
3© LES/PUC-Rio
Motivation
• Self-adaptive systems become one of the main focal points for software engineers.
• Several approaches describing how systems can perform self-adaptation have been investigated.
• Few approaches check if the adapted behavior is adequate for the new characteristics of the environment.
• It is necessary to test the adapted behavior by investigating its compliance with the new environment requirements at runtime.
4© LES/PUC-Rio
Related Work (I/II)
• (Wen et al., 2005)
– It proposes a Software-Based Self-Test (SBST) framework in order to be used in microprocessors.
– The components of the framework are tied to concepts of microprocessors, it is not possible to use them in different domains.
• (Denaro et al., 2007)
– Presents a self-adaptive approach for service-oriented applications.
– Besides, the self-test being proposed is fixed to the process.
Wen, C., Wang, L.-C, Cheng, K.-T, Yang, K., Liu, W.-T.., "On a Software-Based Self-Test Methodology and Its Application". IEEE VLSI Test Symposium, May 2005.
Denaro, G., Pezze, M., and Tosi, D., Designing Self-Adaptive Service-Oriented Applications. In Proceedings of the Fourth International Conference on Autonomic Computing. IEEE Computer Society, Washington, DC, 16, 2007.
5© LES/PUC-Rio
Related Work (II/II)
• (Stevens et al., 2007)
– The approach proposes a framework for testing self-adaptive systems at runtime.
– It works together with IBM’s layered architecture for an autonomic computing (AC) systems (IBM, 2003).
– Each test activity is connected with the layers and is implemented according to layer characteristics.
– It is not possible to use the proposed self-test activities in different self-adaptation processes.
Stevens, R., Parsons, B., and King, T. M., A self-testing autonomic container. In Proceedings of the 45th Annual Southeast Regional Conference (Winston-Salem, North Carolina). ACM-SE 45. ACM, New York, NY, 1-6, 2007.
6© LES/PUC-Rio
Proposal
• After adapting the behavior and before executing it, the agent may test if the self-adapted behavior fulfills the new environment requirements.
• Extend the JAAF - Java Self-Adaptive Agent Framework (Neto et al, 2009) - that uses JADE.
JAAF+TJava Self-Adaptive Agent Framework with Self-Test
Neto, B. F. S., Costa, A. D., Netto, M. T. A., Silvia, V., Lucena, C. J. P., JAAF: A Framework to Implement Self-adaptive Agents. In Proceeding of the 21st International Conference on Software Engineering Knowledge Engineering (SEKE’2009), Boston, Massachusetts, USA, pp. 212-217, July 2009.
7© LES/PUC-Rio
JAAF+T
• JAAF+T
– Agents that perform self-adaptation
– Plans executed by agents representing self-adaptation processes (or control loops)
– Activities that are the steps of such processes.
– Define input and output data to be used in different test cases.
– Define which test cases can be executed to each system version and context.
– Execute different types of test.
– Generate logs that describe the result of the test executions.
• The framework provides a default control loop that can be extended.
8© LES/PUC-Rio
Default Control Loop
IBM, An architectural blueprint for autonomic computing. Technical Report., IBM, 2003.
9© LES/PUC-Rio
Test Activity
• It is responsible for testing the actions chosen by the decision activity and to inform the decision activity if errors have occurred when testing these actions.
• The test activity is composed of four steps.
• The first two steps should be executed off-line and the other two are executed together with the application, at runtime.
10© LES/PUC-Rio
Test Definition Language (TDL)
Step 1
• The application designer should relate the actions of the agent to the test cases used to test such actions.
• The set of test cases are predefined by the designer and related to the actions that they are able to test.
11© LES/PUC-Rio
Quality Definition Language (QDL)
• This step defines the data to be used as input data and output assertions while testing the actions.
• The same input data can be used in different actions such as, in cases that test different application versions.
Step 2
12© LES/PUC-Rio
Step 3
• Tests can be executed when requested by the decision activity.
• Therefore, the third step of the test activity executes the test per se.
• Nowadays, the framework already provides two types of executions: using JUnit1 and DBUnit2 API for unit tests.
• Other types of test cases can be implemented.
1JUnit Web Site, http://www.junit.org/
2DBUnit Web Site, http://www.dbunit.org/
13© LES/PUC-Rio
Step 4
• In the sequence, it is time to generate the output logs with the results of the executed test.
• These logs will be used by the decision activity in order to decide whether to execute the action or choose another one.
• Name and path, where such logs should be stored, can be defined in the nameLog attribute provided by TDL.
14© LES/PUC-Rio
Hot-spots and Frozen-spots
• Hot-spots
– Test Activity
– Executing of different test cases
– Writing in different logs formats
– Reading different logs
– Decision Activity
• Frozen-spots
– New control loop provided by the framework as a default control loop with self-test.
– Parsing TDL file
– Parsing QDL file
15© LES/PUC-Rio
Case Study: Creation of Susceptibility Maps (I/VI)
• Landslides are natural phenomena, which are difficult to predict since they depend on many (unpredicted) factors and on the relationships between them.
• The main challenges faced by the specialists is to decide the most appropriate model configuration to generate susceptibility maps (SM), i.e., maps that show locations with landslide risks in a specific area.
• Application is composed of a set of agents that has the goal to generate a SM that shows the places with landslide risks in Rio de Janeiro.
16© LES/PUC-Rio
Case Study: Creation of Susceptibility Maps (II/VI)
• The multi-agent system tries to meet a susceptibility model that creates a good SM based on data provided by a user.
• Each agent adapts its behavior while choosing the most appropriate model from a set of models that each one knows.
• A model is implemented as a web service, and each agent uses OWL-S files in order to find such models.
17© LES/PUC-Rio
Case Study: Creation of Susceptibility Maps (III/VI)
18© LES/PUC-Rio
Agents Applying Self-Test (IV/VI)
• Test activity: Execute different test cases.
– One of the most simple test cases only verifies if the web-service is online
– Another one also very simple test case checks if the agent has the data required by the service to be execute. It uses QDL file.
– Check how much time the service takes to generate the sample maps in order to estimate the time to generate the whole map.
– A more complex test may compare the SM in the map that stores the history of landslides with the SM generated by the web-service to find out if the generated SM is satisfactory. The web-service will provide only a sample of the map it is able to generate.
19© LES/PUC-Rio
Case Study: Creation of Susceptibility Maps (V/VI)
20© LES/PUC-Rio © LES/PUC-Rio
Case Study: Creation of Susceptibility Maps (VI/VI)
BR-101 – Rio-Santos
Niterói, April 2010 Morin, Petrópolis, December 2002
21© LES/PUC-Rio
Conclusion and Future Works
• JAAF+T extended JAAF in order to implement the self-test concept.
• Extend the framework, such as how the concept of self-tests can be applied to systems governed by norms.
• When agents perform self-adaptation, such adaptations can reflect in the violation of norms defined in the environment.
• Questions:– Which tests can be used to check the possibility of occurring
such violations?
– If violations happen, which type of decision should be taken by the agent?
The End