https://github.com/maswag/monaa
A Tool for Timed Patten Matching with Automata-Based Acceleration
https://github.com/maswag/monaa
automata data-streaming formal-specification monitoring monitoring-tool regular-expression runtime-verification
Last synced: 7 months ago
JSON representation
A Tool for Timed Patten Matching with Automata-Based Acceleration
- Host: GitHub
- URL: https://github.com/maswag/monaa
- Owner: MasWag
- License: gpl-3.0
- Created: 2017-10-04T13:08:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-05-23T09:10:33.000Z (9 months ago)
- Last Synced: 2025-05-23T09:11:41.825Z (9 months ago)
- Topics: automata, data-streaming, formal-specification, monitoring, monitoring-tool, regular-expression, runtime-verification
- Language: C++
- Homepage:
- Size: 2.75 MB
- Stars: 9
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.bib
Awesome Lists containing this project
README
MONAA --- A Tool for Timed Patten Matching with Automata-Based Acceleration
===========================================================================
[](https://github.com/MasWag/monaa/actions/workflows/boosttest.yml)
[](https://monaa.readthedocs.io/en/latest/?badge=latest)
[](https://hub.docker.com/r/maswag/monaa)
[](./LICENSE)
This is the source code repository for MONAA --- A Tool for Timed Patten Matching with Automata-Based Acceleration.
Demo on Google Colab is available!!
[](https://colab.research.google.com/github/MasWag/monaa/blob/master/demo/MONAA%20demo.ipynb)
[](https://colab.research.google.com/github/MasWag/monaa/blob/master/demo/MONAA%20velocity%20demo.ipynb)
Usage
-----
### Synopsis
monaa [OPTIONS] PATTERN [FILE]
monaa [OPTIONS] -e PATTERN [FILE]
monaa [OPTIONS] -f FILE [FILE]
### Options
**-h**, **--help** Print a help message.
**-q**, **--quiet** Quiet mode. Causes any results to be suppressed.
**-a**, **--ascii** Ascii mode. (default)
**-b**, **--binary** Binary mode.
**-V**, **--version** Print the version
**-E**, **--event** Event mode (default)
**-S**, **--signal** Signal mode
**-i** *file*, **--input** *file* Read a timed word from *file*.
**-f** *file*, **--automaton** *file* Read a timed automaton from *file*.
**-e** *pattern*, **--expression** *pattern* Specify a *pattern* by a timed regular expression.
Installation
------------
MONAA is tested on Arch Linux, Ubuntu (20.04, 22.04, 24.04), and macOS (12 Monterey, 13 Ventura, 14 Sonoma). We also provide a [docker image](https://hub.docker.com/repository/docker/maswag/monaa).
### Requirements
* C++ compiler supporting C++20 and the corresponding libraries.
* Boost (>= 1.59)
* Eigen
* CMake (>= 3.30)
* Bison (>= 3.0)
* Flex
### Instructions
```sh
mkdir build
cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make && make install
```
### Usage of the docker image
Note: Docker support is experimental. It seems this image does not work with Docker Desktop for macOS.
You can use monaa via docker by `docker run -it maswag/monaa ...` instead of `monaa ...`.
The following shows an example.
```sh
docker run -v $PWD:/mnt -it maswag/monaa -f /mnt/examples/small.dot -i /mnt/examples/small.txt
```
Examples
--------
See [Getting Started](./doc/getting_started.md) for an example usage.
Syntax of Timed Automata
------------------------
You can use [DOT language](http://www.graphviz.org/content/dot-language) to represent a timed automaton. For the timing constraints and other information, you can use the following custom attributes.
attribute
value
description
vertex
init0 or 1init=1 if the state is initial
vertexmatch0 or 1match=1 if the state is accepting
edgelabel[a-z], [A-Z]the value represents the event on the transition
edgereseta list of integersthe set of variables reset after the transition
edgeguarda list of inequality constraintsthe guard of the transition
Syntax of Timed Regular Expressions
-----------------------------------
expr : c (An event)
| ( expr ) (Grouping)
| expr + (Kleene Plus)
| expr * (Kleene Star)
| expr expr (Concatenation)
| expr | expr (Disjunction)
| expr & expr (Conjunction)
| expr % (s,t) | expr % [s,t) | expr % (s,t] | expr % [s,t] | expr % (>s) | expr % (>=s) | expr % (