Skip to content

pfeodrippe/tladeps

Repository files navigation

TLA Deps

Simple dependency manager for TLA+.

This CLI is a wrapper over TLC which can fetch modules from Maven or Clojars. This has the following advantages:

  • Not bloating the TLA+ Community Modules repo;

  • No need for custom repository, just use the ones you are used to, e.g. maven or clojars;

  • Ease sharing(Perhaps? Let’s see if someone will use it).

Installation

Then install tladeps.

bash < <(curl -s https://raw.githubusercontent.com/pfeodrippe/tladeps/master/install)

Usage

The arguments are the same that you use for TLC or Sany (or any other tlatool class), but you can also pass:

  • --tladeps-dep, you can pass shortcuts for existent and registered deps (see the src/tladeps/core.clj file);

  • --tladeps-raw-deps, pass a EDN map with references to any other dependencies (see below), it’s a scape hatch if the dependency/module is not already registered here.

  • --tladeps-classpath, returns only the classpath. You have to add edn namespaces manually if needed, but this may be more composable if you want to keep using java -cp …​ command to call tla tools.

See examples below.

Let’s say I have a Abc.tla file.

------------- CONFIG Abc ---------

===================

-------------------------------- MODULE Abc --------------------------------

EXTENDS Edn, Integers, Sequences, TLC, TLCExt

ASSUME(ToEdn({}) = "#{}")

=============================================================================

We can use the registed EDN module with --tladeps-dep edn.

tladeps --tladeps-dep edn tlc2.TLC Abc.tla -config Abc.tla

About

Simple TLA+ Dependency Manager

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published