-
Notifications
You must be signed in to change notification settings - Fork 11
Compiling LTSMin
S# includes its own [model checker](Model Checking) and also supports LTSMin. LTSMin, however, is not built-into S# and has to be downloaded and compiled separately as follows:
-
Clone LTSMin:
git clone https://github.com/utwente-fmt/ltsmin
-
Switch to the commit for version 2.1:
git checkout ba6db31
; newer versions are not supported. -
Install the latest 64-bit version of cygwin.
-
Open a cygwin console, go to the directory containing the LTSMin repository, and run the following commands:
$ ./configure --disable-dependency-tracking LDFLAGS=-Wl,--export-all-symbols
$ make
-
Add the path to the compiled file
pins2lts-seq.exe
to your system path:-
In the start menu, search for "edit system variables" to open the advanced system properties dialog.
-
Click on "Environment Variables".
-
In the section "System Variables", search for the "Path" entry and click "Edit".
-
Add a
;
at the end of the "Variable value" line and append the full path (excluding the file name) to the compiledpins2lts-seq.exe
.
-
-
Make sure the following cygwin DLLs are in a directory included in your system path as well:
cyggcc_s-seh-1.dll
,cygiconv-2.dll
,cygintl-8.dll
,cygpopt-0.dll
,cygstdc++-6.dll
,cygstdc++-6.dll
,cygwin1.dll
, andcygz.dll
.
If you follow these instructions, S# should be able to use LTSMin for model checking as shown in the example below. If S# still cannot find LTSMin, check if your paths are wrong; you might also have to restart your system.
var model = // ...
var ltsmin = new LtsMin();
var result = ltsmin.CheckInvariant(model, true);
if (result.FormulaHolds)
Console.WriteLine($"Formula holds.");
Note, however, that S#'s LTSMin integration does not support counter examples. For the full list of limitations, see the [model checking page](Model Checking).