Skip to content

The original timed regular expression matcher over temporal behaviors

License

Notifications You must be signed in to change notification settings

doganulus/montre

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

montre

A timed regular expression matcher

Usage

montre [OPTIONS ...] PATTERN [FILE]

Options

-b, --offline              Offline Mode (Batch)
-e, --expr=PATTERN         Use PATTERN for matching
-f, --filename=FILE        Use FILE for matching
-i, --online               Online Mode (Incremental)
-h, --help                 Display this information
-o, --output=FILE          Place the output into FILE (Default: stdout)

    --output-type=TYPE     Supported types are <end|zone>
    --syntax-help          Display the syntax of timed regular expressions
    --version              Version Information

Syntax of Timed Regular Expressions

Atom = p                   (Propositional Symbol)
     : !Atom               (Negation)
     : Atom1 && Atom2      (Conjunction)
     : Atom1 || Atom2      (Disjunction)

Expr = Atom                (Atomic Expression)
     : <:Atom              (Begin-anchored)
     : Atom:>              (End-anchored)
     : <:Atom:>            (BeginEnd-anchored)
     : Expr1 ; Expr2       (Concatenation)
     : Expr1 | Expr2       (Union)
     : Expr1 & Expr2       (Intersection)
     : Expr1 % (i,j)       (Time Restriction)
     : Expr1 *             (Zero-or-more Repetition)
     : Expr1 +             (One-or-more Repetition)
     : (Expr)              (Grouping)

Installation

Ubuntu LTS 14.04 64-bit is the recommended platform.

Requirements

  • GNU C/C++ and the corresponding libraries.
  • Pure Programming Language:
  • pkg-config

Instructions

If you have problems with permissions don't forget to prefix with sudo

  1. Clone the Montre repository:
git clone https://github.com/doganulus/montre
cd montre
  1. Build and install Montre:
make && make install

It will install Montre with the default prefix /usr/local. You can modify Makefile if you would like to install to a custom location.

Running Montre in Docker

Docker provides an alternative (and easier) way for people that want to run Montre without needing to install all dependencies. If Docker is not installed on your machine, you can install using these instructions. Note that you may need sudo for docker commands below. Many thanks to @mibarg for preparing the Dockerfile.

  1. Pull the Montre docker image.
docker pull doganulus/montre:latest
  1. Start a command prompt inside the container.
docker run -it doganulus/montre:latest /bin/bash
  1. Do some timed pattern matching using montre!
montre '(p;q)%(3,4)' montre/examples/my_sym_beh.txt

Tutorial

We have used Montre to find all sprints performed by a player in a real soccer match. See the tutorial Finding Sprints.

Documentation

  • Timed Pattern Matching. Dogan Ulus, Thomas Ferrere, Eugene Asarin and Oded Maler. FORMATS'14.
  • Online Timed Pattern Matching using Derivatives. Dogan Ulus, Thomas Ferrere, Eugene Asarin and Oded Maler. TACAS'16.
  • Montre: A Tool for Monitoring Timed Regular Expressions. Dogan Ulus. CAV'17.
  • Pattern Matching with Time: Theory and Applications. Dogan Ulus. PhD Thesis. 2018.