Browse Source

Merge branch 'master' into PrctlParser

tempestpy_adaptions
Lanchid 12 years ago
parent
commit
9edc0cf3a4
  1. 2
      src/formula/AbstractFormula.h
  2. 2
      src/formula/AbstractPathFormula.h
  3. 4
      src/formula/AbstractStateFormula.h
  4. 2
      src/formula/And.h
  5. 2
      src/formula/Ap.h
  6. 6
      src/formula/BoundedEventually.h
  7. 10
      src/formula/BoundedNaryUntil.h
  8. 2
      src/formula/BoundedUntil.h
  9. 6
      src/formula/Eventually.h
  10. 5
      src/formula/Formulas.h
  11. 6
      src/formula/NoBoundOperator.h
  12. 2
      src/formula/Not.h
  13. 28
      src/formula/PathBoundOperator.h
  14. 14
      src/formula/ProbabilisticBoundOperator.h
  15. 2
      src/formula/ReachabilityReward.h
  16. 12
      src/formula/RewardBoundOperator.h
  17. 197
      src/formula/StateBoundOperator.h
  18. 119
      src/formula/SteadyStateOperator.h
  19. 0
      src/modelchecker/AbstractModelChecker.h
  20. 6
      src/modelchecker/DtmcPrctlModelChecker.h
  21. 2
      src/modelchecker/EigenDtmcPrctlModelChecker.h
  22. 0
      src/modelchecker/ForwardDeclarations.h
  23. 2
      src/modelchecker/GmmxxDtmcPrctlModelChecker.h
  24. 251
      src/models/Ctmdp.h
  25. 2
      src/models/GraphTransitions.h
  26. 9
      src/parser/AutoParser.cpp
  27. 4
      src/parser/DeterministicModelParser.h
  28. 40
      src/parser/MdpParser.h
  29. 20
      src/parser/NonDeterministicModelParser.cpp
  30. 62
      src/parser/NonDeterministicModelParser.h
  31. 16
      src/parser/PrctlParser.cpp
  32. 4
      src/storm.cpp
  33. 1
      test/parser/.gitignore
  34. 6
      test/parser/ParseMdpTest.cpp
  35. 4
      test/parser/PrctlParserTest.cpp
  36. 2
      test/storm-tests.cpp

2
src/formula/AbstractFormula.h

@ -14,7 +14,7 @@ namespace storm { namespace formula {
template <class T> class AbstractFormula;
}}
#include "src/modelChecker/AbstractModelChecker.h"
#include "src/modelchecker/AbstractModelChecker.h"
#include "src/formula/AbstractFormulaChecker.h"
namespace storm {

2
src/formula/AbstractPathFormula.h

@ -13,8 +13,8 @@ template <class T> class AbstractPathFormula;
}}
#include "src/formula/AbstractFormula.h"
#include "src/modelchecker/AbstractModelChecker.h"
#include "modelChecker/AbstractModelChecker.h"
#include <vector>
#include <iostream>
#include <typeinfo>

4
src/formula/AbstractStateFormula.h

@ -12,9 +12,9 @@ namespace storm { namespace formula {
template <class T> class AbstractStateFormula;
}}
#include "AbstractFormula.h"
#include "src/formula/AbstractFormula.h"
#include "src/storage/BitVector.h"
#include "src/modelChecker/AbstractModelChecker.h"
#include "src/modelchecker/AbstractModelChecker.h"
namespace storm {
namespace formula {

2
src/formula/And.h

@ -10,7 +10,7 @@
#include "src/formula/AbstractStateFormula.h"
#include "src/formula/AbstractFormulaChecker.h"
#include "src/modelChecker/AbstractModelChecker.h"
#include "src/modelchecker/AbstractModelChecker.h"
#include <string>
namespace storm {

2
src/formula/Ap.h

@ -10,7 +10,7 @@
#include "src/formula/AbstractStateFormula.h"
#include "src/formula/AbstractFormulaChecker.h"
#include "src/modelChecker/AbstractModelChecker.h"
#include "src/modelchecker/AbstractModelChecker.h"
namespace storm {
namespace formula {

6
src/formula/BoundedEventually.h

@ -8,12 +8,12 @@
#ifndef STORM_FORMULA_BOUNDEDEVENTUALLY_H_
#define STORM_FORMULA_BOUNDEDEVENTUALLY_H_
#include "AbstractPathFormula.h"
#include "AbstractStateFormula.h"
#include "src/formula/AbstractPathFormula.h"
#include "src/formula/AbstractStateFormula.h"
#include "src/formula/AbstractFormulaChecker.h"
#include "boost/integer/integer_mask.hpp"
#include <string>
#include "src/modelChecker/AbstractModelChecker.h"
#include "src/modelchecker/AbstractModelChecker.h"
namespace storm {

10
src/formula/BoundedNaryUntil.h

@ -10,7 +10,7 @@
#include "src/formula/AbstractPathFormula.h"
#include "src/formula/AbstractStateFormula.h"
#include "src/modelChecker/AbstractModelChecker.h"
#include "src/modelchecker/AbstractModelChecker.h"
#include "boost/integer/integer_mask.hpp"
#include <string>
#include <vector>
@ -68,7 +68,7 @@ public:
* Empty constructor
*/
BoundedNaryUntil() {
this->left = NULL;
this->left = nullptr;
this->right = new std::vector<std::tuple<AbstractStateFormula<T>*,T,T>>();
}
@ -77,7 +77,6 @@ public:
*
* @param left The left formula subtree
* @param right The left formula subtree
* @param bound The maximal number of steps
*/
BoundedNaryUntil(AbstractStateFormula<T>* left, std::vector<std::tuple<AbstractStateFormula<T>*,T,T>>* right) {
this->left = left;
@ -91,10 +90,10 @@ public:
* (this behaviour can be prevented by setting the subtrees to NULL before deletion)
*/
virtual ~BoundedNaryUntil() {
if (left != NULL) {
if (left != nullptr) {
delete left;
}
if (right != NULL) {
if (right != nullptr) {
delete right;
}
}
@ -205,7 +204,6 @@ private:
};
} //namespace formula
} //namespace storm
#endif /* STORM_FORMULA_BOUNDEDNARYUNTIL_H_ */

2
src/formula/BoundedUntil.h

@ -10,7 +10,7 @@
#include "src/formula/AbstractPathFormula.h"
#include "src/formula/AbstractStateFormula.h"
#include "src/modelChecker/AbstractModelChecker.h"
#include "src/modelchecker/AbstractModelChecker.h"
#include "boost/integer/integer_mask.hpp"
#include <string>
#include "src/formula/AbstractFormulaChecker.h"

6
src/formula/Eventually.h

@ -8,9 +8,9 @@
#ifndef STORM_FORMULA_EVENTUALLY_H_
#define STORM_FORMULA_EVENTUALLY_H_
#include "AbstractPathFormula.h"
#include "AbstractStateFormula.h"
#include "src/modelChecker/AbstractModelChecker.h"
#include "src/formula/AbstractPathFormula.h"
#include "src/formula/AbstractStateFormula.h"
#include "src/modelchecker/AbstractModelChecker.h"
namespace storm {

5
src/formula/Formulas.h

@ -8,7 +8,7 @@
#ifndef STORM_FORMULA_FORMULAS_H_
#define STORM_FORMULA_FORMULAS_H_
#include "modelChecker/ForwardDeclarations.h"
#include "modelchecker/ForwardDeclarations.h"
#include "AbstractFormula.h"
#include "AbstractPathFormula.h"
@ -34,7 +34,8 @@
#include "ReachabilityReward.h"
#include "RewardBoundOperator.h"
#include "RewardNoBoundOperator.h"
#include "SteadyStateOperator.h"
#include "modelChecker/DtmcPrctlModelChecker.h"
#include "modelchecker/DtmcPrctlModelChecker.h"
#endif /* STORM_FORMULA_FORMULAS_H_ */

6
src/formula/NoBoundOperator.h

@ -8,11 +8,11 @@
#ifndef STORM_FORMULA_NOBOUNDOPERATOR_H_
#define STORM_FORMULA_NOBOUNDOPERATOR_H_
#include "AbstractFormula.h"
#include "AbstractPathFormula.h"
#include "src/formula/AbstractFormula.h"
#include "src/formula/AbstractPathFormula.h"
#include "src/formula/AbstractFormulaChecker.h"
#include "modelChecker/ForwardDeclarations.h"
#include "src/modelchecker/ForwardDeclarations.h"
namespace storm {

2
src/formula/Not.h

@ -10,7 +10,7 @@
#include "AbstractStateFormula.h"
#include "src/formula/AbstractFormulaChecker.h"
#include "src/modelChecker/AbstractModelChecker.h"
#include "src/modelchecker/AbstractModelChecker.h"
namespace storm {

28
src/formula/BoundOperator.h → src/formula/PathBoundOperator.h

@ -1,35 +1,35 @@
/*
* BoundOperator.h
* PathBoundOperator.h
*
* Created on: 27.12.2012
* Author: Christian Dehnert
*/
#ifndef STORM_FORMULA_BOUNDOPERATOR_H_
#define STORM_FORMULA_BOUNDOPERATOR_H_
#ifndef STORM_FORMULA_PATHBOUNDOPERATOR_H_
#define STORM_FORMULA_PATHBOUNDOPERATOR_H_
#include "src/formula/AbstractStateFormula.h"
#include "src/formula/AbstractPathFormula.h"
#include "src/formula/AbstractFormulaChecker.h"
#include "src/modelChecker/AbstractModelChecker.h"
#include "src/modelchecker/AbstractModelChecker.h"
#include "src/utility/ConstTemplates.h"
namespace storm {
namespace formula {
template <class T> class BoundOperator;
template <class T> class PathBoundOperator;
/*!
* @brief Interface class for model checkers that support BoundOperator.
* @brief Interface class for model checkers that support PathBoundOperator.
*
* All model checkers that support the formula class BoundOperator must inherit
* All model checkers that support the formula class PathBoundOperator must inherit
* this pure virtual class.
*/
template <class T>
class IBoundOperatorModelChecker {
class IPathBoundOperatorModelChecker {
public:
virtual storm::storage::BitVector* checkBoundOperator(const BoundOperator<T>& obj) const = 0;
virtual storm::storage::BitVector* checkPathBoundOperator(const PathBoundOperator<T>& obj) const = 0;
};
/*!
@ -54,7 +54,7 @@ class IBoundOperatorModelChecker {
* @see AbstractFormula
*/
template<class T>
class BoundOperator : public AbstractStateFormula<T> {
class PathBoundOperator : public AbstractStateFormula<T> {
public:
enum ComparisonType { LESS, LESS_EQUAL, GREATER, GREATER_EQUAL };
@ -66,7 +66,7 @@ public:
* @param bound The bound for the probability
* @param pathFormula The child node
*/
BoundOperator(ComparisonType comparisonOperator, T bound, AbstractPathFormula<T>* pathFormula)
PathBoundOperator(ComparisonType comparisonOperator, T bound, AbstractPathFormula<T>* pathFormula)
: comparisonOperator(comparisonOperator), bound(bound), pathFormula(pathFormula) {
// Intentionally left empty
}
@ -77,7 +77,7 @@ public:
* The subtree is deleted with the object
* (this behavior can be prevented by setting them to NULL before deletion)
*/
virtual ~BoundOperator() {
virtual ~PathBoundOperator() {
if (pathFormula != nullptr) {
delete pathFormula;
}
@ -173,7 +173,7 @@ public:
* @returns A bit vector indicating all states that satisfy the formula represented by the called object.
*/
virtual storm::storage::BitVector *check(const storm::modelChecker::AbstractModelChecker<T>& modelChecker) const {
return modelChecker.template as<IBoundOperatorModelChecker>()->checkBoundOperator(*this);
return modelChecker.template as<IPathBoundOperatorModelChecker>()->checkPathBoundOperator(*this);
}
/*!
@ -196,4 +196,4 @@ private:
} //namespace storm
#endif /* STORM_FORMULA_BOUNDOPERATOR_H_ */
#endif /* STORM_FORMULA_PATHBOUNDOPERATOR_H_ */

14
src/formula/ProbabilisticBoundOperator.h

@ -10,7 +10,7 @@
#include "AbstractStateFormula.h"
#include "AbstractPathFormula.h"
#include "BoundOperator.h"
#include "src/formula/PathBoundOperator.h"
#include "utility/ConstTemplates.h"
namespace storm {
@ -38,14 +38,14 @@ namespace formula {
* @see AbstractFormula
*/
template<class T>
class ProbabilisticBoundOperator : public BoundOperator<T> {
class ProbabilisticBoundOperator : public PathBoundOperator<T> {
public:
/*!
* Empty constructor
*/
ProbabilisticBoundOperator() : BoundOperator<T>
(BoundOperator<T>::LESS_EQUAL, storm::utility::constGetZero<T>(), nullptr) {
ProbabilisticBoundOperator() : PathBoundOperator<T>
(PathBoundOperator<T>::LESS_EQUAL, storm::utility::constGetZero<T>(), nullptr) {
// Intentionally left empty
}
@ -58,8 +58,8 @@ public:
* @param pathFormula The child node
*/
ProbabilisticBoundOperator(
typename BoundOperator<T>::ComparisonType comparisonRelation, T bound, AbstractPathFormula<T>* pathFormula) :
BoundOperator<T>(comparisonRelation, bound, pathFormula) {
typename PathBoundOperator<T>::ComparisonType comparisonRelation, T bound, AbstractPathFormula<T>* pathFormula) :
PathBoundOperator<T>(comparisonRelation, bound, pathFormula) {
// Intentionally left empty
}
@ -68,7 +68,7 @@ public:
*/
virtual std::string toString() const {
std::string result = "P ";
result += BoundOperator<T>::toString();
result += PathBoundOperator<T>::toString();
return result;
}

2
src/formula/ReachabilityReward.h

@ -11,7 +11,7 @@
#include "src/formula/AbstractPathFormula.h"
#include "src/formula/AbstractStateFormula.h"
#include "src/formula/AbstractFormulaChecker.h"
#include "src/modelChecker/AbstractModelChecker.h"
#include "src/modelchecker/AbstractModelChecker.h"
namespace storm {
namespace formula {

12
src/formula/RewardBoundOperator.h

@ -10,7 +10,7 @@
#include "AbstractStateFormula.h"
#include "AbstractPathFormula.h"
#include "BoundOperator.h"
#include "PathBoundOperator.h"
#include "utility/ConstTemplates.h"
namespace storm {
@ -37,13 +37,13 @@ namespace formula {
* @see AbstractFormula
*/
template<class T>
class RewardBoundOperator : public BoundOperator<T> {
class RewardBoundOperator : public PathBoundOperator<T> {
public:
/*!
* Empty constructor
*/
RewardBoundOperator() : BoundOperator<T>(BoundOperator<T>::LESS_EQUAL, storm::utility::constGetZero<T>(), nullptr) {
RewardBoundOperator() : PathBoundOperator<T>(PathBoundOperator<T>::LESS_EQUAL, storm::utility::constGetZero<T>(), nullptr) {
// Intentionally left empty
}
@ -55,8 +55,8 @@ public:
* @param pathFormula The child node
*/
RewardBoundOperator(
typename BoundOperator<T>::ComparisonType comparisonRelation, T bound, AbstractPathFormula<T>* pathFormula) :
BoundOperator<T>(comparisonRelation, bound, pathFormula) {
typename PathBoundOperator<T>::ComparisonType comparisonRelation, T bound, AbstractPathFormula<T>* pathFormula) :
PathBoundOperator<T>(comparisonRelation, bound, pathFormula) {
// Intentionally left empty
}
@ -65,7 +65,7 @@ public:
*/
virtual std::string toString() const {
std::string result = "R ";
result += BoundOperator<T>::toString();
result += PathBoundOperator<T>::toString();
return result;
}

197
src/formula/StateBoundOperator.h

@ -0,0 +1,197 @@
/*
* BoundOperator.h
*
* Created on: 27.12.2012
* Author: Christian Dehnert
*/
#ifndef STORM_FORMULA_STATEBOUNDOPERATOR_H_
#define STORM_FORMULA_STATEBOUNDOPERATOR_H_
#include "src/formula/AbstractStateFormula.h"
#include "src/formula/AbstractPathFormula.h"
#include "src/formula/AbstractFormulaChecker.h"
#include "src/modelchecker/AbstractModelChecker.h"
#include "src/utility/ConstTemplates.h"
namespace storm {
namespace formula {
template <class T> class StateBoundOperator;
/*!
* @brief Interface class for model checkers that support StateBoundOperator.
*
* All model checkers that support the formula class StateBoundOperator must inherit
* this pure virtual class.
*/
template <class T>
class IStateBoundOperatorModelChecker {
public:
virtual storm::storage::BitVector* checkStateBoundOperator(const StateBoundOperator<T>& obj) const = 0;
};
/*!
* @brief
* Class for a Abstract formula tree with a P (probablistic) operator node over a probability interval
* as root.
*
* Has one Abstract state formula as sub formula/tree.
*
* @par Semantics
* The formula holds iff the probability that the state formula holds is inside the bounds
* specified in this operator
*
* The subtree is seen as part of the object and deleted with it
* (this behavior can be prevented by setting them to NULL before deletion)
*
*
* @see AbstractStateFormula
* @see AbstractPathFormula
* @see ProbabilisticOperator
* @see ProbabilisticNoBoundsOperator
* @see AbstractFormula
*/
template<class T>
class StateBoundOperator : public AbstractStateFormula<T> {
public:
enum ComparisonType { LESS, LESS_EQUAL, GREATER, GREATER_EQUAL };
/*!
* Constructor
*
* @param comparisonOperator The relation for the bound.
* @param bound The bound for the probability
* @param stateFormula The child node
*/
StateBoundOperator(ComparisonType comparisonOperator, T bound, AbstractStateFormula<T>* stateFormula)
: comparisonOperator(comparisonOperator), bound(bound), stateFormula(stateFormula) {
// Intentionally left empty
}
/*!
* Destructor
*
* The subtree is deleted with the object
* (this behavior can be prevented by setting them to NULL before deletion)
*/
virtual ~StateBoundOperator() {
if (stateFormula != nullptr) {
delete stateFormula;
}
}
/*!
* @returns the child node (representation of a Abstract state formula)
*/
const AbstractStateFormula<T>& getStateFormula () const {
return *stateFormula;
}
/*!
* Sets the child node
*
* @param stateFormula the state formula that becomes the new child node
*/
void setStateFormula(AbstractStateFormula<T>* stateFormula) {
this->stateFormula = stateFormula;
}
/*!
* @returns the comparison relation
*/
const ComparisonType getComparisonOperator() const {
return comparisonOperator;
}
void setComparisonOperator(ComparisonType comparisonOperator) {
this->comparisonOperator = comparisonOperator;
}
/*!
* @returns the bound for the measure
*/
const T& getBound() const {
return bound;
}
/*!
* Sets the interval in which the probability that the path formula holds may lie in.
*
* @param bound The bound for the measure
*/
void setBound(T bound) {
this->bound = bound;
}
/*!
* @returns a string representation of the formula
*/
virtual std::string toString() const {
std::string result = "";
switch (comparisonOperator) {
case LESS: result += "< "; break;
case LESS_EQUAL: result += "<= "; break;
case GREATER: result += "> "; break;
case GREATER_EQUAL: result += ">= "; break;
}
result += std::to_string(bound);
result += " [";
result += stateFormula->toString();
result += "]";
return result;
}
bool meetsBound(T value) const {
switch (comparisonOperator) {
case LESS: return value < bound; break;
case LESS_EQUAL: return value <= bound; break;
case GREATER: return value > bound; break;
case GREATER_EQUAL: return value >= bound; break;
default: return false;
}
}
/*!
* Clones the called object.
*
* Performs a "deep copy", i.e. the subtrees of the new object are clones of the original ones
*
* @returns a new AND-object that is identical the called object.
*/
virtual AbstractStateFormula<T>* clone() const = 0;
/*!
* Calls the model checker to check this formula.
* Needed to infer the correct type of formula class.
*
* @note This function should only be called in a generic check function of a model checker class. For other uses,
* the methods of the model checker should be used.
*
* @returns A bit vector indicating all states that satisfy the formula represented by the called object.
*/
virtual storm::storage::BitVector *check(const storm::modelChecker::AbstractModelChecker<T>& modelChecker) const {
return modelChecker.template as<IStateBoundOperatorModelChecker>()->checkStateBoundOperator(*this);
}
/*!
* @brief Checks if the subtree conforms to some logic.
*
* @param checker Formula checker object.
* @return true iff the subtree conforms to some logic.
*/
virtual bool conforms(const AbstractFormulaChecker<T>& checker) const {
return checker.conforms(this->stateFormula);
}
private:
ComparisonType comparisonOperator;
T bound;
AbstractStateFormula<T>* stateFormula;
};
} //namespace formula
} //namespace storm
#endif /* STORM_FORMULA_STATEBOUNDOPERATOR_H_ */

119
src/formula/SteadyStateOperator.h

@ -0,0 +1,119 @@
/*
* SteadyState.h
*
* Created on: 19.10.2012
* Author: Thomas Heinemann
*/
#ifndef STORM_FORMULA_STEADYSTATEOPERATOR_H_
#define STORM_FORMULA_STEADYSTATEOPERATOR_H_
#include "src/formula/AbstractPathFormula.h"
#include "src/formula/AbstractStateFormula.h"
#include "src/formula/StateBoundOperator.h"
#include "src/formula/AbstractFormulaChecker.h"
namespace storm {
namespace formula {
template <class T> class SteadyStateOperator;
/*!
* @brief Interface class for model checkers that support SteadyStateOperator.
*
* All model checkers that support the formula class SteadyStateOperator must inherit
* this pure virtual class.
*/
template <class T>
class ISteadyStateOperatorModelChecker {
public:
/*!
* @brief Evaluates SteadyStateOperator formula within a model checker.
*
* @param obj Formula object with subformulas.
* @return Result of the formula for every node.
*/
virtual storm::storage::BitVector* checkSteadyStateOperator(const SteadyStateOperator<T>& obj) const = 0;
};
/*!
* @brief
* Class for a Abstract (path) formula tree with a SteadyStateOperator node as root.
*
* Has two Abstract state formulas as sub formulas/trees.
*
* @par Semantics
* The formula holds iff \e child holds SteadyStateOperator step, \e child holds
*
* The subtree is seen as part of the object and deleted with the object
* (this behavior can be prevented by setting them to NULL before deletion)
*
* @see AbstractPathFormula
* @see AbstractFormula
*/
template <class T>
class SteadyStateOperator : public StateBoundOperator<T> {
public:
/*!
* Empty constructor
*/
SteadyStateOperator() : StateBoundOperator<T>
(StateBoundOperator<T>::LESS_EQUAL, storm::utility::constGetZero<T>(), nullptr) {
// Intentionally left empty
}
/*!
* Constructor
*
* @param stateFormula The child node
*/
SteadyStateOperator(
typename StateBoundOperator<T>::ComparisonType comparisonRelation, T bound, AbstractStateFormula<T>* stateFormula) :
StateBoundOperator<T>(comparisonRelation, bound, stateFormula) {
}
/*!
* @returns a string representation of the formula
*/
virtual std::string toString() const {
std::string result = "(";
result += " S ";
result += StateBoundOperator<T>::toString();
result += ")";
return result;
}
/*!
* Clones the called object.
*
* Performs a "deep copy", i.e. the subtrees of the new object are clones of the original ones
*
* @returns a new BoundedUntil-object that is identical the called object.
*/
virtual AbstractStateFormula<T>* clone() const {
SteadyStateOperator<T>* result = new SteadyStateOperator<T>();
result->setStateFormula(this->getStateFormula().clone());
return result;
}
/*!
* Calls the model checker to check this formula.
* Needed to infer the correct type of formula class.
*
* @note This function should only be called in a generic check function of a model checker class. For other uses,
* the methods of the model checker should be used.
*
* @returns A vector indicating the probability that the formula holds for each state.
*/
virtual storm::storage::BitVector* check(const storm::modelChecker::AbstractModelChecker<T>& modelChecker) const {
return modelChecker.template as<ISteadyStateOperatorModelChecker>()->checkSteadyStateOperator(*this);
}
};
} //namespace formula
} //namespace storm
#endif /* STORM_FORMULA_STEADYSTATEOPERATOR_H_ */

0
src/modelChecker/AbstractModelChecker.h → src/modelchecker/AbstractModelChecker.h

6
src/modelChecker/DtmcPrctlModelChecker.h → src/modelchecker/DtmcPrctlModelChecker.h

@ -16,7 +16,7 @@
#include "src/storage/BitVector.h"
#include "src/exceptions/InvalidPropertyException.h"
#include "src/utility/Vector.h"
#include "src/modelChecker/AbstractModelChecker.h"
#include "src/modelchecker/AbstractModelChecker.h"
#include <vector>
#include "log4cplus/logger.h"
@ -117,7 +117,7 @@ public:
/*!
* Checks the given operator (with no bound) on the DTMC and prints the result
* (probability/rewards) for all initial states.
* @param probabilisticNoBoundFormula The formula to be checked.
* @param noBoundFormula The formula to be checked.
*/
void check(const storm::formula::NoBoundOperator<Type>& noBoundFormula) const {
std::cout << std::endl;
@ -222,7 +222,7 @@ public:
* @param formula The state formula to check
* @returns The set of states satisfying the formula, represented by a bit vector
*/
storm::storage::BitVector* checkBoundOperator(const storm::formula::BoundOperator<Type>& formula) const {
storm::storage::BitVector* checkPathBoundOperator(const storm::formula::PathBoundOperator<Type>& formula) const {
// First, we need to compute the probability for satisfying the path formula for each state.
std::vector<Type>* quantitativeResult = this->checkPathFormula(formula.getPathFormula());

2
src/modelChecker/EigenDtmcPrctlModelChecker.h → src/modelchecker/EigenDtmcPrctlModelChecker.h

@ -11,7 +11,7 @@
#include "src/utility/Vector.h"
#include "src/models/Dtmc.h"
#include "src/modelChecker/DtmcPrctlModelChecker.h"
#include "src/modelchecker/DtmcPrctlModelChecker.h"
#include "src/solver/GraphAnalyzer.h"
#include "src/utility/ConstTemplates.h"
#include "src/exceptions/NoConvergenceException.h"

0
src/modelChecker/ForwardDeclarations.h → src/modelchecker/ForwardDeclarations.h

2
src/modelChecker/GmmxxDtmcPrctlModelChecker.h → src/modelchecker/GmmxxDtmcPrctlModelChecker.h

@ -11,7 +11,7 @@
#include <cmath>
#include "src/models/Dtmc.h"
#include "src/modelChecker/DtmcPrctlModelChecker.h"
#include "src/modelchecker/DtmcPrctlModelChecker.h"
#include "src/solver/GraphAnalyzer.h"
#include "src/utility/Vector.h"
#include "src/utility/ConstTemplates.h"

251
src/models/Ctmdp.h

@ -0,0 +1,251 @@
/*
* Ctmdp.h
*
* Created on: 14.01.2013
* Author: Philipp Berger
*/
#ifndef STORM_MODELS_CTMDP_H_
#define STORM_MODELS_CTMDP_H_
#include <ostream>
#include <iostream>
#include <memory>
#include <cstdlib>
#include "AtomicPropositionsLabeling.h"
#include "GraphTransitions.h"
#include "src/storage/SparseMatrix.h"
#include "src/exceptions/InvalidArgumentException.h"
#include "src/utility/CommandLine.h"
#include "src/utility/Settings.h"
#include "src/models/AbstractModel.h"
#include "src/parser/NonDeterministicSparseTransitionParser.h"
namespace storm {
namespace models {
/*!
* This class represents a Markov Decision Process (CTMDP) whose states are
* labeled with atomic propositions.
*/
template <class T>
class Ctmdp : public storm::models::AbstractModel {
public:
//! Constructor
/*!
* Constructs a CTMDP object from the given transition probability matrix and
* the given labeling of the states.
* @param probabilityMatrix The transition probability relation of the
* CTMDP given by a matrix.
* @param stateLabeling The labeling that assigns a set of atomic
* propositions to each state.
*/
Ctmdp(std::shared_ptr<storm::storage::SparseMatrix<T>> probabilityMatrix,
std::shared_ptr<storm::models::AtomicPropositionsLabeling> stateLabeling,
std::shared_ptr<std::vector<uint_fast64_t>> rowMapping,
std::shared_ptr<std::vector<T>> stateRewards = nullptr,
std::shared_ptr<storm::storage::SparseMatrix<T>> transitionRewardMatrix = nullptr)
: probabilityMatrix(probabilityMatrix), stateLabeling(stateLabeling), rowMapping(rowMapping),
stateRewards(stateRewards), transitionRewardMatrix(transitionRewardMatrix),
backwardTransitions(nullptr) {
if (!this->checkValidityOfProbabilityMatrix()) {
LOG4CPLUS_ERROR(logger, "Probability matrix is invalid.");
throw storm::exceptions::InvalidArgumentException() << "Probability matrix is invalid.";
}
}
//! Copy Constructor
/*!
* Copy Constructor. Performs a deep copy of the given CTMDP.
* @param ctmdp A reference to the CTMDP that is to be copied.
*/
Ctmdp(const Ctmdp<T> &ctmdp) : probabilityMatrix(ctmdp.probabilityMatrix),
stateLabeling(ctmdp.stateLabeling), rowMapping(ctmdp.rowMapping), stateRewards(ctmdp.stateRewards),
transitionRewardMatrix(ctmdp.transitionRewardMatrix) {
if (ctmdp.backwardTransitions != nullptr) {
this->backwardTransitions = new storm::models::GraphTransitions<T>(*ctmdp.backwardTransitions);
}
if (!this->checkValidityOfProbabilityMatrix()) {
LOG4CPLUS_ERROR(logger, "Probability matrix is invalid.");
throw storm::exceptions::InvalidArgumentException() << "Probability matrix is invalid.";
}
}
//! Destructor
/*!
* Destructor. Frees the matrix and labeling associated with this CTMDP.
*/
~Ctmdp() {
if (this->backwardTransitions != nullptr) {
delete this->backwardTransitions;
}
}
/*!
* Returns the state space size of the CTMDP.
* @return The size of the state space of the CTMDP.
*/
uint_fast64_t getNumberOfStates() const {
return this->probabilityMatrix->getColumnCount();
}
/*!
* Returns the number of (non-zero) transitions of the CTMDP.
* @return The number of (non-zero) transitions of the CTMDP.
*/
uint_fast64_t getNumberOfTransitions() const {
return this->probabilityMatrix->getNonZeroEntryCount();
}
/*!
* Returns a bit vector in which exactly those bits are set to true that
* correspond to a state labeled with the given atomic proposition.
* @param ap The atomic proposition for which to get the bit vector.
* @return A bit vector in which exactly those bits are set to true that
* correspond to a state labeled with the given atomic proposition.
*/
storm::storage::BitVector* getLabeledStates(std::string ap) const {
return this->stateLabeling->getAtomicProposition(ap);
}
/*!
* Returns a pointer to the matrix representing the transition probability
* function.
* @return A pointer to the matrix representing the transition probability
* function.
*/
std::shared_ptr<storm::storage::SparseMatrix<T>> getTransitionProbabilityMatrix() const {
return this->probabilityMatrix;
}
/*!
* Returns a pointer to the matrix representing the transition rewards.
* @return A pointer to the matrix representing the transition rewards.
*/
std::shared_ptr<storm::storage::SparseMatrix<T>> getTransitionRewardMatrix() const {
return this->transitionRewardMatrix;
}
/*!
* Returns a pointer to the vector representing the state rewards.
* @return A pointer to the vector representing the state rewards.
*/
std::shared_ptr<std::vector<T>> getStateRewards() const {
return this->stateRewards;
}
/*!
*
*/
std::set<std::string> const getPropositionsForState(uint_fast64_t const &state) const {
return stateLabeling->getPropositionsForState(state);
}
/*!
* Retrieves a reference to the backwards transition relation.
* @return A reference to the backwards transition relation.
*/
storm::models::GraphTransitions<T>& getBackwardTransitions() {
if (this->backwardTransitions == nullptr) {
this->backwardTransitions = new storm::models::GraphTransitions<T>(this->probabilityMatrix, false);
}
return *this->backwardTransitions;
}
/*!
* Retrieves whether this CTMDP has a state reward model.
* @return True if this CTMDP has a state reward model.
*/
bool hasStateRewards() {
return this->stateRewards != nullptr;
}
/*!
* Retrieves whether this CTMDP has a transition reward model.
* @return True if this CTMDP has a transition reward model.
*/
bool hasTransitionRewards() {
return this->transitionRewardMatrix != nullptr;
}
/*!
* Retrieves whether the given atomic proposition is a valid atomic proposition in this model.
* @param atomicProposition The atomic proposition to be checked for validity.
* @return True if the given atomic proposition is valid in this model.
*/
bool hasAtomicProposition(std::string const& atomicProposition) {
return this->stateLabeling->containsAtomicProposition(atomicProposition);
}
/*!
* Prints information about the model to the specified stream.
* @param out The stream the information is to be printed to.
*/
void printModelInformationToStream(std::ostream& out) const {
storm::utility::printSeparationLine(out);
out << std::endl;
out << "Model type: \t\tCTMDP" << std::endl;
out << "States: \t\t" << this->getNumberOfStates() << std::endl;
out << "Transitions: \t\t" << this->getNumberOfTransitions() << std::endl;
this->stateLabeling->printAtomicPropositionsInformationToStream(out);
out << "Size in memory: \t"
<< (this->probabilityMatrix->getSizeInMemory() +
this->stateLabeling->getSizeInMemory() +
sizeof(*this))/1024 << " kbytes" << std::endl;
out << std::endl;
storm::utility::printSeparationLine(out);
}
storm::models::ModelType getType() {
return CTMDP;
}
private:
/*!
* @brief Perform some sanity checks.
*
* Checks probability matrix if all rows sum up to one.
*/
bool checkValidityOfProbabilityMatrix() {
// Get the settings object to customize linear solving.
storm::settings::Settings* s = storm::settings::instance();
double precision = s->get<double>("precision");
for (uint_fast64_t row = 0; row < this->probabilityMatrix->getRowCount(); row++) {
T sum = this->probabilityMatrix->getRowSum(row);
if (sum == 0) continue;
if (std::abs(sum - 1) > precision) return false;
}
return true;
}
/*! A matrix representing the transition probability function of the CTMDP. */
std::shared_ptr<storm::storage::SparseMatrix<T>> probabilityMatrix;
/*! The labeling of the states of the CTMDP. */
std::shared_ptr<storm::models::AtomicPropositionsLabeling> stateLabeling;
/*! The mapping from states to rows. */
std::shared_ptr<std::vector<uint_fast64_t>> rowMapping;
/*! The state-based rewards of the CTMDP. */
std::shared_ptr<std::vector<T>> stateRewards;
/*! The transition-based rewards of the CTMDP. */
std::shared_ptr<storm::storage::SparseMatrix<T>> transitionRewardMatrix;
/*!
* A data structure that stores the predecessors for all states. This is
* needed for backwards directed searches.
*/
storm::models::GraphTransitions<T>* backwardTransitions;
};
} // namespace models
} // namespace storm
#endif /* STORM_MODELS_CTMDP_H_ */

2
src/models/GraphTransitions.h

@ -73,7 +73,7 @@ public:
/*!
* Returns an iterator referring to the element after the successors of
* the given state.
* @param row The state for which to get the iterator.
* @param state The state for which to get the iterator.
* @return An iterator referring to the element after the successors of
* the given state.
*/

9
src/parser/AutoParser.cpp

@ -6,7 +6,7 @@
#include "src/exceptions/WrongFormatException.h"
#include "src/models/AbstractModel.h"
#include "src/parser/DeterministicModelParser.h"
#include "src/parser/MdpParser.h"
#include "src/parser/NonDeterministicModelParser.h"
namespace storm {
namespace parser {
@ -37,12 +37,15 @@ AutoParser::AutoParser(std::string const & transitionSystemFile, std::string con
break;
}
case storm::models::MDP: {
MdpParser parser(transitionSystemFile, labelingFile, stateRewardFile, transitionRewardFile);
NonDeterministicModelParser parser(transitionSystemFile, labelingFile, stateRewardFile, transitionRewardFile);
this->model = parser.getMdp();
break;
}
case storm::models::CTMDP:
case storm::models::CTMDP: {
NonDeterministicModelParser parser(transitionSystemFile, labelingFile, stateRewardFile, transitionRewardFile);
this->model = parser.getCtmdp();
break;
}
default: ; // Unknown
}

4
src/parser/DeterministicModelParser.h

@ -18,10 +18,10 @@ namespace parser {
/*!
* @brief Load label and transition file and return initialized dtmc or ctmc object.
*
* @Note This class creates a new Dtmc or Ctmc object that can
* @note This class creates a new Dtmc or Ctmc object that can
* be accessed via getDtmc() or getCtmc(). However, it will not delete this object!
*
* @Note The labeling representation in the file may use at most as much nodes as are specified in the transition system.
* @note The labeling representation in the file may use at most as much nodes as are specified in the transition system.
*/
class DeterministicModelParser: public storm::parser::Parser {
public:

40
src/parser/MdpParser.h

@ -1,40 +0,0 @@
/*
* MdpParser.h
*
* Created on: 14.01.2013
* Author: thomas
*/
#ifndef STORM_PARSER_MDPPARSER_H_
#define STORM_PARSER_MDPPARSER_H_
#include "src/parser/Parser.h"
#include "src/models/Mdp.h"
namespace storm {
namespace parser {
/*!
* @brief Load label and transition file and return initialized mdp object
*
* @Note This class creates a new Mdp object that can
* be accessed via getMdp(). However, it will not delete this object!
*
* @Note The labeling representation in the file may use at most as much nodes as are specified in the mdp.
*/
class MdpParser: public storm::parser::Parser {
public:
MdpParser(std::string const & transitionSystemFile, std::string const & labelingFile,
std::string const & stateRewardFile = "", std::string const & transitionRewardFile = "");
std::shared_ptr<storm::models::Mdp<double>> getMdp() {
return this->mdp;
}
private:
std::shared_ptr<storm::models::Mdp<double>> mdp;
};
} /* namespace parser */
} /* namespace storm */
#endif /* STORM_PARSER_MDPPARSER_H_ */

20
src/parser/MdpParser.cpp → src/parser/NonDeterministicModelParser.cpp

@ -1,11 +1,11 @@
/*
* MdpParser.cpp
* NonDeterministicModelParser.cpp
*
* Created on: 14.01.2013
* Author: Philipp Berger
*/
#include "src/parser/MdpParser.h"
#include "src/parser/NonDeterministicModelParser.h"
#include <string>
#include <vector>
@ -27,25 +27,27 @@ namespace parser {
* @param stateRewardFile String containing the location of the state reward file (...srew)
* @param transitionRewardFile String containing the location of the transition reward file (...trew)
*/
MdpParser::MdpParser(std::string const & transitionSystemFile, std::string const & labelingFile,
NonDeterministicModelParser::NonDeterministicModelParser(std::string const & transitionSystemFile, std::string const & labelingFile,
std::string const & stateRewardFile, std::string const & transitionRewardFile) {
storm::parser::NonDeterministicSparseTransitionParser tp(transitionSystemFile);
uint_fast64_t stateCount = tp.getMatrix()->getRowCount();
std::shared_ptr<std::vector<double>> stateRewards = nullptr;
std::shared_ptr<storm::storage::SparseMatrix<double>> transitionRewards = nullptr;
storm::parser::AtomicPropositionLabelingParser lp(stateCount, labelingFile);
if (stateRewardFile != "") {
storm::parser::SparseStateRewardParser srp(stateCount, stateRewardFile);
stateRewards = srp.getStateRewards();
this->stateRewards = srp.getStateRewards();
}
if (transitionRewardFile != "") {
storm::parser::NonDeterministicSparseTransitionParser trp(transitionRewardFile);
transitionRewards = trp.getMatrix();
this->transitionRewardMatrix = trp.getMatrix();
}
mdp = std::shared_ptr<storm::models::Mdp<double>>(new storm::models::Mdp<double>(tp.getMatrix(), lp.getLabeling(), tp.getRowMapping(), stateRewards, transitionRewards));
this->probabilityMatrix = tp.getMatrix();
this->stateLabeling = lp.getLabeling();
this->rowMapping = tp.getRowMapping();
this->mdp = nullptr;
this->ctmdp = nullptr;
}
} /* namespace parser */

62
src/parser/NonDeterministicModelParser.h

@ -0,0 +1,62 @@
/*
* NonDeterministicModelParser.h
*
* Created on: 14.01.2013
* Author: thomas
*/
#ifndef STORM_PARSER_NONDETERMINISTICMODELPARSER_H_
#define STORM_PARSER_NONDETERMINISTICMODELPARSER_H_
#include "src/parser/Parser.h"
#include "src/models/Mdp.h"
#include "src/models/Ctmdp.h"
namespace storm {
namespace parser {
/*!
* @brief Load label and transition file and return initialized mdp object
*
* @note This class creates a new Mdp object that can
* be accessed via getMdp(). However, it will not delete this object!
*
* @note The labeling representation in the file may use at most as much nodes as are specified in the mdp.
*/
class NonDeterministicModelParser: public storm::parser::Parser {
public:
NonDeterministicModelParser(std::string const & transitionSystemFile, std::string const & labelingFile,
std::string const & stateRewardFile = "", std::string const & transitionRewardFile = "");
std::shared_ptr<storm::models::Mdp<double>> getMdp() {
if (this->mdp == nullptr) {
this->mdp = std::shared_ptr<storm::models::Mdp<double>>(new storm::models::Mdp<double>(
this->probabilityMatrix, this->stateLabeling, this->rowMapping, this->stateRewards, this->transitionRewardMatrix
));
}
return this->mdp;
}
std::shared_ptr<storm::models::Ctmdp<double>> getCtmdp() {
if (this->ctmdp == nullptr) {
this->ctmdp = std::shared_ptr<storm::models::Ctmdp<double>>(new storm::models::Ctmdp<double>(
this->probabilityMatrix, this->stateLabeling, this->rowMapping, this->stateRewards, this->transitionRewardMatrix
));
}
return this->ctmdp;
}
private:
std::shared_ptr<storm::storage::SparseMatrix<double>> probabilityMatrix;
std::shared_ptr<storm::models::AtomicPropositionsLabeling> stateLabeling;
std::shared_ptr<std::vector<uint_fast64_t>> rowMapping;
std::shared_ptr<std::vector<double>> stateRewards;
std::shared_ptr<storm::storage::SparseMatrix<double>> transitionRewardMatrix;
std::shared_ptr<storm::models::Mdp<double>> mdp;
std::shared_ptr<storm::models::Ctmdp<double>> ctmdp;
};
} /* namespace parser */
} /* namespace storm */
#endif /* STORM_PARSER_NONDETERMINISTICMODELPARSER_H_ */

16
src/parser/PrctlParser.cpp

@ -58,24 +58,24 @@ struct PrctlParser::PrctlGrammar : qi::grammar<Iterator, storm::formula::Abstrac
atomicProposition.name("state formula");
probabilisticBoundOperator = (
(qi::lit("P") >> qi::lit(">") >> qi::double_ > qi::lit("[") > pathFormula > qi::lit("]"))[qi::_val =
phoenix::new_<storm::formula::ProbabilisticBoundOperator<double> >(storm::formula::BoundOperator<double>::GREATER, qi::_1, qi::_2)] |
phoenix::new_<storm::formula::ProbabilisticBoundOperator<double> >(storm::formula::PathBoundOperator<double>::GREATER, qi::_1, qi::_2)] |
(qi::lit("P") >> qi::lit(">=") > qi::double_ > qi::lit("[") > pathFormula > qi::lit("]"))[qi::_val =
phoenix::new_<storm::formula::ProbabilisticBoundOperator<double> >(storm::formula::BoundOperator<double>::GREATER_EQUAL, qi::_1, qi::_2)] |
phoenix::new_<storm::formula::ProbabilisticBoundOperator<double> >(storm::formula::PathBoundOperator<double>::GREATER_EQUAL, qi::_1, qi::_2)] |
(qi::lit("P") >> qi::lit("<") >> qi::double_ > qi::lit("[") > pathFormula > qi::lit("]"))[qi::_val =
phoenix::new_<storm::formula::ProbabilisticBoundOperator<double> >(storm::formula::BoundOperator<double>::LESS, qi::_1, qi::_2)] |
phoenix::new_<storm::formula::ProbabilisticBoundOperator<double> >(storm::formula::PathBoundOperator<double>::LESS, qi::_1, qi::_2)] |
(qi::lit("P") >> qi::lit("<=") > qi::double_ > qi::lit("[") > pathFormula > qi::lit("]"))[qi::_val =
phoenix::new_<storm::formula::ProbabilisticBoundOperator<double> >(storm::formula::BoundOperator<double>::LESS_EQUAL, qi::_1, qi::_2)]
phoenix::new_<storm::formula::ProbabilisticBoundOperator<double> >(storm::formula::PathBoundOperator<double>::LESS_EQUAL, qi::_1, qi::_2)]
);
probabilisticBoundOperator.name("state formula");
rewardBoundOperator = (
(qi::lit("R") >> qi::lit(">") >> qi::double_ >> qi::lit("[") >> pathFormula >> qi::lit("]"))[qi::_val =
phoenix::new_<storm::formula::RewardBoundOperator<double> >(storm::formula::BoundOperator<double>::GREATER, qi::_1, qi::_2)] |
phoenix::new_<storm::formula::RewardBoundOperator<double> >(storm::formula::PathBoundOperator<double>::GREATER, qi::_1, qi::_2)] |
(qi::lit("R") >> qi::lit(">=") >> qi::double_ >> qi::lit("[") >> pathFormula >> qi::lit("]"))[qi::_val =
phoenix::new_<storm::formula::RewardBoundOperator<double> >(storm::formula::BoundOperator<double>::GREATER_EQUAL, qi::_1, qi::_2)] |
phoenix::new_<storm::formula::RewardBoundOperator<double> >(storm::formula::PathBoundOperator<double>::GREATER_EQUAL, qi::_1, qi::_2)] |
(qi::lit("R") >> qi::lit("<") >> qi::double_ >> qi::lit("[") >> pathFormula >> qi::lit("]"))[qi::_val =
phoenix::new_<storm::formula::RewardBoundOperator<double> >(storm::formula::BoundOperator<double>::LESS, qi::_1, qi::_2)] |
phoenix::new_<storm::formula::RewardBoundOperator<double> >(storm::formula::PathBoundOperator<double>::LESS, qi::_1, qi::_2)] |
(qi::lit("R") >> qi::lit("<=")>> qi::double_ >> qi::lit("[") >> pathFormula >> qi::lit("]"))[qi::_val =
phoenix::new_<storm::formula::RewardBoundOperator<double> >(storm::formula::BoundOperator<double>::LESS_EQUAL, qi::_1, qi::_2)]
phoenix::new_<storm::formula::RewardBoundOperator<double> >(storm::formula::PathBoundOperator<double>::LESS_EQUAL, qi::_1, qi::_2)]
);
rewardBoundOperator.name("state formula");

4
src/storm.cpp

@ -22,8 +22,8 @@
#include "src/models/Dtmc.h"
#include "src/storage/SparseMatrix.h"
#include "src/models/AtomicPropositionsLabeling.h"
#include "src/modelChecker/EigenDtmcPrctlModelChecker.h"
#include "src/modelChecker/GmmxxDtmcPrctlModelChecker.h"
#include "src/modelchecker/EigenDtmcPrctlModelChecker.h"
#include "src/modelchecker/GmmxxDtmcPrctlModelChecker.h"
#include "src/parser/AutoParser.h"
#include "src/parser/PrctlParser.h"
#include "src/solver/GraphAnalyzer.h"

1
test/parser/.gitignore

@ -0,0 +1 @@
/output.dot

6
test/parser/ParseMdpTest.cpp

@ -8,12 +8,12 @@
#include "gtest/gtest.h"
#include "storm-config.h"
#include "src/parser/MdpParser.h"
#include "src/parser/NonDeterministicModelParser.h"
#include "src/utility/IoUtility.h"
TEST(ParseMdpTest, parseAndOutput) {
storm::parser::MdpParser* mdpParser = nullptr;
ASSERT_NO_THROW(mdpParser = new storm::parser::MdpParser(
storm::parser::NonDeterministicModelParser* mdpParser = nullptr;
ASSERT_NO_THROW(mdpParser = new storm::parser::NonDeterministicModelParser(
STORM_CPP_TESTS_BASE_PATH "/parser/tra_files/mdp_general_input_01.tra",
STORM_CPP_TESTS_BASE_PATH "/parser/lab_files/pctl_general_input_01.lab"));

4
test/parser/PrctlParserTest.cpp

@ -54,7 +54,7 @@ TEST(PrctlParserTest, parseProbabilisticFormulaTest) {
storm::formula::ProbabilisticBoundOperator<double>* op = static_cast<storm::formula::ProbabilisticBoundOperator<double>*>(prctlFileParser->getFormula());
ASSERT_EQ(storm::formula::BoundOperator<double>::GREATER, op->getComparisonOperator());
ASSERT_EQ(storm::formula::PathBoundOperator<double>::GREATER, op->getComparisonOperator());
ASSERT_EQ(0.5, op->getBound());
ASSERT_EQ(prctlFileParser->getFormula()->toString(), "P > 0.500000 [F a]");
@ -74,7 +74,7 @@ TEST(PrctlParserTest, parseRewardFormulaTest) {
storm::formula::RewardBoundOperator<double>* op = static_cast<storm::formula::RewardBoundOperator<double>*>(prctlFileParser->getFormula());
ASSERT_EQ(storm::formula::BoundOperator<double>::GREATER_EQUAL, op->getComparisonOperator());
ASSERT_EQ(storm::formula::PathBoundOperator<double>::GREATER_EQUAL, op->getComparisonOperator());
ASSERT_EQ(15.0, op->getBound());
ASSERT_EQ(prctlFileParser->getFormula()->toString(), "R >= 15.000000 [a U !b]");

2
test/storm-tests.cpp

@ -7,7 +7,7 @@
#include "log4cplus/fileappender.h"
#include "src/utility/Settings.h"
#include "src/modelChecker/GmmxxDtmcPrctlModelChecker.h"
#include "src/modelchecker/GmmxxDtmcPrctlModelChecker.h"
log4cplus::Logger logger;

Loading…
Cancel
Save