A library for efficiently working with Signal Temporal Logic (STL) and its quantitative semantics.
Project description
pystlogic
This package is a forked version of anand-bala's signal-temporal-logic.
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
Hashes for pystlogic-0.1.3.post2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d837b000fabf8ed5c7e90a79f43d7b01e34ad235393780553855d23145f8e2f |
|
MD5 | 35804ed36147b3e7865fc1f7ffc60ee5 |
|
BLAKE2b-256 | ac842c7e0eb5563069bfc3500338f0ef789921ca2ab088dabec90525f10ebbb0 |
Hashes for pystlogic-0.1.3.post2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a09e958969d47c6be30e5ee90506eb27f2e1bc3b5fb6368a6688fd7af1f25424 |
|
MD5 | 73b3474d5a65007af33acc166ec29356 |
|
BLAKE2b-256 | b6d81c4bd25f704c7ebd1e4aa25517a745e0cdc937a96876c1aa4d5a41e6b9c8 |
Hashes for pystlogic-0.1.3.post2-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b563c552aed4921442dd89aa0b1f9cd81cff614eb3307e99e5ddaa1399db8db |
|
MD5 | b6726949f5378ce2d09a97348d25f143 |
|
BLAKE2b-256 | c14906012fa9a57031d3565d5aea6490c07d395af9964d13c16af1ea0f90c68c |
Hashes for pystlogic-0.1.3.post2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 329f7e80b0bf2b4ca8cca067487bab2037af9f0e4db9fed308ea0ab386257af8 |
|
MD5 | 932d685bc26321a9cc1b62193c97ea98 |
|
BLAKE2b-256 | 81552d44359d4d30892cefd24feb855cd0c5c839a3e8a0de4ab955a137841413 |
Hashes for pystlogic-0.1.3.post2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3b4e2a3febbc371e498c15c6139fa4d90c4cd90906bb05302531c583b3290e4 |
|
MD5 | 7dd212c16d084083987dce9c184908bd |
|
BLAKE2b-256 | 880b49cd044f5969c776c536c1d83b845b283930f7e1bed2d3a471c504b639f5 |
Hashes for pystlogic-0.1.3.post2-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 333021a7ac6839f8426afae471332a49964561becb4d3f9b9c45308fd6b5a9c2 |
|
MD5 | a0b529ce8cfb03c24fbf825fee3158ba |
|
BLAKE2b-256 | 434b03fa19f0ef922e972d7560195456333cca89105d4b22e20ee28dc2ba0c23 |
Hashes for pystlogic-0.1.3.post2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 785beb1b063e69fa8e14b15553b2d25427e92d591d879d6c12b32a3622a58b52 |
|
MD5 | ecb52ece74b60bb0ce06c0581d205fbd |
|
BLAKE2b-256 | f9537618929292a4eee5af2d9bcfff7dcc14a90baabeb9d91d3f21117e2321c6 |
Hashes for pystlogic-0.1.3.post2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b097620f31920a4177400c2467891b381ce39439fe2234122d5f973e0ee714ff |
|
MD5 | fb5a565df3aff71a051e16ef877ccc0e |
|
BLAKE2b-256 | d26702bb1f42694378c5215b1740f41b2df331152151196e9c10afad6cf00570 |
Hashes for pystlogic-0.1.3.post2-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b48ded28650e01fbe8b01de3c7c0c9cd8cc604dbe74ef33aedb184c7937fbf48 |
|
MD5 | 269ef06b979c33c194cc1ef2172d6873 |
|
BLAKE2b-256 | 1834592ac0f1fe9554f64c4ca2583cd58a49d80daeb8a334779e416101f2e624 |
Hashes for pystlogic-0.1.3.post2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e16365e79238bc11c926b51938799b51369edd6cae6d00cb20e72f2a76c8fea |
|
MD5 | d21229ed5826e8344135312288babe49 |
|
BLAKE2b-256 | 1745f93f69ee7862fb63f4369f5baa6ee5b5f3738a62aa4ff648888b5ba0cf98 |
Hashes for pystlogic-0.1.3.post2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d695bf909ecc4b106416b1aa0b0e2ed3eb61d5e22601171571df75ec1017ae39 |
|
MD5 | f5f943adf4f6a47a28cf19d0b4b0a257 |
|
BLAKE2b-256 | 959faa29e14093d19937c3b763301047ceff71aff76f0308752421941ecf7977 |
Hashes for pystlogic-0.1.3.post2-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6062ba1fd31143709fef74c8a9021f379bb2bb641a6fe149e293377b7a7f4340 |
|
MD5 | b4eda4ac875419e51c776a34485e77ca |
|
BLAKE2b-256 | 996d74e9d32f9fdbd8fa071050ebc02e9294f9100aaec07d0383761743e37fc9 |