Commit 4cd10c3d authored by martinez's avatar martinez
Browse files

* src/ltlvisit/Makefile.am: Copyright 2004.

* src/ltltest/inf.test: More test.
* src/ltlvisit/basereduc.cc, src/ltlvisit/forminf.cc (spot):
Use dynamic_cast.
* src/ltlvisit/reducform.cc, src/ltlvisit/reducform.hh,
src/ltltest/reduc.test, src/ltltest/reduc.cc: Add an option
to choose which rules applies to simplify the formula.
parent f7e5fe08
2004-05-13 Thomas Martinez <martinez@src.lip6.fr>
* src/ltlvisit/Makefile.am: Copyright 2004.
* src/ltltest/inf.test: More test.
* src/ltlvisit/basereduc.cc, src/ltlvisit/forminf.cc (spot):
Use dynamic_cast.
* src/ltlvisit/reducform.cc, src/ltlvisit/reducform.hh,
src/ltltest/reduc.test, src/ltltest/reduc.cc: Add an option
to choose which rules applies to simplify the formula.
2004-05-13 Alexandre Duret-Lutz <adl@src.lip6.fr>
* src/ltltest/reduc.test: Typo.
......
......@@ -26,6 +26,27 @@
. ./defs || exit 1
#
run 1 ./inf 'Xa' 'X(b U a)'
run 1 ./inf 'XXa' 'XX(b U a)'
run 1 ./inf '(e R f)' '(g U f)'
run 1 ./inf '( X(a + b))' '( X((a + b)+(c)+(d)))'
run 1 ./inf '( X(a + b)) U (e R f)' '( X((a + b)+(c)+(d))) U (g U f)'
run 0 ./inf 'Xa' 'XX(b U a)'
run 0 ./inf 'XXa' 'X(b U a)'
run 0 ./inf '( X(a + b))' '( X(X(a + b)+(c)+(d)))'
run 0 ./inf '( X(a + b)) U (e R f)' '( X(X(a + b)+(c)+(d))) U (g U f)'
run 0 ./inf 'a' 'b'
run 0 ./inf 'a' 'b + c'
run 0 ./inf 'a + b' 'a'
run 0 ./inf 'a' 'a * c'
run 0 ./inf 'a * b' 'c'
run 0 ./inf 'a' 'a U b'
run 0 ./inf 'a' 'a R b'
run 0 ./inf 'a R b' 'a'
run 1 ./inf '1' '1'
run 1 ./inf '0' '0'
......@@ -52,6 +73,9 @@ run 1 ./inf 'a' 'a R 1'
run 1 ./inf 'a R b' 'b'
run 1 ./inf 'a R b' '1'
run 1 ./inf 'Xa' 'X(b U a)'
run 1 ./inf 'X(a R b)' 'Xb'
run 1 ./inf 'a U b' '1 U b'
run 1 ./inf 'a R b' '1 R b'
......
......@@ -34,30 +34,45 @@
void
syntax(char* prog)
{
std::cerr << prog << " formula1 (formula2)?" << std::endl;
std::cerr << prog << " option formula1 (formula2)?" << std::endl;
exit(2);
}
typedef spot::ltl::formula* ptrfunct(const spot::ltl::formula*);
int
main(int argc, char** argv)
{
if (argc < 2)
if (argc < 3)
syntax(argv[0]);
spot::ltl::option o;
switch(atoi(argv[1])){
case 0:
o = spot::ltl::Base;
break;
case 1:
o = spot::ltl::Inf;
break;
case 2:
o = spot::ltl::EventualUniversal;
break;
case 3:
o = spot::ltl::BRI;
break;
default: return 2;
}
spot::ltl::parse_error_list p1;
spot::ltl::formula* f1 = spot::ltl::parse(argv[1], p1);
spot::ltl::formula* f1 = spot::ltl::parse(argv[2], p1);
spot::ltl::formula* f2 = NULL;
if (spot::ltl::format_parse_errors(std::cerr, argv[1], p1))
if (spot::ltl::format_parse_errors(std::cerr, argv[2], p1))
return 2;
if (argc == 3){
if (argc == 4){
spot::ltl::parse_error_list p2;
f2 = spot::ltl::parse(argv[2], p2);
if (spot::ltl::format_parse_errors(std::cerr, argv[2], p2))
f2 = spot::ltl::parse(argv[3], p2);
if (spot::ltl::format_parse_errors(std::cerr, argv[3], p2))
return 2;
}
......@@ -78,7 +93,7 @@ main(int argc, char** argv)
std::string f1s_before = spot::ltl::to_string(f1);
ftmp1 = f1;
f1 = spot::ltl::reduce(f1);
f1 = spot::ltl::reduce(f1,o);
ftmp2 = f1;
f1 = spot::ltl::unabbreviate_logic(f1);
spot::ltl::destroy(ftmp1);
......@@ -134,13 +149,6 @@ main(int argc, char** argv)
if (length_f1_after < length_f1_before) exit_code = 0;
}
/*
spot::ltl::dump(std::cout, f1); std::cout << std::endl;
if (f2 != NULL)
spot::ltl::dump(std::cout, f2); std::cout << std::endl;
*/
spot::ltl::destroy(f1);
if (f2 != NULL)
spot::ltl::destroy(f2);
......
......@@ -23,30 +23,37 @@
# Check for the reduc visitor.
. ./defs || exit 1
#. ./defs || exit 1
set -e
FICH=${1-$srcdir/formules.ltl}
#FICH=${1-$srcdir/formules.ltl}
FICH=${1-formules.ltl}
#####################################
rm -f result.data
for opt in 0 1 2 3
do
rm -f result.data
cat $FICH |
while read f; do
cat $FICH |
while read f; do
if [ -n "$f" ] && [ "$f" != "####" ]; then
./reduc "$f" >> result.data
./reduc $opt "$f" >> result.data
fi
done
done
test $? == 0 || exit 1
test $? == 0 || exit 1
#####################################
perl -ne 'BEGIN { $sum1 = 0; $sum2 = 0; }
perl -ne 'BEGIN { $sum1 = 0; $sum2 = 0; }
/^(\d+)\s+(\d+)/;
$sum1 += $1;
$sum2 += $2;
END { print $sum2 * 100 / $sum1; print "\n"; }
END { print 100 - ($sum2 * 100 / $sum1); print "\n"; }
' < result.data
done
#####################################
## Copyright (C) 2003 Laboratoire d'Informatique de Paris 6 (LIP6),
## Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
## dpartement Systmes Rpartis Coopratifs (SRC), Universit Pierre
## et Marie Curie.
##
......
// Copyright (C) 2003 Laboratoire d'Informatique de Paris 6 (LIP6),
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
// dpartement Systmes Rpartis Coopratifs (SRC), Universit Pierre
// et Marie Curie.
//
......@@ -88,24 +88,24 @@ namespace spot
/* X(f1 & GF(f2)) = X(f1) & GF(F2) */
/* X(f1 | GF(f2)) = X(f1) | GF(F2) */
if (node_type(result_) == (node_type_form_visitor::Multop)) {
if (spot::ltl::nb_term_multop(result_) == 2) {
if (is_GF(((multop*)result_)->nth(0)) ||
is_FG(((multop*)result_)->nth(0))) {
if (dynamic_cast<multop*>(result_)->size() == 2) {
if (is_GF(dynamic_cast<multop*>(result_)->nth(0)) ||
is_FG(dynamic_cast<multop*>(result_)->nth(0))) {
multop::vec* res = new multop::vec;
res->push_back(unop::instance(unop::F, basic_reduce_form(((multop*)result_)->nth(1))));
res->push_back(basic_reduce_form(((multop*)result_)->nth(0)));
res->push_back(unop::instance(unop::F, basic_reduce_form(dynamic_cast<multop*>(result_)->nth(1))));
res->push_back(basic_reduce_form(dynamic_cast<multop*>(result_)->nth(0)));
f = result_;
result_ = multop::instance(((multop*)(result_))->op(), res);
result_ = multop::instance(dynamic_cast<multop*>(result_)->op(), res);
spot::ltl::destroy(f);
return;
}
if (is_GF(((multop*)result_)->nth(1)) ||
is_FG(((multop*)result_)->nth(1))) {
if (is_GF(dynamic_cast<multop*>(result_)->nth(1)) ||
is_FG(dynamic_cast<multop*>(result_)->nth(1))) {
multop::vec* res = new multop::vec;
res->push_back(unop::instance(unop::F, basic_reduce_form(((multop*)result_)->nth(0))));
res->push_back(basic_reduce_form(((multop*)result_)->nth(1)));
res->push_back(unop::instance(unop::F, basic_reduce_form(dynamic_cast<multop*>(result_)->nth(0))));
res->push_back(basic_reduce_form(dynamic_cast<multop*>(result_)->nth(1)));
f = result_;
result_ = multop::instance(((multop*)(result_))->op(), res);
result_ = multop::instance(dynamic_cast<multop*>(result_)->op(), res);
spot::ltl::destroy(f);
return;
}
......@@ -124,33 +124,33 @@ namespace spot
/* FX(a) = XF(a) */
if (node_type(result_) == (node_type_form_visitor::Unop))
if ( ((unop*)(result_))->op() == unop::X ){
if (dynamic_cast<unop*>(result_)->op() == unop::X){
f = result_;
result_ = unop::instance(unop::X,
unop::instance(unop::F,
basic_reduce_form(((unop*)(result_))->child()) ));
basic_reduce_form(dynamic_cast<unop*>(result_)->child()) ));
spot::ltl::destroy(f);
return;
}
/* F(f1 & GF(f2)) = F(f1) & GF(F2) */
if (node_type(result_) == (node_type_form_visitor::Multop)) {
if ( ((multop*)(result_))->op() == multop::And ) {
if (spot::ltl::nb_term_multop(result_) == 2) {
if (is_GF(((multop*)result_)->nth(0)) ||
is_FG(((multop*)result_)->nth(0))) {
if (dynamic_cast<multop*>(result_)->op() == multop::And) {
if (dynamic_cast<multop*>(result_)->size() == 2) {
if (is_GF(dynamic_cast<multop*>(result_)->nth(0)) ||
is_FG(dynamic_cast<multop*>(result_)->nth(0))) {
multop::vec* res = new multop::vec;
res->push_back(unop::instance(unop::F, basic_reduce_form(((multop*)result_)->nth(1))));
res->push_back(basic_reduce_form(((multop*)result_)->nth(0)));
res->push_back(unop::instance(unop::F, basic_reduce_form(dynamic_cast<multop*>(result_)->nth(1))));
res->push_back(basic_reduce_form(dynamic_cast<multop*>(result_)->nth(0)));
spot::ltl::destroy(result_);
result_ = multop::instance(multop::And, res);
return;
}
if (is_GF(((multop*)result_)->nth(1)) ||
is_FG(((multop*)result_)->nth(1))) {
if (is_GF(dynamic_cast<multop*>(result_)->nth(1)) ||
is_FG(dynamic_cast<multop*>(result_)->nth(1))) {
multop::vec* res = new multop::vec;
res->push_back(unop::instance(unop::F, basic_reduce_form(((multop*)result_)->nth(0))));
res->push_back(basic_reduce_form(((multop*)result_)->nth(1)));
res->push_back(unop::instance(unop::F, basic_reduce_form(dynamic_cast<multop*>(result_)->nth(0))));
res->push_back(basic_reduce_form(dynamic_cast<multop*>(result_)->nth(1)));
spot::ltl::destroy(result_);
result_ = multop::instance(multop::And, res);
return;
......@@ -171,42 +171,42 @@ namespace spot
/* G(a R b) = G(b) */
if (node_type(result_) == node_type_form_visitor::Binop)
if ( ((binop*)(result_))->op() == binop::R ){
if (dynamic_cast<binop*>(result_)->op() == binop::R){
f = result_;
result_ = unop::instance(unop::G, basic_reduce_form(((binop*)(result_))->second()));
result_ = unop::instance(unop::G, basic_reduce_form(dynamic_cast<binop*>(result_)->second()));
spot::ltl::destroy(f);
return;
}
/* GX(a) = XG(a) */
if (node_type(result_) == (node_type_form_visitor::Unop))
if ( ((unop*)(result_))->op() == unop::X ){
if ( dynamic_cast<unop*>(result_)->op() == unop::X ){
f = result_;
result_ = unop::instance(unop::X,
unop::instance(unop::G,
basic_reduce_form(((unop*)(result_))->child()) ));
basic_reduce_form(dynamic_cast<unop*>(result_)->child())));
spot::ltl::destroy(f);
return;
}
/* G(f1 | GF(f2)) = G(f1) | GF(F2) */
if (node_type(result_) == (node_type_form_visitor::Multop)) {
if ( ((multop*)(f))->op() == multop::Or ) {
if (spot::ltl::nb_term_multop(result_) == 2) {
if (is_GF(((multop*)result_)->nth(0)) ||
is_FG(((multop*)result_)->nth(0))) {
if (dynamic_cast<multop*>(f)->op() == multop::Or) {
if (dynamic_cast<multop*>(result_)->size() == 2) {
if (is_GF(dynamic_cast<multop*>(result_)->nth(0)) ||
is_FG(dynamic_cast<multop*>(result_)->nth(0))) {
multop::vec* res = new multop::vec;
res->push_back(unop::instance(unop::G, basic_reduce_form(((multop*)result_)->nth(1))));
res->push_back(basic_reduce_form(((multop*)result_)->nth(0)));
res->push_back(unop::instance(unop::G, basic_reduce_form(dynamic_cast<multop*>(result_)->nth(1))));
res->push_back(basic_reduce_form(dynamic_cast<multop*>(result_)->nth(0)));
spot::ltl::destroy(result_);
result_ = multop::instance(multop::Or, res);
return;
}
if (is_GF(((multop*)result_)->nth(1)) ||
is_FG(((multop*)result_)->nth(1))) {
if (is_GF(dynamic_cast<multop*>(result_)->nth(1)) ||
is_FG(dynamic_cast<multop*>(result_)->nth(1))) {
multop::vec* res = new multop::vec;
res->push_back(unop::instance(unop::G, basic_reduce_form(((multop*)result_)->nth(0))));
res->push_back(basic_reduce_form(((multop*)result_)->nth(1)));
res->push_back(unop::instance(unop::G, basic_reduce_form(dynamic_cast<multop*>(result_)->nth(0))));
res->push_back(basic_reduce_form(dynamic_cast<multop*>(result_)->nth(1)));
spot::ltl::destroy(result_);
result_ = multop::instance(multop::Or, res);
return;
......@@ -262,11 +262,11 @@ namespace spot
/* X(a) U X(b) = X(a U b) */
if ( node_type(f1) == (node_type_form_visitor::Unop)
&& node_type(f2) == (node_type_form_visitor::Unop)) {
if ( (((unop*)(f1))->op() == unop::X)
&& (((unop*)(f2))->op() == unop::X) ) {
if ((dynamic_cast<unop*>(f1)->op() == unop::X)
&& (dynamic_cast<unop*>(f2)->op() == unop::X)) {
ftmp = binop::instance(binop::U,
basic_reduce_form(((unop*)(f1))->child()),
basic_reduce_form(((unop*)(f2))->child()));
basic_reduce_form(dynamic_cast<unop*>(f1)->child()),
basic_reduce_form(dynamic_cast<unop*>(f2)->child()));
result_ = unop::instance(unop::X, basic_reduce_form(ftmp));
spot::ltl::destroy(f1);
spot::ltl::destroy(f2);
......@@ -290,13 +290,13 @@ namespace spot
f1 = basic_reduce_form(f1);
/* X(a) R X(b) = X(a R b) */
if ( node_type(f1) == (node_type_form_visitor::Unop)
if (node_type(f1) == (node_type_form_visitor::Unop)
&& node_type(f2) == (node_type_form_visitor::Unop)) {
if ( (((unop*)(f1))->op() == unop::X)
&& (((unop*)(f2))->op() == unop::X) ) {
if ((dynamic_cast<unop*>(f1)->op() == unop::X)
&& (dynamic_cast<unop*>(f2)->op() == unop::X)) {
ftmp = binop::instance(bo->op(),
basic_reduce_form(((unop*)(f1))->child()),
basic_reduce_form(((unop*)(f2))->child()));
basic_reduce_form(dynamic_cast<unop*>(f1)->child()),
basic_reduce_form(dynamic_cast<unop*>(f2)->child()));
result_ = unop::instance(unop::X, basic_reduce_form(ftmp));
spot::ltl::destroy(f1);
spot::ltl::destroy(f2);
......@@ -347,14 +347,14 @@ namespace spot
case node_type_form_visitor::Unop:
/* Xa & Xb = X(a & b)*/
if (((unop*)(*i))->op() == unop::X) {
tmpX->push_back( spot::ltl::basic_reduce_form(((unop*)(*i))->child()) );
if (dynamic_cast<unop*>(*i)->op() == unop::X) {
tmpX->push_back(spot::ltl::basic_reduce_form(dynamic_cast<unop*>(*i)->child()));
break;
}
/* FG(a) & FG(b) = FG(a & b)*/
if (is_FG(*i)) {
tmpFG->push_back( spot::ltl::basic_reduce_form( ((unop*)((unop*)(*i))->child())->child() ) );
tmpFG->push_back(spot::ltl::basic_reduce_form(dynamic_cast<unop*>(dynamic_cast<unop*>(*i)->child())->child()));
break;
}
tmpOther->push_back(spot::ltl::basic_reduce_form(*i));
......@@ -368,19 +368,19 @@ namespace spot
case node_type_form_visitor::Binop:
/* (a U b) & (c U b) = (a & c) U b */
if (((binop*)(*i))->op() == binop::U) {
ftmp = ((binop*)(*i))->second();
if (dynamic_cast<binop*>(*i)->op() == binop::U) {
ftmp = dynamic_cast<binop*>(*i)->second();
tmpUright = new multop::vec;
for (multop::vec::iterator j = i; j != res->end(); j++)
{
if (*j == NULL) continue;
if (node_type(*j) == node_type_form_visitor::Binop)
{
if (((binop*)(*j))->op() == binop::U)
if (dynamic_cast<binop*>(*j)->op() == binop::U)
{
if (ftmp == ((binop*)(*j))->second())
if (ftmp == dynamic_cast<binop*>(*j)->second())
{
tmpUright->push_back(spot::ltl::basic_reduce_form(((binop*)(*j))->first() ));
tmpUright->push_back(spot::ltl::basic_reduce_form(dynamic_cast<binop*>(*j)->first() ));
if (j != i) {
spot::ltl::destroy(*j);
*j = NULL;
......@@ -396,19 +396,19 @@ namespace spot
}
/* (a R b) & (a R c) = a R (b & c) */
if (((binop*)(*i))->op() == binop::R) {
ftmp = ((binop*)(*i))->first();
if (dynamic_cast<binop*>(*i)->op() == binop::R) {
ftmp = dynamic_cast<binop*>(*i)->first();
tmpRright = new multop::vec;
for (multop::vec::iterator j = i; j != res->end(); j++)
{
if (*j == NULL) continue;
if (node_type(*j) == node_type_form_visitor::Binop)
{
if (((binop*)(*j))->op() == binop::R)
if (dynamic_cast<binop*>(*j)->op() == binop::R)
{
if (ftmp == ((binop*)(*j))->first())
if (ftmp == dynamic_cast<binop*>(*j)->first())
{
tmpRright->push_back(spot::ltl::basic_reduce_form(((binop*)(*j))->second() ));
tmpRright->push_back(spot::ltl::basic_reduce_form(dynamic_cast<binop*>(*j)->second() ));
if (j != i) {
spot::ltl::destroy(*j);
*j = NULL;
......@@ -445,14 +445,14 @@ namespace spot
case node_type_form_visitor::Unop:
/* Xa | Xb = X(a | b)*/
if (((unop*)(*i))->op() == unop::X) {
tmpX->push_back( spot::ltl::basic_reduce_form(((unop*)(*i))->child()) );
if (dynamic_cast<unop*>(*i)->op() == unop::X) {
tmpX->push_back(spot::ltl::basic_reduce_form(dynamic_cast<unop*>(*i)->child()));
break;
}
/* GF(a) & GF(b) = GF(a & b)*/
if (is_GF(*i)) {
tmpGF->push_back( spot::ltl::basic_reduce_form( ((unop*)((unop*)(*i))->child())->child() ) );
tmpGF->push_back(spot::ltl::basic_reduce_form(dynamic_cast<unop*>(dynamic_cast<unop*>(*i)->child())->child()));
break;
}
tmpOther->push_back(spot::ltl::basic_reduce_form(*i));
......@@ -461,19 +461,19 @@ namespace spot
case node_type_form_visitor::Binop:
/* (a U b) | (a U c) = a U (b | c) */
if (((binop*)(*i))->op() == binop::U) {
ftmp = ((binop*)(*i))->first();
if (dynamic_cast<binop*>(*i)->op() == binop::U) {
ftmp = dynamic_cast<binop*>(*i)->first();
tmpUright = new multop::vec;
for (multop::vec::iterator j = i; j != res->end(); j++)
{
if (*j == NULL) continue;
if (node_type(*j) == node_type_form_visitor::Binop)
{
if (((binop*)(*j))->op() == binop::U)
if (dynamic_cast<binop*>(*j)->op() == binop::U)
{
if (ftmp == ((binop*)(*j))->first())
if (ftmp == dynamic_cast<binop*>(*j)->first())
{
tmpUright->push_back(spot::ltl::basic_reduce_form(((binop*)(*j))->second() ));
tmpUright->push_back(spot::ltl::basic_reduce_form(dynamic_cast<binop*>(*j)->second()));
if (j != i) {
spot::ltl::destroy(*j);
*j = NULL;
......@@ -489,19 +489,19 @@ namespace spot
}
/* (a R b) | (c R b) = (a | c) R b */
if (((binop*)(*i))->op() == binop::R) {
ftmp = ((binop*)(*i))->second();
if (dynamic_cast<binop*>(*i)->op() == binop::R) {
ftmp = dynamic_cast<binop*>(*i)->second();
tmpRright = new multop::vec;
for (multop::vec::iterator j = i; j != res->end(); j++)
{
if (*j == NULL) continue;
if (node_type(*j) == node_type_form_visitor::Binop)
{
if (((binop*)(*j))->op() == binop::R)
if (dynamic_cast<binop*>(*j)->op() == binop::R)
{
if (ftmp == ((binop*)(*j))->second())
if (ftmp == dynamic_cast<binop*>(*j)->second())
{
tmpRright->push_back(spot::ltl::basic_reduce_form(((binop*)(*j))->first() ));
tmpRright->push_back(spot::ltl::basic_reduce_form(dynamic_cast<binop*>(*j)->first()));
if (j != i) {
spot::ltl::destroy(*j);
*j = NULL;
......
......@@ -35,10 +35,10 @@ namespace spot
bool
is_GF(const formula* f)
{
if ((const unop*)f != NULL)
if (((const unop*)f)->op() == unop::G)
if ((const unop*)(((const unop*)f)->child()) != NULL)
if (((const unop*)((const unop*)f)->child())->op() == unop::F)
if (node_type(f) == node_type_form_visitor::Unop)
if (dynamic_cast<const unop*>(f)->op() == unop::G)
if (node_type(((const unop*)f)->child()) == node_type_form_visitor::Unop)
if (dynamic_cast<const unop*>(dynamic_cast<const unop*>(f)->child())->op() == unop::F)
return true;
return false;
}
......@@ -46,24 +46,14 @@ namespace spot
bool
is_FG(const formula* f)
{
if ((const unop*)f != NULL)
if (((const unop*)f)->op() == unop::F)
if ((const unop*)(((const unop*)f)->child()) != NULL)
if (((const unop*)((const unop*)f)->child())->op() == unop::G)
if (node_type(f) == node_type_form_visitor::Unop)
if (dynamic_cast<const unop*>(f)->op() == unop::F)
if (node_type(((const unop*)f)->child()) == node_type_form_visitor::Unop)
if (dynamic_cast<const unop*>(dynamic_cast<const unop*>(f)->child())->op() == unop::G)
return true;
return false;
}
int
nb_term_multop(const formula* f)
{
if ((const multop*)f == NULL) return -1;
unsigned mos = ((const multop*)(f))->size();
return mos;
}
node_type_form_visitor::node_type_form_visitor(){}
node_type_form_visitor::type
......@@ -102,7 +92,7 @@ namespace spot
node_type_form_visitor::type node_type(const formula* f)
{
node_type_form_visitor v;
if (f == NULL) std::cout << "f == NULL !!!!!!!!" << std::endl;
assert(f != NULL);
const_cast<formula*>(f)->accept(v);
return v.result();
}
......@@ -113,7 +103,7 @@ namespace spot
form_eventual_universal_visitor()
{
eventual = false; // faux au dpart
eventual = false;
universal = false;
}
......@@ -179,12 +169,12 @@ namespace spot
return;
case binop::U:
if (node_type(f1) == node_type_form_visitor::Const)
if (((const constant*)f1)->val() == constant::True)
if (dynamic_cast<const constant*>(f1)->val() == constant::True)
eventual = true;
return;
case binop::R:
if (node_type(f1) != node_type_form_visitor::Const)
if (((const constant*)f1)->val() == constant::False)
if (node_type(f1) == node_type_form_visitor::Const)
if (dynamic_cast<const constant*>(f1)->val() == constant::False)
universal = true;
return;
}
...