Browse Source

flag to indicate whether condition should be in dnf

tempestpy_adaptions
hannah 4 years ago
committed by Stefan Pranger
parent
commit
139ac3d0dc
  1. 5
      src/storm/automata/LTL2DeterministicAutomaton.cpp
  2. 2
      src/storm/automata/LTL2DeterministicAutomaton.h

5
src/storm/automata/LTL2DeterministicAutomaton.cpp

@ -19,7 +19,7 @@
namespace storm { namespace storm {
namespace automata { namespace automata {
std::shared_ptr<DeterministicAutomaton> LTL2DeterministicAutomaton::ltl2da(storm::logic::Formula const& f) {
std::shared_ptr<DeterministicAutomaton> LTL2DeterministicAutomaton::ltl2da(storm::logic::Formula const& f, bool dnf) {
#ifdef STORM_HAVE_SPOT #ifdef STORM_HAVE_SPOT
std::string prefixLtl = f.toPrefixString(); std::string prefixLtl = f.toPrefixString();
@ -40,7 +40,8 @@ namespace storm {
auto aut = trans.run(spotFormula); auto aut = trans.run(spotFormula);
// TODO necessary for MDP LTL-MC // TODO necessary for MDP LTL-MC
if(!(aut->get_acceptance().is_dnf())){
if(!(aut->get_acceptance().is_dnf()) && dnf){
STORM_LOG_INFO("Convert acceptance condition into DNF...");
aut->set_acceptance(aut->get_acceptance().to_dnf()); aut->set_acceptance(aut->get_acceptance().to_dnf());
} }

2
src/storm/automata/LTL2DeterministicAutomaton.h

@ -17,7 +17,7 @@ namespace storm {
class LTL2DeterministicAutomaton { class LTL2DeterministicAutomaton {
public: public:
static std::shared_ptr<DeterministicAutomaton> ltl2da(storm::logic::Formula const& f);
static std::shared_ptr<DeterministicAutomaton> ltl2da(storm::logic::Formula const&, bool dnf);
}; };
} }

Loading…
Cancel
Save