Skip to main content

A library for efficiently working with Signal Temporal Logic (STL) and its quantitative semantics.

Project description

pypi

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.
  • 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pystlogic-0.1.3.post3-cp312-cp312-win_amd64.whl (221.9 kB view details)

Uploaded CPython 3.12 Windows x86-64

pystlogic-0.1.3.post3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (313.3 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

pystlogic-0.1.3.post3-cp312-cp312-macosx_11_0_arm64.whl (227.9 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

pystlogic-0.1.3.post3-cp311-cp311-win_amd64.whl (220.0 kB view details)

Uploaded CPython 3.11 Windows x86-64

pystlogic-0.1.3.post3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (313.1 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pystlogic-0.1.3.post3-cp311-cp311-macosx_11_0_arm64.whl (226.5 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

pystlogic-0.1.3.post3-cp310-cp310-win_amd64.whl (219.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

pystlogic-0.1.3.post3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (313.2 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pystlogic-0.1.3.post3-cp310-cp310-macosx_11_0_arm64.whl (226.5 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

pystlogic-0.1.3.post3-cp39-cp39-win_amd64.whl (211.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

pystlogic-0.1.3.post3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (313.6 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pystlogic-0.1.3.post3-cp39-cp39-macosx_11_0_arm64.whl (226.7 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

pystlogic-0.1.3.post3-cp38-cp38-win_amd64.whl (220.3 kB view details)

Uploaded CPython 3.8 Windows x86-64

pystlogic-0.1.3.post3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (313.0 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pystlogic-0.1.3.post3-cp38-cp38-macosx_11_0_x86_64.whl (248.2 kB view details)

Uploaded CPython 3.8 macOS 11.0+ x86-64

File details

Details for the file pystlogic-0.1.3.post3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 accba5fd58497fcc82aa4a82e0645f7fdc3cba1c760f8381cf3a5334e7049d99
MD5 14022178d0437e7e728af168f2172596
BLAKE2b-256 cfe6a9909617dd33832247b0263b28fb78d692dcb0615146c6bac8526441556e

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e0bfcd2153e797d2c4a53f8a8a808eb072b759ce46d0f35d3332869ac384594e
MD5 ac1aabac4651e5546f0217932905d901
BLAKE2b-256 106b877d7b081326340e34a23ef6a36ed356a17a65da2398abec3c32ce6aba34

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b5e6fcd6b353e5749e473971191293be45bdfb44e748c3f1e5b520877a14998a
MD5 5382e753659646c0bcc9c5bb07aa7956
BLAKE2b-256 adc097721cef00baa265507a114325f43c829bfd8f268eafec169f60a6a82dc5

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 31723cf12bd5f7888f2cfa99fcfbd59d1677978bcb7ec77dc363bf5d4334d348
MD5 2b387895bd1780b3086ca838cbf17eba
BLAKE2b-256 010da27be89c31f8fdc46c6b830190e7cef9d86bb763f6589f29352fae6ed572

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fc9785675c2246c462735b771e19ad396b1cd080b6dff0c7c0c6172ec0b297ee
MD5 b98d87383c1c8628c0272bfe887b1750
BLAKE2b-256 524ba882ba8002b0a42416ce8904a9ea1f34ec17e4adb3e7381ff63ed99de8a0

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e8e1cf0a0ea048f6dc42667980ba296508a7453402ee915f0048339beb120105
MD5 cb2eadbb1940642eaba68aeedfc9b7c0
BLAKE2b-256 b9a28c226b61d993f3c47760d6ce6cff3baaace90a02871879ec115b7fa4f14d

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post3-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4c314428fc1956fa605a96be10f124f17ca9bd30a6edd2998bd3363f9fbf006b
MD5 21fbc3ce6766129ea44050d1ffd484a7
BLAKE2b-256 c1a9c82e6af47b647aa727b2cbedefd3582cebdccabfdb8ae9621c59279c5727

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cb0b6274cdc232e2d05a9f794dc4208f3611c0da1656f268bb0ef7c180611b28
MD5 41bdd752656c383655b88bd8db436c12
BLAKE2b-256 874ff491705c864c1ac5c053db7656f62e914b1d718ec0b8d8af2ca67b1cf1e5

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8a80295b6a21cab43c85ea274b42f6f3501bedd4b497886f40f54718c8c9bb78
MD5 20de01137caad8f6e68c329e5bbe2828
BLAKE2b-256 f26c18ddc272e02a1e7c66cf976655703643a994a8605b27703c2ca6d7b0dc38

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post3-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ef135d1acf5d7128c257533021c300a0a629d8c9ef762c989b21cd991d1ebe7c
MD5 f6b07b48307caeba29a282539667a0f1
BLAKE2b-256 dc51306b662a8953242600915b13d1550bfe4482661cd85cb4ffa0da26bdb54d

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 18032c6a97500aa99b6e550f14e5b24dd8c453e5f6f7ce7c2bea2e51727500a6
MD5 6618813d1590c2fee9f6facd8602e472
BLAKE2b-256 02fb99337468c64e6dae8ee503bae3a1a0f1cd708ad2f6c93df29b57625dc310

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post3-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2e715813671fcb1fe01cf840685706a3b79546b687fc671ccc098050239f6ccc
MD5 2b28baa1f7aff785fb912b8e748de815
BLAKE2b-256 c328921e8729f51e24fe346ca402f8a4cde90d64ef29790679c383d82770564b

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post3-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 09702e6495b6633e8f57f4243df12df24665dc3a19d17ca9d7099c407a7abe64
MD5 75250a2c820862c50327a6c6e76ded43
BLAKE2b-256 066108fe8417918d17d85fc6c386389e0828a96688b30c89a0e4b2f27251d42d

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9cd4005ad244207be2ef63636ce69d34642c7dea53317f45942b2df1d868ab7c
MD5 c4a945becc06a1ba772ec6d2384280bb
BLAKE2b-256 d638b0f742fc9a4fc38786b9086e022c0548090063191b84cf29fe2583c37be7

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post3-cp38-cp38-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post3-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 f60a0f4a18f7c5f99f29aa9a07ad69cbc514e0774744c0d497e70c7cc726047d
MD5 f0e00ad08e5568bf3cb240e169967e5a
BLAKE2b-256 597df6dcae327c04ff5b48e37d16f4f36a52bbcadf378caafcef217ccbbdf31b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page