Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

Currently, the only way to obtain SCAN is to build it from sources.

Build prerequisites

SCAN is entirely written in Rust, so, to build it, you need to install a recent version of the Rust toolchain. The easiest and recommended way to do so is by installing rustup either following the instructions on its homepage or through your OS’s package manager. Do not forget to set your PATH correctly, if required.

Installing with Cargo

To install and use SCAN on your system, the easiest way is to use the cargo install command, with:

cargo install smc_scan --locked

Cargo will build and install SCAN on your system (the --locked option is not required, but it is recommended as it improves build reproducibility by enforcing the use of specified versions for dependencies).

Cargo will build and install SCAN on your system, after which it can be used as a command-line tool. The same command updates SCAN to the latest version.

After installation, type

scan

to verify that the installation completed successfully by displaying the in-line help.

Installing specific versions

To install a specific SCAN version, e.g., v0.1.0, use:

cargo install smc_scan --version 0.1.0 --locked

It is also possible to install SCAN from the latest commit directly from this repository with:

cargo install --git https://github.com/convince-project/scan

(see cargo install --help for more options).

Features

By default, SCAN includes the SCXML and JANI frontends, while the Promela frontend is disabled through the use of Cargo features. The available features for SCAN are:

  • scxml to include the SCXML frontend (enabled by default);
  • jani to include the JANI frontend (enabled by default);
  • promela to include the Promela frontend (disabled by default);

To change which frontends to include at build time, explicitly select the desired features with the --features option as follows:

cargo install smc_scan --locked --features FEATURES

where FEATURES is a (comma-separated, or space-separated inside quotes) list. Alternatively, if you want all available features, install SCAN with:

cargo install smc_scan --locked --all-features

Be aware that each feature imports extra dependencies and increases build time.

Build optimization

Even though by default the cargo install builds are well-optimized, some further advanced build optimizations are possible. The extent of the speed-up that can be obtained depends on the use-case, and is not always worth the extra effort required to enable these configurations.

Advanced Rust users will already be familiar with compilation settings and can tune the build as they see fit. For users that are unfamiliar with Rust but still want to get high performances, and without going into the details, a more optimized built can be attempted with:

RUSTFLAGS="-C target-cpu=native" cargo install smc_scan --locked --profile release-lto

An excellent, though unofficial, reference on Rust performance optimization is The Rust Performance Book, specifically the Build configuration section.