Browse Source

set hasQualitativeResult to false for HOAFormulas

tempestpy_adaptions
hannah 3 years ago
committed by Stefan Pranger
parent
commit
113f17372f
  1. 4
      src/storm/logic/HOAPathFormula.cpp
  2. 1
      src/storm/logic/HOAPathFormula.h
  3. 6
      src/storm/modelchecker/AbstractModelChecker.cpp

4
src/storm/logic/HOAPathFormula.cpp

@ -43,6 +43,10 @@ namespace storm {
return true;
}
bool HOAPathFormula::hasQualitativeResult() const {
return false;
}
boost::any HOAPathFormula::accept(FormulaVisitor const& visitor, boost::any const& data) const {
return visitor.visit(*this, data);
}

1
src/storm/logic/HOAPathFormula.h

@ -32,6 +32,7 @@ namespace storm {
virtual bool isHOAPathFormula() const override;
virtual bool isProbabilityPathFormula() const override;
virtual bool hasQuantitativeResult() const override;
virtual bool hasQualitativeResult() const override;
virtual boost::any accept(FormulaVisitor const& visitor, boost::any const& data) const override;

6
src/storm/modelchecker/AbstractModelChecker.cpp

@ -65,11 +65,6 @@ namespace storm {
std::unique_ptr<CheckResult> AbstractModelChecker<ModelType>::computeProbabilities(Environment const& env, CheckTask<storm::logic::Formula, ValueType> const& checkTask) {
storm::logic::Formula const& formula = checkTask.getFormula();
//TODO if this is not checked first, computeStateFormulaProbabilities(...) is called (hasQualitativeResult true)
if (formula.isHOAPathFormula()) {
return this->computeHOAPathProbabilities(env, checkTask.substituteFormula(formula.asHOAPathFormula()));
}
if (formula.isStateFormula() || formula.hasQualitativeResult()) {
return this->computeStateFormulaProbabilities(env, checkTask.substituteFormula(formula));
}
@ -89,7 +84,6 @@ namespace storm {
} else if (formula.isUntilFormula()) {
return this->computeUntilProbabilities(env, checkTask.substituteFormula(formula.asUntilFormula()));
} else if (formula.isHOAPathFormula()) {
// TODO checked earlier?
return this->computeHOAPathProbabilities(env, checkTask.substituteFormula(formula.asHOAPathFormula()));
} else if (formula.isNextFormula()) {
return this->computeNextProbabilities(env, checkTask.substituteFormula(formula.asNextFormula()));

Loading…
Cancel
Save