1#include "storm-config.h"
24class GBGmmxxDoubleGmresEnvironment {
27 static const bool isExact =
false;
40class GBEigenDoubleDGmresEnvironment {
43 static const bool isExact =
false;
56class GBEigenRationalLUEnvironment {
59 static const bool isExact =
true;
69class GBNativeSorEnvironment {
72 static const bool isExact =
false;
85class GBNativeWalkerChaeEnvironment {
88 static const bool isExact =
false;
101class DistrGmmxxDoubleGmresEnvironment {
104 static const bool isExact =
false;
117class DistrEigenRationalLUEnvironment {
120 static const bool isExact =
true;
130class DistrNativeWalkerChaeEnvironment {
133 static const bool isExact =
false;
146class ValueIterationEnvironment {
149 static const bool isExact =
false;
158template<
typename TestType>
159class LraDtmcPrctlModelCheckerTest :
public ::testing::Test {
161 typedef typename TestType::ValueType
ValueType;
162 LraDtmcPrctlModelCheckerTest() : _environment(TestType::createEnvironment()) {}
167 return storm::utility::convertNumber<ValueType>(input);
177typedef ::testing::Types<
179 GBGmmxxDoubleGmresEnvironment, GBEigenDoubleDGmresEnvironment, DistrGmmxxDoubleGmresEnvironment,
181 GBEigenRationalLUEnvironment, GBNativeSorEnvironment, GBNativeWalkerChaeEnvironment, DistrEigenRationalLUEnvironment, DistrNativeWalkerChaeEnvironment,
182 ValueIterationEnvironment>
187TYPED_TEST(LraDtmcPrctlModelCheckerTest, LRASingleBscc) {
188 typedef typename TestFixture::ValueType
ValueType;
191 std::shared_ptr<storm::models::sparse::Dtmc<ValueType>> dtmc;
204 ap.addLabelToState(
"a", 1);
212 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.check(this->env(), *formula);
215 EXPECT_NEAR(this->
parseNumber(
"0.5"), quantitativeResult1[0], this->precision());
216 EXPECT_NEAR(this->
parseNumber(
"0.5"), quantitativeResult1[1], this->precision());
228 ap.addLabelToState(
"a", 1);
236 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.check(this->env(), *formula);
239 EXPECT_NEAR(this->
parseNumber(
"0.5"), quantitativeResult1[0], this->precision());
240 EXPECT_NEAR(this->
parseNumber(
"0.5"), quantitativeResult1[1], this->precision());
252 ap.addLabelToState(
"a", 2);
260 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.check(this->env(), *formula);
263 EXPECT_NEAR(this->
parseNumber(
"1/3"), quantitativeResult1[0], this->precision());
264 EXPECT_NEAR(this->
parseNumber(
"1/3"), quantitativeResult1[1], this->precision());
265 EXPECT_NEAR(this->
parseNumber(
"1/3"), quantitativeResult1[2], this->precision());
269TYPED_TEST(LraDtmcPrctlModelCheckerTest, LRA) {
270 typedef typename TestFixture::ValueType
ValueType;
273 std::shared_ptr<storm::models::sparse::Dtmc<ValueType>> dtmc;
311 ap.addLabelToState(
"a", 1);
312 ap.addLabelToState(
"a", 4);
313 ap.addLabelToState(
"a", 5);
314 ap.addLabelToState(
"a", 7);
315 ap.addLabelToState(
"a", 11);
316 ap.addLabelToState(
"a", 13);
317 ap.addLabelToState(
"a", 14);
325 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.check(this->env(), *formula);
328 EXPECT_NEAR(this->
parseNumber(
"1/10"), quantitativeResult1[0], this->precision());
329 EXPECT_NEAR(this->
parseNumber(
"0"), quantitativeResult1[3], this->precision());
330 EXPECT_NEAR(this->
parseNumber(
"1/3"), quantitativeResult1[6], this->precision());
331 EXPECT_NEAR(this->
parseNumber(
"0"), quantitativeResult1[9], this->precision());
332 EXPECT_NEAR(this->
parseNumber(
"1/10"), quantitativeResult1[12], this->precision());
333 EXPECT_NEAR(this->
parseNumber(
"79/300"), quantitativeResult1[13], this->precision());
334 EXPECT_NEAR(this->
parseNumber(
"1/10"), quantitativeResult1[14], this->precision());
void setPrecision(storm::RationalNumber value)
void setPreconditioner(storm::solver::EigenLinearEquationSolverPreconditioner value)
void setMethod(storm::solver::EigenLinearEquationSolverMethod value)
SolverEnvironment & solver()
void setMethod(storm::solver::GmmxxLinearEquationSolverMethod value)
void setPrecision(storm::RationalNumber value)
void setPreconditioner(storm::solver::GmmxxLinearEquationSolverPreconditioner value)
void setDetLraMethod(storm::solver::LraMethod value, bool isSetFromDefault=false)
void setPrecision(storm::RationalNumber value)
void setSorOmega(storm::RationalNumber const &value)
void setMaximalNumberOfIterations(uint64_t value)
void setMethod(storm::solver::NativeLinearEquationSolverMethod value)
void setPrecision(storm::RationalNumber value)
void setLinearEquationSolverType(storm::solver::EquationSolverType const &value, bool isSetFromDefault=false)
EigenSolverEnvironment & eigen()
NativeSolverEnvironment & native()
GmmxxSolverEnvironment & gmmxx()
LongRunAverageSolverEnvironment & lra()
ExplicitQuantitativeCheckResult< ValueType > & asExplicitQuantitativeCheckResult()
This class represents a discrete-time Markov chain.
This class manages the labeling of the state space with a number of (atomic) labels.
A class that can be used to build a sparse matrix by adding value by value.
void addNextValue(index_type row, index_type column, value_type const &value)
Sets the matrix entry at the given row and column to the given value.
SparseMatrix< value_type > build(index_type overriddenRowCount=0, index_type overriddenColumnCount=0, index_type overriddenRowGroupCount=0)
A class that holds a possibly non-square matrix in the compressed row storage format.
SFTBDDChecker::ValueType ValueType
NumberType parseNumber(std::string const &value)
Parse number from string.
TYPED_TEST(GraphTestAR, SymbolicProb01StochasticGameDieSmall)
TYPED_TEST_SUITE(GraphTestAR, TestingTypes,)
::testing::Types< Cudd, Sylvan > TestingTypes