This release is a pre-release and may not be stable for production use.
Timewinder is a Python 3 library to build and run temporal logic models. The goal of the library is to bring formal methods, specifically Lamport's Temporal Logic of Actions, to a broader audience. While very much inspired by TLA+, Timewinder tries to be simpler, more readable, and more industry-focused. That said, TLA+ is an impressive tool and Timewinder is not trying to cover the full spectrum of what TLA+ can do.
The project intends to work toward the following goals:
- Introduce more developers into modeling and formal methods
- Increase the number of people working with temporal logic
- Improve design docs, with testable example models that non-experts can also read
- Make running models easy and automatable, even from the command line.
Project Status
This project is still alpha, so the API may change. Please join in on the Github Discussions to talk about models, examples, and direction. Help is definitely wanted and appreciated!
Examples
- Account Transfers from Practical TLA+, Chapter 1
- Blocking Queue from Weeks of Debugging Can Save You Hours of TLA+
High-level Usage
Timewinder starts with the @timewinder.object and @timewinder.process decorators.
object wraps classes and registers them as a Timewinder data structures.
process wraps functions that we intend to check. Inside process functions, Python's yield keyword represents an atomicity boundary -- that is, at every yield point, the evaluator saves the state and is free to run any other available process in any order.
A function with no yield keyword always runs to completion in one step.
Finally, there are predicates, which are properties about the objects to be checked at every stage.
These are all combined in the Evaluator, where Timewinder will exhaustively generate (up to a limit number of steps) all the potential program states resulting from running the processes in any order.
Installation
You can simply pip install timewinder.
Developing
Pre-requisites
You only need tox for testing and documentation building:
python3 -m pip install tox
Or clone the repository:
git clone https://github.com/timewinder-dev/timewinder
Running the test suite
You can run the full test suite with:
tox
Metadata
Release files for timewinder 0.1.dev1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| timewinder-0.1.dev1.tar.gz | 15.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| timewinder-0.1.dev1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.2 kB
Release files / timewinder-0.1.dev1.tar.gz
| Download URL | timewinder-0.1.dev1.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8772398312f46a0fd50e3b871cf7e93e80286f581c98ac6ab9b0ee99bcd8534
|
|
BLAKE2b-256 checksum How to use checksums |
191e8a801419b503eee7dde7291c4cab3fa809090138dc20f4dc67a0cada280b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
|
Release files / timewinder-0.1.dev1-py3-none-any.whl
| Download URL | timewinder-0.1.dev1-py3-none-any.whl |
|---|---|
| Size | 31.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be3c33ad6adab973ba872cb8ec8c02a0c4d2d9b3862a8b2097848ff5e95bb831
|
|
BLAKE2b-256 checksum How to use checksums |
b54380891b86640911733c5ab70a590cfbd6406bc0eebb0cd5d89ac0924a5440
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
|
Security for timewinder 0.1.dev1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.