Alloy Analyzer 4

Version 4 of the Alloy Analyzer is a complete rewrite, offering improvements in robustness, performance and usability. The new codebase is approximately a quarter of the size of the codebase of Alloy 3. Compilation is now instantaneous for all but the largest models, and analysis is often a factor of 2-10 faster. We recommend that all users switch to this new version. There are a small number of syntactic improvements over Alloy 3, and models written in Alloy 3 will therefore require some very small alterations to run in Alloy 4.

The Alloy Analyzer 4 is based on the new SAT-based model finder Kodkod. Kodkod applies new techniques and optimizations to the translation from relational to boolean logic, such as user-provided partial instances and a more general symmetry-breaking technique that works in the presence of arbitrary partial instances.

System Requirements:

Java 5 or above

Download Alloy Analyzer 4.1.7

Mac OS X: download and open this dmg file.

All Others: download and double-click this jar file. Or download the file then type  java -jar alloy4.jar   into a command prompt.

Note: Ancient versions of Alloy 4.0 BETA uses the Java Webstart deployment technology and is incompatible with the newer Alloy4. Please type javaws into a command prompt, select Alloy4, then click Remove.

Documentation

A step-by-step walkthrough and tutorial of Alloy4 is here and here.

A list of frequently asked questions is here.

The grammar is here.

For existing Alloy 3 users, please refer to the Alloy 4 quick guide for the list of changes, as well as an overview of the new analyzer.

For new users, we are in the process of updating the existing user manual and tutorials for Alloy 4. In the mean time, please refer to the old Alloy 3 documentation in conjunction with the Alloy 4 quick guide.

The book "Software Abstractions: Logic, Language, and Analysis":

Daniel Jackson's book Software Abstractions: Logic, Language, and Analysis was based on Alloy 3.
The complete list of how to update the book for Alloy 4 is listed here.

Furthermore, the examples in the book have been updated to the Alloy 4 syntax.
They are now included in Alloy 4's sample directory, and can also be downloaded as a single zip file, or be browsed online.

What's New

Using Alloy4 with your own Text Editor

Daniel Le Berre and his group have developed an Eclipse plugin for Alloy Analyzer 4. It is still under development, but it has already proven useful to many users.

Allison Waingold wrote an Emacs major mode for Alloy 3. We have not had the opportunity to update it for Alloy 4, but hopefully its syntax highlighting and other features can still be useful for Alloy 4 users.

There is a VIM syntax for Alloy4.

There is an a2ps stylesheet for Alloy4.

Troubleshooting

  1. If you see the error message "java.lang.UnsupportedClassVersionError", that means your Java version is too old. Alloy4 requires Java 5 or newer.

  2. If you've downloaded a new version of Alloy4, but an old version (Alloy4 BETA7) keeps appearing, then you may have a stale entry in your Java Webstart registry.
    Please type javaws into a command prompt, select Alloy4, then click Remove.

  3. If you get the error message "java is not in your current program search path", please add it to your path. For Windows users, please refer to the "update the PATH variable" section in Sun's installation guide. For other OS, please refer to the appropriate documentation.

Feedback

We'd like to hear from you! Email us at:

To discuss Alloy with other users, post a message in the alloy discussion forum.

Source Download

The source code for the Alloy Analyzer is included in alloy4.jar (in the /edu/mit/csail/sdg directory),
and is placed under the MIT license.

The Alloy Analyzer utilizes several third-party packages whose code may be distributed under a different license (see the various LICENSE files in the distribution for details). We are extremely grateful to the authors of these packages for making their source code freely available.