Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

RTEC: Run-Time Event Calculus

RTEC is an open-source Event Calculus dialect optimised for data stream reasoning. It is written in Prolog and has been tested under YAP and SWI Prolog.

YAP Installation Instructions

YAP 6.3 is the latest stable version of YAP; installation and execution instructions may be found in this manual.

In case the installation of YAP fails (we have noticed this in Ubuntu 20 LTS), please download YAP 6.3 from the "threads" branch of the repository. To do this from the command line, please type:

git clone -b threads yap

where -b threads specifies that YAP will be downloaded from the "threads" branch.


RTEC comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions; see the GNU Lesser General Public License v3 for more details.


  • Interval-based.
  • Sliding window reasoning.
  • Interval manipulation constructs for non-inertial fluents.
  • Caching for hierarchical knowledge bases.
  • Support for out-of-order data streams.
  • Indexing for handling efficiently irrelevant data.

File Description

To run RTEC you need the files in the /src directory.

The /examples directory is optional and includes patterns and sample datasets for experimentation.



RTEC has been used for:

Related Software

  • iRTEC: Incremental RTEC. iRTEC supports incremental reasoning, handling efficiently the delays and retractions in data streams.
  • oPIEC: Online Probabilistic Interval-Based Event Calculus. oPIEC supports Event Calculus reasoning over data streams under uncertainty.
  • OLED: Online Learning of Event Definitions. OLED is a supervised machine learning tool for constructing Event Calculus rules, such as complex event patterns, from annotated data streams.
  • LoMRF: Library for Markov Logic Networks. LoMRF supports Event Calculus reasoning and learning under uncertainty.
  • Wayeb: Wayeb is a Complex Event Processing and Forecasting (CEP/F) engine written in Scala. It is based on symbolic automata and Markov models.