A library for efficiently working with Signal Temporal Logic (STL) and its quantitative semantics.
Project description
Signal Temporal Logic Monitoring
This package provides an interface to define offline monitoring for Signal Temporal Logic (STL) specifications. The library is written in C++ (and can be used with CMake) and has been wrapped for Python usage using pybind11.
The library is inspired by the following projects:
- py-metric-temporal-logic is a tool written in pure Python, and provides an elegant interface for evaluating discrete time signals using Metric Temporal Logic (MTL).
- Breach and S-TaLiRo are Matlab toolboxes designed for falsification and simulation-based testing of cyber-physical systems with STL and MTL specifications, respectively. One of their various features includes the ability to evaluate the robustness of signals against STL/MTL.
The signal-temporal-logic
library aims to be different from the above in the following
ways:
- Written for speed and targets Python.
- While py-metric-temporal-logic is written in Python, it doesn't perform computations efficiently and quickly.
- Support for multiple quantitative semantics.
- All the above tools have their own way of computing the quantitative semantics for STL/MTL specifications.
- This tool will try to support common ways of computing the robustness, but will also have support for other quantitative semantics of STL.
List of Quantitative Semantics
- Classic Robustness
- A. Donzé and O. Maler, "Robust Satisfaction of Temporal Logic over Real-Valued Signals," in Formal Modeling and Analysis of Timed Systems, Berlin, Heidelberg, 2010, pp. 92–106.
- Temporal Logic as Filtering
- A. Rodionova, E. Bartocci, D. Nickovic, and R. Grosu, "Temporal Logic As Filtering," in Proceedings of the 19th International Conference on Hybrid Systems: Computation and Control, New York, NY, USA, 2016, pp. 11–20.
- Smooth Cumulative Semantics
- I. Haghighi, N. Mehdipour, E. Bartocci, and C. Belta, "Control from Signal Temporal Logic Specifications with Smooth Cumulative Quantitative Semantics," arXiv:1904.11611 [cs], Apr. 2019.
Installing Python package
Using pip
$ python3 -m pip install signal-temporal-logic
Build from source
Requirements: cmake
>= 3.5, git
and a C++ compiler that supports C++17.
First clone the repository:
$ git clone https://github.com/anand-bala/signal-temporal-logic
Then install using pip
, install the package:
$ python3 -m pip install -U .
Usage
See the examples/ directory for some usage examples in C++ and Python.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file signal_temporal_logic-0.1.3.post1-pp36-pypy36_pp73-manylinux2010_x86_64.whl
.
File metadata
- Download URL: signal_temporal_logic-0.1.3.post1-pp36-pypy36_pp73-manylinux2010_x86_64.whl
- Upload date:
- Size: 267.2 kB
- Tags: PyPy, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b74fc50fa6ddec5b6b11756864805104c246bdd1cbb71178b264a413d99fa746 |
|
MD5 | 1497af4b2052f6376f52953d530ef9dc |
|
BLAKE2b-256 | 831ec4e559451920b203fef244b9806675ff81e03af06936d492e3d7bfcad343 |
File details
Details for the file signal_temporal_logic-0.1.3.post1-cp38-cp38-manylinux2014_x86_64.whl
.
File metadata
- Download URL: signal_temporal_logic-0.1.3.post1-cp38-cp38-manylinux2014_x86_64.whl
- Upload date:
- Size: 289.0 kB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d3af1e5b0257b310670077ba588ac088996a2681ec388e97742c8bcf03b5e9b |
|
MD5 | e8c86626a304821475b974549a6fda38 |
|
BLAKE2b-256 | 48f5eaf4c92fa08f699f9f62de15654769b97dadc8940d79bde22fde5d353e96 |
File details
Details for the file signal_temporal_logic-0.1.3.post1-cp38-cp38-manylinux2010_i686.whl
.
File metadata
- Download URL: signal_temporal_logic-0.1.3.post1-cp38-cp38-manylinux2010_i686.whl
- Upload date:
- Size: 276.4 kB
- Tags: CPython 3.8, manylinux: glibc 2.12+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a16c716f087c27a265d9bbc2ca9ecc18f1c5cb3224804489698f30eb71fd623 |
|
MD5 | c079f4d2c783f9b1988bf760df393de6 |
|
BLAKE2b-256 | e08171df94806cbf1c4c0c742ea278b038cf479c29f04f0f92b1e332ec83d99a |
File details
Details for the file signal_temporal_logic-0.1.3.post1-cp38-cp38-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: signal_temporal_logic-0.1.3.post1-cp38-cp38-macosx_10_15_x86_64.whl
- Upload date:
- Size: 242.1 kB
- Tags: CPython 3.8, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a377dcd443793a8dd617c20e30042b676f6351ed6ace56a187e84f5407e9fd9c |
|
MD5 | d94a4e82e32809963365262e576beed1 |
|
BLAKE2b-256 | 1325699b6e3cf98052fd3ad28a39132f6ac9cd002eef800f5e1728cdfdf03b9a |
File details
Details for the file signal_temporal_logic-0.1.3.post1-cp37-cp37m-manylinux2014_x86_64.whl
.
File metadata
- Download URL: signal_temporal_logic-0.1.3.post1-cp37-cp37m-manylinux2014_x86_64.whl
- Upload date:
- Size: 293.2 kB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1f79f7c85b211588bd8a13eabcf56201fb125f80fb055285e0d8373bb708a75 |
|
MD5 | f273825455d3515d9cc79f95304a2ffc |
|
BLAKE2b-256 | 21e1b915d638ec9121a53037b0191841c9e93dd1f65514efeb759d8f6a15441d |
File details
Details for the file signal_temporal_logic-0.1.3.post1-cp37-cp37m-manylinux2010_i686.whl
.
File metadata
- Download URL: signal_temporal_logic-0.1.3.post1-cp37-cp37m-manylinux2010_i686.whl
- Upload date:
- Size: 282.4 kB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85d1661a159fe5673062b516647ce2c04aee83f913017f525506543cee6ca632 |
|
MD5 | 7a0def142bff49301c4be4dbd10bfc52 |
|
BLAKE2b-256 | fb540ec6903cdc71dd41cd69644fd5464c55b73b70c65c1fd81bf2ed2a30a68e |
File details
Details for the file signal_temporal_logic-0.1.3.post1-cp37-cp37m-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: signal_temporal_logic-0.1.3.post1-cp37-cp37m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 233.9 kB
- Tags: CPython 3.7m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9071f0728f887e89fdd0515e96979f009be201de882bb3d539e8ee09a9e8739 |
|
MD5 | fc801fd6edfff800577c49ea0950c99f |
|
BLAKE2b-256 | ba211bddc3509a0984ba412af2827e4ebb3a64c001876b3314e80e6cecdf2e66 |
File details
Details for the file signal_temporal_logic-0.1.3.post1-cp36-cp36m-manylinux2014_x86_64.whl
.
File metadata
- Download URL: signal_temporal_logic-0.1.3.post1-cp36-cp36m-manylinux2014_x86_64.whl
- Upload date:
- Size: 293.1 kB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a46f72f7a3025a014cf7f193e5284a5ed49c498edcedd1861594dc7d066ef9a |
|
MD5 | bfc8b70e5cb327f38500e4f94445a8c9 |
|
BLAKE2b-256 | a8d543eb6a7b480756003373d5728b52084d233482561555569d83ec8871ffee |
File details
Details for the file signal_temporal_logic-0.1.3.post1-cp36-cp36m-manylinux2010_i686.whl
.
File metadata
- Download URL: signal_temporal_logic-0.1.3.post1-cp36-cp36m-manylinux2010_i686.whl
- Upload date:
- Size: 282.1 kB
- Tags: CPython 3.6m, manylinux: glibc 2.12+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e5ff4ab6e68012aaa4359fe50081c1da070f9027ddaa4c6c354e5b2e8e01435 |
|
MD5 | 0194f6156258cd4d87eebfcb59418de7 |
|
BLAKE2b-256 | ce7123e8872ea8bd360eecaca5bc7be58360821594238cbc435a68b4bf81e8ad |
File details
Details for the file signal_temporal_logic-0.1.3.post1-cp36-cp36m-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: signal_temporal_logic-0.1.3.post1-cp36-cp36m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 233.7 kB
- Tags: CPython 3.6m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 457ff4fc37024da6e17f165e81f3a1bb15b66d5d3a5f625f24270b3d31aabbb2 |
|
MD5 | 8250910807b429bcbf73eb22e94b5c02 |
|
BLAKE2b-256 | 72d8d4fb05b8adec61c9d61e7e222b99538e4d8441d42dcc907a8ccb343efe9c |
File details
Details for the file signal_temporal_logic-0.1.3.post1-cp35-cp35m-manylinux2014_x86_64.whl
.
File metadata
- Download URL: signal_temporal_logic-0.1.3.post1-cp35-cp35m-manylinux2014_x86_64.whl
- Upload date:
- Size: 293.1 kB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c91ee7cfcfbb79dde7e04b215eeff162f70c186239a5991ca3358256068289ad |
|
MD5 | 953da7e1c0505d205b357fa6d2c638d9 |
|
BLAKE2b-256 | 63608455f13023632d72ade24b983651c825012a802ce3c734fb88f98fb83428 |
File details
Details for the file signal_temporal_logic-0.1.3.post1-cp35-cp35m-manylinux2010_i686.whl
.
File metadata
- Download URL: signal_temporal_logic-0.1.3.post1-cp35-cp35m-manylinux2010_i686.whl
- Upload date:
- Size: 282.1 kB
- Tags: CPython 3.5m, manylinux: glibc 2.12+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7777908610c1a5ec09b2f545f8d07fd0cda64a0f53271cafa7f0d534d971b94d |
|
MD5 | 1df372e6a835c24739de3715ef775e91 |
|
BLAKE2b-256 | aef2b8d2f3097e513b79a98a1381810ffc51ed54999850d2a1893301c1879df6 |
File details
Details for the file signal_temporal_logic-0.1.3.post1-cp35-cp35m-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: signal_temporal_logic-0.1.3.post1-cp35-cp35m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 233.7 kB
- Tags: CPython 3.5m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8ec966745412b52795a4ded59d3fa1e56ce080491f8e768e610da61bacc94a7 |
|
MD5 | 0b55974057edcb7bcf28e15edcf33947 |
|
BLAKE2b-256 | 03f294e3f3ab29282fdb2e65016a49c250feec08aaa6a085569fc91c6119d395 |