Tuesday , October 23 2018

Active Program Analysis Using Rule-Based Modification and Aspectation

Seyed Morteza BABAMIR
Department of Computer Engineering, University of Kashan
Kashan, Iran

Abstract: Active programs behave based on occurrence of events and therefore they facilitate capturing events and states. The active system is a rule-based system and we use event-condition-action rules to show active rules. Thus, defining active behavior is facilitated by event-condition-action rules. An active system, forming a runtime environment, sets a trap to catch runtime events and then check them by the rules. The rules appear in form of event-condition-action. Exploiting active programs as event based environments and using event-condition-action rules are main contributions of our approach. In this paper, we propose a new approach based on a bipartite framework exploiting capabilities of active systems. We apply our approach to a classical Abstract Data Type (ADT), stack, and express how one can use an active environment for observance tracking the stack.

Keywords: Active system, event-condition-action rule, program modification, aspect-oriented.

>>Full text
CITE THIS PAPER AS:
Seyed Morteza BABAMIR, Active Program Analysis Using Rule-Based Modification and Aspectation, Studies in Informatics and Control, ISSN 1220-1766, vol. 20 (4), pp. 381-392, 2011.

1. Introduction

We could classify systems into two categories according to their behavior. First, transformational systems (e.g. compilers, data acquisition systems and etc.) that take input values, compute output values, and then are stopped. All inputs in transformational systems are ready when invoked and the outputs are produced after a certain computation period. These systems are generally passive, in the sense that user explicitly invokes them. Applications send requests for operations to be performed by the system and wait for the system to confirm and return any possible answers. Second, active systems whose action is based on occurrence of events, interacts with their environment continuously. Figures 1a and 1b show a transformational system and an active system.

a06f01a. A transformational system (all inputs ready)

a06f02b. An Active System continuously interacts with its environment

Figure 1. Transformational and active systems

Typical examples appear when the environment is a physical process (e.g., process control in industry, power plants; embedded systems in trains, aircrafts, traffic-light controller, etc). Almost most systems have some active components, because a system is not usually isolated from its environment. In addition, systems typically collaborate or interact with their environment. Therefore, a reactive behavior carries out such collaboration.

In contrast with transformational systems that are passive,active systems act based on occurrence of events. Accordingly, they are event driven and for verifying them one must monitor their reaction to the environment whenever an event occurs. The importance of active applications has increased in the recent years with the emergence of e-commerce applications such as stock market, business opportunities, and sale alerts, as well as systemmanagement applications, such as command and control applications. There are two types of active system, interactive and reactive. Interactive systems are those that permanently communicate with their environment, but at their own speed (e.g. operating systems, web server).

Reactive systems are those which react to their environment, but at speed of environment. The term reactive system was introduced by David Harel and Amir Pnueli [1] and is now commonly accepted to designate systems that permanently interact with their environment, and to distinguish them from transformational systems. In contrast with most interactive systems, reactive systems are generally deterministic: from an abstract point of view, the execution of a reactive system can be viewed as an infinite sequence of input/output vectors, where, at each step, the output values are completely determined by the past and present inputs.

The idea of active system is close to the active databases that were coined in [2] as meaning “a paradigm that combines aspects of both database and artificial intelligence technologies”. In [2] a mechanism for constraint maintenance was presented as a declarative representation for a set of related production rules in form of Condition-Action. In HiPAC [3, 4] a thorough specification was made of what different mechanisms are desirable in an Active Database Management System (ADBMS). Active rules are defined as rules, where the Event specifies when a rule should be triggered, the Condition is a query that is evaluated when the Event occurs, and the Action is executed when the Event occurs and the Condition is satisfied. Events can be seen as signals that inform that a change to data in the database has occurred, e.g. an update of a table. There are three rules: (1) immediate meaning the rule conditions are evaluated and the actions are executed immediately when the event occurred. A distinction was also made between whether the rule process takes place before or after some change in the database. (2) Deferred rule meaning the rule process is delayed until committing the transaction. (3) Casually Dependent Decoupled rule meaning any triggered action is executed in a separate sub-transaction that waits until the main transaction is committed. Decoupled rule process means that the sub-transaction is completely decoupled from the main transaction and commits regardless of the outcome of the main transaction.

Active systems are event driven ones where operations such as changes to data generate events that can be analyzed by active rules.

An active system can be invoked, not only by synchronous events that have been generated by users or application programs, but also by external asynchronous events such as changes of sensor values or time. For example, push technology, i.e., the ability of sending relevant information to clients in reaction to new events, is a fundamental aspect of modern information systems [5, 6]. One important aspect of Internet-based information systems is the ability of pushing information to clients, by matching new event occurrences with predefined user’s interests. Such ability is embedded within many WEB development products and applications, which support one-to-one information delivery in response to users’ current and past interactions. Active rules are an important ingredient for supporting this reactive technology.

The remainder of the paper is organized as follows. Section 2 explains active rule and their roles in an active system. Section 3 explains necessity of runtime analysis. Because a controlled program should be well aware of events, Section 4 deals with program awareness by program modification and aspectation facility. Section 5 explains how the control and controlled programs interrelate. Section 6 states some known analysis approaches. Section 7 proposes: (1) a bipartite model for analysis of environment, i.e. the program that should be analyzed and (2) transformation of passive environment to active one. Section 8 proposes case study “stack” as an abstract data type and verify its required properties and applies the steps of the proposed approach. Finally, Section 9 concludes major advantages of our approach.

REFERENCES

  1. HAREL, D., M. POLITI, Modeling Reactive Systems with Statecharts, McGraw-Hill, 1998.
  2. MORGENSTERN, M., Active Databases as a Paradigm Enhanced Computing Environments, Proceedings of the 9th VLDB Conference, Florence, Nov. 1983.
  3. PATON, N. W., O. DÍAZ, Active Database Systems, ACM Computing Surveys, vol. 31(1), 1999, pp. 63-103.
  4. WIDOM, J., S. CERI, Active Database Systems-triggers and Rules for Advanced Database Processing, Morgan Kaufmann Publishers, Inc. , 1996, ISBN-1-55860-304-2.
  5. DENG, X., Application of Information Push Technology in Residential Building Performance Assessment System, in Proceedings of 8th World Congress on Intelligent Control and Automation (WCICA), 2010, pp. 3965-3968.
  6. SUN, J., H. FANG, G. WANG, Z. HE, Information Push Technology and Its Application in Network Control System, in Proceedings of the International Conference of Computer Science and Software Engineering, 2008, pp. 198-201.
  7. WIDOM J., S. CERI, Active Database Systems, Morgan-Kaufmann, San Mateo, California, 1995.
  8. CHEUNG, A. K. Y., H. A. JACOBSEN, Load Balancing Content-Based Publish / Subscribe Systems, ACM Transactions on Computer Systems (TOCS), vol. 28(4), December 2010.
  9. BRY, F., M. ECKERT, P. PATRANJAN, I. ROMANENKO, Realizing Business Processes with ECA Rules: Benefits, Challenges, Limits, in Proceedings of International Workshop on Principles and Practice of Semantic Web Reasoning, Lecture Notes in Computer Science, vol. 4187, 2006, pp. 48-62.
  10. TERADA, T., M. TSUKAMOTO, S. NISHIO, Dynamic Construction Mechanism of a Trigger Graph on Active Databases in Mobile Computing Environments, in Proceedings of the 14th International Workshop on Database and Expert Systems Applications, IEEE Computer Society Washington, DC, USA, 2003, pp. 936-941.
  11. SHANKAR, C., R. CAMPBELL, A Policy-based Management Framework for Pervasive Systems using Axiomatized Rule-actions, in Proceedings of the 4th of IEEE International Symposium on Network Computing and Applications, IEEE Computer Society Washington, DC, USA, 2005.
  12. BARALIS, E., S. CERI, S. PARABOSCHI, Improved Rule Analysis by Means of Triggering and Activation Graphs, Second International Workshop on Rules in Database Systems (RIDS-95), Athens, LNCS 985, Springer, 1995, pp. 165-181.
  13. Analysis, Design and Programming Language, Information technology-Eiffel: ISO/IEC 2543, 2006.
  14. HAMANI, N., N. DANGOUMAU, E. CRAYE, Specification and Verification of the Model of Component and the Model of Function, Studies in Informatics and Control, vol. 17(1), 2008.
  15. GOLDSBY, H. J., B. H. C. CHENG, J. ZHANG, AMOEBA-RT: Run-time Verification of Adaptive Software, Software Engineering Models in Software Engineering, in Proceedings of Workshops and Symposia at MoDELS, Lecture Notes in Computer Science, vol. 5002, 2008, pp. 212-224.
  16. CILIA, M., M. HAUPT, M. MEZINI, A. BUCHMANN, The Convergence of AOP and Active Databases: Towards Reactive Middleware, in Proceedings of the International Conference on Generative Programming and Component Engineering (GPEC’03), Lecture Notes In Computer Science, Springer, 2830, 2003, pp. 169-188.
  17. TONG, J. G., M. BOULE, Z. ZILIC, Defining and Providing Coverage for Assertion-based Dynamic Verification, Journal of Electronic Testing: Theory and Applications, Kluwer Academic Publishers, vol. 26(2), 2010, pp. 211-225.
  18. AUGUSTON, M., M. TRAKHTENBROT, Run-time Monitoring of Reactive System Models, The 2nd International Workshop on Dynamic Analysis (WODA), Edinburgh, 25 May 2004.
  19. KIM, M., I. LEE, U. SAMMAPUN, J. SHIN, O. SOKOLSKY, Monitoring, Checking and Steering Real-time Systems, in Proceedings of the 2nd International Workshop on Run-time Verification, July 2002.
  20. SAHOO, S. K., L. MAN-LAP, P. RAMACHANDRAN, S. V. ADVE, Z. YUANYUAN, Using Likely Program Invariants to Detect Hardware Errors, in Proceedings of IEEE International Conference on Dependable Systems and Networks with FTCS and DCC, 2008, pp. 70-79.
  21. M’HALLA, A., S. C. DUTILLEUL, E. CRAYE, M. BENREJEB, Monitoring of a Milk Manufacturing Workshop Using Chronicle and Fault Tree Approaches, Studies in Informatics and Control, vol. 19(4), 2010.

https://doi.org/10.24846/v20i4y201106