jaaf+t: a framework to implement self- adaptive agents that apply self-test andrew diniz da costa...

22
JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa [email protected]

Upload: bathsheba-booth

Post on 25-Dec-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

JAAF+T: A Framework to Implement Self-Adaptive Agents that Apply Self-Test

Andrew Diniz da Costa

[email protected]

Page 2: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

2© LES/PUC-Rio

Outline

• Motivation

• Related Works

• JAAF+T

• Case Study: Creation of Susceptibility Maps

• Conclusion and Future Works

Page 3: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

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.

Page 4: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

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.

Page 5: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

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.

Page 6: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

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.

Page 7: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

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.

Page 8: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

8© LES/PUC-Rio

Default Control Loop

IBM, An architectural blueprint for autonomic computing. Technical Report., IBM, 2003.

Page 9: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

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.

Page 10: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

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.

Page 11: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

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

Page 12: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

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/

Page 13: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

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.

Page 14: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

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

Page 15: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

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.

Page 16: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

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.

Page 17: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

17© LES/PUC-Rio

Case Study: Creation of Susceptibility Maps (III/VI)

Page 18: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

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.

Page 19: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

19© LES/PUC-Rio

Case Study: Creation of Susceptibility Maps (V/VI)

Page 20: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

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

Page 21: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

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?

Page 22: JAAF+T: A Framework to Implement Self- Adaptive Agents that Apply Self-Test Andrew Diniz da Costa acosta@inf.puc-rio.br

The End