Overview

This website provides the implementation code for the three CEP-based case studies described in our paper entitled "Formalizing Complex Event Processing Systems in Maude", which proposes a formal framework for the specification of CEP applications, using rewriting logic and Maude, to allow developers to formally analyze and prove properties of their CEP programs. Maude permits modeling, simulation, analysis and semantic validation of CEP programs.


Case Studies

Accident Monitoring

A fleet of motorbikes are equipped with sensors that produce real-time information about their state: the pressure of their two tires, their location, speed, and whether the driver on the seat or not. Using this information, we are interested in monitoring them and deriving the following events:

  • BlowOutTire: The pressure of one of the tires of a moving motorbike goes down from more than 2.0 BAR to less than 1.2 BAR in less than 5 seconds.
  • Crash: The speed of a motorbike goes from more than 50 km/h to 0 km/h in less than 3 seconds.
  • DriverLeftSeat: The seat sensor detects that the motorbike driver has left the seat.
  • Accident: A moving motorbike suffers a blow out of one of its tires, then a Crash event is detected, and the driver is thrown out, everything within less than 3 seconds.
  • AccidentsReport: A derived event with the number of Accidents per day and location.
  • DangerousLocation: This event is raised every time 100 events of type Crash are detected in a given location.

Temperature Monitoring

This case study simulates a simplistic temperature monitoring system at a nuclear power plant [1]. Using the temperature measurements produced every second by the plant sensors as the simple events, the CEP application defines and processes the following three types of events:

  • Monitor: computes the average temperature every 10 seconds
  • Warning: warns if 2 consecutive temperatures above a certain threshold (400ºC) are detected
  • Critical: alerts of any sudden, rising escalating temperature spike whereby there are 4 consecutive events, with the first one above 100ºC, each subsequent one greater than the previous, and the last one being 1.5 times greater than the first

Air Quality Monitoring

This is an example of real CEP application that automatically controls air quality in real time across the Andalusian region (33,694 sq. miles, 8.4 million people). It uses the existing Andalusian regional government's sensor network composed of 61 sensor stations spread all over the region. Each station measures every 10 minutes six air pollutants including, e.g., Carbon Monoxide, Ozone, Nitrogen Dioxide and Sulfur Dioxide. In this case study, the air quality is measured using the index proposed by the U.S. Environmental Protection Agency (EPA), which defines windows of 1, 8 or 24 hours to analyze the simple events depending on the specific air pollutant, and expresses the results in a 6-grade scale, from Good to Hazardous [2].

The CEP application is defined in terms of 43 event patterns. The information about each pollutant measurement is aggregated by one pattern, and other six patterns determine the grade of the air quality for the pollutant. This makes seven patterns for every pollutant, and therefore we need 42 patterns to analyze the six pollutants. A final pattern AirQualityLevel calculates the global air quality level by computing the maximum of the grades obtained for each pollutant.


Downloads

Accidents.zip
Temperature.zip
AirQuality.zip
Esper2Maude.zip

References

[1] Milne, A. Complex Event Processing Made Easy (using Esper), Last accessed: March 2018. http://www.adrianmilne.com/complex-event-processing-made-easy/
[2] Mintz, D. Technical Assistance Document for the Reporting of Daily Air Quality - the Air Quality Index (AQI). Technical Report EPA-454/B-16-002, U.S. Environmental Protection Agency, 2016.