* src/priv/countstates.cc: Handle tgba_digraph.
This commit is contained in:
parent
120ce7d8e6
commit
97e3eb7655
1 changed files with 9 additions and 13 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2013 Laboratoire de Recherche et Développement
|
// Copyright (C) 2013, 2014 Laboratoire de Recherche et Développement
|
||||||
// de l'Epita (LRDE).
|
// de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
|
|
@ -19,23 +19,19 @@
|
||||||
|
|
||||||
#include "countstates.hh"
|
#include "countstates.hh"
|
||||||
#include "tgba/tgbaexplicit.hh"
|
#include "tgba/tgbaexplicit.hh"
|
||||||
|
#include "tgba/tgbagraph.hh"
|
||||||
#include "tgbaalgos/stats.hh"
|
#include "tgbaalgos/stats.hh"
|
||||||
|
|
||||||
namespace spot
|
namespace spot
|
||||||
{
|
{
|
||||||
unsigned count_states(const tgba* a)
|
unsigned count_states(const tgba* a)
|
||||||
{
|
{
|
||||||
const sba_explicit_number* se =
|
if (auto b = dynamic_cast<const tgba_digraph*>(a))
|
||||||
dynamic_cast<const sba_explicit_number*>(a);
|
return b->num_states();
|
||||||
if (se)
|
if (auto b = dynamic_cast<const sba_explicit_number*>(a))
|
||||||
return se->num_states();
|
return b->num_states();
|
||||||
const tgba_explicit_number* te =
|
if (auto b = dynamic_cast<const tgba_explicit_number*>(a))
|
||||||
dynamic_cast<const tgba_explicit_number*>(a);
|
return b->num_states();
|
||||||
if (te)
|
return stats_reachable(a).states;
|
||||||
return te->num_states();
|
|
||||||
tgba_statistics st = stats_reachable(a);
|
|
||||||
return st.states;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue