10 changed files with 93 additions and 3 deletions
			
			
		- 
					3src/formula/AbstractFormula.h
 - 
					18src/formula/AbstractFormulaChecker.h
 - 
					7src/formula/Ap.h
 - 
					9src/formula/BoundedUntil.h
 - 
					4src/formula/Eventually.h
 - 
					5src/formula/NoBoundOperator.h
 - 
					5src/formula/Not.h
 - 
					35src/formula/PrctlFormulaChecker.h
 - 
					5src/formula/ReachabilityReward.h
 - 
					5src/formula/Until.h
 
@ -0,0 +1,18 @@ | 
				
			|||
#ifndef STORM_FORMULA_ABSTRACTFORMULACHECKER_H_ | 
				
			|||
#define STORM_FORMULA_ABSTRACTFORMULACHECKER_H_ | 
				
			|||
 | 
				
			|||
#include "src/formula/AbstractFormula.h" | 
				
			|||
 | 
				
			|||
namespace storm { | 
				
			|||
namespace formula { | 
				
			|||
 | 
				
			|||
template <class T> | 
				
			|||
class AbstractFormulaChecker { | 
				
			|||
	public: | 
				
			|||
		virtual bool conforms(const AbstractFormula<T>* formula) const = 0; | 
				
			|||
}; | 
				
			|||
 | 
				
			|||
} | 
				
			|||
} | 
				
			|||
 | 
				
			|||
#endif | 
				
			|||
@ -0,0 +1,35 @@ | 
				
			|||
#ifndef STORM_FORMULA_PRCTLFORMULACHECKER_H_ | 
				
			|||
#define STORM_FORMULA_PRCTLFORMULACHECKER_H_ | 
				
			|||
 | 
				
			|||
#include "src/formula/AbstractFormulaChecker.h" | 
				
			|||
#include "src/formula/Formulas.h" | 
				
			|||
 | 
				
			|||
#include <iostream> | 
				
			|||
 | 
				
			|||
namespace storm { | 
				
			|||
namespace formula { | 
				
			|||
 | 
				
			|||
template <class T> | 
				
			|||
class PrctlFormulaChecker : public AbstractFormulaChecker<T> { | 
				
			|||
	public: | 
				
			|||
		virtual bool conforms(const AbstractFormula<T>* formula) const { | 
				
			|||
			if ( | 
				
			|||
					dynamic_cast<const And<T>*>(formula) || | 
				
			|||
					dynamic_cast<const Ap<T>*>(formula) || | 
				
			|||
					dynamic_cast<const Eventually<T>*>(formula) || | 
				
			|||
					dynamic_cast<const Not<T>*>(formula) || | 
				
			|||
					dynamic_cast<const Or<T>*>(formula) || | 
				
			|||
					dynamic_cast<const ProbabilisticNoBoundOperator<T>*>(formula) | 
				
			|||
				) { | 
				
			|||
				return formula->conforms(*this); | 
				
			|||
			} | 
				
			|||
			return false; | 
				
			|||
		} | 
				
			|||
	 | 
				
			|||
	private: | 
				
			|||
}; | 
				
			|||
 | 
				
			|||
} | 
				
			|||
} | 
				
			|||
 | 
				
			|||
#endif | 
				
			|||
						Write
						Preview
					
					
					Loading…
					
					Cancel
						Save
					
		Reference in new issue