Revert everything related to Damien's work in 2008 (he will commit a new version soon).
Here are the reverted patches:8c0d1003b0,25a3114287,9afbaf6342,dc0005f4e1,543190f2bc.
This commit is contained in:
parent
3d278663cd
commit
b1bfdee870
130 changed files with 912 additions and 5104 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2003, 2004, 2005, 2006, 2008 Laboratoire d'Informatique de
|
||||
// Copyright (C) 2003, 2004, 2005, 2006 Laboratoire d'Informatique de
|
||||
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
// Université Pierre et Marie Curie.
|
||||
//
|
||||
|
|
@ -25,6 +25,8 @@
|
|||
#include <ltlvisit/clone.hh>
|
||||
#include <ltlvisit/destroy.hh>
|
||||
#include <ltlvisit/tostring.hh>
|
||||
#include <ltlvisit/tostring.hh>
|
||||
#include <ltlast/atomic_prop.hh>
|
||||
#include <ltlenv/defaultenv.hh>
|
||||
#include "bdddict.hh"
|
||||
|
||||
|
|
@ -46,8 +48,7 @@ namespace spot
|
|||
}
|
||||
|
||||
int
|
||||
bdd_dict::register_proposition(const internal::base_formula* f,
|
||||
const void* for_me)
|
||||
bdd_dict::register_proposition(const ltl::formula* f, const void* for_me)
|
||||
{
|
||||
int num;
|
||||
// Do not build a variable that already exists.
|
||||
|
|
@ -58,7 +59,7 @@ namespace spot
|
|||
}
|
||||
else
|
||||
{
|
||||
f = f->clone();
|
||||
f = clone(f);
|
||||
num = allocate_variables(1);
|
||||
var_map[f] = num;
|
||||
var_formula_map[num] = f;
|
||||
|
|
@ -82,8 +83,7 @@ namespace spot
|
|||
}
|
||||
|
||||
int
|
||||
bdd_dict::register_state(const internal::base_formula* f,
|
||||
const void* for_me)
|
||||
bdd_dict::register_state(const ltl::formula* f, const void* for_me)
|
||||
{
|
||||
int num;
|
||||
// Do not build a state that already exists.
|
||||
|
|
@ -94,7 +94,7 @@ namespace spot
|
|||
}
|
||||
else
|
||||
{
|
||||
f = f->clone();
|
||||
f = ltl::clone(f);
|
||||
num = allocate_variables(2);
|
||||
now_map[f] = num;
|
||||
now_formula_map[num] = f;
|
||||
|
|
@ -108,8 +108,8 @@ namespace spot
|
|||
}
|
||||
|
||||
int
|
||||
bdd_dict::register_acceptance_variable(const internal::base_formula* f,
|
||||
const void* for_me)
|
||||
bdd_dict::register_acceptance_variable(const ltl::formula* f,
|
||||
const void* for_me)
|
||||
{
|
||||
int num;
|
||||
// Do not build an acceptance variable that already exists.
|
||||
|
|
@ -120,7 +120,7 @@ namespace spot
|
|||
}
|
||||
else
|
||||
{
|
||||
f = f->clone();
|
||||
f = clone(f);
|
||||
num = allocate_variables(1);
|
||||
acc_map[f] = num;
|
||||
acc_formula_map[num] = f;
|
||||
|
|
@ -151,14 +151,13 @@ namespace spot
|
|||
assert(i != acc_formula_map.end());
|
||||
std::ostringstream s;
|
||||
// FIXME: We could be smarter and reuse unused "$n" numbers.
|
||||
s << i->second->to_string()
|
||||
<< "$"
|
||||
s << ltl::to_string(i->second) << "$"
|
||||
<< ++clone_counts[var];
|
||||
internal::base_formula* f =
|
||||
ltl::formula* f =
|
||||
ltl::atomic_prop::instance(s.str(),
|
||||
ltl::default_environment::instance());
|
||||
int res = register_acceptance_variable(f, for_me);
|
||||
f->destroy();
|
||||
ltl::destroy(f);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
@ -235,7 +234,7 @@ namespace spot
|
|||
// Let's free it. First, we need to find
|
||||
// if this is a Now, a Var, or an Acc variable.
|
||||
int n = 1;
|
||||
const internal::base_formula* f = 0;
|
||||
const ltl::formula* f = 0;
|
||||
vf_map::iterator vi = var_formula_map.find(var);
|
||||
if (vi != var_formula_map.end())
|
||||
{
|
||||
|
|
@ -280,7 +279,7 @@ namespace spot
|
|||
// formula itself.
|
||||
release_variables(var, n);
|
||||
if (f)
|
||||
f->destroy();
|
||||
ltl::destroy(f);
|
||||
var_refs.erase(cur);
|
||||
}
|
||||
|
||||
|
|
@ -299,8 +298,7 @@ namespace spot
|
|||
}
|
||||
|
||||
bool
|
||||
bdd_dict::is_registered_proposition(const internal::base_formula* f,
|
||||
const void* by_me)
|
||||
bdd_dict::is_registered_proposition(const ltl::formula* f, const void* by_me)
|
||||
{
|
||||
fv_map::iterator fi = var_map.find(f);
|
||||
if (fi == var_map.end())
|
||||
|
|
@ -310,8 +308,7 @@ namespace spot
|
|||
}
|
||||
|
||||
bool
|
||||
bdd_dict::is_registered_state(const internal::base_formula* f,
|
||||
const void* by_me)
|
||||
bdd_dict::is_registered_state(const ltl::formula* f, const void* by_me)
|
||||
{
|
||||
fv_map::iterator fi = now_map.find(f);
|
||||
if (fi == now_map.end())
|
||||
|
|
@ -321,7 +318,7 @@ namespace spot
|
|||
}
|
||||
|
||||
bool
|
||||
bdd_dict::is_registered_acceptance_variable(const internal::base_formula* f,
|
||||
bdd_dict::is_registered_acceptance_variable(const ltl::formula* f,
|
||||
const void* by_me)
|
||||
{
|
||||
fv_map::iterator fi = acc_map.find(f);
|
||||
|
|
@ -340,23 +337,23 @@ namespace spot
|
|||
{
|
||||
os << " " << fi->second << " (x"
|
||||
<< var_refs.find(fi->second)->second.size() << "): ";
|
||||
fi->first->to_string(os) << std::endl;
|
||||
to_string(fi->first, os) << std::endl;
|
||||
}
|
||||
os << "States:" << std::endl;
|
||||
for (fi = now_map.begin(); fi != now_map.end(); ++fi)
|
||||
{
|
||||
int refs = var_refs.find(fi->second)->second.size();
|
||||
os << " " << fi->second << " (x" << refs << "): Now[";
|
||||
fi->first->to_string(os) << "]" << std::endl;
|
||||
to_string(fi->first, os) << "]" << std::endl;
|
||||
os << " " << fi->second + 1 << " (x" << refs << "): Next[";
|
||||
fi->first->to_string(os) << "]" << std::endl;
|
||||
to_string(fi->first, os) << "]" << std::endl;
|
||||
}
|
||||
os << "Acceptance Conditions:" << std::endl;
|
||||
for (fi = acc_map.begin(); fi != acc_map.end(); ++fi)
|
||||
{
|
||||
os << " " << fi->second << " (x"
|
||||
<< var_refs.find(fi->second)->second.size() << "): Acc[";
|
||||
fi->first->to_string(os) << "]" << std::endl;
|
||||
to_string(fi->first, os) << "]" << std::endl;
|
||||
}
|
||||
os << "Ref counts:" << std::endl;
|
||||
vr_map::const_iterator ri;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (C) 2003, 2004, 2006 Laboratoire d'Informatique de Paris
|
||||
// 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
// Université Pierre et Marie Curie.
|
||||
// Copyright (C) 2003, 2004, 2006 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
#include <map>
|
||||
#include <iosfwd>
|
||||
#include <bdd.h>
|
||||
#include "internal/baseformula.hh"
|
||||
#include "ltlast/formula.hh"
|
||||
#include "misc/bddalloc.hh"
|
||||
|
||||
namespace spot
|
||||
|
|
@ -43,9 +43,9 @@ namespace spot
|
|||
~bdd_dict();
|
||||
|
||||
/// Formula-to-BDD-variable maps.
|
||||
typedef std::map<const internal::base_formula*, int> fv_map;
|
||||
typedef std::map<const ltl::formula*, int> fv_map;
|
||||
/// BDD-variable-to-formula maps.
|
||||
typedef std::map<int, const internal::base_formula*> vf_map;
|
||||
typedef std::map<int, const ltl::formula*> vf_map;
|
||||
|
||||
fv_map now_map; ///< Maps formulae to "Now" BDD variables
|
||||
vf_map now_formula_map; ///< Maps "Now" BDD variables to formulae
|
||||
|
|
@ -77,8 +77,7 @@ namespace spot
|
|||
///
|
||||
/// \return The variable number. Use bdd_ithvar() or bdd_nithvar()
|
||||
/// to convert this to a BDD.
|
||||
int
|
||||
register_proposition(const internal::base_formula* f, const void* for_me);
|
||||
int register_proposition(const ltl::formula* f, const void* for_me);
|
||||
|
||||
/// \brief Register BDD variables as atomic propositions.
|
||||
///
|
||||
|
|
@ -100,7 +99,7 @@ namespace spot
|
|||
/// \return The first variable number. Add one to get the second
|
||||
/// variable. Use bdd_ithvar() or bdd_nithvar() to convert this
|
||||
/// to a BDD.
|
||||
int register_state(const internal::base_formula* f, const void* for_me);
|
||||
int register_state(const ltl::formula* f, const void* for_me);
|
||||
|
||||
/// \brief Register an atomic proposition.
|
||||
///
|
||||
|
|
@ -112,8 +111,7 @@ namespace spot
|
|||
///
|
||||
/// \return The variable number. Use bdd_ithvar() or bdd_nithvar()
|
||||
/// to convert this to a BDD.
|
||||
int register_acceptance_variable(const internal::base_formula* f,
|
||||
const void* for_me);
|
||||
int register_acceptance_variable(const ltl::formula* f, const void* for_me);
|
||||
|
||||
/// \brief Clone an acceptance variable VAR for FOR_ME.
|
||||
///
|
||||
|
|
@ -158,12 +156,9 @@ namespace spot
|
|||
|
||||
/// @{
|
||||
/// Check whether formula \a f has already been registered by \a by_me.
|
||||
bool is_registered_proposition(const internal::base_formula* f,
|
||||
const void* by_me);
|
||||
|
||||
bool is_registered_state(const internal::base_formula* f,
|
||||
const void* by_me);
|
||||
bool is_registered_acceptance_variable(const internal::base_formula* f,
|
||||
bool is_registered_proposition(const ltl::formula* f, const void* by_me);
|
||||
bool is_registered_state(const ltl::formula* f, const void* by_me);
|
||||
bool is_registered_acceptance_variable(const ltl::formula* f,
|
||||
const void* by_me);
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@
|
|||
#include <cassert>
|
||||
#include <ostream>
|
||||
#include "bddprint.hh"
|
||||
#include "ltlvisit/tostring.hh"
|
||||
#include "formula2bdd.hh"
|
||||
#include "ltlvisit/destroy.hh"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
|
|
@ -40,7 +42,7 @@ namespace spot
|
|||
bdd_dict::vf_map::const_iterator isi =
|
||||
dict->var_formula_map.find(var);
|
||||
if (isi != dict->var_formula_map.end())
|
||||
isi->second->to_string(o);
|
||||
to_string(isi->second, o);
|
||||
else
|
||||
{
|
||||
isi = dict->acc_formula_map.find(var);
|
||||
|
|
@ -49,12 +51,12 @@ namespace spot
|
|||
if (want_acc)
|
||||
{
|
||||
o << "Acc[";
|
||||
isi->second->to_string(o) << "]";
|
||||
to_string(isi->second, o) << "]";
|
||||
}
|
||||
else
|
||||
{
|
||||
o << "\"";
|
||||
isi->second->to_string(o) << "\"";
|
||||
to_string(isi->second, o) << "\"";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -62,14 +64,14 @@ namespace spot
|
|||
isi = dict->now_formula_map.find(var);
|
||||
if (isi != dict->now_formula_map.end())
|
||||
{
|
||||
o << "Now["; isi->second->to_string(o) << "]";
|
||||
o << "Now["; to_string(isi->second, o) << "]";
|
||||
}
|
||||
else
|
||||
{
|
||||
isi = dict->now_formula_map.find(var - 1);
|
||||
if (isi != dict->now_formula_map.end())
|
||||
{
|
||||
o << "Next["; isi->second->to_string(o) << "]";
|
||||
o << "Next["; to_string(isi->second, o) << "]";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2003, 2004, 2008 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
//
|
||||
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
#include <cassert>
|
||||
#include "formula2bdd.hh"
|
||||
#include "ltlast/allnodes.hh"
|
||||
#include "ltlast/visitor.hh"
|
||||
#include "misc/minato.hh"
|
||||
#include "ltlvisit/clone.hh"
|
||||
|
||||
|
|
@ -162,7 +164,7 @@ namespace spot
|
|||
int var = bdd_var(b);
|
||||
bdd_dict::vf_map::const_iterator isi = d->var_formula_map.find(var);
|
||||
assert(isi != d->var_formula_map.end());
|
||||
formula* res = clone(dynamic_cast<const ltl::formula*>(isi->second));
|
||||
formula* res = clone(isi->second);
|
||||
|
||||
bdd high = bdd_high(b);
|
||||
if (high == bddfalse)
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@
|
|||
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
|
||||
#include "ltlvisit/clone.hh"
|
||||
#include "ltlvisit/destroy.hh"
|
||||
#include "tgbabddconcretefactory.hh"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
tgba_bdd_concrete_factory::tgba_bdd_concrete_factory(bdd_dict* dict)
|
||||
|
|
@ -32,12 +33,12 @@ namespace spot
|
|||
{
|
||||
acc_map_::iterator ai;
|
||||
for (ai = acc_.begin(); ai != acc_.end(); ++ai)
|
||||
ai->first->destroy();
|
||||
destroy(ai->first);
|
||||
get_dict()->unregister_all_my_variables(this);
|
||||
}
|
||||
|
||||
int
|
||||
tgba_bdd_concrete_factory::create_state(const internal::base_formula* f)
|
||||
tgba_bdd_concrete_factory::create_state(const ltl::formula* f)
|
||||
{
|
||||
int num = get_dict()->register_state(f, this);
|
||||
// Keep track of all "Now" variables for easy
|
||||
|
|
@ -47,7 +48,7 @@ namespace spot
|
|||
}
|
||||
|
||||
int
|
||||
tgba_bdd_concrete_factory::create_atomic_prop(const internal::base_formula* f)
|
||||
tgba_bdd_concrete_factory::create_atomic_prop(const ltl::formula* f)
|
||||
{
|
||||
int num = get_dict()->register_proposition(f, this);
|
||||
// Keep track of all atomic proposition for easy
|
||||
|
|
@ -57,9 +58,8 @@ namespace spot
|
|||
}
|
||||
|
||||
void
|
||||
tgba_bdd_concrete_factory::declare_acceptance_condition(
|
||||
bdd b,
|
||||
const internal::base_formula* a)
|
||||
tgba_bdd_concrete_factory::declare_acceptance_condition(bdd b,
|
||||
const ltl::formula* a)
|
||||
{
|
||||
// Maintain a conjunction of BDDs associated to A. We will latter
|
||||
// (in tgba_bdd_concrete_factory::finish()) associate this
|
||||
|
|
@ -67,7 +67,7 @@ namespace spot
|
|||
acc_map_::iterator ai = acc_.find(a);
|
||||
if (ai == acc_.end())
|
||||
{
|
||||
a = a->clone();
|
||||
a = clone(a);
|
||||
acc_[a] = b;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
# define SPOT_TGBA_TGBABDDCONCRETEFACTORY_HH
|
||||
|
||||
#include "misc/hash.hh"
|
||||
#include "internal/baseformula.hh"
|
||||
#include "ltlast/formula.hh"
|
||||
#include "tgbabddfactory.hh"
|
||||
|
||||
namespace spot
|
||||
|
|
@ -45,7 +45,7 @@ namespace spot
|
|||
/// The state variables are not created if they already exist.
|
||||
/// Instead their existing variable numbers are returned.
|
||||
/// Variable numbers can be turned into BDD using ithvar().
|
||||
int create_state(const internal::base_formula* f);
|
||||
int create_state(const ltl::formula* f);
|
||||
|
||||
/// Create an atomic proposition variable for formula \a f.
|
||||
///
|
||||
|
|
@ -55,7 +55,7 @@ namespace spot
|
|||
/// The atomic proposition is not created if it already exists.
|
||||
/// Instead its existing variable number is returned. Variable numbers
|
||||
/// can be turned into BDD using ithvar().
|
||||
int create_atomic_prop(const internal::base_formula* f);
|
||||
int create_atomic_prop(const ltl::formula* f);
|
||||
|
||||
/// Declare an acceptance condition.
|
||||
///
|
||||
|
|
@ -68,7 +68,7 @@ namespace spot
|
|||
/// \param b a BDD indicating which variables are in the
|
||||
/// acceptance set
|
||||
/// \param a the formula associated
|
||||
void declare_acceptance_condition(bdd b, const internal::base_formula* a);
|
||||
void declare_acceptance_condition(bdd b, const ltl::formula* a);
|
||||
|
||||
const tgba_bdd_core_data& get_core_data() const;
|
||||
bdd_dict* get_dict() const;
|
||||
|
|
@ -86,8 +86,8 @@ namespace spot
|
|||
private:
|
||||
tgba_bdd_core_data data_; ///< Core data for the new automata.
|
||||
|
||||
typedef Sgi::hash_map<const internal::base_formula*, bdd,
|
||||
internal::formula_ptr_hash> acc_map_;
|
||||
typedef Sgi::hash_map<const ltl::formula*, bdd,
|
||||
ltl::formula_ptr_hash> acc_map_;
|
||||
acc_map_ acc_; ///< BDD associated to each acceptance condition
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2003, 2004, 2008 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
//
|
||||
|
|
@ -19,6 +19,8 @@
|
|||
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
|
||||
#include "ltlast/atomic_prop.hh"
|
||||
#include "ltlast/constant.hh"
|
||||
#include "ltlvisit/destroy.hh"
|
||||
#include "tgbaexplicit.hh"
|
||||
#include "tgba/formula2bdd.hh"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (C) 2003, 2004, 2005, 2008 Laboratoire d'Informatique de
|
||||
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
// Université Pierre et Marie Curie.
|
||||
// Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -22,8 +22,8 @@
|
|||
#include <cassert>
|
||||
#include "tgbatba.hh"
|
||||
#include "bddprint.hh"
|
||||
#include "ltlast/constant.hh"
|
||||
#include "misc/hashfunc.hh"
|
||||
#include "ltlast/formula.hh"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue