28 changed files with 525 additions and 324 deletions
-
65src/formula/AbstractFormula.h
-
32src/formula/AbstractPathFormula.h
-
31src/formula/AbstractStateFormula.h
-
39src/formula/And.h
-
25src/formula/Ap.h
-
38src/formula/BoundOperator.h
-
34src/formula/BoundedEventually.h
-
40src/formula/BoundedUntil.h
-
26src/formula/CumulativeReward.h
-
39src/formula/Eventually.h
-
7src/formula/Formulas.h
-
36src/formula/Globally.h
-
26src/formula/InstantaneousReward.h
-
34src/formula/Next.h
-
38src/formula/NoBoundOperator.h
-
32src/formula/Not.h
-
41src/formula/Or.h
-
48src/formula/PctlFormula.h
-
18src/formula/ProbabilisticBoundOperator.h
-
18src/formula/ProbabilisticNoBoundOperator.h
-
36src/formula/ReachabilityReward.h
-
16src/formula/RewardBoundOperator.h
-
18src/formula/RewardNoBoundOperator.h
-
40src/formula/Until.h
-
43src/modelChecker/AbstractModelChecker.h
-
18src/modelChecker/DtmcPrctlModelChecker.h
-
6src/parser/PrctlParser.cpp
-
5src/parser/PrctlParser.h
@ -0,0 +1,65 @@ |
|||
/* |
|||
* Abstractformula.h |
|||
* |
|||
* Created on: 19.10.2012 |
|||
* Author: Thomas Heinemann |
|||
*/ |
|||
|
|||
#ifndef STORM_FORMULA_AbstractFORMULA_H_ |
|||
#define STORM_FORMULA_AbstractFORMULA_H_ |
|||
|
|||
#include <string> |
|||
|
|||
namespace storm { namespace formula { |
|||
template <class T> class AbstractFormula; |
|||
}} |
|||
|
|||
#include "src/modelChecker/AbstractModelChecker.h" |
|||
|
|||
namespace storm { |
|||
namespace formula { |
|||
|
|||
|
|||
//abstract |
|||
/*! |
|||
* @brief |
|||
* Abstract base class for Abstract formulas in general. |
|||
* |
|||
* @attention This class is abstract. |
|||
* @note Formula classes do not have copy constructors. The parameters of the constructors are usually the subtrees, so |
|||
* the syntax conflicts with copy constructors for unary operators. To produce an identical object, the classes |
|||
* AbstractPathFormula and AbstractStateFormula offer the method clone(). |
|||
*/ |
|||
template <class T> |
|||
class AbstractFormula { |
|||
|
|||
public: |
|||
/*! |
|||
* virtual destructor |
|||
*/ |
|||
virtual ~AbstractFormula() { } |
|||
|
|||
/*! |
|||
* @note This function is not implemented in this class. |
|||
* @returns a string representation of the formula |
|||
*/ |
|||
virtual std::string toString() const = 0; |
|||
|
|||
template <template <class Type> class MC> |
|||
const MC<T>* cast(const storm::modelChecker::AbstractModelChecker<T>& modelChecker) const { |
|||
try { |
|||
const MC<T>& mc = dynamic_cast<const MC<T>&>(modelChecker); |
|||
return &mc; |
|||
} catch (std::bad_cast& bc) { |
|||
std::cerr << "Bad cast: tried to cast " << typeid(modelChecker).name() << " to " << typeid(MC<T>).name() << std::endl; |
|||
|
|||
} |
|||
return nullptr; |
|||
} |
|||
}; |
|||
|
|||
} //namespace formula |
|||
|
|||
} //namespace storm |
|||
|
|||
#endif /* STORM_FORMULA_AbstractFORMULA_H_ */ |
@ -1,48 +0,0 @@ |
|||
/* |
|||
* Pctlformula.h |
|||
* |
|||
* Created on: 19.10.2012 |
|||
* Author: Thomas Heinemann |
|||
*/ |
|||
|
|||
#ifndef STORM_FORMULA_PCTLFORMULA_H_ |
|||
#define STORM_FORMULA_PCTLFORMULA_H_ |
|||
|
|||
#include <string> |
|||
|
|||
namespace storm { |
|||
|
|||
namespace formula { |
|||
|
|||
|
|||
//abstract |
|||
/*! |
|||
* @brief |
|||
* Abstract base class for PCTL formulas in general. |
|||
* |
|||
* @attention This class is abstract. |
|||
* @note Formula classes do not have copy constructors. The parameters of the constructors are usually the subtrees, so |
|||
* the syntax conflicts with copy constructors for unary operators. To produce an identical object, the classes |
|||
* PctlPathFormula and PctlStateFormula offer the method clone(). |
|||
*/ |
|||
template <class T> |
|||
class PctlFormula { |
|||
|
|||
public: |
|||
/*! |
|||
* virtual destructor |
|||
*/ |
|||
virtual ~PctlFormula() { } |
|||
|
|||
/*! |
|||
* @note This function is not implemented in this class. |
|||
* @returns a string representation of the formula |
|||
*/ |
|||
virtual std::string toString() const = 0; |
|||
}; |
|||
|
|||
} //namespace formula |
|||
|
|||
} //namespace storm |
|||
|
|||
#endif /* STORM_FORMULA_PCTLFORMULA_H_ */ |
@ -0,0 +1,43 @@ |
|||
/* |
|||
* DtmcPrctlModelChecker.h |
|||
* |
|||
* Created on: 22.10.2012 |
|||
* Author: Thomas Heinemann |
|||
*/ |
|||
|
|||
#ifndef STORM_MODELCHECKER_ABSTRACTMODELCHECKER_H_ |
|||
#define STORM_MODELCHECKER_ABSTRACTMODELCHECKER_H_ |
|||
|
|||
namespace storm { namespace modelChecker { |
|||
template <class Type> class AbstractModelChecker; |
|||
}} |
|||
|
|||
//#include "src/formula/Formulas.h" |
|||
#include "src/formula/Or.h" |
|||
#include "src/formula/Ap.h" |
|||
#include "src/storage/BitVector.h" |
|||
|
|||
namespace storm { |
|||
namespace modelChecker { |
|||
|
|||
/*! |
|||
* @brief |
|||
* Interface for model checker classes. |
|||
* |
|||
* This class provides basic functions that are the same for all subclasses, but mainly only declares |
|||
* abstract methods that are to be implemented in concrete instances. |
|||
* |
|||
* @attention This class is abstract. |
|||
*/ |
|||
template<class Type> |
|||
class AbstractModelChecker : |
|||
public virtual storm::formula::IOrModelChecker<Type>, |
|||
public virtual storm::formula::IApModelChecker<Type> |
|||
{ |
|||
}; |
|||
|
|||
} //namespace modelChecker |
|||
|
|||
} //namespace storm |
|||
|
|||
#endif /* STORM_MODELCHECKER_DTMCPRCTLMODELCHECKER_H_ */ |
Write
Preview
Loading…
Cancel
Save
Reference in new issue