Sireum is available as pre-built binaries/installers or from source. The main advantage of using the source distribution is that updates can be done incrementally while the binary distribution requires complete re-installation. On the other hand, source distribution requires more setup. As Sireum is currently in its early active development phase, it is highly recommended to use the source distribution.

Download

Binary Distributions

GitHub Releases

The binary distribution files are available at: https://github.com/sireum/kekinian/releases

Sireum binary distribution files are 7z self-extracting archives (SFX) with command-line installers to (optionally) configure where Sireum should be installed (the files can also be extracted using a program capable of uncompressing 7z archive).

On macOS, you might need to “un-quarantine” the self-extracting executable:

xattr -rd com.apple.quarantine <PATH-TO>/sireum-dev-mac.sfx

If you want to ensure that the downloaded files are genuine, download the appropriate Minisign signature file for the specific platform, then run:

minisign -P RWShRZe/1tMRHAcQ2162Wq5FhU2ptktJdQxzUxvK0MwVjDYRC4JY87Fb -VHm <installer-file>

Set the SIREUM_HOME env var to the Sireum installation path, then proceed to Using Sireum.

Using Installer Scripts

You can also set up the bleeding edge version of Sireum by downloading and running Sireum’s initialization script (curl is required; DIR can be set to another path for Sireum home bin directory):

(DIR=Sireum && SIREUM_V=master && rm -fR $DIR && mkdir -p $DIR/bin && cd $DIR/bin && curl -JLso init.sh https://raw.githubusercontent.com/sireum/kekinian/$SIREUM_V/bin/init.sh && bash init.sh)
cmd /V /C "set DIR=Sireum && set SIREUM_V=master&& (if exist !DIR! rd /S /Q !DIR!) && md !DIR!\bin && cd !DIR!\bin && curl -JLso init.bat https://raw.githubusercontent.com/sireum/kekinian/!SIREUM_V!/bin/init.bat && init.bat"

Note that this installation approach is using GitHub anonymous connection, thus subject to rate limiting. To remove the limit, set the GITHUB_TOKEN environment variable to one of your GitHub tokens.

Also note that, the latest pre-built sireum.jar might be behind the latest commit, so there might be app/dependency versioning mismatch compared to the source distribution, but it does not require source compilation (faster). The pre-built sireum.jar is more frequently updated than the GitHub release binary distribution described above, and it is what is used to build Sireum itself at every commit.

To ensure there is no versioning mismatch, you can use a specific version of Sireum, by replacing master with a release version (> 4.202211*) or commit tip SHA (without the 4. prefix) listed at https://github.com/sireum/init/releases in the command line above.

Git Source Distribution

Requirements

Note that Sireum stores small, pre-built binary dependencies in its repositories. Virus analysis results are provided in the respective submodule repositories for macOS, Linux, and Windows.

Setup

In a console terminal:

git clone --recursive https://github.com/sireum/kekinian Sireum
Sireum/bin/build.cmd setup  # for non-POSIX shell, prefix with sh
git clone --recursive https://github.com/sireum/Sireum
Sireum\bin\build.cmd setup

The above install Sireum command-line interface (CLI) and its IntelliJ-based Integrated Verification Environment (IVE), as well as their dependencies. Set the SIREUM_HOME env var to the Sireum path above.

To update later on, simply do a git pull --recurse-submodules and re-run build.cmd. Note that after a setup update, it is best to invalidate IntelliJ’s cache files and restart by using IntelliJ’s File -> Invalidate Caches... menu item and select Clear all file system cache and Local History.

Notes
  • Occasionally, there might be new API used in build.cmd that is available in the pre-built binary online but not in your local copy. This issue happens because build.cmd uses Sireum itself, hence it is a bootstrapping issue. This issue typically manifests by build.cmd failing to compile/execute due to missing methods/classes. In that case, first delete your local sireum.jar (and build.cmd.com, if any) in the bin directory and then re-run build.cmd setup.

  • If building Sireum somehow failed still, try cleaning the repo:

    ${SIREUM_HOME}/bin/clean.sh
    
    %SIREUM_HOME%\bin\clean.bat
    

    The clean scripts remove all Sireum-related cache directories and revert any changes and delete new files in the local git repository.

    After cleaning, re-run git pull --recurse-submodules (possibly multiple times until it reaches a good fix-point where git status indicates that its working tree is clean) and build.cmd setup.

    If all else fails, try recursively re-clone Sireum.

Native Executable

It is recommended to compile Sireum (and Slash build scripts) to native as it removes JVM boot up time.

First, install GraalVM native-image’s prerequisites (note: native-image for Windows requires Visual Studio Community/Enterprise); then, to build Sireum native executable:

${SIREUM_HOME}/bin/build.cmd native
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
%SIREUM_HOME%\bin\build.cmd native
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
%SIREUM_HOME%\bin\build.cmd native
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
%SIREUM_HOME%\bin\build.cmd native

The compiled native binary is located at:

${SIREUM_HOME}/bin/mac/sireum
${SIREUM_HOME}/bin/linux/sireum
%SIREUM_HOME%\bin\win\sireum.exe

Note that once the native version is available (and has a newer timestamp), sireum and sireum.bat in bin call the native version. This is also similar for build.cmd in bin.

Remote Development Setup (Experimental)
Using JetBrains Projector

You can project Sireum IVE so it can be viewed by a web browser using JetBrains Projector that ships with IVE. To launch, click on “Projector” in the IVE status bar.

If you use Linux, you can launch Sireum IVE headless-ly by first installing the projector server:

$SIREUM_HOME/bin/install/projector-server.cmd
$SIREUM_HOME/bin/linux/idea/bin/projector-server.sh

Then open http://<machine-ip>:8887 in a browser.

Using JetBrains Gateway

IntelliJ Ultimate now supports remote development from a Linux server reachable using ssh, and Sireum IVE can be set up on top of it:

  1. Use JetBrains Gateway to install an IntelliJ Ultimate instance in the Linux server.

    Note that the supported instance version of IntelliJ should be compatible with what is listed in version.properties with property key org.sireum.version.idea property key). If the listed property value is 20XX.Y.Z or 20XX.Y, then you need to IntelliJ Ultimate build that starts withXXY.

  2. Connect to the server and install Sireum:

    git clone --recursive https://github.com/sireum/kekinian Sireum
    Sireum/bin/build.cmd setup-server
    
  3. Open the Sireum path above with JetBrains Gateway/Client.

Installing FMIDE+HAMR

${SIREUM_HOME}/bin/install/fmide.cmd
%SIREUM_HOME%\bin\sireum\fmide.cmd

Using Sireum

To launch the Sireum CLI, IVE, or FMIDE+HAMR:

${SIREUM_HOME}/bin/sireum                      # CLI
open ${SIREUM_HOME}/bin/mac/idea/IVE.app       # IVE
open ${SIREUM_HOME}bin/mac/fmide.app           # FMIDE+HAMR
${SIREUM_HOME}/bin/sireum
${SIREUM_HOME}/bin/linux/idea/bin/IVE.sh
${SIREUM_HOME}/bin/linux/fmide/fmide
${SIREUM_HOME}/bin/sireum
${SIREUM_HOME}/bin/linux/arm/idea/bin/IVE.sh
%SIREUM_HOME%\bin\sireum.bat
%SIREUM_HOME%\bin\win\idea\bin\IVE.exe
start /B %SIREUM_HOME%\bin\win\fmide\fmide.exe

See Sireum Documentation for more information.