Commit e11da2e3 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

* lbtt/: Merge lbtt 1.1.0.

* src/tgbatest/spotlbtt.test: Adjust config file syntax to
please lbtt 1.1.0.
parent cfdd81a9
2004-07-07 Alexandre Duret-Lutz <adl@src.lip6.fr>
* lbtt/: Merge lbtt 1.1.0.
* src/tgbatest/spotlbtt.test: Adjust config file syntax to
please lbtt 1.1.0.
* src/tgbaalgos/gtec/gtec.hh (emptiness_check_shy::find_state): Add
comments.
* iface/gspn/ssp.cc (emptiness_check_shy_ssp::find_state): Likewise.
......
This diff is collapsed.
......@@ -33,6 +33,7 @@
#include "Exception.h"
#include "LtlFormula.h"
#include "translate.h"
#include "TempFsysName.h"
#include "TranslatorInterface.h"
/******************************************************************************
......@@ -98,13 +99,21 @@
* from the names of the input/output files. Each of these files should be
* "registered" before calling the external program with the function
*
* void registerTempFileObject
* (const string& filename, TempFileObject::Type t)
*
* where `filename' is the full name of the temporary file and `t' is a type
* of the object (TempFileObject::FILE or TempFileObject::DIRECTORY).
*
* All files or directories registered using this function will then be
* const char* registerTempFileObject
* (const string& filename, const TempFsysName::NameType t,
* const bool literal)
*
* where `filename' is the prefix of a temporary file name, `t' is a type
* of the object (TempFsysName::FILE or TempFsysName::DIRECTORY), and
* `literal' specifies whether `filename' should be interpreted literally or
* not (if not, `filename' will be treated as a suggestion for the name
* of the temporary file). If the name is to be interpreted literally,
* `filename' should contain the full path name of the temporary file to be
* created. In all cases, the function returns the full path name of the
* temporary file or directory, or it throws an IOException (defined in
* Exception.h) if the creation fails.
*
* All files or directories registered using this function will be
* automatically deleted after the translation is finished or aborted.
* The files or directories will be deleted in the reverse order of
* registration, i.e., the most recently registered file/directory will be
......@@ -115,55 +124,15 @@
class ExternalTranslator : public TranslatorInterface
{
public:
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
class TempFileObject /* A class for storing */
{ /* information about */
public: /* temporary files and
* directories.
*/
enum Type {FILE, DIRECTORY}; /* Types for a temporary
* file object.
*/
TempFileObject /* Constructor. */
(const string& filename = "", Type t = FILE);
~TempFileObject(); /* Destructor. */
const string& getName() const; /* Returns the filename
* associated with the
* object.
*/
Type getType() const; /* Returns the type of
* the object.
*/
private:
string name; /* Name of the file object.
*/
Type type; /* Type of the file object.
*/
TempFileObject(const TempFileObject&); /* Prevent copying and */
TempFileObject& operator= /* assignment of */
(const TempFileObject&); /* TempFileObjects. */
};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
ExternalTranslator(); /* Constructor. */
~ExternalTranslator(); /* Destructor. */
TempFileObject& registerTempFileObject /* Registers a temporary */
const char* registerTempFileObject /* Registers a temporary */
(const string& filename = "", /* file or directory */
TempFileObject::Type /* such that it will be */
t = TempFileObject::FILE); /* automatically deleted
* when the translation
const TempFsysName::NameType /* such that it will be */
t = TempFsysName::FILE, /* automatically deleted */
const bool literal = false); /* when the translation
* is complete.
*/
......@@ -205,18 +174,13 @@ private:
* objects.
*/
stack<TempFileObject*, /* Stack for storing */
deque<TempFileObject*, /* temporary file */
ALLOC(TempFileObject*) > > /* information. */
stack<TempFsysName*, /* Stack for storing */
deque<TempFsysName*, /* temporary file */
ALLOC(TempFsysName*) > > /* information. */
temporary_file_objects;
friend class KecWrapper; /* Friend declarations. */
friend class Ltl2AutWrapper;
friend class Ltl2BaWrapper;
friend class ProdWrapper;
friend class SpinWrapper;
friend class SpinWrapper; /* Friend declarations. */
friend class SpotWrapper;
friend class WringWrapper;
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
......@@ -317,46 +281,6 @@ inline bool ExternalTranslator::execSuccess(int exitcode)
/******************************************************************************
*
* Inline function definitions for class ExternalTranslator::TempFileObject.
*
*****************************************************************************/
/* ========================================================================= */
inline const string& ExternalTranslator::TempFileObject::getName() const
/* ----------------------------------------------------------------------------
*
* Description: Returns the name associated with the
* ExternalTranslator::TempFileObject.
*
* Arguments: None.
*
* Returns: The name associated with the object.
*
* ------------------------------------------------------------------------- */
{
return name;
}
/* ========================================================================= */
inline ExternalTranslator::TempFileObject::Type
ExternalTranslator::TempFileObject::getType() const
/* ----------------------------------------------------------------------------
*
* Description: Returns the type of the ExternalTranslator::TempFileObject.
*
* Arguments: None.
*
* Returns: The type associated with the object.
*
* ------------------------------------------------------------------------- */
{
return type;
}
/******************************************************************************
*
* Inline function definitions for class
......
......@@ -3,55 +3,61 @@ AM_YFLAGS = -d
bin_PROGRAMS = lbtt lbtt-translate
lbtt_SOURCES = \
BitArray.cc \
BitArray.h \
Bitset.h \
BuchiAutomaton.cc \
BitArray.cc \
BuchiAutomaton.h \
Config-lex.ll \
BuchiAutomaton.cc \
BuchiProduct.h \
BuchiProduct.cc \
Config-parse.yy \
Configuration.cc \
Config-lex.ll \
Configuration.h \
DispUtil.cc \
Configuration.cc \
DispUtil.h \
DispUtil.cc \
EdgeContainer.h \
Exception.h \
FormulaRandomizer.cc \
FormulaRandomizer.h \
FormulaRandomizer.cc \
FormulaWriter.h \
IntervalList.h \
IntervalList.cc \
LbttAlloc.h \
LtlFormula.cc \
LtlFormula.h \
LtlFormula.cc \
Ltl-parse.yy \
main.cc \
PathEvaluator.cc \
PathEvaluator.h \
PathIterator.cc \
PathEvaluator.cc \
PathIterator.h \
ProductAutomaton.cc \
ProductAutomaton.h \
PathIterator.cc \
Product.h \
Random.h \
SccIterator.h \
SccCollection.h \
SharedTestData.h \
StatDisplay.cc \
StatDisplay.h \
StateSpace.cc \
StatDisplay.cc \
StateSpace.h \
StateSpaceRandomizer.cc \
StateSpace.cc \
StateSpaceProduct.h \
StateSpaceRandomizer.h \
StringUtil.cc \
StateSpaceRandomizer.cc \
StringUtil.h \
TestOperations.cc \
StringUtil.cc \
TempFsysName.h \
TempFsysName.cc \
TestOperations.h \
TestOperations.cc \
TestRoundInfo.h \
TestStatistics.cc \
TestStatistics.h \
UserCommandReader.cc \
TestStatistics.cc \
UserCommandReader.h \
UserCommands.cc \
UserCommands.h
UserCommandReader.cc \
UserCommands.h \
UserCommands.cc
EXTRA_lbtt_SOURCES = gnu-getopt.h
lbtt_LDADD = $(LIBOBJS) $(READLINELIBS)
lbtt_LDADD = @LIBOBJS@ @READLINELIBS@
lbtt_translate_SOURCES = \
BitArray.h \
......@@ -60,10 +66,13 @@ lbtt_translate_SOURCES = \
ExternalTranslator.h \
ExternalTranslator.cc \
FormulaWriter.h \
IntervalList.h \
IntervalList.cc \
LbttAlloc.h \
LbtWrapper.h \
LtlFormula.h \
LtlFormula.cc \
Ltl-parse.yy \
NeverClaim-parse.yy \
NeverClaim-lex.ll \
NeverClaimAutomaton.h \
......@@ -74,9 +83,10 @@ lbtt_translate_SOURCES = \
SpotWrapper.cc \
StringUtil.h \
StringUtil.cc \
TempFsysName.h \
TempFsysName.cc \
translate.h \
translate.cc \
TranslatorInterface.h
EXTRA_lbtt_translate_SOURCES = gnu-getopt.h
lbtt_translate_LDADD = $(LIBOBJS)
lbtt_translate_LDADD = @LIBOBJS@
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -46,6 +46,17 @@ char** command_line_arguments;
/******************************************************************************
*
* Pointer to an object providing operations for translating a formula into an
* automaton.
*
*****************************************************************************/
static TranslatorInterface* translator = 0;
/******************************************************************************
*
* A function for showing warnings to the user.
......@@ -61,21 +72,46 @@ void printWarning(const string& msg)
/******************************************************************************
*
* Signal handler for debugging purposes.
* Handler for SIGINT, SIGQUIT, SIGABRT and SIGTERM.
*
*****************************************************************************/
RETSIGTYPE signalHandler(int signal_number)
static void signalHandler(int signal_number)
{
cerr << string(command_line_arguments[0]) + ": received signal "
<< signal_number
<< endl;
signal(signal_number, SIG_DFL);
if (translator != 0)
delete translator;
struct sigaction s;
s.sa_handler = SIG_DFL;
sigemptyset(&s.sa_mask);
s.sa_flags = 0;
sigaction(signal_number, &s, static_cast<struct sigaction*>(0));
raise(signal_number);
}
/******************************************************************************
*
* Function for installing signal handlers.
*
*****************************************************************************/
static void installSignalHandler(int signum)
{
struct sigaction s;
sigaction(signum, static_cast<struct sigaction*>(0), &s);
if (s.sa_handler != SIG_IGN)
{
s.sa_handler = signalHandler;
sigemptyset(&s.sa_mask);
s.sa_flags = 0;
sigaction(signum, &s, static_cast<struct sigaction*>(0));
}
}
/******************************************************************************
*
* Main function.
......@@ -84,7 +120,7 @@ RETSIGTYPE signalHandler(int signal_number)
int main(int argc, char** argv)
{
typedef enum {OPT_HELP = 'h', OPT_LBT, OPT_SPIN, OPT_SPOT, OPT_VERSION = 'v'}
typedef enum {OPT_HELP = 'h', OPT_LBT, OPT_SPIN, OPT_SPOT, OPT_VERSION = 'V'}
OptionType;
static OPTIONSTRUCT command_line_options[] =
......@@ -102,12 +138,10 @@ int main(int argc, char** argv)
opterr = 1;
int opttype, option_index;
TranslatorInterface* translator = 0;
do
{
option_index = 0;
opttype = getopt_long(argc, argv, "hv", command_line_options,
opttype = getopt_long(argc, argv, "hV", command_line_options,
&option_index);
switch (opttype)
......@@ -118,7 +152,7 @@ int main(int argc, char** argv)
"file] [automaton file]\n"
"General options:\n"
" --h, --help Show this help\n"
" --v, --version Show version and exit\n\n"
" --V, --version Show version and exit\n\n"
"Translator options:\n"
" --lbt lbt\n"
" --spin Spin\n"
......@@ -175,16 +209,15 @@ int main(int argc, char** argv)
int exitstatus = 0;
signal(SIGHUP, signalHandler);
signal(SIGINT, signalHandler);
signal(SIGQUIT, signalHandler);
signal(SIGILL, signalHandler);
signal(SIGABRT, signalHandler);
signal(SIGFPE, signalHandler);
signal(SIGSEGV, signalHandler);
signal(SIGPIPE, signalHandler);
signal(SIGALRM, signalHandler);
signal(SIGTERM, signalHandler);
installSignalHandler(SIGHUP);
installSignalHandler(SIGINT);
installSignalHandler(SIGQUIT);
installSignalHandler(SIGABRT);
installSignalHandler(SIGPIPE);
installSignalHandler(SIGALRM);
installSignalHandler(SIGTERM);
installSignalHandler(SIGUSR1);
installSignalHandler(SIGUSR2);
::Ltl::LtlFormula* formula(0);
......
......@@ -31,330 +31,376 @@ cat > config <<EOF
Algorithm
{
Name = "Spot (Couvreur -- LaCIM)"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -F -t'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -F -t'"
Enabled = yes
}
Algorithm
{
Name = "Spot (Couvreur -- LaCIM), reduction of formula"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -r4 -F -t'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -r4 -F -t'"
Enabled = yes
}
Algorithm
{
Name = "Spot (Couvreur -- LaCIM), degeneralized"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -F -t -D'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -F -t -D'"
Enabled = yes
}
Algorithm
{
Name = "Spot (Couvreur -- LaCIM), fake"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -F -T'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -F -T'"
Enabled = no
}
Algorithm
{
Name = "Spot (Couvreur -- FM)"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -F -f -t'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -F -f -t'"
Enabled = yes
}
Algorithm
{
Name = "Spot (Couvreur -- FM), basic reduction of formula"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -r1 -F -f -t'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -r1 -F -f -t'"
Enabled = no
}
Algorithm
{
Name = "Spot (Couvreur -- FM), reduction of formula using class of formula"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -r2 -F -f -t'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -r2 -F -f -t'"
Enabled = no
}
Algorithm
{
Name = "Spot (Couvreur -- FM), reduction of formula using implies relation"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -r3 -F -f -t'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -r3 -F -f -t'"
Enabled = no
}
Algorithm
{
Name = "Spot (Couvreur -- FM), reduction of formula (pre reduction)"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -r4 -F -f -t'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -r4 -F -f -t'"
Enabled = yes
}
Algorithm
{
Name = "Spot (Couvreur -- FM), post reduction with direct simulation"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -R1 -F -f -t'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -R1 -F -f -t'"
Enabled = yes
}
Algorithm
{
Name = "Spot (Couvreur -- FM), post reduction with delayed simulation"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -R2 -F -f -t'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -R2 -F -f -t'"
Enabled = yes
}
Algorithm
{
Name = "Spot (Couvreur -- FM), post reduction with scc"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -R3 -F -f -t'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -R3 -F -f -t'"
Enabled = yes
}
Algorithm
{
Name = "Spot (Couvreur -- FM), pre + post reduction"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -r4 -R1 -R3 -F -f -t'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -r4 -R1 -R3 -F -f -t'"
Enabled = yes
}
Algorithm
{
Name = "Spot (Couvreur -- FM), without symb_merge"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -F -f -y -t'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -F -f -y -t'"
Enabled = yes
}
Algorithm
{
Name = "Spot (Couvreur -- FM), degeneralized"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -F -f -t -D'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -F -f -t -D'"
Enabled = yes
}
Algorithm
{
Name = "Spot (Couvreur -- FM), degeneralized, via never claim"
Path = "${LBTT_TRANSLATE} --spin './ltl2tgba -F -f -N'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spin './ltl2tgba -F -f -N'"
Enabled = yes
}
Algorithm
{
Name = "Spot (Couvreur -- FM), fake"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -F -f -T'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -F -f -T'"
Enabled = no
}
Algorithm
{
Name = "Spot (Couvreur -- FM), reduction of formula, fake"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -r4 -F -f -T'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -r4 -F -f -T'"
Enabled = no
}
Algorithm
{
Name = "Spot (Couvreur -- FM), without symb_merge, fake"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -F -f -y -T'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -F -f -y -T'"
Enabled = no
}
Algorithm
{
Name = "Spot (Couvreur -- FM), fake, LTL simplifications by ltl2ba"
Path = "${LBTT_TRANSLATE} --spot '${srcdir}/ltl2baw.pl --spot=\"-f -T\" -F'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot '${srcdir}/ltl2baw.pl --spot=\"-f -T\" -F'"
Enabled = no
}
Algorithm
{
Name = "Spot (Couvreur -- FM exprop)"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -F -f -x -t'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -F -f -x -t'"
Enabled = yes
}
Algorithm
{
Name = "Spot (Couvreur -- FM exprop), without symb_merge"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -F -f -x -y -t'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -F -f -x -y -t'"
Enabled = yes
}
Algorithm
{
Name = "Spot (Couvreur -- FM exprop), degeneralized"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -F -f -x -t -D'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -F -f -x -t -D'"
Enabled = yes
}
Algorithm
{
Name = "Spot (Couvreur -- FM post_branch + exprop)"
Path = "${LBTT_TRANSLATE} --spot './ltl2tgba -F -f -x -p -t'"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot './ltl2tgba -F -f -x -p -t'"
Enabled = yes
}
Algorithm
{