Skip to main content

TLA+ tools: download TLC, compile custom modules, run model checker

Project description

TLA+ CLI

Command-line tool for working with TLA+ specifications and the TLC model checker.

Installation

Install system-wide via uv tool

uv tool install git+https://github.com/nikolskiy/tlaplus-cli

Upgrade:

uv tool upgrade tlaplus-cli

Uninstall

uv tool uninstall tlaplus-cli

Usage

Download TLC

# Download stable release
tla download

# Download nightly build
tla download --nightly

Check Java Version

tla check-java

Compile Custom Java Modules

tla build

# Verbose output
tla build --verbose

Compiles .java files from workspace/modules/ into workspace/classes/.

Run TLC

tla tlc <spec_name>

For example:

tla tlc queue

Configuration

On first run, a default config is created at:

~/.config/tla/config.yaml

Edit this file to set your workspace path and TLC options:

tla:
  jar_name: tla2tools.jar
  urls:
    stable: https://github.com/tlaplus/tlaplus/releases/latest/download/tla2tools.jar
    nightly: https://tla.msr-inria.inria.fr/tlatoolbox/ci/dist/tla2tools.jar

workspace:
  root: .                 # Project root (relative to CWD)
  spec_dir: spec          # Directory containing .tla files
  modules_dir: modules    # Directory containing .java files
  classes_dir: classes    # Directory for compiled .class files

tlc:
  java_class: tlc2.TLC
  overrides_class: tlc2.overrides.TLCOverrides

java:
  min_version: 11
  opts:
    - "-XX:+IgnoreUnrecognizedVMOptions"
    - "-XX:+UseParallelGC"

Directory Layout

Directory Purpose Location
Config config.yaml ~/.config/tla/
Cache tla2tools.jar ~/.cache/tla/
Workspace specs + modules + classes Set via workspace.root in config

Note on Package Name

This package is distributed on PyPI as tlaplus-cli but imports as tla. There is a separate, unrelated tla package on PyPI (a TLA+ parser). If you have both installed, they will conflict. In practice this is unlikely since they serve different purposes, but be aware of it.

Dependencies

  • Java >= 11: Required for TLC.
  • uv: For installing the tool.

Project details


Download files

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

Source Distribution

tlaplus_cli-0.1.7.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

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

tlaplus_cli-0.1.7-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file tlaplus_cli-0.1.7.tar.gz.

File metadata

  • Download URL: tlaplus_cli-0.1.7.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tlaplus_cli-0.1.7.tar.gz
Algorithm Hash digest
SHA256 552a9ed0711a0aa41a2b3ce71b5b520ffa09b596de6727cb64601a281df36230
MD5 3f9490206feb91d5e2c3726457ba499b
BLAKE2b-256 c3af9de3e152e4912a41c21785474481142c3d3759b5f8baf6dedb2033b0d69d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tlaplus_cli-0.1.7.tar.gz:

Publisher: release.yml on nikolskiy/tlaplus-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tlaplus_cli-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: tlaplus_cli-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tlaplus_cli-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 53cc4e0c515852ae6a1ccc5dac716c46958d34082cb70859d55c6f92a123530f
MD5 b2d849ec340d0a78303f693f40c66621
BLAKE2b-256 75a71f587bacde97a05563164d8920351960fcffb2cf42ce5dc6660f3fed08ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for tlaplus_cli-0.1.7-py3-none-any.whl:

Publisher: release.yml on nikolskiy/tlaplus-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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