TLA+ Tools
TLA+ Tools
The Toolbox
Most users of TLA+ will now use the TLA
Toolbox.
The TLA+ tools come with the Toolbox and are run
from it.
This page is of interest mainly to those who want to use the TLA+
tools outside the Toolbox, from a command-line interface.
TLA+2
The original version of TLA, has been retired. The current
version of TLA is now TLA+2 tools. TLA+2 is a new version of
TLA+ with additional features that are mostly for writing
proofs. One new feature that is useful for writing ordinary
specifications is the ability to write recursive operator
definitions.
What are the TLA+ Tools?
TLA+ is a language for writing TLA specifications.
See the TLA web page or the book
Specifying Systems to find out
about TLA and TLA+. A new
TLA+ Hyperbook
is being written. It provides what is hopefully a gentler introduction
to TLA+.
There are four TLA+ tools available, each described with its own
web page:
- The SANY Syntactic Analyzer
- A parser and syntax checker for TLA+ specifications.
- TLC
- A model checker and simulator for a subclass of "executable" TLA+
specifications.
- The PlusCal Translator
- A translator from the PlusCal algorithm language to TLA+.
- TLATeX
- A program for typesetting TLA+ specifications.
Except for the PlusCal translator, the tools are described in the book
Specifying Systems.
Documentation of the PlusCal translator is on the PlusCal web page. The current
versions of these tools are:
TLC: Version 2.04 of 19 January 2012
SANY: Version 2.2 of 20 July 2011
PlusCal: Version 1.7 of 19 January 2012
TLATeX: Version 0.9 of 19 September 2007
These versions differ somewhat from the ones described in the
book. In particular, several features have been added
to TLC. The known differences are described in this
document:
-
Current Versions of the
TLA+ Tools
-
Downloading and Installing the Tools
The distribution comes as a zip file. Download the file by clicking
here:
-
TLA+ Tools
Separate directions for completing the installation on Windows and
on Unix are given
below.
WINDOWS
Choose (or create) a folder into which you want to put the tools
and unzip the downloaded file into that folder.
Let's suppose that your folder is
c:\user\myfolder .
This will create a subfolder of myfolder named
tla that has three subfolders, each
containing one of the tools.
You must then add
c:\user\myfolder\tla
to your CLASSPATH variable.
How you do that depends on what version of Windows you're using:
Non-Ancient Versions of Windows
Choose Start / ControlPanel.
On the Control Panel, choose
System,
then click on
Advanced and then
Environment Variables,
then look for the CLASSPATH variable. If it exists, append
;c:\user\myfolder\tla
to the end of it.
If not, create a new CLASSPATH variable whose value is
c:\user\myfolder\tla .
Windows 95 (and probably Windows 98)
You must modify your AUTOEXEC.BAT file. If there is a command
set CLASSPATH = c:\foo\bar;d:\myjava\files
then you should change it to
set CLASSPATH = c:\foo\bar;d:\myjava\files;c:\user\myfolder\tla
If there is no such command in the file, then you should add
set CLASSPATH = c:\user\myfolder\tla
to your AUTOEXEC.BAT file.
UNIX
Choose (or create) a directory into which you want to put the tools
and unzip the downloaded file into that directory.
Let's suppose that your directory is
/udir/user/mydir .
This will create a subdirectory of mydir named
tla that has three subdirectories, each
containing one of the tools.
You must now add /udir/user/mydir/tla
to the CLASSPATH environment variable.
Assuming you're running the C shell or some derivative, you do this by
typing
setenv CLASSPATH /udir/user/mydir/tla
However, you'll probably want to have the CLASSPATH variable set
automatically when you login.
To do this, your
.login
or
.csh
file must contain a command to set that variable.
If a command
setenv CLASSPATH ...
already exists in your
.login
or
.csh
file, just add the command
setenv CLASSPATH $CLASSPATH":/udir/user/mydir/tla"
after it.
Otherwise, just add the command
setenv CLASSPATH /udir/user/mydir/tla
Running the Tools
To run the tools, you must have Java installed on your
machine.
If you're running Unix, it is probably already there.
If you're running Windows, you can get Java
here
or
here.
After installing the tools and Java, you run them in a Windows
Command Prompt window or in a Unix shell by typing the
appropriate one of these commands
java tlc2.TLC
java tla2sany.SANY
java pcal.trans
java tla2tex.TLA
followed by the command arguments, which consist of zero or more
switches followed by the name of a .tla file.
(The extension .tla can be omitted when typing
the file name.)