This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Compile-Time and Runtime Analysis of Active Behaviors
May/June 1998 (vol. 10 no. 3)
pp. 353-370

Abstract—Active rules may interact in complex and sometimes unpredictable ways, thus possibly yielding infinite rule executions by triggering each other indefinitely. This paper presents analysis techniques focused on detecting termination of rule execution. We describe an approach which combines static analysis of a rule set at compile-time and detection of endless loops during rule processing at runtime. The compile-time analysis technique is based on the distinction between mutual triggering and mutual activation of rules. This distinction motivates the introduction of two graphs defining rule interaction, called Triggering and Activation Graphs, respectively. This analysis technique allows us to identify reactive behaviors which are guaranteed to terminate and reactive behaviors which may lead to infinite rule processing. When termination cannot be guaranteed at compile-time, it is crucial to detect infinite rule executions at runtime. We propose a technique for identifying loops which is based on recognizing that a given situation has already occurred in the past and, therefore, will occur an infinite number of times in the future. This technique is potentially very expensive, therefore, we explain how it can be implemented in practice with limited computational effort. A particular use of this technique allows us to develop cycle monitors, which check that critical rule sequences, detected at compile time, do not repeat forever. We bridge compile-time analysis to runtime monitoring by showing techniques, based on the result of rule analysis, for the identification of rule sets that can be independently monitored and for the optimal selection of cycle monitors.

[1] R. Agrawal, R. Cochrane, and B.G. Lindsay, “On Maintaining Priorities in a Production Rule System,” Proc. VLDB Conf., pp. 479-487, 1991.
[2] A. Aiken, J.M. Hellerstein, and J. Widom, “Static Analysis Techniques for Predicting the Behavior of Active Database Rules,” ACM Trans. Database Systems (ACM TODS), vol. 20, no. 1, pp. 3-41, 1995.
[3] E. Baralis, S. Ceri, and S. Paraboschi, "Declarative Specification of Constraint Maintenance," Proc. 13th Int'l Conf. Entity-Relationship Approach—ER '94, P. Loucopoulos, ed., Lecture Notes in Computer Science, vol. 881, pp. 205-222,Manchester, U.K. Berlin: Springer-Verlag, Dec. 1994.
[4] E. Baralis, S. Ceri, and S. Paraboschi, “Improved Rule Analysis by Means of Triggered and Activation Graphs,” Proc. Rule in Database Systems: Second Int'l Workshop, (RIDS '95), pp. 165-181, Sept. 1995.
[5] E. Baralis, S. Ceri, and S. Paraboshi, “Runtime Detection of Non-Terminating Active Rule Systems,” Proc. Fourth Int'l Conf. Deductive and Object-Oriented Databases, T.W. Ling, A.O. Mendelzon, and L. Vieille eds., pp. 38-54, Dec. 1995.
[6] E. Baralis, S. Ceri, and S. Paraboschi, “Modularization Techniques for Active Rules Design,” Trans. Database Systems, vol. 21, no.1, pp. 1-29, 1996.
[7] E. Baralis, S. Ceri, and J. Widom, "Better Termination Analysis for Active Databases," Proc. First Workshop Rules in Database Systems, WICS, N.W. Paton and M.H. Williams, eds., pp. 163-179,Edinburgh, U.K. Berlin: Springer-Verlag, Aug. 1993.
[8] E. Baralis and J. Widom, “An Algebraic Approach to Rule Analysis in Expert Database Systems,” Proc. 20th Int'l Conf. Very Large Data Bases, pp. 475-485, Sept. 1994.
[9] E. Baralis and J. Widom, "Better Static Analysis for Active Database Systems," submitted for publication, 1996.
[10] E. Banazet, H. Guehl, and M. Bouzeghoub, “VITAL: A Visual Tool for Analysis of Rule Behavior in Active Databases,” Rules in Database Systems, pp. 182-196, 1995.
[11] L. Brownston,R. Farrell,E. Kant, and N. Martin,Programming Expert Systems in OPS5 An Introduction to Rule-Based Programming. Addison Wesley, 1985.
[12] S. Ceri, E. Baralis, P. Fraternali, and S. Paraboschi, "Design of Active Rule Applications: Issues and Approaches," Proc. Conf. Deductive and Object-Oriented Databases, DOOD '95, Lecture Notes in Computer Science, vol. 1,013, Singapore, Dec.1-18 1995.
[13] S. Ceri, P. Fraternali, S. Paraborchi, and L. Tanca, “Automatic Generation of Production Rules for Integrity Maintenance,” ACM Trans. Database Systems, vol. 19, no. 3, pp. 366-421, 1994.
[14] S. Ceri, P. Fraternali, S. Paraboschi, and L. Tanca, "Active Rule Management in Chimera," J. Widom and S. Ceri, Active Database Systems, pp. 151-176.San Mateo, Calif.: Morgan Kaufmann, 1996.
[15] S. Ceri,J. Widom,“Deriving production rules for constraint maintenance,” Proc. Int’l Conf. Very Large Data Bases, 1990.
[16] S. Ceri and J. Widom, "Managing Semantic Heterogeneity with Production Rules and Persistent Queues," Proc. 19th Int'l Conf. Very Large Data Bases, R. Agrawal, S. Baker, and D. Bell, eds., pp. 108-119,Dublin, Ireland, Aug. 1993.
[17] S. Ceri and J. Widom, "Deriving Incremental Production Rules for Deductive Data," Information Systems, vol. 19, no. 6, pp. 467-490, Nov. 1994.
[18] S. Chakaravarthy, Z. Tamizuddin, and J. Zhou, “A Visualization and Explanation Tool for Debugging ECA Rules in Active Databases,” Rules in Database Systems, pp. 197-209, 1995.
[19] D. Daniels, L. Boon Doo, A. Downing, C. Elsbernd, G. Hallmark, S. Jain, B. Jenkins, P. Lim, G. Smith, B. Souder, and J. Stamos, "Oracle's Symmetric Replication Technology and Implications for Application Design," Proc. ACM SIGMOD Int'l Conf. Management of Data, R.T. Snodgrass and M. Winslett, eds., p. 467,Minneapolis, Minn., May 1994.
[20] U. Dayal, M. Hsu, and R. Ladin, "Organizing Long-Running Activities with Triggers and Transactions," Proc. ACM SIGMOD Conf. Management of Data, 1990.
[21] O. Diaz, A. Jaime, and N. Paton, "DEAR: A Debugger for Active Rules in an Object-Oriented Context," Proc. First Workshop Rules in Database Systems, WICS, N.W. Paton and M.H. Williams, eds., pp. 180-193,Edinburgh, U.K. Berlin: Springer-Verlag, Aug. 1993.
[22] J. Gray and A. Reuter, Transaction Processing: Concepts and Techniques, Morgan Kauffman, 1993.
[23] E.N. Hanson,"Rule condition testing and action execution in Ariel," Proc. ACM SIGMOD Int'l Conf. Management of Data, pp. 49-58, June 1992.
[24] V. Harinarayan, A. Rajaraman, and J. D. Ullman, “Implementing Data Cubes Efficiently,” Proc. ACM SIGMOD, pp. 205-216, June 1996
[25] ISO-ANSI Working Draft: Database Language/SQL Foundation, Aug. 1994. Document DBL:RIO-004 and X3H2-94-329.
[26] H.V. Jagadish, A.O. Mendelzon, and I.S. Mumick, “Managing Conflicts Between Rules,” Proc. 15th ACM SIGACT/SIGMOD Symp. Principles of Database Systems, pp. 192-201, 1996.
[27] A.P. Karadimce and S.D. Urban, "Conditional Term Rewriting as a Formal Basis for Analysis of Active Database Rules," Proc. Fourth Int'l Workshop Research Issues in Data Eng., RIDE-ADS '94, pp. 156-162,Houston, Feb. 1994.
[28] R.M. Karp, "Reducibility Among Combinatorial Problems," Complexity of Computer Computations, R.E. Miller and J.W. Thatcher, ed. New York: Plenum Press, 1972.
[29] A.Y. Levy and Y. Sagiv, “Queries Independent of Updates,” Proc. Very Large Data Bases Conf., pp. 171-181, 1993.
[30] P. Loucopoulos, "Requirements Engineering: Conceptual Modeling and CASE Perspectives," Technical Report COMETT/FORMITT Course on Conceptual Modeling, Databases, and CASE, Lausanne, Switzerland, Oct. 1994.
[31] D. Montesi and R. Torlone, "A Rewriting Technique for the Analysis and the Optimization of Active Databases," Proc. Fifth Int'l Conf. Database Theory, pp. 238-251,Prague, Czech Republic, 1995.
[32] S. Paraboschi, "Automatic Rule Generation for Constraint and View Maintenance in Active Databases," PhD thesis, Politecnico di Milano, Dipartimento di Elettronica e Informazione, in Italian, Jan. 1994.
[33] W.W. Peterson and D.T. Brown, "Cyclic Codes for Error Detection," Proc. IRE, vol. 49, pp. 228-235, Jan. 1961.
[34] A.S. Tanenbaum, Computer Networks, third ed. Prentice Hall, 1996.
[35] H. Tsai and A.M.K. Cheng, "Termination Analysis of OPS5 Expert Systems," Proc. AAAI Nat'l Conf. Artificial Intelligence,Seattle, Wash., 1994.
[36] L. vander Voort and A. Siebes, “Termination and Confluence of Rule Execution,” Proc. Second Int'l Conf. Information and Knowledge Management, Nov. 1993.
[37] J. Widom, "Research Issues in Active Database Systems: Report from the Closing Panel at RIDE-ADS '94," SIGMOD Record, vol. 23, no. 3, pp. 41-43, Sept. 1994.
[38] J. Widom and S. Ceri, Active Database Systems.San Mateo, Calif.: Morgan Kaufmann, 1996.
[39] J. Widom and S.J. Finkelstein,"Set-oriented production rules in relational database systems," Proc. 1990 ACM SIGMOD Int'l Conf. Management of Data, pp. 259-270, 1990.

Index Terms:
Rule analysis, rule termination, rule debugging, active databases, production rules.
Citation:
Elena Baralis, Stefano Ceri, Stefano Paraboschi, "Compile-Time and Runtime Analysis of Active Behaviors," IEEE Transactions on Knowledge and Data Engineering, vol. 10, no. 3, pp. 353-370, May-June 1998, doi:10.1109/69.687973
Usage of this product signifies your acceptance of the Terms of Use.