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

* iface/dve2/dve2.cc, iface/dve2/dve2check.cc: Cosmetic changes

to please sanity checks.
parent 51e6989d
2011-03-06 Alexandre Duret-Lutz <adl@lrde.epita.fr>
* iface/dve2/dve2.cc, iface/dve2/dve2check.cc: Cosmetic changes
to please sanity checks.
2011-03-06 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Call divine to compile dve models.
......
......@@ -31,7 +31,8 @@
namespace spot
{
namespace {
namespace
{
////////////////////////////////////////////////////////////////////////
// DVE2 --ltsmin interface
......@@ -50,7 +51,7 @@ namespace spot
lt_dlhandle handle; // handle to the dynamic library
void (*get_initial_state)(void *to);
int (*have_property)();
int (*get_successors)( void* m, int *in, TransitionCB, void *arg );
int (*get_successors)(void* m, int *in, TransitionCB, void *arg);
int (*get_state_variable_count)();
const char* (*get_state_variable_name)(int var);
......@@ -492,25 +493,37 @@ namespace spot
for (prop_set::const_iterator i = ps_->begin();
i != ps_->end(); ++i)
{
int l = s->vars[(*i).var_num];
int r = (*i).val;
int l = s->vars[i->var_num];
int r = i->val;
bool cond = false;
switch ((*i).op)
switch (i->op)
{
case OP_EQ: cond = (l == r); break;
case OP_NE: cond = (l != r); break;
case OP_LT: cond = (l < r); break;
case OP_GT: cond = (l > r); break;
case OP_LE: cond = (l <= r); break;
case OP_GE: cond = (l >= r); break;
case OP_EQ:
cond = (l == r);
break;
case OP_NE:
cond = (l != r);
break;
case OP_LT:
cond = (l < r);
break;
case OP_GT:
cond = (l > r);
break;
case OP_LE:
cond = (l <= r);
break;
case OP_GE:
cond = (l >= r);
break;
}
if (cond)
res &= bdd_ithvar((*i).bddvar);
res &= bdd_ithvar(i->bddvar);
else
res &= bdd_nithvar((*i).bddvar);
res &= bdd_nithvar(i->bddvar);
}
return res;
}
......@@ -694,7 +707,7 @@ namespace spot
d->get_state_variable_type_count = (int (*)())
lt_dlsym(h, "get_state_variable_type_count");
d->get_state_variable_type_name = (const char* (*)(int))
lt_dlsym(h, "get_state_variable_type_name" );
lt_dlsym(h, "get_state_variable_type_name");
d->get_state_variable_type_value_count = (int (*)(int))
lt_dlsym(h, "get_state_variable_type_value_count");
d->get_state_variable_type_value = (const char* (*)(int, int))
......
......@@ -100,9 +100,15 @@ main(int argc, char **argv)
case 'g':
switch (opt[1])
{
case 'm': output = DotModel; break;
case 'p': output = DotProduct; break;
case 'f': output = DotFormula; break;
case 'm':
output = DotModel;
break;
case 'p':
output = DotProduct;
break;
case 'f':
output = DotFormula;
break;
default:
goto error;
}
......
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