Commit 87ac63e7 authored by Alfons Laarman's avatar Alfons Laarman

Completed DiVinE / SPIN LTL semantics for deadlocks.

Added LTSmin semantics under -L (io -l).
(Closes #552)
parent 35208c28
......@@ -16,6 +16,8 @@ using namespace wibble;
struct Compile {
commandline::BoolOption *o_ltsmin;
commandline::BoolOption *o_ltsmin_ltl;
commandline::BoolOption *o_textbook;
commandline::Engine *cmd_compile;
commandline::StandardParserWithMandatoryCommand &opts;
......@@ -55,8 +57,13 @@ struct Compile {
run( cmd.str() );
}
void compileDve( std::string in, bool ltsmin ) {
dve_compiler compiler(ltsmin);
void compileDve( std::string in, bool ltsmin, bool ltsmin_ltl,
bool textbook ) {
if (textbook)
die( "Textbook LTL semantics not yet implemented." );
if (ltsmin && ltsmin_ltl)
die( "Use -l OR -L." );
dve_compiler compiler(ltsmin || ltsmin_ltl, ltsmin_ltl);
compiler.read( in.c_str() );
compiler.analyse();
......@@ -82,7 +89,8 @@ struct Compile {
if ( access( input.c_str(), R_OK ) )
die( "FATAL: cannot open input file " + input + " for reading" );
if ( str::endsWith( input, ".dve" ) ) {
compileDve( input, o_ltsmin->boolValue() );
compileDve( input, o_ltsmin->boolValue(), o_ltsmin_ltl->boolValue(),
o_textbook->boolValue() );
#ifdef HAVE_MURPHI
} else if ( str::endsWith( input, ".m" ) ) {
compileMurphi( input );
......@@ -101,6 +109,12 @@ struct Compile {
o_ltsmin = cmd_compile->add< commandline::BoolOption >(
"ltsmin", 'l', "ltsmin", "",
"ltsmin interface" );
o_ltsmin_ltl = cmd_compile->add< commandline::BoolOption >(
"ltsmin", 'L', "LTSmin", "",
"ltsmin interface with LTSmin LTL semantics" );
o_textbook = cmd_compile->add< commandline::BoolOption >(
"textbook", 't', "textbook", "",
"ltsmin interface with textbook LTL semantics" );
}
......
This diff is collapsed.
......@@ -16,6 +16,7 @@ struct ext_transition_t
{
int synchronized;
int commited; // used for ltsmin
int buchi; // used for ltsmin
dve_transition_t *first;
dve_transition_t *second; // only when first transition is synchronized;
dve_transition_t *property; // transition of property automaton
......@@ -55,7 +56,8 @@ struct simple_predicate
struct dve_compiler: public dve_explicit_system_t
{
bool ltsmin;
bool ltsmin; // LTSmin successor generator
bool ltsmin_ltl; // divine LTL semantics in LTsmin successor generator
bool many;
int current_label;
......@@ -94,8 +96,8 @@ struct dve_compiler: public dve_explicit_system_t
outline();
}
dve_compiler(bool ltsmin, error_vector_t & evect=gerr)
: explicit_system_t(evect), dve_explicit_system_t(evect), current_label(0), m_indent( 0 ), ltsmin(ltsmin)
dve_compiler(bool ltsmin, bool ltsmin_ltl, error_vector_t & evect=gerr)
: explicit_system_t(evect), dve_explicit_system_t(evect), current_label(0), m_indent( 0 ), ltsmin(ltsmin), ltsmin_ltl(ltsmin_ltl)
{}
virtual ~dve_compiler() {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment