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

If you're not sure about the file name format, learn more about wheel file names.

pystlogic-0.1.3.post6-cp314-cp314-win_amd64.whl (225.3 kB view details)

Uploaded CPython 3.14Windows x86-64

pystlogic-0.1.3.post6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (313.8 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

pystlogic-0.1.3.post6-cp314-cp314-macosx_11_0_arm64.whl (219.1 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

pystlogic-0.1.3.post6-cp313-cp313-win_amd64.whl (218.6 kB view details)

Uploaded CPython 3.13Windows x86-64

pystlogic-0.1.3.post6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (313.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

pystlogic-0.1.3.post6-cp313-cp313-macosx_11_0_arm64.whl (218.6 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pystlogic-0.1.3.post6-cp312-cp312-win_amd64.whl (218.5 kB view details)

Uploaded CPython 3.12Windows x86-64

pystlogic-0.1.3.post6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (313.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pystlogic-0.1.3.post6-cp312-cp312-macosx_11_0_arm64.whl (218.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pystlogic-0.1.3.post6-cp311-cp311-win_amd64.whl (216.4 kB view details)

Uploaded CPython 3.11Windows x86-64

pystlogic-0.1.3.post6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (313.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pystlogic-0.1.3.post6-cp311-cp311-macosx_11_0_arm64.whl (217.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file pystlogic-0.1.3.post6-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post6-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 40cb8975fb5a402704d3d15018a730dbe9852e41b4b9e0167f9e8dd3186f67c0
MD5 44d9f86a8120cd36beee7504b4cc8afe
BLAKE2b-256 6314ad900341daa3cfe7ab60fb3b07a1d5aab9583387efb9dce6e837418ab3be

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 b49b713ce33ac9cd447191842fa4977c5383ae9e08bddc5e790c54307d36fbed
MD5 26eeb25a9e68443bf4a8e46e20a1ecdb
BLAKE2b-256 45ef0dd8d0f05d781f0122c6eab5124fd9005b16bc5d57112de89c4c56faa869

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post6-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post6-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e2d7e43ed4a84aacae31205d10f808b52cf1da838d730ba9f392a23523125474
MD5 1f10d044b7f06a381d48f2327377ee67
BLAKE2b-256 d532eaa8312553412bf50e3a041a825daf6cf4a9fcc7941a5e018788b6e91e3e

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post6-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9240ed9f9a42c5c7ccf6e7d972902faf2d7b85abbcbf909d0203e4dc51464bbd
MD5 2556a63faa1baa510c947f0df8d3fa58
BLAKE2b-256 98639067e03a1cd783b3dc8e8784fe3f4cefd2bdeaa891478fdda2961717a5d5

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 fbd1752cf790d13f9c7b7117f475a1f2b42e1e72c6cfaac46dbbbf8527ec5268
MD5 ad0aff7781f95962c8386979f229ef1b
BLAKE2b-256 681b1abf554c8d582971ee8e26744c0d9179eaf5534d4116e13a78568f3c3a80

See more details on using hashes here.

File details

Details for the file pystlogic-0.1.3.post6-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pystlogic-0.1.3.post6-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9390616b8a8ae0ab9762ec4f68362d3acc5c8843089a327a37a745d1a77f75f6
MD5 6862c3726950a16cbb29532f8d61f1cd
BLAKE2b-256 e080cb3fd8fd0e730da98d002d6564d99a0a36c2adfd4f430b1ff41132159e2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pystlogic-0.1.3.post6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ed797a6c9aa22e1fe649fce363b312c54e97f0b205811ebed667bc6232f30abd
MD5 c005bc06cd191a702d9c7ca228870af0
BLAKE2b-256 8a68dc6b73b9bacd3c470b18ad5460fec74b9a765039281a1767ea9cfb859aa8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pystlogic-0.1.3.post6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 c3fac0f507581034c51787e453b16d90c9dbcb1d7fa7d58523e77f8713a82013
MD5 4eca4f6af2242c48fbc2f49d6162a28c
BLAKE2b-256 8f14d4632408bb61c14292c38f5d9a7b4612c52b7bf0590fe0796f7fb2e45a6c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pystlogic-0.1.3.post6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 395550661a721cb9edd84d6e6fd17fc9ec8b5c3d654916f27fdf3359200c9660
MD5 689ffbbc41ac44ef02ff29e68eb48346
BLAKE2b-256 4d5921ea618166d0bf08374029ac36c9e5de3bd2c1b6c3aa3d3d565fbb077ff7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pystlogic-0.1.3.post6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 62bec6e5a987488232a60b4fb58285368ea63ba509dd9a77c94e34ee65cfcf72
MD5 b8e01f2b47e408badb30bf7a84d07863
BLAKE2b-256 e51d48c59a3ab2b22ffc2762cd05dfe46cd4545e7774d2ce118219351e282661

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pystlogic-0.1.3.post6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 9ffc2372cf51105ce15027a1dbd2887ad8307454de447c1d6f680d8eff5b7467
MD5 70322c7264aee1fb8307f13212381bc4
BLAKE2b-256 441904fff5d33e6cd36b9b45d2714b2cb475223e557c7b59b507e336e56536d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pystlogic-0.1.3.post6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8d8c98ed777628e915e97cead07a70bc6c99c69cfe6f0e6ba3959b2e1177d3b7
MD5 2e9e0bfcf540cb155621d0eddc983cc9
BLAKE2b-256 d16e104c7d9321f42508617f0891cc13c8d520d155e38fcef40088fda24d46f8

See more details on using hashes here.

Supported by

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