Add support for finite behaviors in the DVE interface.
* iface/dve2/dve2.hh (load_dve2): Take a "dead" argument. * iface/dve2/dve2.cc (callback_context): Add a destructor to simplify... (dve2_succ_iterator::~dve2_succ_iterator) ... this one. (convert_aps): Skip the dead proposition. (dve2_kripke::dve2_kripke): Take a dead argument, and setup alive_prop and dead_prop. (compute_state_condition, get_succ): Use a cache for the conditions and successor of the last state, to share some work between these two function. Add loops on dead states. (load_dve2): Pass dead to dve2_kripke and convert_aps. * iface/dve2/dve2check.cc: Add a -dDEAD option. * iface/dve2/finite.test, iface/dve2/finite.dve: New file. * iface/dve2/Makefile.am: Declare them.
This commit is contained in:
parent
ef976c93d0
commit
cb83e855a4
7 changed files with 246 additions and 20 deletions
|
|
@ -42,6 +42,9 @@ syntax(char* prog)
|
|||
std::cerr << "usage: " << prog << " [options] model formula" << std::endl
|
||||
<< std::endl
|
||||
<< "Options:" << std::endl
|
||||
<< " -dDEAD use DEAD as property for marking DEAD states"
|
||||
<< std::endl
|
||||
<< " (by default DEAD = true)" << std::endl
|
||||
<< " -e[ALGO] run emptiness check, expect an accepting run"
|
||||
<< std::endl
|
||||
<< " -E[ALGO] run emptiness check, expect no accepting run"
|
||||
|
|
@ -71,6 +74,7 @@ main(int argc, char **argv)
|
|||
output = EmptinessCheck;
|
||||
bool accepting_run = false;
|
||||
bool expect_counter_example = false;
|
||||
char *dead = 0;
|
||||
|
||||
const char* echeck_algo = "Cou99";
|
||||
|
||||
|
|
@ -86,6 +90,9 @@ main(int argc, char **argv)
|
|||
case 'C':
|
||||
accepting_run = true;
|
||||
break;
|
||||
case 'd':
|
||||
dead = opt + 1;
|
||||
break;
|
||||
case 'e':
|
||||
case 'E':
|
||||
{
|
||||
|
|
@ -135,6 +142,7 @@ main(int argc, char **argv)
|
|||
spot::ltl::default_environment& env =
|
||||
spot::ltl::default_environment::instance();
|
||||
|
||||
|
||||
spot::ltl::atomic_prop_set ap;
|
||||
spot::bdd_dict* dict = new spot::bdd_dict();
|
||||
spot::kripke* model = 0;
|
||||
|
|
@ -143,6 +151,21 @@ main(int argc, char **argv)
|
|||
spot::emptiness_check_instantiator* echeck_inst = 0;
|
||||
int exit_code = 0;
|
||||
spot::ltl::formula* f = 0;
|
||||
spot::ltl::formula* deadf = 0;
|
||||
|
||||
if (dead == 0 || !strcasecmp(dead, "true"))
|
||||
{
|
||||
deadf = spot::ltl::constant::true_instance();
|
||||
std::cerr << "true" << std::endl;
|
||||
}
|
||||
else if (!strcasecmp(dead, "false"))
|
||||
{
|
||||
deadf = spot::ltl::constant::false_instance();
|
||||
}
|
||||
else
|
||||
{
|
||||
deadf = env.require(dead);
|
||||
}
|
||||
|
||||
if (output == EmptinessCheck)
|
||||
{
|
||||
|
|
@ -175,7 +198,7 @@ main(int argc, char **argv)
|
|||
if (output != DotFormula)
|
||||
{
|
||||
tm.start("loading dve2");
|
||||
model = spot::load_dve2(argv[1], dict, &ap, true);
|
||||
model = spot::load_dve2(argv[1], dict, &ap, deadf, true);
|
||||
tm.stop("loading dve2");
|
||||
|
||||
if (!model)
|
||||
|
|
@ -304,6 +327,8 @@ main(int argc, char **argv)
|
|||
f->destroy();
|
||||
delete dict;
|
||||
|
||||
deadf->destroy();
|
||||
|
||||
if (use_timer)
|
||||
tm.print(std::cout);
|
||||
tm.reset_all(); // This helps valgrind.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue