ltsmin: make it easier to find the README

Fixes #550, reported by Daniel Stan.

* tests/ltsmin/README: Move...
* README.ltsmin: ... here.
* Makefile.am (EXTRA_DIST): Add README.ltsmin.
* README: Mention README.ltsmin.
* spot/ltsmin/spins_interface.cc: Mention README.ltsmin in the error
message.
* tests/ltsmin/check.test, tests/ltsmin/check3.test: Adjust reference
to README.
* NEWS: Mention this fix.
* THANKS: Add Danial.
This commit is contained in:
Alexandre Duret-Lutz 2023-11-15 17:00:19 +01:00
parent b7995fcc5d
commit 5ed56c054b
8 changed files with 34 additions and 18 deletions

View file

@ -1,6 +1,6 @@
## -*- coding: utf-8 -*- ## -*- coding: utf-8 -*-
## Copyright (C) 2011-2017, 2020, 2022 Laboratoire de Recherche et Développement ## Copyright (C) 2011-2017, 2020, 2022-2023 Laboratoire de Recherche
## de l'Epita (LRDE). ## et Développement de l'Epita (LRDE).
## Copyright (C) 2003, 2005 Laboratoire d'Informatique de Paris 6 (LIP6), ## Copyright (C) 2003, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
## département Systèmes Répartis Coopératifs (SRC), Université Pierre ## département Systèmes Répartis Coopératifs (SRC), Université Pierre
## et Marie Curie. ## et Marie Curie.
@ -69,7 +69,7 @@ EXTRA_DIST = HACKING ChangeLog.1 tools/gitlog-to-changelog \
tools/help2man tools/man2html.pl \ tools/help2man tools/man2html.pl \
tools/test-driver-teamcity $(UTF8) $(DEBIAN) \ tools/test-driver-teamcity $(UTF8) $(DEBIAN) \
m4/gnulib-cache.m4 .dir-locals.el \ m4/gnulib-cache.m4 .dir-locals.el \
spot.spec spot.spec.in spot.spec spot.spec.in README.ltsmin
dist-hook: gen-ChangeLog dist-hook: gen-ChangeLog

3
NEWS
View file

@ -108,6 +108,9 @@ New in spot 2.11.6.dev (not yet released)
removal of superfluous APs that is now performed by ltlsynt removal of superfluous APs that is now performed by ltlsynt
(search for --polarity and --global-equivalence above). (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: Python:
- The spot.automata() and spot.automaton() functions now accept a - The spot.automata() and spot.automaton() functions now accept a

4
README
View file

@ -93,6 +93,10 @@ automata.
If the SAT-solver glucose is found on your system, it will be used by 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. 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 Spot used to distribute a modified version of LBTT (an LTL to Büchi
test bench), mostly fixing errors reported by recent compilers. test bench), mostly fixing errors reported by recent compilers.
However Spot now distributes its own reimplementation of LBTT, called However Spot now distributes its own reimplementation of LBTT, called

1
THANKS
View file

@ -10,6 +10,7 @@ Caroline Lemieux
Christian Dax Christian Dax
Christopher Ziegler Christopher Ziegler
Clément Tamines Clément Tamines
Daniel Stan
David Dokoupil David Dokoupil
David Müller David Müller
Dávid Smolka Dávid Smolka

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*- // -*- 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) // de l'Epita (LRDE)
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
@ -45,22 +45,26 @@ namespace spot
static void static void
compile_model(std::string& filename, const std::string& ext) compile_model(std::string& filename, const std::string& ext)
{ {
const char* cmd;
std::string command; std::string command;
std::string compiled_ext; std::string compiled_ext;
if (ext == ".gal") if (ext == ".gal")
{ {
command = "gal2c " + filename; cmd = "gal2c ";
command = cmd + filename;
compiled_ext = "2C"; compiled_ext = "2C";
} }
else if (ext == ".prom" || ext == ".pm" || ext == ".pml") else if (ext == ".prom" || ext == ".pm" || ext == ".pml")
{ {
command = "spins " + filename; cmd = "spins ";
command = cmd + filename;
compiled_ext = ".spins"; compiled_ext = ".spins";
} }
else if (ext == ".dve") 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 command += " 2> /dev/null"; // FIXME needed for Clang on MacOSX
compiled_ext = "2C"; compiled_ext = "2C";
} }
@ -92,9 +96,17 @@ namespace spot
int res = system(command.c_str()); int res = system(command.c_str());
if (res) if (res)
throw std::runtime_error("Execution of '"s {
+ command.c_str() + "' returned exit code " std::ostringstream os;
+ std::to_string(WEXITSTATUS(res))); 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());
}
} }
} }

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright (C) 2011, 2012, 2014, 2015, 2016, 2017, 2019, 2020 Laboratoire # Copyright (C) 2011-2012, 2014-2017, 2019-2020, 2023 Laboratoire de
# de Recherche et Développement de l'Epita (LRDE). # Recherche et Développement de l'Epita (LRDE).
# #
# This file is part of Spot, a model checking library. # This file is part of Spot, a model checking library.
# #
@ -48,7 +48,7 @@ fi
# dve2 # dve2
for opt in '' '--compress 1'; do 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 # (Don't run the first one using "run 0" because it would take too much
# time with valgrind.). # time with valgrind.).

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# -*- coding: utf-8 -*- # -*- 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). # et Développement de l'Epita (LRDE).
# #
# This file is part of Spot, a model checking library. # This file is part of Spot, a model checking library.
@ -28,10 +28,6 @@ fi
set -e set -e
for opt in '' '--compress 1'; do 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 \ run 1 ../modelcheck $opt --is-empty --model $srcdir/beem-peterson.4.gal \
--formula '!G("P_0.state==2" -> F "P_0.state==1")' --formula '!G("P_0.state==2" -> F "P_0.state==1")'
run 1 ../modelcheck $opt --is-empty --model $srcdir/beem-peterson.4.gal \ run 1 ../modelcheck $opt --is-empty --model $srcdir/beem-peterson.4.gal \