EN FR
EN FR


Section: New Software and Platforms

Allen

The Allen DSL for online context detection over binary sensors

Keywords: DSL - Contextual service - Iot - Sensors - Data stream

Scientific Description: There is a large variety of binary sensors in use today, and useful context-aware services can be defined using such binary sensors. However, the currently available approaches for programming context-aware services do not conveniently support binary sensors. Indeed, no existing approach simultaneously supports a notion of state, central to binary sensors, offers a complete set of operators to compose states, allows to define reusable abstractions by means of such compositions, and implements efficient online processing of these operators.

The Allen language proposes a new approach for event processing specifically targeted to binary sensors. The central contributions of this language are a native notion of state and semi-causal operators for temporal state composition including: Allen logic's interval relations generalized for handling multiple intervals, and temporal filters for handling delays. Compared to other approaches such as CEP (complex event processing), our language provides less discontinued information, allows less restricted compositions, and supports reusable abstractions. We implemented a compiler for our language and applied it to successfully rewrite a full set of real Ambient Assisted Living services. The performance of our prototype interpreter has been shown to compete well with a commercial CEP engine when expressing the same services.

Functional Description: Main concepts and features: * Signal: formalized as a boolean function of (discrete) time. A signal models either the current state of a physical sensor or a higher-level context depending on such sensors. The "states" of a signal are the time intervals where the signal is 1. * Precise semantics of an Allen program: based on the above model. Allows checking domain properties. * Operators: allow to combine signals for deriving more complex signals. Each operator takes a given number of signals and produces a signal. For instance, the logic operators "and", "or", "not" have their usual meaning, at each time point, unary operators up(s) and down(s) produces the starting/ending events of signal s. Binary operator during(p,q) produces a signal containing the states of p entirely contained in some state of q. * Parameterized operators: take, besides a given number of signals, a given number of scalar (numeric) parameters, such as temporal delays. For instance, the unary operators gt[T](s) and lt[T](s) produces signals containing only the states of s which are longer/shorter than some delay T. * Language constructs for defining new operators. For instance, "def up(s) = gt[1](s)" allows defining operator "up" above, based on the more primitive operator "gt". This feature enables the construction of user-defined abstractions, and thus creating layers of reusable pieces of context logic. * Online context detection: the computation in real time of contexts based on incoming streams of events produces by sensors.

Release Functional Description: First public version.