Skip to main content

tidystl

STL robustness evaluation for Python. Explicit semantics, batch-first, extensible backends.

import numpy as np
from tidystl import Signal, parse, robustness

phi = parse("G[0,5](F[0,2](velocity >= 10))")

velocity_batch = np.full((100, 200), 12.0)  # N=100 traces, T=200 samples

sig = Signal.from_dict(
    times=np.linspace(0, 10, 200),
    values={"velocity": velocity_batch},  # shape: (N, T)
)

rho = robustness(phi, sig)  # shape: (N, T)

Features

  • Minimal dependencies: numpy and lark only; no C++ build, no MATLAB
  • Explicit semantics: boundary handling, interpolation, and end-of-trace behavior are documented and switchable per backend
  • Cross-validated: regression suites against reference tools (Breach, RTAMT, and others) using their ground-truth data
  • Batch-first: native (N, S, T) tensor layout
  • Backend-centric: swap evaluation strategy without changing formula or signal
  • Full STL: arbitrary nesting including the Until operator

Use cases

tidySTL is useful when you want to evaluate STL robustness in a small, explicit, and testable way.

  • Evaluate STL robustness Compute robustness values of STL formulas over real-valued signals.

  • Test STL semantics Check boundary-sensitive behavior such as interpolation, sampling, interval endpoints, and temporal aggregation, and compare the results with other STL tools when needed.

  • Experiment with semantics Implement alternative robustness semantics by changing only the relevant evaluation components.

  • Build research prototypes Use tidySTL as a lightweight STL evaluation layer inside monitoring, falsification, learning, or control workflows.

Installation

pip install tidystl

Requires Python 3.11+, numpy, lark.

The compatibility backends (Breach, RTAMT, STLCG++, TaLiRo, py-MTL, and more) live in a separate package; install it and register it once:

pip install tidystl-compat
import tidystl
import tidystl_compat
from tidystl import list_backends

tidystl.use(tidystl_compat)

print(list_backends())  # the full set registered, e.g. ['breach', 'native', ...]
# every listed name is usable as backend="...", e.g. backend="breach"

Only native is built into tidystl itself; list_backends() always reflects what is currently registered.

Documentation

For the full user manual (installation, signals, specification language, backend semantics, and worked examples), see docs/usage.md; for grammar tables, call signatures, and API contracts, see docs/reference.md.

License

MIT License. Copyright (c) 2026 National Institute of Advanced Industrial Science and Technology (AIST). Developed by Sota Sato.

Metadata

Release files for tidystl 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tidystl 0.2.0
File Size Uploaded
tidystl-0.2.0.tar.gz 34.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tidystl 0.2.0
File Interpreter ABI Platform
tidystl-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 57.3 kB

Release files / tidystl-0.2.0.tar.gz

Download URL tidystl-0.2.0.tar.gz
Size 34.3 kB
Tags Source
SHA-256 checksum
How to use checksums
79b169256f712214d8f66b40839bbb01151ca7c3bfd24d622b998d57f1ca2519
BLAKE2b-256 checksum
How to use checksums
61288413350d8f9ef97ade30cefc80fc87759fde0ff58d6077f6a78579406e8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / tidystl-0.2.0-py3-none-any.whl

Download URL tidystl-0.2.0-py3-none-any.whl
Size 23.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de2032d9c93b79ce7bc2c6c445f2160c1309129054495f1d49ee010b0c58c35c
BLAKE2b-256 checksum
How to use checksums
a5846bbd742baa001c8f83377a653d1fadfc2e2461c2e592e1febdf2c320630d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page