nfer

a language and tool for inferring interval abstractions from event traces

This page describes research related to nfer. The nfer tool can be found at http://nfer.io/.

Nfer was developed in collaboration between researchers in Canada and from the NASA Jet Propulsion Laboratory in the USA (Kauffman et al., 2016). It was designed to help operators of the Mars Science Laboratory (Curiosity rover) and other spacecraft better understand these remote systems (Kauffman et al., 2016). Nfer creates abstractions of event streams, meaning the information produced by applying nfer rules is easier to comprehend than directly accessing the event stream. Nfer abstractions form a hierarchy of temporal intervals: they can be built up from smaller pieces to find meaningful information. Applying an nfer specification can also be understood as adding prior knowledge to a trace, transforming it into a more easily analyzed representation (Kauffman et al., 2018). Nfer specifications consisting of only before relations can also be mined from real-time system traces (Kauffman & Fischmeister, 2017).

A :- B before C
A :- B meet C
A :- B during C
A :- B coincide C
A :- B start C
A :- B finish C
A :- B overlap C
A :- B slice C
The eight nfer inclusive operators: before, meet, during, coincide, start, finish, overlap, and slice

Nfer is also a tool that implements the eponymous language(Kauffman, 2021). The tool takes an event stream as an input, such as a program log, and applies a specification to the stream to calculate new information in the form of intervals. In nfer, an interval refers to a piece of data with a label (also called an identifier or name) and two timestamps indicating when it began and ended. Intervals can also carry data, such as integers and strings, in a map. Events in the input are also considered intervals where the begin and end timestamps are identical. An nfer specification consists of rules that each relate (usually) two intervals to one another. When two intervals match, a new interval is produced using information from the rule to determine the label, timestamps, and data (Kauffman, 2023).

Recent work analyzing the evaluation complexity of nfer has shown that it is undecidable for the full language, but with numerous decidable fragments (Kauffman & Zimmermann, 2022). Notably, nfer evaluation under the minimality meta-constraint is in PTime (Kauffman & Zimmermann, 2024). Minimality restricts nfer to produce only intervals that are minimal in their timestamps; they do not contain another interval with the same identifier during the same time period. Nfer satisfiability is also undecidable in the general case, even without data, but a PTime algorithm exists for satisfiability without data and without cycles (Kauffman et al., 2024).

Minimality discards the shaded interval produced by A :- B before C

For humans to use nfer for event trace comprehension, the hierarchy of intervals it produces must be visualized. However, displaying the output of nfer comes with a unique set of challenges because of its hierarchical and concurrent nature. Visualizing these intervals has been the subject of some recent work that has found solutions to the problems inherent when data has duration and hierarchy (Sadman et al., 2025)

Visualization with Nvis

References

2025

  1. nvis.svg
    Visualizing Temporal Interval Hierarchies
    Nafiz Sadman , Nastaran Kian Ersi , and Sean Kauffman
    In NASA Formal Methods (NFM’25), Williamsburg, USA, Jun 2025

2024

  1. scp-journal.jpg
    The Complexity of Evaluating nfer
    Sean Kauffman and Martin Zimmermann
    Science of Computer Programming, Jun 2024
  2. rv24-logo.svg
    The Complexity of Data-Free Nfer
    In International Conference on Runtime Verification (RV’24), Instanbul, Turkey, Oct 2024

2023

  1. Log Analysis and System Monitoring with nfer
    Sean Kauffman
    Science of Computer Programming, Jan 2023

2022

  1. The Complexity of Evaluating nfer
    Sean Kauffman and Martin Zimmermann
    In International Symposium on Theoretical Aspects of Software Engineering (TASE’22), Jul 2022

2021

  1. nfer – A Tool for Event Stream Abstraction
    Sean Kauffman
    In International Conference on Software Engineering and Formal Methods (SEFM’21), Jul 2021

2018

  1. Inferring Event Stream Abstractions
    Sean Kauffman , Klaus Havelund , Rajeev Joshi , and Sebastian Fischmeister
    Formal Methods in System Design, Jul 2018

2017

  1. Mining Temporal Intervals from Real-time System Traces
    Sean Kauffman and Sebastian Fischmeister
    In International Workshop on Software Mining (SoftwareMining’17), Jul 2017

2016

  1. nfer–A Notation and System for Inferring Event Stream Abstractions
    Sean Kauffman , Klaus Havelund , and Rajeev Joshi
    In International Conference on Runtime Verification (RV’16), Jul 2016
  2. Towards a logic for inferring properties of event streams
    Sean Kauffman , Rajeev Joshi , and Klaus Havelund
    In International Symposium on Leveraging Applications of Formal Methods (ISoLA’16), Jul 2016