<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Static Analysis of Complex Event Processing Programs</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Loli Burgueño</string-name>
          <email>loli@lcc.uma.es</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Antonio Vallecillo</string-name>
          <email>av@lcc.uma.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Adrián García-López</string-name>
          <email>agl@lcc.uma.es</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Universidad de Málaga</institution>
          ,
          <country country="ES">Spain</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Universidad de Málaga</institution>
          ,
          <country country="ES">Spain</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Universidad de Málaga</institution>
          ,
          <addr-line>Spain, UOC, Barcelona, Spain, CEA-List, Paris</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <abstract>
        <p>Complex Event Processing (CEP) provides a mechanism to eficiently correlate and infer conclusions about systems by means of analyzing the events they process. In areas such as the Internet of Things (IoT), Cyber Physical Systems (CPS), system monitoring or data streaming analytics, CEP is able to read events from a data stream and to generate complex events that represent situations of interest to the system owner by means of event patterns. Every time a sequence of events matches a pattern, a complex event is created and added to the data stream. The dependencies among the rules and the possibility of non-confluent behavior of CEP rulebased systems may lead to unexpected outputs when executing CEP programs. In this work, we show how to statically check and correct two particular properties of CEP systems: rule acyclicity and rule race conditions. We use Esper EPL as a CEP language, and present a tool we have developed to perform these analyses.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>Domains such as Internet of Things (IoT), Cyber-Physical Systems
(CPS), social networks, or system monitoring, generate gigabytes
of data every second. In order to take advantage of that situation,
approaches for data analytics have arisen and are used to extract
useful information and knowledge from it.</p>
      <p>
        Complex Event Processing (CEP) [
        <xref ref-type="bibr" rid="ref15 ref9">9, 15</xref>
        ] addresses the issue of
analyzing a specific kind of data: events about facts or situations
occurring in real-time. CEP systems deal with the tasks of
processing streams of events and the identification of significant patterns
by means of techniques such as detection of relationships among
events, event correlation, and aspects such as causality and timing.
      </p>
      <p>CEP systems are developed using Event Pattern Languages (EPL),
which are normally rule-based languages that define rules for each
pattern. Patterns are triggered when their matching conditions are
met (e.g., the relevant source event occurs) and are in charge of
generating the resulting complex events.</p>
      <p>As with any other rule-based language, CEP programs are easy
to develop and very eficient when they are composed of a small
set of rules. However, as the number of patterns (rules) grow, the
complexity of CEP programs becomes unmanageable, their
behavior can be unpredictable, and checking their correctness becomes a
very dificult task.</p>
      <p>In this work, we present a tool for the static analysis of CEP
programs, which addresses the issues of detecting and fixing acyclicity
and rule race conditions. This static analyses help improve and
maintain the code quality and give developers immediate feedback
in the early development phases of the CEP software system.</p>
      <p>The rest of the paper is structured as follows. First, Section 2
presents the background of our work. Then, we present our main
contribution in Section 3, and our tool in Section 4. Section 5
discusses a validation exercise we have used to evaluate our approach,
using a real CEP application. Finally, Section 6 compares our
approach with other related works, and Section 7 concludes and
outlines our future lines of work.
2</p>
    </sec>
    <sec id="sec-2">
      <title>BACKGROUND</title>
      <p>
        Complex Event Processing ofers a form of data processing [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]
that aims at defining and detecting situations of interest, from the
analysis of low-level event notifications [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>
        There are two types of events in a CEP system: simple events,
which contain the information received by the sensors; and complex
events, which are generated by the CEP system and inserted into
the data stream [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Each event has a type and a set of attributes
associated. CEP programs are composed of sets of patterns that
analyze and match sequences of events (both simple and complex)
taking into account their content and temporal relations. Each time
a match occurs, a complex event is created.
      </p>
      <p>
        Although several CEP systems and languages exist, they all share
the same basic concepts, mechanisms and structure. In this paper
we write the rules in one particular EPL, called Esper EPL [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
2.1
      </p>
    </sec>
    <sec id="sec-3">
      <title>CEP by example</title>
      <p>
        In order to explain CEP and to illustrate our proposal, we will use
the Smart House case study we introduced in [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]. In this system,
a house contains a set of devices and services that cooperate to
simplify the lives of its residents.
      </p>
      <p>For the particular case of ensuring security in situations of fire,
we know that when a fire starts, the temperature increases at a
rate higher than a given value; and carbon monoxide (CO), which
weights less than air, increases and accumulates in the ceiling. For
this reason, temperature and carbon monoxide (CO) sensors have
been installed in the ceiling. They record the absolute value of the
temperature and CO in their respective position every second and
send signals to the central system.</p>
      <p>In case of fire, another key aspect is to determine whether or not
someone is at home. For this purpose, our system uses the mobile
phones of its occupants as motion detectors that inform of their
geographical coordinates at all times.</p>
      <p>Using the measurements produced by these sensors, and using
Esper EPL, we have defined the set of CEP rules that we show in
Listing 1. Lines 1–3 show the types of the simple events, in the form
of templates that specify their name and attributes. In this example,</p>
      <p>Listing 1: Esper EPL patterns for the Smart House
1 create schema Home ( id i n t , ts i n t , x i n t , y i n t , sqre i n t ,
2 temp i n t , co i n t , dopen boolean ) ;
3 create schema Person ( pid i n t , ts i n t , x i n t , y i n t ) ;
4
5 @Name( " TempIncrease " )
6 i n s e r t into TempIncrease
7 s e l e c t h2 . ts as ts , h1 . id as id , h2 . temp as temp ,
8 h2 . temp−h1 . temp as incr
9 from pattern [ ( every ( h1 = Home ( ) −&gt;
10 h2=Home ( h2 . temp−h1 . temp &gt;=2 and h2 . id=h1 . id ) ) )
11 where timer : within ( 1 minutes ) ] ;
12
13 @Name( " TempWarning " )
14 i n s e r t into TempWarning
15 s e l e c t t4 . ts as ts t1 . id as id , t4 . temp
16 from pattern [ ( every ( t1 = TempIncrease ( t1 . temp &gt;= 3 3 ) )
17 −&gt; ( t2 = TempIncrease ( t2 . temp &gt; t1 . temp and t2 . id = t1 . id ) )
18 −&gt; ( t3 = TempIncrease ( t3 . temp &gt; t2 . temp and t3 . id = t1 . id ) )
19 −&gt; ( t4 = TempIncrease ( t4 . temp &gt; t3 . temp and t4 . id = t1 . id ) ) )
20 where timer : within ( 5 minutes ) ] ;
21
22 @Name( " COHigh " )
23 i n s e r t into COHigh
24 s e l e c t h1 . ts as ts , h1 . id as id
25 from pattern [ ( every ( h1 = Home ( h1 . co &gt;= 5 0 0 0 ) ) ) ] ;
26
27 @Name( " FireWarning " )
28 i n s e r t into FireWarning
29 s e l e c t tw . id as id , coh . ts as ts
30 from pattern [ ( every ( coh = COHigh ( ) ) −&gt;
31 every ( tw = TempWarning ( tw . id = coh . id ) ) )
32 where timer : within ( 5 seconds ) ] ;
33
34 @Name( " NobodyHome " )
35 i n s e r t into NobodyHome
36 s e l e c t p . ts as ts , h . x as x , h . y as y , h . id as id
37 from pattern [ ( every h =Home ( not dopen ) −&gt; every ( p=Person (
38 ( p . x &lt;= ( h . x − Math . sqrt ( h . sqre ) / 4 ) ) or
39 ( p . x &gt;= ( h . x + Math . sqrt ( h . sqre ) / 4 ) ) or
40 ( p . y &lt;= ( h . y − Math . sqrt ( h . sqre ) / 4 ) ) or
41 ( p . y &gt;= ( h . y + Math . sqrt ( h . sqre ) / 4 ) ) ) ) )
42 where timer : within ( 3 seconds ) ] ;
43
44 @Name( " CallFireDepartment " )
45 i n s e r t into CallFireDepartment
46 s e l e c t fw . id as id , fw . ts as ts
47 from pattern [ ( every ( nh = NobodyHome ( ) ) −&gt;
48 fw = FireWarning ( fw . id = nh . id ) ) )
49 where timer : within ( 5 seconds ) ] ;
there are two types of simple events that serve as inputs to the CEP
program: Home and Person. Each Home event keeps information
of the house identifier, the event timestamp, the house location
given its geographical coordinates x and y, its size measured in
square meters, the temperature degrees and CO accumulated in the
environment and whether the main door is open or not. Regarding
the simple events of type Person, they are represented by a tuple
with information about the person identifier, her corresponding
geographical location given by its x and y coordinates, and the
timestamp in which the event is produced.</p>
      <p>Our example contains six event patterns. The pattern called
TempIncrease matches Home events in a time window of one minute
and checks whether the temperature of the house has increased
in 2 or more degrees. If so, it generates a complex event with the
same name. Similarly, the pattern COHigh creates a complex event
each time the sensors detect CO levels above 5000 ppm.</p>
      <p>Pattern TempWarning detects if four events of type TempIncrease
occur in a five-minute window where the first one starts from a
temperature equal to or greater than 33 degrees, and the rest of
them detect a temperature increase of two or more degrees.</p>
      <p>A FireWarning event is created every time an event of type
COHigh is detected, followed by another of type TempWarning,
everything within less than 5 seconds.</p>
      <p>A NobodyHome event is created from the primitive events Home
and Person when the main door of the house is closed and there is
nobody whose geographic coordinates are within the perimeter of
the house.</p>
      <p>Finally, pattern CallFireDepartment creates an event of the
same name when there is nobody at home and a fire warning has
been detected. In these cases, the central system must react and call
the fire department.</p>
      <p>In Esper EPL, as can be inferred from previous patterns, each
complex event created has a type and set of attributes indicated in
the select clause of the pattern.</p>
    </sec>
    <sec id="sec-4">
      <title>2.2 Problems with patterns</title>
      <p>Due to the nature of rule-based declarative languages such as Esper
EPL, their patterns (rules) could be executed in any order. Pattern
execution of course depends on the arrival of the events and thus
the event arrival would constrain the order in which patterns will
execute. However, CEP systems can generate complex events that
are added to the event stream, and there are rules that depend on
these complex events to produce further complex events. The order
in which these rules are triggered may have a significant efect on
the final output of the program. This makes the execution of CEP
programs non-deterministic and hard to maintain, test and debug.</p>
      <p>The two main source of problems we detect in this work are rule
acyclicity conditions and rule race conditions. Rule acyclicity takes
place, for instance, when a pattern A generates events of type a,
which are consumed by another pattern B, which at the same time
generates events of type b that are consumed by A.</p>
      <p>Rule race conditions occur when there are input-output
dependencies between rules in uncontrollable or non-deterministic
situations. In the case of CEP, rule race conditions happen when a
pattern consumes complex events that have not been produced by
the time it is being executed, but afterwards. Hence, the pattern
misses them and its match and execution never take place although
they should. For example, pattern A produces complex event a;
pattern B produces complex event b; and pattern C requires the
occurrence of the events a and b to produce the event c. What happens
if pattern C is checked before patterns A or B are triggered?</p>
    </sec>
    <sec id="sec-5">
      <title>3 STATIC ANALYSIS</title>
      <p>In order to address the problems presented in Section 2.2, we
represent CEP programs as directed graphs where the patterns are nodes
and the dependencies between patterns are the graph edges. Note
that two patterns can generate the same complex event. In the case
that that complex event is consumed by a third pattern, this third
pattern has dependencies with the two former patterns.
Person</p>
      <p>Home
NobodyHome</p>
      <p>TempIncrease
Home</p>
      <p>Person
TempIncrease</p>
      <p>NobodyHome
TempWarning</p>
      <p>COHigh
COHigh</p>
      <p>TempWarning</p>
      <p>FireWarning
CallFireDepartment</p>
    </sec>
    <sec id="sec-6">
      <title>Rule acyclicity detection</title>
      <p>Rule acyclicity is not a problem in itself but it can cause problems,
such as infinite loops that flood the system with useless events.
Thus, we decided to detect those cycles and inform the engineer
about them.</p>
      <p>
        First of all, we build the graph corresponding to the Esper EPL
code. As mentioned before, a node is created for each pattern. Edges
are created as follows. For each pattern R, we analyze its from
pattern to detect the events involved in its matching phase, track
the patterns in which these events are produced, and create an edge
in the graph associating the pattern R with each one with which it
has dependencies. In a second step, once the dependency graph is
built, we apply the Kosaraju-Sharir algorithm [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ] to detect cycles.
      </p>
      <p>Imagine that due to copy-paste, the code of our example
contains errors. Imagine that the rule TempIncrease stated in its from
pattern that depends on FireWarning events, and the COHigh rule
consumed its own events. The generated graph following our
approach would be the one presented in Figure 1. Note how cycles
are depicted in red to catch the engineer’s attention.
3.2</p>
    </sec>
    <sec id="sec-7">
      <title>Rule race detection and solving</title>
      <p>In Esper EPL, priorities can be assigned to patterns by using the
label @Priority(n) where n is a non-negative integer. By default, if
the priority is not specified, the CEP engine assumes that the pattern
has the highest priority, which is 0. Users may assign priorities to
rules in order to avoid the rule race conditions described in Sect. 2.2.</p>
      <p>The lack of priority assignation, or errors in their assignments,
can lead to race conditions between patterns—specially those that
consume complex events. In order to detect these conditions, we
also rely on the graph representation of the Esper EPL programs.</p>
      <p>Firstly, the acyclicity analysis has to be performed. If it detects
cycles, we cannot make any conclusion about the correctness of
the priorities. On the contrary, if the graph does not contain cycles,
we are able to generate the priority of each node given their
dependencies. In order to do so, we make use of the graph topological
order of their nodes. The priority of each node is the maximum of
the priorities of its predecessors plus one.</p>
      <p>FireWarning</p>
      <p>CallFireDepartment</p>
      <p>Once we calculate the priority that each pattern should have, we
compare them with the priorities assigned by the user. With the
result of the analysis we generate two files. One with the program
dependency graph that, when interpreted and visualized, shows in
red every node for which the priorities do not coincide, and one
with the Esper EPL code containing the same code as the original
ifle in which the priorities have been fixed.</p>
      <p>As an example, Figure 2 shows the graph generated from the code
in Listing 1. We can see how, due to the lack of priorities (which
the Esper engine assumes as priority 0), patterns TempWarning,
FireWarning and CallFireDepartment are suggested for review.
Listing 2 shows the excepts of the new generated Esper file in which
the right priorities are explicitly defined. In this context, right means
that the rule priorities ensure the correct order of triggering, in
order to avoid rule race conditions.
4</p>
    </sec>
    <sec id="sec-8">
      <title>THE CEPA TOOL</title>
      <p>We have created an Eclipse plug-in called CEPA1, 2 to give support
to our approach. We have used Xtext,3which allows the definition of
Domain-Specific Languages (DSL) and ofers a parser, typechecker
and compiler for free; and GEF, 4 which permits the integration of
the Graphviz5 tool for graph visualization within Eclipse.</p>
      <p>Using Xtext, we have defined a simplified grammar that parses
any valid Esper EPL program, and builds an Abstract Syntax Tree
(AST) that focuses only on the parts of interest needed to extract
the pattern dependencies. In this way, the AST only contains
information about the select and from pattern parts of the CEP
programs, ignoring the rest of the language syntax.</p>
      <p>Given the AST provided by Xtext, we have built a Java program
that creates a graph containing the primitive events and pattern
dependencies and perform the analyses mentioned in Section 3.</p>
      <p>If the acyclicity analysis detects cycles, we use the Xtend6 code
generator to automatically generate the textual code that represent
1https://github.com/Garlo13/CEPStaticAnalysis
2CEPA stands for CEP Analysis. Cepa is also the Spanish word for strain.
3https://www.eclipse.org/Xtext/
4https://www.eclipse.org/gef/
5http://www.graphviz.org/
6http://www.eclipse.org/xtend/</p>
      <p>Esper EPL
Program
Graphviz
Graph
Graphviz
Graph</p>
      <p>Parse Program
and create AST</p>
      <p>(Xtext)
Graphviz</p>
      <p>Graph
Generate
Graphviz No Race
Code Cond?
(Xtend)
Generate
Graphviz
Code
(Xtend)</p>
      <p>Yes
AND</p>
      <p>AST</p>
      <p>Create Graph</p>
      <p>(Java)
Generate Yes
Graphviz
Code
(Xtend)</p>
      <p>Cycles?</p>
      <p>No</p>
      <p>Perform Race
Condition Analysis</p>
      <p>(Java)
Generate Esper
EPL Program w/</p>
      <p>Priorities
(Xtend)</p>
      <p>Graph
Perform Acyclicity</p>
      <p>Analysis
(Java)
Esper EPL
Program
the pattern dependency graph showing the cycles with red arrows.
This graph is interpreted by Graphviz and shown to the user.</p>
      <p>In case the acyclicity analysis does not report the presence of
cycles, the race condition analysis is carried out. If rule race conditions
are detected, Xtend is used to generate two files: one containing
the Graphviz graph with the result of the analysis, and another one
with the Esper code with the right priority for each pattern. If no
rule race condition is detected, only one file is generated with the
Graphviz graph.</p>
      <p>For clarity, Figure 3 depicts the CEPA workflow diagram, with
the main steps of its internal behavior. For illustration purposes,
Figure 4 presents a screenshot of our tool, showing its graphical
interface to the user.
5</p>
    </sec>
    <sec id="sec-9">
      <title>VALIDATION</title>
      <p>
        In order to validate our approach, we used a real CEP application
that currently runs across the Andalusian region in southern Spain,
and controls the quality of the air in real time, using the index
proposed by the U.S. Environmental Protection Agency (EPA) [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ].
The raw data is obtained from the Andalusian Regional
Government’s sensor network, which is composed of 61 sensor stations.
Each station measures every 10 minutes six air pollutants: carbon
monoxide, ozone, nitrogen dioxide and sulfur dioxide. The EPA
proposes the analysis of these pollutant every 1, 8 or 24 hours and
express the results in a 6-grade scale, from Good to Hazardous.
      </p>
      <p>
        The definition of this CEP program 7, which is written in Esper
EPL [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], contains 43 patterns. The information about each pollutant
measurement is aggregated by one pattern, and other six patterns
per pollutant determine the air quality grade for it. This makes
seven patterns for every pollutant, and therefore the CEP program
uses 42 patterns to analyze the six pollutants of interest. A final
pattern, AirQualityLevel, calculates the global air quality level by
computing the maximum of the grades obtained for each pollutant.
      </p>
      <p>Interestingly, we discovered that, although there are no cycles in
this program, these 43 patterns sufered from rule race conditions
due to dependencies between the patterns. These dependencies may
cause that some patterns are triggered before the patterns on which
they depend, hence leading to erroneous results and conclusions
about the quality of the air in the region.</p>
      <p>Our tool was able to detect this error and to propose the
correct assignment of priorities to the application CEP patterns that
permitted solving the rule-race condition problem.
6</p>
    </sec>
    <sec id="sec-10">
      <title>RELATED WORK</title>
      <p>
        Rabinovich et al. [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] analyze the behavior of CEP applications
using static and dynamic techniques using formal methods. Cugola et
al. [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] transform the property checking task into a set of constraint
solving problems. Although these approaches ofer more kinds of
analyses than we do, for the ones we provide support, given the
exploratory nature of CSP solutions, their approaches are not as
eficient as ours.
      </p>
      <p>
        In the context of Active DBMSs [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ] there is a group of works
related to the analysis of rule-based reactive systems, including
confluence [
        <xref ref-type="bibr" rid="ref2 ref5">2, 5</xref>
        ], termination [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], and correctness [
        <xref ref-type="bibr" rid="ref11 ref14">11, 14</xref>
        ]. Our
work is similar to those, applied to the context of CEP systems.
      </p>
      <p>
        Race detection in event-driven systems have been previously
studied [
        <xref ref-type="bibr" rid="ref12 ref20">12, 20</xref>
        ]. The novelty of our approach is that here we deal
with race conditions between complex events generated by the CEP
rules, and therefore the order in which the rules are triggered has
efect on the final output of the program. This is not the same as
possible race conditions among the simple events that arrive to the
data stream.
      </p>
      <p>
        There are other works modeling CEP systems using Petri Nets.
An an example, Ahmad et al. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] model CEP applications using
Timed Net Condition Event Systems (TNCES), a formalism based
on Timed Petri Nets. This approach checks whether the system
satisfies certain properties or not. However, a simple EPL pattern
such as every (A -&gt; B), is transformed into a vast and hardly
readable TNCES model that is dificult to understand and debug.
7Available from http://atenea.lcc.uma.es/projects/FormalizingCEP.html
      </p>
      <p>
        Finally, some of the issues discussed here were identified in our
previous work [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. This paper reports on the tool we have developed
to implement the analyses hinted in that work, and how we have
realized it.
7
      </p>
    </sec>
    <sec id="sec-11">
      <title>CONCLUSIONS</title>
      <p>In this contribution, we present our approach to statically analyze
Esper EPL programs, and to automatically check two properties:
rule acyclicity and rule race conditions. Furthermore, when rule
race conditions are detected, we suggest how to repair the Esper
code to avoid non-confluence problems. We have built an Eclipse
tool, called CEPA, that ofers support for conducting such tests.</p>
      <p>
        In the future we plan to increase the list of analyses supported
by our tool, such as for example dead-end detection. Furthermore,
we would like to extend our current scope, by integrating into our
tool the dynamic analyses we explored in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Finally, although the
performance of the algorithm currently used for detecting cycles
in the graph is acceptable, we would also like to evaluate other
algorithms [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], in particular the one by Johnson [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
      </p>
      <p>Acknowledgements. We would like to thank the reviewers of this
paper for their helpful suggestions and comments. This work has
been funded by Spanish Research Project TIN2014-52034-R.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Waheed</given-names>
            <surname>Ahmad</surname>
          </string-name>
          , Andrei Lobov, and Jose L. Martinez
          <string-name>
            <surname>Lastra</surname>
          </string-name>
          .
          <year>2012</year>
          .
          <article-title>Formal modelling of Complex Event Processing: A generic algorithm and its application to a manufacturing line</article-title>
          .
          <source>In Proc. of INDIN'12. IEEE</source>
          ,
          <fpage>380</fpage>
          -
          <lpage>385</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Alexander</given-names>
            <surname>Aiken</surname>
          </string-name>
          ,
          <string-name>
            <surname>Joseph M. Hellerstein</surname>
            , and
            <given-names>Jennifer</given-names>
          </string-name>
          <string-name>
            <surname>Widom</surname>
          </string-name>
          .
          <year>1995</year>
          .
          <article-title>Static Analysis Techniques for Predicting the Behavior of Active Database Rules</article-title>
          .
          <source>ACM Trans. Database Syst</source>
          .
          <volume>20</volume>
          ,
          <issue>1</issue>
          (
          <year>1995</year>
          ),
          <fpage>3</fpage>
          -
          <lpage>41</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Elena</given-names>
            <surname>Baralis</surname>
          </string-name>
          , Stefano Ceri, and
          <string-name>
            <given-names>Stefano</given-names>
            <surname>Paraboschi</surname>
          </string-name>
          .
          <year>1998</year>
          .
          <article-title>Compile-Time and Runtime Analysis of Active Behaviors</article-title>
          .
          <source>IEEE Trans. Knowl. Data Eng</source>
          .
          <volume>10</volume>
          ,
          <issue>3</issue>
          (
          <year>1998</year>
          ),
          <fpage>353</fpage>
          -
          <lpage>370</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Loli</given-names>
            <surname>Burgueño</surname>
          </string-name>
          , Juan Boubeta-Puig, and Antonio Vallecillo.
          <year>2018</year>
          .
          <source>Formalizing Complex Event Processing Systems in Maude. IEEE Access</source>
          <volume>6</volume>
          (
          <year>2018</year>
          ),
          <fpage>23222</fpage>
          -
          <lpage>23241</lpage>
          . https://doi.org/10.1109/ACCESS.
          <year>2018</year>
          .2831185
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Sara</given-names>
            <surname>Comai</surname>
          </string-name>
          and
          <string-name>
            <given-names>Letizia</given-names>
            <surname>Tanca</surname>
          </string-name>
          .
          <year>2003</year>
          .
          <article-title>Termination and Confluence by Rule Prioritization</article-title>
          .
          <source>IEEE Trans. Knowl. Data Eng</source>
          .
          <volume>15</volume>
          ,
          <issue>2</issue>
          (
          <year>2003</year>
          ),
          <fpage>257</fpage>
          -
          <lpage>270</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Gianpaolo</given-names>
            <surname>Cugola</surname>
          </string-name>
          and
          <string-name>
            <given-names>Alessandro</given-names>
            <surname>Margara</surname>
          </string-name>
          .
          <year>2012</year>
          .
          <article-title>Processing flows of information: From data stream to complex event processing</article-title>
          .
          <source>ACM Comput. Surv</source>
          .
          <volume>44</volume>
          ,
          <issue>3</issue>
          (
          <year>2012</year>
          ),
          <volume>15</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>15</lpage>
          :
          <fpage>62</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Gianpaolo</given-names>
            <surname>Cugola</surname>
          </string-name>
          , Alessandro Margara, Mauro Pezzè, and
          <string-name>
            <given-names>Matteo</given-names>
            <surname>Pradella</surname>
          </string-name>
          .
          <year>2015</year>
          .
          <article-title>Eficient analysis of event processing applications</article-title>
          .
          <source>In Proc. of DEBS'15. ACM</source>
          ,
          <volume>10</volume>
          -
          <fpage>21</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>EsperTech.</surname>
          </string-name>
          (accessed
          <issue>18</issue>
          <year>November 2017</year>
          ). Esper - Complex Event Processing. http://www.espertech.com/esper/.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Opher</given-names>
            <surname>Etzion</surname>
          </string-name>
          and
          <string-name>
            <given-names>Peter</given-names>
            <surname>Niblett</surname>
          </string-name>
          .
          <year>2010</year>
          . Event Processing in Action. Manning Publications.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <source>[10] Event Processing Technical Society. 2011. Event Processing Glossary, Version</source>
          <volume>2</volume>
          .0. http://www.complexevents.com/wp-content/uploads/2011/08/EPTS_Event_ Processing_Glossary_v2.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>Esa</given-names>
            <surname>Falkenroth</surname>
          </string-name>
          and
          <string-name>
            <given-names>Anders</given-names>
            <surname>Törne</surname>
          </string-name>
          .
          <year>1999</year>
          .
          <article-title>How to construct predictable rule sets</article-title>
          .
          <source>In Proc. of Real Time Programming</source>
          '
          <volume>99</volume>
          .
          <fpage>33</fpage>
          -
          <lpage>40</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Chun-Hung</surname>
            <given-names>Hsiao</given-names>
          </string-name>
          , Cristiano Pereira, Jie Yu, Gilles Pokam, Satish Narayanasamy,
          <string-name>
            <surname>Peter M. Chen</surname>
            , Ziyun Kong, and
            <given-names>Jason</given-names>
          </string-name>
          <string-name>
            <surname>Flinn</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>Race detection for event-driven mobile applications</article-title>
          .
          <source>In Proc. of PLDI'14. ACM</source>
          ,
          <volume>326</volume>
          -
          <fpage>336</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Donald</surname>
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Johnson</surname>
          </string-name>
          .
          <year>1976</year>
          .
          <article-title>Finding all the elementary circuits of a directed graph</article-title>
          .
          <source>SIAM J. Comput. 4</source>
          ,
          <issue>1</issue>
          (
          <year>1976</year>
          ),
          <fpage>77</fpage>
          -
          <lpage>84</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <surname>Sin-Yeung Lee</surname>
          </string-name>
          and
          <string-name>
            <surname>Tok-Wang Ling</surname>
          </string-name>
          .
          <year>1999</year>
          . Verify Updating Trigger Correctness. Springer,
          <fpage>382</fpage>
          -
          <lpage>391</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <surname>David</surname>
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Luckham</surname>
          </string-name>
          .
          <year>2002</year>
          .
          <article-title>The Power of Events: An Introduction to Complex Event Processing in Distributed Enterprise Systems</article-title>
          . Addison-Wesley.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>Prabhaker</given-names>
            <surname>Mateti</surname>
          </string-name>
          and
          <string-name>
            <given-names>Narsingh</given-names>
            <surname>Deo</surname>
          </string-name>
          .
          <year>1976</year>
          .
          <article-title>On Algorithms for Enumerating All Circuits of a Graph Related Databases</article-title>
          .
          <source>SIAM J. Comput. 5</source>
          ,
          <issue>1</issue>
          (
          <year>1976</year>
          ),
          <fpage>90</fpage>
          -
          <lpage>99</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>D.</given-names>
            <surname>Mintz</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Technical Assistance Document for the Reporting of Daily Air Quality - the Air Quality Index (AQI)</article-title>
          .
          <source>Technical Report</source>
          EPA-454/B-16- 002. U.S. Environmental Protection Agency. http://www.epa.gov/airnow/ aqi-technical
          <article-title>-assistance-document-may2016.pdf</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <surname>Nathalie</surname>
            <given-names>Moreno</given-names>
          </string-name>
          , Manuel F. Bertoa, Gala Barquero, Loli Burgueño, Javier Troya, and Antonio Vallecillo.
          <year>2018</year>
          .
          <article-title>Managing Uncertain Complex Events in Web of Things Applications</article-title>
          .
          <source>In Proc. of ICWE'18 (LNCS)</source>
          . Springer,
          <fpage>349</fpage>
          -
          <lpage>357</lpage>
          . http: //atenea.lcc.uma.es/projects/UCEP.html
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <surname>Ella</surname>
            <given-names>Rabinovich</given-names>
          </string-name>
          , Opher Etzion, Sitvanit Ruah, and
          <string-name>
            <given-names>Sarit</given-names>
            <surname>Archushin</surname>
          </string-name>
          .
          <year>2010</year>
          .
          <article-title>Analyzing the behavior of event processing applications</article-title>
          .
          <source>In Proc. of DEBS'10. ACM</source>
          ,
          <volume>223</volume>
          -
          <fpage>234</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <surname>Veselin</surname>
            <given-names>Raychev</given-names>
          </string-name>
          , Martin T. Vechev, and
          <string-name>
            <given-names>Manu</given-names>
            <surname>Sridharan</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>Efective race detection for event-driven programs</article-title>
          .
          <source>In Proc. of OOPSLA'13. ACM</source>
          ,
          <volume>151</volume>
          -
          <fpage>166</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>M.</given-names>
            <surname>Sharir</surname>
          </string-name>
          .
          <year>1981</year>
          .
          <article-title>A strong-connectivity algorithm and its application in data flow analysis</article-title>
          .
          <source>Computers and Mathematics with Applications</source>
          <volume>7</volume>
          (
          <year>1981</year>
          ),
          <fpage>67</fpage>
          -
          <lpage>72</lpage>
          . Issue 1.
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>J.</given-names>
            <surname>Widom</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Ceri</surname>
          </string-name>
          .
          <year>1996</year>
          .
          <article-title>Active database systems: Triggers and rules for advanced database processing</article-title>
          . Morgan Kaufmann.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>