let ltsmin.model.kripke() take the output of atomic_prop_collect()

Fixes #160.

* spot/tl/formula.hh (formula::ap): New specialization.
* tests/python/ltsmin.ipynb: Test it.
This commit is contained in:
Alexandre Duret-Lutz 2016-04-08 18:46:08 +02:00
parent a4f111f342
commit ed3b58c99c
2 changed files with 55 additions and 6 deletions

View file

@ -799,6 +799,20 @@ namespace spot
return formula(fnode::ap(name));
}
/// \brief Build an atomic proposition from... an atomic proposition.
///
/// The only practical interest of this methods is for the Python
/// bindings, where ap() can therefore work both from string or
/// atomic propositions.
static formula ap(const formula& a)
{
if (a.kind() == op::ap)
return a;
else
throw std::invalid_argument("atomic propositions cannot be "
"constructed from arbitrary formulas");
}
/// \brief Build a unary operator.
/// \pre \a o should be one of op::Not, op::X, op::F, op::G,
/// op::Closure, op::NegClosure, op::NegClosureMarked.