diff --git a/Makefile.am b/Makefile.am index db7a60d9b..5cd8257d2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ## -*- coding: utf-8 -*- -## Copyright (C) 2011-2017, 2020, 2022 Laboratoire de Recherche et Développement -## de l'Epita (LRDE). +## Copyright (C) 2011-2017, 2020, 2022-2023 Laboratoire de Recherche +## et Développement de l'Epita (LRDE). ## Copyright (C) 2003, 2005 Laboratoire d'Informatique de Paris 6 (LIP6), ## département Systèmes Répartis Coopératifs (SRC), Université Pierre ## et Marie Curie. @@ -69,7 +69,7 @@ EXTRA_DIST = HACKING ChangeLog.1 tools/gitlog-to-changelog \ tools/help2man tools/man2html.pl \ tools/test-driver-teamcity $(UTF8) $(DEBIAN) \ m4/gnulib-cache.m4 .dir-locals.el \ - spot.spec spot.spec.in + spot.spec spot.spec.in README.ltsmin dist-hook: gen-ChangeLog diff --git a/NEWS b/NEWS index 021548c09..72e24d612 100644 --- a/NEWS +++ b/NEWS @@ -108,6 +108,9 @@ New in spot 2.11.6.dev (not yet released) removal of superfluous APs that is now performed by ltlsynt (search for --polarity and --global-equivalence above). + - ltsmin's interface will now point to README.ltsmin in case an + error is found while running divine or spins. + Python: - The spot.automata() and spot.automaton() functions now accept a diff --git a/README b/README index 458da2d99..a19fc8473 100644 --- a/README +++ b/README @@ -93,6 +93,10 @@ automata. If the SAT-solver glucose is found on your system, it will be used by our test suite to test our SAT-based minimization algorithm. +If you want to use Spot with DiVinE2 (for model checking DVE models) +or with SpinS (for model checking Promela models), please read the +file named "README.ltsmin" for installation instructions. + Spot used to distribute a modified version of LBTT (an LTL to Büchi test bench), mostly fixing errors reported by recent compilers. However Spot now distributes its own reimplementation of LBTT, called diff --git a/tests/ltsmin/README b/README.ltsmin similarity index 100% rename from tests/ltsmin/README rename to README.ltsmin diff --git a/THANKS b/THANKS index ae3a37f8c..46e747d4e 100644 --- a/THANKS +++ b/THANKS @@ -10,6 +10,7 @@ Caroline Lemieux Christian Dax Christopher Ziegler Clément Tamines +Daniel Stan David Dokoupil David Müller Dávid Smolka diff --git a/spot/ltsmin/spins_interface.cc b/spot/ltsmin/spins_interface.cc index bd968b208..f4e1823f2 100644 --- a/spot/ltsmin/spins_interface.cc +++ b/spot/ltsmin/spins_interface.cc @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2019, 2020 Laboratoire de Recherche et Développement +// Copyright (C) 2019, 2020, 2023 Laboratoire de Recherche et Développement // de l'Epita (LRDE) // // This file is part of Spot, a model checking library. @@ -45,22 +45,26 @@ namespace spot static void compile_model(std::string& filename, const std::string& ext) { + const char* cmd; std::string command; std::string compiled_ext; if (ext == ".gal") { - command = "gal2c " + filename; + cmd = "gal2c "; + command = cmd + filename; compiled_ext = "2C"; } else if (ext == ".prom" || ext == ".pm" || ext == ".pml") { - command = "spins " + filename; + cmd = "spins "; + command = cmd + filename; compiled_ext = ".spins"; } else if (ext == ".dve") { - command = "divine compile --ltsmin " + filename; + cmd = "divine "; + command = cmd + "compile --ltsmin "s + filename; command += " 2> /dev/null"; // FIXME needed for Clang on MacOSX compiled_ext = "2C"; } @@ -92,9 +96,17 @@ namespace spot int res = system(command.c_str()); if (res) - throw std::runtime_error("Execution of '"s - + command.c_str() + "' returned exit code " - + std::to_string(WEXITSTATUS(res))); + { + std::ostringstream os; + int status = WEXITSTATUS(res); + os << "Execution of '" << command << "' returned exit code " + << status << '.'; + if (status == 127) + os << "\nIs " << cmd << "installed and on your $PATH?\n" + "Read README.ltsmin in Spot's sources for " + "installation instructions."; + throw std::runtime_error(os.str()); + } } } diff --git a/tests/ltsmin/check.test b/tests/ltsmin/check.test index 2beb82cc3..c4ce7d49b 100755 --- a/tests/ltsmin/check.test +++ b/tests/ltsmin/check.test @@ -1,7 +1,7 @@ #!/bin/sh # -*- coding: utf-8 -*- -# Copyright (C) 2011, 2012, 2014, 2015, 2016, 2017, 2019, 2020 Laboratoire -# de Recherche et Développement de l'Epita (LRDE). +# Copyright (C) 2011-2012, 2014-2017, 2019-2020, 2023 Laboratoire de +# Recherche et Développement de l'Epita (LRDE). # # This file is part of Spot, a model checking library. # @@ -48,7 +48,7 @@ fi # dve2 for opt in '' '--compress 1'; do - # The three examples from the README. + # The three examples from README.ltsmin. # (Don't run the first one using "run 0" because it would take too much # time with valgrind.). diff --git a/tests/ltsmin/check3.test b/tests/ltsmin/check3.test index 5d98cf83f..47df0e4d3 100755 --- a/tests/ltsmin/check3.test +++ b/tests/ltsmin/check3.test @@ -1,6 +1,6 @@ #!/bin/sh # -*- coding: utf-8 -*- -# Copyright (C) 2016, 2017 Laboratoire de Recherche +# Copyright (C) 2016-2017, 2023 Laboratoire de Recherche # et Développement de l'Epita (LRDE). # # This file is part of Spot, a model checking library. @@ -28,10 +28,6 @@ fi set -e for opt in '' '--compress 1'; do - # The three examples from the README. - # (Don't run the first one using "run 0" because it would take too much - # time with valgrind.). - run 1 ../modelcheck $opt --is-empty --model $srcdir/beem-peterson.4.gal \ --formula '!G("P_0.state==2" -> F "P_0.state==1")' run 1 ../modelcheck $opt --is-empty --model $srcdir/beem-peterson.4.gal \