neverclaim: do not pass the formula
* src/tgbaalgos/neverclaim.cc, src/tgbaalgos/neverclaim.hh: Do not pass the formula. Use the automaton name instead. * src/tgbatest/ltl2tgba.cc: Adjust.
This commit is contained in:
parent
490c97d797
commit
892fb11f04
3 changed files with 13 additions and 18 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2009, 2011, 2012, 2014 Laboratoire de Recherche et
|
// Copyright (C) 2009, 2011, 2012, 2014, 2015 Laboratoire de Recherche et
|
||||||
// Développement de l'Epita (LRDE).
|
// Développement de l'Epita (LRDE).
|
||||||
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||||
|
|
@ -37,9 +37,9 @@ namespace spot
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
never_claim_bfs(const const_tgba_ptr& a, std::ostream& os,
|
never_claim_bfs(const const_tgba_ptr& a, std::ostream& os,
|
||||||
const ltl::formula* f, bool comments)
|
bool comments)
|
||||||
: tgba_reachable_iterator_breadth_first(a),
|
: tgba_reachable_iterator_breadth_first(a),
|
||||||
os_(os), f_(f), accept_all_(-1), fi_needed_(false),
|
os_(os), accept_all_(-1), fi_needed_(false),
|
||||||
comments_(comments),
|
comments_(comments),
|
||||||
sba_(std::dynamic_pointer_cast<const tgba_digraph>(a))
|
sba_(std::dynamic_pointer_cast<const tgba_digraph>(a))
|
||||||
{
|
{
|
||||||
|
|
@ -50,12 +50,9 @@ namespace spot
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
os_ << "never {";
|
os_ << "never {";
|
||||||
if (f_)
|
auto n = aut_->get_named_prop<std::string>("automaton-name");
|
||||||
{
|
if (n)
|
||||||
os_ << " /* ";
|
os_ << " /* " << *n << " */";
|
||||||
to_string(f_, os_);
|
|
||||||
os_ << " */";
|
|
||||||
}
|
|
||||||
os_ << '\n';
|
os_ << '\n';
|
||||||
init_ = aut_->get_init_state();
|
init_ = aut_->get_init_state();
|
||||||
}
|
}
|
||||||
|
|
@ -187,7 +184,6 @@ namespace spot
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::ostream& os_;
|
std::ostream& os_;
|
||||||
const ltl::formula* f_;
|
|
||||||
int accept_all_;
|
int accept_all_;
|
||||||
bool fi_needed_;
|
bool fi_needed_;
|
||||||
state* init_;
|
state* init_;
|
||||||
|
|
@ -198,10 +194,10 @@ namespace spot
|
||||||
|
|
||||||
std::ostream&
|
std::ostream&
|
||||||
never_claim_reachable(std::ostream& os, const const_tgba_ptr& g,
|
never_claim_reachable(std::ostream& os, const const_tgba_ptr& g,
|
||||||
const ltl::formula* f, bool comments)
|
bool comments)
|
||||||
{
|
{
|
||||||
assert(g->acc().num_sets() <= 1);
|
assert(g->acc().num_sets() <= 1);
|
||||||
never_claim_bfs n(g, os, f, comments);
|
never_claim_bfs n(g, os, comments);
|
||||||
n.run();
|
n.run();
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2009, 2011, 2012, 2013, 2014 Laboratoire de Recherche
|
// Copyright (C) 2009, 2011, 2012, 2013, 2014, 2015 Laboratoire de
|
||||||
// et Développement de l'Epita (LRDE).
|
// Recherche et Développement de l'Epita (LRDE).
|
||||||
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||||
// et Marie Curie.
|
// et Marie Curie.
|
||||||
|
|
@ -24,8 +24,8 @@
|
||||||
# define SPOT_TGBAALGOS_NEVERCLAIM_HH
|
# define SPOT_TGBAALGOS_NEVERCLAIM_HH
|
||||||
|
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
#include "ltlast/formula.hh"
|
|
||||||
#include "tgba/fwd.hh"
|
#include "tgba/fwd.hh"
|
||||||
|
#include "misc/common.hh"
|
||||||
|
|
||||||
namespace spot
|
namespace spot
|
||||||
{
|
{
|
||||||
|
|
@ -45,7 +45,6 @@ namespace spot
|
||||||
SPOT_API std::ostream&
|
SPOT_API std::ostream&
|
||||||
never_claim_reachable(std::ostream& os,
|
never_claim_reachable(std::ostream& os,
|
||||||
const const_tgba_ptr& g,
|
const const_tgba_ptr& g,
|
||||||
const ltl::formula* f = 0,
|
|
||||||
bool comments = false);
|
bool comments = false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1596,7 +1596,7 @@ checked_main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
assert(degeneralize_opt == DegenSBA);
|
assert(degeneralize_opt == DegenSBA);
|
||||||
if (assume_sba)
|
if (assume_sba)
|
||||||
spot::never_claim_reachable(std::cout, a, f, spin_comments);
|
spot::never_claim_reachable(std::cout, a, spin_comments);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// It is possible that we have applied other
|
// It is possible that we have applied other
|
||||||
|
|
@ -1604,7 +1604,7 @@ checked_main(int argc, char** argv)
|
||||||
// degeneralization. Let's degeneralize again!
|
// degeneralization. Let's degeneralize again!
|
||||||
auto s = spot::degeneralize(ensure_digraph(a), degen_reset,
|
auto s = spot::degeneralize(ensure_digraph(a), degen_reset,
|
||||||
degen_order, degen_cache);
|
degen_order, degen_cache);
|
||||||
spot::never_claim_reachable(std::cout, s, f, spin_comments);
|
spot::never_claim_reachable(std::cout, s, spin_comments);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue