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 pystlogic
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/davidhjp01/pystlogic
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.
Metadata
Release files for pystlogic 0.1.3.post6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 3.0 MB
Release files / pystlogic-0.1.3.post6-cp314-cp314-win_amd64.whl
| Download URL | pystlogic-0.1.3.post6-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 225.3 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
40cb8975fb5a402704d3d15018a730dbe9852e41b4b9e0167f9e8dd3186f67c0
|
|
BLAKE2b-256 checksum How to use checksums |
6314ad900341daa3cfe7ab60fb3b07a1d5aab9583387efb9dce6e837418ab3be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / pystlogic-0.1.3.post6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | pystlogic-0.1.3.post6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 313.8 kB |
| Tags | CPython 3.14 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
b49b713ce33ac9cd447191842fa4977c5383ae9e08bddc5e790c54307d36fbed
|
|
BLAKE2b-256 checksum How to use checksums |
45ef0dd8d0f05d781f0122c6eab5124fd9005b16bc5d57112de89c4c56faa869
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / pystlogic-0.1.3.post6-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | pystlogic-0.1.3.post6-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 219.1 kB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e2d7e43ed4a84aacae31205d10f808b52cf1da838d730ba9f392a23523125474
|
|
BLAKE2b-256 checksum How to use checksums |
d532eaa8312553412bf50e3a041a825daf6cf4a9fcc7941a5e018788b6e91e3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / pystlogic-0.1.3.post6-cp313-cp313-win_amd64.whl
| Download URL | pystlogic-0.1.3.post6-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 218.6 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9240ed9f9a42c5c7ccf6e7d972902faf2d7b85abbcbf909d0203e4dc51464bbd
|
|
BLAKE2b-256 checksum How to use checksums |
98639067e03a1cd783b3dc8e8784fe3f4cefd2bdeaa891478fdda2961717a5d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / pystlogic-0.1.3.post6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | pystlogic-0.1.3.post6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 313.4 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
fbd1752cf790d13f9c7b7117f475a1f2b42e1e72c6cfaac46dbbbf8527ec5268
|
|
BLAKE2b-256 checksum How to use checksums |
681b1abf554c8d582971ee8e26744c0d9179eaf5534d4116e13a78568f3c3a80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / pystlogic-0.1.3.post6-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | pystlogic-0.1.3.post6-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 218.6 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9390616b8a8ae0ab9762ec4f68362d3acc5c8843089a327a37a745d1a77f75f6
|
|
BLAKE2b-256 checksum How to use checksums |
e080cb3fd8fd0e730da98d002d6564d99a0a36c2adfd4f430b1ff41132159e2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / pystlogic-0.1.3.post6-cp312-cp312-win_amd64.whl
| Download URL | pystlogic-0.1.3.post6-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 218.5 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ed797a6c9aa22e1fe649fce363b312c54e97f0b205811ebed667bc6232f30abd
|
|
BLAKE2b-256 checksum How to use checksums |
8a68dc6b73b9bacd3c470b18ad5460fec74b9a765039281a1767ea9cfb859aa8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / pystlogic-0.1.3.post6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | pystlogic-0.1.3.post6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 313.4 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
c3fac0f507581034c51787e453b16d90c9dbcb1d7fa7d58523e77f8713a82013
|
|
BLAKE2b-256 checksum How to use checksums |
8f14d4632408bb61c14292c38f5d9a7b4612c52b7bf0590fe0796f7fb2e45a6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / pystlogic-0.1.3.post6-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | pystlogic-0.1.3.post6-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 218.6 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
395550661a721cb9edd84d6e6fd17fc9ec8b5c3d654916f27fdf3359200c9660
|
|
BLAKE2b-256 checksum How to use checksums |
4d5921ea618166d0bf08374029ac36c9e5de3bd2c1b6c3aa3d3d565fbb077ff7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / pystlogic-0.1.3.post6-cp311-cp311-win_amd64.whl
| Download URL | pystlogic-0.1.3.post6-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 216.4 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
62bec6e5a987488232a60b4fb58285368ea63ba509dd9a77c94e34ee65cfcf72
|
|
BLAKE2b-256 checksum How to use checksums |
e51d48c59a3ab2b22ffc2762cd05dfe46cd4545e7774d2ce118219351e282661
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / pystlogic-0.1.3.post6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | pystlogic-0.1.3.post6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 313.2 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
9ffc2372cf51105ce15027a1dbd2887ad8307454de447c1d6f680d8eff5b7467
|
|
BLAKE2b-256 checksum How to use checksums |
441904fff5d33e6cd36b9b45d2714b2cb475223e557c7b59b507e336e56536d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / pystlogic-0.1.3.post6-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | pystlogic-0.1.3.post6-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 217.2 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8d8c98ed777628e915e97cead07a70bc6c99c69cfe6f0e6ba3959b2e1177d3b7
|
|
BLAKE2b-256 checksum How to use checksums |
d16e104c7d9321f42508617f0891cc13c8d520d155e38fcef40088fda24d46f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|