Case based Reasoning Model using AI in Software Automation Systems

Download Full-Text PDF Cite this Publication

Text Only Version

Case based Reasoning Model using AI in Software Automation Systems

Nihar ranjan Hota

Computer Science & Engineering Einstein Academy of Technology & Management

Bhubaneswar, India

Sushree Sanibigrah

Computer Science & Engineering Einstein Academy of Technology & Management

Bhubaneswar, India

Abstract -Automated in software systems is an aspect that allows software system to independently adjust their features during execution time to keep satisfying systems objective. Thisadjustmentisperformed with less or without manpower. The motivation behind developing software automation systems is to enable the managed system to execute independently which reduces the cost of complexities caused by manual handling of maintenance. Effective software automation systems should handle all possible operating scenarios that dominants systems objective. This requires Adaptation Device that receives adaptation request during the monitoring process of the self-managed system and responds with the adequate adaptationresponse. InthisthesisCBRMSAS is presented which is a framework for building an external adaptation device for software automation systems that is built on Case Based Reasoning (CBR). CBR is an Artificial Intelligence (AI) branch deals with the idea of Homogeneous Problems have Heterogeneous Solutions (HPHS). CBRMSAS handles two of the challenging problems in software automation systems: (1) Managing unpredictable in the adaptation process (2) Managing the adaptation cost and (3) Managing the adaptation of t ime complexity efficiently. This paper presents an experiment illustrating how CBRMSAS is utilized along with Performance and evaluation that show a significant impact for execution time, adaptation Costand adaptation under unpredictable.

Keywords: Artificial Intelligence (AI), Homogeneous Problems Heterogeneous Solutions (HPHS), Case Based Reasoning Model Software Automation Systems (CBRMSAS).


    In Modern Era software plays a significant role in the regular activity which creates more challenges that are needed to be dissolved. Software engineering aim is to provide software of quality in term of service. One of the major challenges is to construct software with the ability of independent behaving during its execution time. Hence automated in software systems is the ability of a software system to adjust its behavior during execution time to preserve systems goals. This property indicates the presence of adaptation mechanism in order to do the logic of Software Automation system. Many solutions, including techniques, approaches and frameworks, exist in literature and practice to realize self-adaptive and automated system. Automated is required to handle software systems complexity, unpredictable and costs

    1. and enable these systems to run independently. This requires reducing the human interference as much as possible which represents a challenge in the development process of Software Automation Systems particularity when the operating states and configurations of the managed system are relatively big. Many challenges exist in the area of Software Automation System and many contributions exist in the literature to handle these

      challenges. However these contributions lack the flexible and dynamic adaptation from three perspectives:

      • Automated responsible unit: There is no clear difference between the self managed system, the system intended to behave adaptively, and the adaptation

        Engine. This increases the complexity and maintenance of the development of Software Automation system and limits the transferability of the work done for one application to another applications and domains.

      • Uncertainty handling: Unpredictable is a challenge that exists not only in Software Automation System but also in the entire software engineering applications.

        Therefore handling uncertainty is considered crucial issue in constructing Software Automation System unpredictable hinders the adaptation process if it is not handled and diminished.

      • Automated space: The mile stone of Software Automation System is to provide an adaptation to be applied on the managed system during execution time. The adaptation process raises a performance challenge if the automated space is

    Relatively high then it requires new adaptations. This challenge needs an efficient mechanism to deal with this adaptation space for a high level of performance satisfactory.



    This thesis is intended to develop and validate CBRMSAS, a framework for an external adaptation engine for Software Automation System, which solves the above said problems together. in addition to provide the functionality of Case-Based Reasoning Model Software Automation Systems, CBRMSAS is used to (1) handle unpredictable that appears in the adaptation process which hinders the Performance of the adaptation process, (2) enhance the efficiency of adaptation process particularly efficiency problems due to the huge number of operation states and configurations and (3) provide minimum response time of the adaptation engine (4) reduce the cost of performance and operations.

    A system that intended to extend to a Software Automation System and is separated from the external automated engine. CBRMSAS requires monitoring the managed system behavior so that it can detect any gap from systems goals. In case that the display unit detects a violation in the self managed systems goals, an adaptation request is received and transfer to the adaptation engine which is modeled in this thesis as Case Based Reasoning Model(CBRM) engine. The self adaptation engine responds to this self adaptation request with appropriate self adaptation response that rescues the automated system from its violating one state to another state that keeps satisfying whole systems goal. Performer tasks is to apply the self adaptation response on the self managed system.

    about: (1) Software Automation Systems, (2) Application of Artificial Intelligence (3) unpredictable in Software Automation Systems and (4) Case Based Reasoning Model. In Chapter 3, some related work and how researchers solve self-automated challenges accompany with extensive evaluation for their work and relate it to CBRM. This chapter also defines the problem statement of this thesis. Chapter 4 contains details about the proposed solution. It also contains a motivating example used for explanation and for the experiment. Chapter 5 is dedicated for the implementation of CBRM Chapter 6 describes the experiment settings used to evaluate CBRMSAS. Furthermore Chapter 7 provides a conclusion of the thesis and discusses the merits and benefits of CBRMSAS.


    This thesis aim is to provide a trustfully effective empirically validated external automation engine that can be utilized in the realization of software automation system. The outcome of this research should overcome the problems in the existing solutions in realizing Automated in software systems. In order to accomplish this Goal, the research in this thesis follows the following research method steps:

    1. Problem statement: The first step in this research is to identify the problem this thesis is solving. This task is carried out by literature review of the existing solution and inspecting their limitation. The outcome of this step is a clear and specific problem statement.

    2. Problem Solution: During this step a problem solution is synthesized in order to build an external automation engine that ovrcomes the problems defined in the problem statement. This step involves an implementation of the problem solution i.e. the proposed external automation engine in order to test and validate it.

    3. Experimental Method: This step aims to validate the external automation engine resulted from the problem solution step of the research method. The test and validation of the proposed solution is performed through an empirical method. The empirical method is conducted as experiment with validation features on a motivating example illustrating the usefulness of this solution. The results of


    Software quality is considered the basic motivation in software engineering field. In order to provide a software system with an accepted quality, some quality attributes should be preserved. Software Automation Systems is a quality attribute that contributes in reducing the cost of handling the complexities of software systems [34] and reduces the required amount of maintenance which reduces the human interference. Most of the work in the area of self-adaptive software engineering agrees that Software Automation Systems are systems that can change its behavior during runtime while preserving software systems goals. So as to develop a Software Automation Systems, many questions should be answered for example, Wh- questions to be adapt [34]. Answering these questions is the main challenge during the development of a Software Automation Systems and characterizes the behavior of the system and the interaction among its components.

    Generally, adaptation mechanism goes through four processes [34] as shown in








    these steps provide the software engineering




    empirical evidence for the validation of this research.

    A. Thesis outline

    The rest of this thesis is organized as follow: Chapter

    2 provides the relative information for the reader to fundamental concept and understanding of the context of this thesis. It also contains the used methodology for the proposed solution. This chapter includes information

    Figure 1:Unpredictable in Software

    Automation Systems

    In self-adaptive software systems, uncertainty is a crucial challenge. This is because the behavior of the system during run-time will be determined by the system itself. So, the system should behave correctly and should not dissent the functional and non- functional

    requirements after the adaptation has been performed. In self-adaptive software systems, the possibility of uncertainties may increase as the adaptation engine decisions will face some uncertainties in both reading the systems parameters and in judging the right adaptation decision.

    Based on [41] uncertainty has three dimensions:

    1. The Location of uncertainty: Where the uncertainty manifests in the system.

    2. The Level of uncertainty: A variation between deterministic level and total ignorance. This means that uncertainty about one attribute of the system can take a value between one and zero [32].

    3. The Nature of uncertainty: Whether the cause of uncertainty is variability or lack of knowledge in the uncertainty meant attribute of the system.

      Uncertainty in self-adaptive software systems falls into two categories [17]:

      1. Internal Uncertainty: This type of uncertainty is a consequence of internal models of the system and adaptation engine. This means that uncertainty is resulted from the system itself including the managed system and/or the adaptation engine.

      2. External Uncertainty: This type of uncertainty is a consequence of the environ- ment that encompasses the self-adaptive software system.

    I see both of external and internal uncertainty related to each other as the external uncertainty contributes in raising the level of internal uncertainty. This is because when the system reads some parameters from the external environment that holds uncertain readings, this uncertainty will be transferred to the internal model, e.g. the adaptation engine hence the internal uncertainty will grow. For example, if a robot system has some sensors for detecting obstacles in the surrounding area then this attribute, obstacle existence, represents an external source of uncertainty because the robot may fail to provide accurate readings to indicate if certainly there is an obstacle or not in the environment. This external uncertainty is reflected on the robot and contributes in an internal uncertainty., Case-based Reasoning

    In this section I will talk about case-based reasoning (CBR) and provide enough details for the reader about it. Section 2.3.1 provides a quick overview about CBR. Section 2.3.2 gives detailed information about CBR life cycle.


    Case-Based Reasoning (CBR) is a branch of artificial intelligence. CBR can be seen as a machine learning approach [38, 37] that is build on the idea of human way of solving problems i.e. as similar problems have similar solutions [5]. CBR

    is established on strong mathematical foundations

    1. like similarity measures which is the backbone of CBR. Any CBR system has a knowledge base that contains cases representing the knowledge of the modelled system. Each case is a pair of a problem and a solution. For any new problem, CBR systems retrieve the relevant cases from the knowledge base which contains cases, then reuse and adapt them for application on the new problem. If the adaptation and reuse phase produces new cases then they are retained in the knowledge base for later reuse. This process represents the learning mechanism, as learning is performed in CBR via retaining new cases. In the following section we will elucidate CBR working mechanism and its fundamentals.


    Some criteria were used in the search process in order to include the work in the related work. These criteria includes:

      • Three libraries were searched for the related work to the self-adaptive soft-

        ware system adaptation engine. The libraries are (1) ACM (2) IEEE and (3) SpringerLink.

      • The modularity and the maturity of the self- adaptive software system construc- tion in the related work. Adaptation engine has to be included in the work

    either explicitly or implicitly as the idea of this thesis is to build an external adaptation engine.


During the last decade, the body of literature in the area of self-adaptivity has provided many of frameworks, approaches and technologies that enhance self-adaptivity. This work is widespread in many solution areas. In the following sections I will present the related work categorized according to the mechanisms used to support self-adaptivity.

Proposed Solution

Motivating example

This section describes a motivating example used for both explaining the solution idea of this thesis and for the validation and experimentation of CBRMSAS. In the following subsections I will describe the a robot that needed to be self-adaptive along with its requirements and utility function realization.

Robot system

CBRMSAS is utilized to receive an adaptation requests and to provide adaptation re sponses to be applied on managed system. In order to validate and test CBRMSAS, I chose a robot as a managed system that demands a self- adaptive behaviour dur ing runtime. The idea of the robot is derived from [17] .

Table 4.1: Robot attribute data sheet

Table 1.

Algorithm 1 CBRMSAS AUTOMATED process

Require: KB , Areq

Ensure: Utility(Ares) > UT

1: List cases Retrieve (KB,Areq)

2: List qualifiedAdaptationFrame

3: Case Ares

4: while Case c Iterate(cases) do 5: if Sim(Areq,c) [1,] then

6: qualifiedAdaptationFrame.add(c)

7: end if

8: end while

9: if qualifiedAdaptationFrame is not Empty then

10: Ares


11: Return Ares

12: else

13: Ares ConstructiveAdapt(Areq)

14: Retain(Ares,KB)

15: Return Ares

16: end if

  1. CBRMSAS architecture

    This section describes a prototypical implementation of CBRMSAS framework. Fig- ure 5.1 shows the execution view of CBRMSASs architecture. In the following subsec- tions I will explain in more details the components included in that figure.

  2. Knowledge base modelling

Knowledge base can be modelled in many forms. Due to the selected case-base rea- soning implementation [2], the knowledge base is modelled as Tab Separated Values (TSV) file. This file hold the cases that are ready to be adaptation response. Fig- ure 5.2 illustrates how the knowledge base looks like. The cases in the knowledge

base can be defined by the domain expert in addition to the newly learned cases. In the experiment I will start from empty knowledge base.

Attribute Values

Communication {OFF, V HF, X band, UHF } Power Mode {Full Power, Medium Power, Saving Mode}


Indicator {Low, Medium, High} Speed {Low, Medium, High} Video

Figure 2.: CBRMSASs Architecture: Execution View

Experiment and Results

This chapter is intended to provide the experimental evaluation as proposed in the research method in Section 1.2. This chapter provides information about the vali- dation and evaluation of CBRMSAS in the light of the motivating example described in Section 4.1. This chapter starts with Section

6.1 that describes the experiment settings and continues with Section 6.2 that gives information about the derivation process of the metrics used for the evaluation and validation process. Section 6.3 embraces the results obtained form the experiment with extensive figures and infor- mation. This chapter ends with Section 6.4 that discuss

the experiments internal and external validly.

VI. EXPERIMENT SETUP The validation of CBRMSAS is done in

a binary validation paradigm. In order to validate CBRMSAS, an experiment is conducted based on the motivating example described in Section 4.1 and implemented as explained in Chapter 5. The experiment was performed under Windows 8 (x64) machine with 4 GB of RAM and CPU Intel CORE 2 Duo (P7750) 2.26 GHz.

  1. Design decisions

    CBRMSAS requires some configuration that needed to be set before working. These design decisions include:

    • Utility threshold is 0.5. Choosing this value give the chance to show

      CBRMSASs ability in providing adaptation with greater utility.

    • is 90% unless otherwise stated. This value is suitable to show how

      CBRMSAS construct cases and retrieve them from the knowledge base in the experiment.

    • First fit heuristic is used in the implementation of the prototype.

      This is the provided implementation by the this prototypical implementation.

    • In the experiment, CBRMSAS starts with empty knowledge base which

      enhances the validation of the generative adaptation process.

    • is 85% unless otherwise stated.

Experiment nature

In order to perform the experiment, CBRMSAS is subjected to seven successive runs. Each run contains 50 randomly generated adaptation requests as explained in Sec- tion 5.2. Seven runs were selected because they provide all important results and after that the results have insignificant effects


Within this master thesis I presented CBRMSAS, a framework for constructing an adaptation engine for self-adaptive software systems, which has some advantages over the existing solutions. The main contribution in this thesis was to provide an efficient adaptation mechanism that considers the number of possible adaptations along with uncertainty handling.

Before providing the information regarding how CBRMSAS works I provided some basic information for the reader to understand the context of the thesis. After that I provided the related work to this thesis then started explain the idea of CBRMSAS and how it works.


  1. An architectural blueprint for

    autonomic computing. http://www-

  2. Freecbr engine.

  3. Java development kit.

  4. Netbeans ide.

  5. A. Aamodt and E. Plaza. Case-based reasoning; foundational issues, methodolog- ical variations, and system approaches. AI COMMUNICATIONS, 7(1):3959, 1994.

  6. D. W. Aha. Case-based learning algorithms, 1991.

  7. S. Aksoy and R. M. Haralick. Probabilistic vs. geometric similarity measures for image retrieval. In IEEE Conf. Computer Vision and Pattern Recognition, 2000.

  8. R. Asadollahi, M. Salehie, and L. Tahvildari. Starmx: A framework for develop- ing self-managing java-based systems. pages 58 67, 2009.

  9. G. Bertolotti, A. Cristiani, R. Lombardi, M. Ribaric and, N. Tomas andevic and, and M. Stanojevic and. Self-adaptive prototype for seat adaption. In Self- Adaptive and Self-Organizing Systems Workshop (SASOW), 2010 Fourth IEEE International Conference on, pages 136 141, 2010.

  10. B. Bontchev, D. Vassileva, B. Chavkova, and V. Mitev. Architectural design of a software engine for adaptation control in the adopta e-learning platform. In Proceedings of the International Conference on Computer Systems and Tech- nologies and Workshop for PhD Students in Computing, CompSysTech 09, pages 24:124:6. ACM, 2009.

  11. V. Cardellini, E. Casalicchio, V. Grassi, F. Lo Presti, and R. Mirandola. Qos- driven runtime adaptation of service oriented architectures. In Proceedings of the the 7th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering, ESEC/FSE 09, pages 131140. ACM, 2009.

  12. S.-W. Cheng and D. Garlan. Handling uncertainty in autonomic systems, 2007.

  13. S.-W. Cheng, D. Garlan, and B. Schmerl. Architecture-based self-adaptation in the presence of multiple objectives. In Proceedings of the 2006 international workshop on Self-adaptation and self-managing systems, SEAMS 06, pages 28. ACM, 2006.

  14. M. Derakhshanmanesh, M. Amoui, G. OGrady, J. Ebert, and L. Tahvildari. Graf: graph-based runtime adaptation framework. In Proceedings of the 6th In- ternational Symposium on Software Engineering for Adaptive and Self-Managing Systems, SEAMS 11,

    pages 128137, 2011.

  15. S. Dobson, S. Denazis, A. Fern´andez, D. Ga¨ti, E. Gelenbe, F. Massacci, P. Nixon,

    F. Saffre, N. Schmidt, and F. Zambonelli. A survey of autonomic communica- tions. 2006.

  16. A. Elkhodary, N. Esfahani, and S. Malek. Fusion: a framework for engineering self-tuning self-adaptive software systems. In Proceedings of the eighteenth ACM SIGSOFT international symposium on Foundations of software engineering, FSE 10, pages 716, 2010.

  17. N. Esfahani, E. Kouroshfar, and S. Malek. Taming uncertainty in self-adaptive software. In Proceedings of the 19th ACM SIGSOFT symposium and the 13th European conference on Foundations of software engineering, ESEC/FSE 11, pages 234244, 2011.

  18. D. Garlan, S.-W. Cheng, A.-C. Huang, B. Schmerl, and P. Steenkiste. Rainbow: architecture-based self-adaptation with reusable infrastructure. pages 46 54, 2004.

  19. P. Guo, Q. Bao, and Q. Yin. Probabilistic similarity measures analysis for remote sensing image retrieval. Machine Learning and Cybernetics, 2006 International Conference, 2006.

  20. M.-H. Karray, C. Ghedira, and Z. Maamar. Towards a self-healing approach to sustain web services reliability. In AINA Workshops11, pages 267272, 2011.

  21. N. Khakpour, R. Khosravi, M Sirjani, and S. Jalili. Formal analysis of policy- based self-adaptive systems. In Proceedings of the 2010 ACM Symposium on Applied Computing, SAC 10, pages 2536 2543. ACM, 2010.

  22. D. Kim and S. Park. Reinforcement learning-based dynamic adaptation planning method for architecture-based self-managed software. In Software Engineering for Adaptive and Self-Managing Systems, 2009. SEAMS 09. ICSE Workshop on, pages 76 85, 2009.

  23. H. Liu, M. Parashar, and S. Member. Accord: A programming framework for autonomic applications. IEEE Transactions on Systems, Man and Cybernetics, Special Issue on Engineering Autonomic Systems, Editors: R. Sterritt and T. Bapty, IEEE Press, 36:341352, 2006.

  24. D. McSherry. Diversity-conscious retrieval. In Proceedings of the 6th European Conference on Advances in Case-Based Reasoning, ECCBR 02, pages 219233. Springer-Verlag, 2002.

  25. D. A. Menasc´e, J. M. Ewing, H. Gomaa, S. Malex, and J. a.

    P. Sousa. A framework for utility-based service oriented design in sassy. In Proceedings of the first joint WOSP/SIPEW international conference on Performance engineering, WOSP/SIPEW 10, pages 2736. ACM, 2010.

  26. A. Metzger. Towards accurate failure prediction for the proactive adaptation of service-oriented systems. In Proceedings of the 8th workshop on Assurances for self-adaptive systems, ASAS 11, pages 1823. ACM, 2011.

  27. B. Morin, O. Barais, J.-M. Jezequel, F. Fleurey, and A. Solberg. Models@ run.time to support dynamic adaptation. Computer, pages 44 51, 2009.

  28. N. C. Narendra and U. Bellur. A middleware for adaptive service orientation in pervasive computing environments. In Proceedings of the 5th International Workshop on Middleware for Service Oriented Computing, MW4SOC 10, pages 1926, 2010.

    V. Pareto. Cours deconomie politique. F. Rouge, Lausanne, 1896

  29. E. Plaza and J. L. Arcos. Constructive adaptation. In Proceedings of the 6th European Conference on Advances in Case-Based Reasoning, ECCBR 02, pages 306320, 2002.

  30. M. Richter and A. AAmodt. Case-based reasoning foundations:the knowledge engineering review. The Knowledge Engineering Review, Vol. 20:3, 203207, 2006.

  31. M. M. Richter and S. Wess. Similarity, uncertainty and case-based reasoning in patdex.

  32. M. Salehie and L. Tahvildari. A quality-driven approach to enable decision- making in self-adaptive software. In Software Engineering

    – Companion, 2007. ICSE 2007 Companion. 29th International Conference on, pages 103 104, may 2007.

  33. M. Salehie and L. Tahvildari. Self-adaptive software: Landscape and research challenges. ACM Transactions on Autonomous and Adaptive Systems (TAAS), 2009.

  34. M. A. S. Sallem and F. J. da Silva e Silva. Adapta: a framework for dynamic reconfiguration of distributed applications. In Proceedings of the 5th workshop on Adaptive and reflective middleware (ARM 06), ARM 06, 2006.

  35. J. W. Schaaf. Fish and shrink. a next step towards efficient case retrieval in large scaled case bases, 1996.

  36. A. Stahl. Learning similarity measures: A formal view based on a generalized cbr model. pages 507521. Springer, 2005.

  37. A. Sthal. Learning of Knowledge-Intensive Similarity Measures in Case-Based Reasoning. PhD thesis, 2003.

  38. R. van Solingen, V. Basili, G. Caldiera, and H. D. Rombach. Goal question metric (gqm) approach. In Encyclopedia of Software Engineering. John Wiley and Sons, Inc., 2002.

  39. T. Vogel and H. Giese. Adaptation and abstract runtime models. In Proceedings of the 2010 ICSE Workshop on Software Engineering for Adaptive and Self- Managing Systems, SEAMS 10, pages 39 48, New York, NY, USA, 2010.

Leave a Reply

Your email address will not be published. Required fields are marked *