Browse Source
Added the class AbstractRewardPathFormula to the PRCTL formula tree.
Added the class AbstractRewardPathFormula to the PRCTL formula tree.
- This change splits the path formulas into probabilistic path formulas like Next or Until and reward path formulas like InstantaneousReward or SteadyStateReward.
|- That way it is assured at compile time that no reward path formula can ever be subformula of any probabilistic bound operator and vise versa.
Next up: Adopt changes in the Csl formula tree to the Csl parser.
Former-commit-id: d74c88bbf8
tempestpy_adaptions
masawei
11 years ago
11 changed files with 152 additions and 27 deletions
-
1src/formula/Prctl.h
-
7src/formula/Prctl/AbstractPathFormula.h
-
62src/formula/Prctl/AbstractRewardPathFormula.h
-
7src/formula/Prctl/CumulativeReward.h
-
7src/formula/Prctl/InstantaneousReward.h
-
50src/formula/Prctl/PrctlFilter.h
-
6src/formula/Prctl/ReachabilityReward.h
-
10src/formula/Prctl/RewardBoundOperator.h
-
7src/formula/Prctl/SteadyStateReward.h
-
20src/modelchecker/prctl/AbstractModelChecker.h
-
2src/parser/PrctlParser.cpp
@ -0,0 +1,62 @@ |
|||
/* |
|||
* AbstractRewardPathFormula.h |
|||
* |
|||
* Created on: May 15, 2014 |
|||
* Author: Manuel S. Weiand |
|||
*/ |
|||
|
|||
#ifndef STORM_FORMULA_PRCTL_ABSTRACTREWARDPATHFORMULA_H_ |
|||
#define STORM_FORMULA_PRCTL_ABSTRACTREWARDPATHFORMULA_H_ |
|||
|
|||
namespace storm { |
|||
namespace property { |
|||
namespace prctl { |
|||
|
|||
/*! Base class for reward path formulas. |
|||
* |
|||
* Reward path formulas are subformulas of reward bound operators. |
|||
* They may not be subformulas of a probabilitic bound operator. |
|||
* |
|||
*/ |
|||
template <class T> |
|||
class AbstractRewardPathFormula : public virtual storm::property::prctl::AbstractPrctlFormula<T> { |
|||
|
|||
public: |
|||
/*! |
|||
* Empty virtual destructor. |
|||
*/ |
|||
virtual ~AbstractRewardPathFormula() { |
|||
// Intentionally left empty |
|||
} |
|||
|
|||
/*! |
|||
* Clones the called object. |
|||
* |
|||
* Performs a "deep copy", i.e. the subtrees of the new object are clones of the original ones |
|||
* |
|||
* @note This function is not implemented in this class. |
|||
* @returns a new AND-object that is identical the called object. |
|||
*/ |
|||
virtual AbstractRewardPathFormula<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. |
|||
* |
|||
* @note This function is not implemented in this class. |
|||
* |
|||
* @returns A vector indicating the probability that the formula holds for each state. |
|||
*/ |
|||
virtual std::vector<T> check(const storm::modelchecker::prctl::AbstractModelChecker<T>& modelChecker, bool qualitative) const = 0; |
|||
}; |
|||
|
|||
} //namespace prctl |
|||
} //namespace property |
|||
} //namespace storm |
|||
|
|||
|
|||
|
|||
#endif /* STORM_FORMULA_PRCTL_ABSTRACTREWARDPATHFORMULA_H_ */ |
Write
Preview
Loading…
Cancel
Save
Reference in new issue