Browse Source

Fixed performance tests.

Former-commit-id: f58e2eb923
tempestpy_adaptions
dehnert 10 years ago
parent
commit
f0b174b756
  1. 2
      src/modelchecker/csl/SparseMarkovAutomatonCslModelChecker.cpp
  2. 1
      src/modelchecker/prctl/SparseDtmcPrctlModelChecker.cpp
  3. 1
      src/modelchecker/prctl/SparseMdpPrctlModelChecker.cpp
  4. 2
      src/models/sparse/Ctmc.h
  5. 3
      src/models/sparse/DeterministicModel.h
  6. 1
      src/models/sparse/Dtmc.cpp
  7. 15
      src/models/sparse/Dtmc.h
  8. 8
      src/models/sparse/MarkovAutomaton.h
  9. 12
      src/models/sparse/Mdp.h
  10. 1
      src/models/sparse/Model.cpp
  11. 9
      src/models/sparse/Model.h
  12. 2
      src/models/sparse/NondeterministicModel.h
  13. 1
      src/storage/DeterministicModelBisimulationDecomposition.h
  14. 12
      test/performance/graph/GraphTest.cpp
  15. 8
      test/performance/modelchecker/GmmxxDtmcPrctModelCheckerTest.cpp
  16. 8
      test/performance/modelchecker/SparseMdpPrctlModelCheckerTest.cpp
  17. 6
      test/performance/storage/MaximalEndComponentDecompositionTest.cpp
  18. 12
      test/performance/storage/StronglyConnectedComponentDecompositionTest.cpp

2
src/modelchecker/csl/SparseMarkovAutomatonCslModelChecker.cpp

@ -3,6 +3,8 @@
#include <utility>
#include <vector>
#include "src/storage/StronglyConnectedComponentDecomposition.h"
#include "src/utility/constants.h"
#include "src/utility/macros.h"
#include "src/utility/vector.h"

1
src/modelchecker/prctl/SparseDtmcPrctlModelChecker.cpp

@ -9,6 +9,7 @@
#include "src/modelchecker/results/ExplicitQualitativeCheckResult.h"
#include "src/modelchecker/results/ExplicitQuantitativeCheckResult.h"
#include "src/exceptions/InvalidStateException.h"
#include "src/exceptions/InvalidPropertyException.h"
namespace storm {

1
src/modelchecker/prctl/SparseMdpPrctlModelChecker.cpp

@ -10,6 +10,7 @@
#include "src/modelchecker/results/ExplicitQualitativeCheckResult.h"
#include "src/modelchecker/results/ExplicitQuantitativeCheckResult.h"
#include "src/exceptions/InvalidStateException.h"
#include "src/exceptions/InvalidPropertyException.h"
namespace storm {

2
src/models/sparse/Ctmc.h

@ -5,8 +5,6 @@
#include <vector>
#include "src/models/sparse/DeterministicModel.h"
#include "src/models/sparse/StateLabeling.h"
#include "src/storage/SparseMatrix.h"
#include "src/utility/OsDetection.h"
namespace storm {

3
src/models/sparse/DeterministicModel.h

@ -1,9 +1,6 @@
#ifndef STORM_MODELS_SPARSE_DETERMINISTICMODEL_H_
#define STORM_MODELS_SPARSE_DETERMINISTICMODEL_H_
#include <memory>
#include <sstream>
#include "src/models/sparse/Model.h"
#include "src/utility/OsDetection.h"

1
src/models/sparse/Dtmc.cpp

@ -1,6 +1,7 @@
#include "src/models/sparse/Dtmc.h"
#include "src/adapters/CarlAdapter.h"
#include "src/exceptions/NotImplementedException.h"
namespace storm {
namespace models {

15
src/models/sparse/Dtmc.h

@ -1,23 +1,8 @@
#ifndef STORM_MODELS_SPARSE_DTMC_H_
#define STORM_MODELS_SPARSE_DTMC_H_
#include <ostream>
#include <iostream>
#include <memory>
#include <cstdlib>
#include "src/models/sparse/DeterministicModel.h"
#include "src/models/sparse/StateLabeling.h"
#include "src/storage/SparseMatrix.h"
#include "src/exceptions/InvalidArgumentException.h"
#include "src/exceptions/NotImplementedException.h"
#include "src/settings/SettingsManager.h"
#include "src/utility/OsDetection.h"
#include "src/utility/constants.h"
#include "src/utility/vector.h"
#include "src/utility/macros.h"
#include "src/utility/matrix.h"
#include "src/utility/constants.h"
namespace storm {
namespace models {

8
src/models/sparse/MarkovAutomaton.h

@ -2,15 +2,7 @@
#define STORM_MODELS_SPARSE_MARKOVAUTOMATON_H_
#include "src/models/sparse/NondeterministicModel.h"
#include "src/models/sparse/StateLabeling.h"
#include "src/storage/SparseMatrix.h"
#include "src/storage/sparse/StateType.h"
#include "src/exceptions/InvalidArgumentException.h"
#include "src/settings/SettingsManager.h"
#include "src/utility/OsDetection.h"
#include "src/utility/constants.h"
#include "src/utility/vector.h"
#include "src/utility/matrix.h"
namespace storm {
namespace models {

12
src/models/sparse/Mdp.h

@ -1,18 +1,8 @@
#ifndef STORM_MODELS_SPARSE_MDP_H_
#define STORM_MODELS_SPARSE_MDP_H_
#include <ostream>
#include <iostream>
#include <memory>
#include <cstdlib>
#include <algorithm>
#include "src/models/sparse/StateLabeling.h"
#include "src/storage/SparseMatrix.h"
#include "src/settings/SettingsManager.h"
#include "src/models/sparse/NondeterministicModel.h"
#include "src/utility/constants.h"
#include "src/utility/matrix.h"
#include "src/utility/OsDetection.h"
namespace storm {
namespace models {

1
src/models/sparse/Model.cpp

@ -1,5 +1,6 @@
#include "src/models/sparse/Model.h"
#include "src/utility/vector.h"
#include "src/adapters/CarlAdapter.h"
namespace storm {

9
src/models/sparse/Model.h

@ -1,7 +1,6 @@
#ifndef STORM_MODELS_SPARSE_MODEL_H_
#define STORM_MODELS_SPARSE_MODEL_H_
#include <memory>
#include <vector>
#include <boost/container/flat_set.hpp>
#include <boost/optional.hpp>
@ -11,14 +10,8 @@
#include "src/storage/sparse/StateType.h"
#include "src/storage/BitVector.h"
#include "src/storage/SparseMatrix.h"
#include "src/storage/Scheduler.h"
#include "src/storage/StronglyConnectedComponentDecomposition.h"
#include "src/utility/constants.h"
#include "src/storage/Decomposition.h"
#include "src/utility/OsDetection.h"
#include "src/utility/macros.h"
#include "src/utility/vector.h"
#include "src/exceptions/InvalidOperationException.h"
namespace storm {
namespace models {

2
src/models/sparse/NondeterministicModel.h

@ -1,8 +1,6 @@
#ifndef STORM_MODELS_SPARSE_NONDETERMINISTICMODEL_H_
#define STORM_MODELS_SPARSE_NONDETERMINISTICMODEL_H_
#include <memory>
#include "src/models/sparse/Model.h"
#include "src/utility/OsDetection.h"

1
src/storage/DeterministicModelBisimulationDecomposition.h

@ -6,6 +6,7 @@
#include "src/storage/sparse/StateType.h"
#include "src/storage/Decomposition.h"
#include "src/storage/StateBlock.h"
#include "src/logic/Formulas.h"
#include "src/models/sparse/Dtmc.h"
#include "src/models/sparse/Ctmc.h"

12
test/performance/graph/GraphTest.cpp

@ -4,13 +4,13 @@
#include "src/parser/AutoParser.h"
#include "src/utility/graph.h"
#include "src/storage/StronglyConnectedComponentDecomposition.h"
#include "src/models/Mdp.h"
#include "src/models/Dtmc.h"
#include "src/models/sparse/Mdp.h"
#include "src/models/sparse/Dtmc.h"
TEST(GraphTest, PerformProb01) {
std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/dtmc/crowds/crowds20_5.tra", STORM_CPP_BASE_PATH "/examples/dtmc/crowds/crowds20_5.lab", "", "");
std::shared_ptr<storm::models::Dtmc<double>> dtmc = abstractModel->as<storm::models::Dtmc<double>>();
std::shared_ptr<storm::models::sparse::Dtmc<double>> dtmc = abstractModel->as<storm::models::sparse::Dtmc<double>>();
storm::storage::BitVector trueStates(dtmc->getNumberOfStates(), true);
LOG4CPLUS_WARN(logger, "Computing prob01 (3 times) for crowds/crowds20_5...");
@ -35,7 +35,7 @@ TEST(GraphTest, PerformProb01) {
abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/dtmc/synchronous_leader/leader6_8.tra", STORM_CPP_BASE_PATH "/examples/dtmc/synchronous_leader/leader6_8.lab", "", "");
std::shared_ptr<storm::models::Dtmc<double>> dtmc2 = abstractModel->as<storm::models::Dtmc<double>>();
std::shared_ptr<storm::models::sparse::Dtmc<double>> dtmc2 = abstractModel->as<storm::models::sparse::Dtmc<double>>();
trueStates = storm::storage::BitVector(dtmc2->getNumberOfStates(), true);
LOG4CPLUS_WARN(logger, "Computing prob01 for synchronous_leader/leader6_8...");
@ -50,7 +50,7 @@ TEST(GraphTest, PerformProb01) {
TEST(GraphTest, PerformProb01MinMax) {
std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/mdp/asynchronous_leader/leader7.tra", STORM_CPP_BASE_PATH "/examples/mdp/asynchronous_leader/leader7.lab", "", "");
std::shared_ptr<storm::models::Mdp<double>> mdp = abstractModel->as<storm::models::Mdp<double>>();
std::shared_ptr<storm::models::sparse::Mdp<double>> mdp = abstractModel->as<storm::models::sparse::Mdp<double>>();
storm::storage::BitVector trueStates(mdp->getNumberOfStates(), true);
LOG4CPLUS_WARN(logger, "Computing prob01min for asynchronous_leader/leader7...");
@ -70,7 +70,7 @@ TEST(GraphTest, PerformProb01MinMax) {
mdp = nullptr;
abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/mdp/consensus/coin4_6.tra", STORM_CPP_BASE_PATH "/examples/mdp/consensus/coin4_6.lab", "", "");
std::shared_ptr<storm::models::Mdp<double>> mdp2 = abstractModel->as<storm::models::Mdp<double>>();
std::shared_ptr<storm::models::sparse::Mdp<double>> mdp2 = abstractModel->as<storm::models::sparse::Mdp<double>>();
trueStates = storm::storage::BitVector(mdp2->getNumberOfStates(), true);
LOG4CPLUS_WARN(logger, "Computing prob01min for consensus/coin4_6...");

8
test/performance/modelchecker/GmmxxDtmcPrctModelCheckerTest.cpp

@ -10,9 +10,9 @@
TEST(GmmxxDtmcPrctlModelCheckerTest, Crowds) {
std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/dtmc/crowds/crowds20_5.tra", STORM_CPP_BASE_PATH "/examples/dtmc/crowds/crowds20_5.lab", "", "");
ASSERT_EQ(abstractModel->getType(), storm::models::DTMC);
ASSERT_EQ(abstractModel->getType(), storm::models::ModelType::Dtmc);
std::shared_ptr<storm::models::Dtmc<double>> dtmc = abstractModel->as<storm::models::Dtmc<double>>();
std::shared_ptr<storm::models::sparse::Dtmc<double>> dtmc = abstractModel->as<storm::models::sparse::Dtmc<double>>();
ASSERT_EQ(2036647ull, dtmc->getNumberOfStates());
ASSERT_EQ(7362293ull, dtmc->getNumberOfTransitions());
@ -48,9 +48,9 @@ TEST(GmmxxDtmcPrctlModelCheckerTest, Crowds) {
TEST(GmmxxDtmcPrctlModelCheckerTest, SynchronousLeader) {
std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/dtmc/synchronous_leader/leader6_8.tra", STORM_CPP_BASE_PATH "/examples/dtmc/synchronous_leader/leader6_8.lab", "", STORM_CPP_BASE_PATH "/examples/dtmc/synchronous_leader/leader6_8.pick.trans.rew");
ASSERT_EQ(abstractModel->getType(), storm::models::DTMC);
ASSERT_EQ(abstractModel->getType(), storm::models::ModelType::Dtmc);
std::shared_ptr<storm::models::Dtmc<double>> dtmc = abstractModel->as<storm::models::Dtmc<double>>();
std::shared_ptr<storm::models::sparse::Dtmc<double>> dtmc = abstractModel->as<storm::models::sparse::Dtmc<double>>();
ASSERT_EQ(1312334ull, dtmc->getNumberOfStates());
ASSERT_EQ(1574477ull, dtmc->getNumberOfTransitions());

8
test/performance/modelchecker/SparseMdpPrctlModelCheckerTest.cpp

@ -10,9 +10,9 @@
TEST(SparseMdpPrctlModelCheckerTest, AsynchronousLeader) {
std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/mdp/asynchronous_leader/leader7.tra", STORM_CPP_BASE_PATH "/examples/mdp/asynchronous_leader/leader7.lab", "", STORM_CPP_BASE_PATH "/examples/mdp/asynchronous_leader/leader7.trans.rew");
ASSERT_EQ(abstractModel->getType(), storm::models::MDP);
ASSERT_EQ(abstractModel->getType(), storm::models::ModelType::Mdp);
std::shared_ptr<storm::models::Mdp<double>> mdp = abstractModel->as<storm::models::Mdp<double>>();
std::shared_ptr<storm::models::sparse::Mdp<double>> mdp = abstractModel->as<storm::models::sparse::Mdp<double>>();
ASSERT_EQ(2095783ull, mdp->getNumberOfStates());
ASSERT_EQ(7714385ull, mdp->getNumberOfTransitions());
@ -72,9 +72,9 @@ TEST(SparseMdpPrctlModelCheckerTest, AsynchronousLeader) {
TEST(SparseMdpPrctlModelCheckerTest, Consensus) {
std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/mdp/consensus/coin4_6.tra", STORM_CPP_BASE_PATH "/examples/mdp/consensus/coin4_6.lab", STORM_CPP_BASE_PATH "/examples/mdp/consensus/coin4_6.steps.state.rew", "");
ASSERT_EQ(abstractModel->getType(), storm::models::MDP);
ASSERT_EQ(abstractModel->getType(), storm::models::ModelType::Mdp);
std::shared_ptr<storm::models::Mdp<double>> mdp = abstractModel->as<storm::models::Mdp<double>>();
std::shared_ptr<storm::models::sparse::Mdp<double>> mdp = abstractModel->as<storm::models::sparse::Mdp<double>>();
ASSERT_EQ(63616ull, mdp->getNumberOfStates());
ASSERT_EQ(213472ull, mdp->getNumberOfTransitions());

6
test/performance/storage/MaximalEndComponentDecompositionTest.cpp

@ -2,11 +2,11 @@
#include "storm-config.h"
#include "src/parser/AutoParser.h"
#include "src/storage/MaximalEndComponentDecomposition.h"
#include "src/models/Mdp.h"
#include "src/models/sparse/Mdp.h"
TEST(MaximalEndComponentDecomposition, AsynchronousLeader) {
std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/mdp/asynchronous_leader/leader7.tra", STORM_CPP_BASE_PATH "/examples/mdp/asynchronous_leader/leader7.lab", "", "");
std::shared_ptr<storm::models::Mdp<double>> mdp = abstractModel->as<storm::models::Mdp<double>>();
std::shared_ptr<storm::models::sparse::Mdp<double>> mdp = abstractModel->as<storm::models::sparse::Mdp<double>>();
storm::storage::MaximalEndComponentDecomposition<double> mecDecomposition;
ASSERT_NO_THROW(mecDecomposition = storm::storage::MaximalEndComponentDecomposition<double>(*mdp));
@ -17,7 +17,7 @@ TEST(MaximalEndComponentDecomposition, AsynchronousLeader) {
TEST(MaximalEndComponentDecomposition, Consensus) {
std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/mdp/consensus/coin6_4.tra", STORM_CPP_BASE_PATH "/examples/mdp/consensus/coin6_4.lab", "", "");
std::shared_ptr<storm::models::Mdp<double>> mdp = abstractModel->as<storm::models::Mdp<double>>();
std::shared_ptr<storm::models::sparse::Mdp<double>> mdp = abstractModel->as<storm::models::sparse::Mdp<double>>();
storm::storage::MaximalEndComponentDecomposition<double> mecDecomposition;
ASSERT_NO_THROW(mecDecomposition = storm::storage::MaximalEndComponentDecomposition<double>(*mdp));

12
test/performance/storage/StronglyConnectedComponentDecompositionTest.cpp

@ -2,12 +2,12 @@
#include "storm-config.h"
#include "src/parser/AutoParser.h"
#include "src/storage/StronglyConnectedComponentDecomposition.h"
#include "src/models/Mdp.h"
#include "src/models/Dtmc.h"
#include "src/models/sparse/Mdp.h"
#include "src/models/sparse/Dtmc.h"
TEST(StronglyConnectedComponentDecomposition, Crowds) {
std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/dtmc/crowds/crowds20_5.tra", STORM_CPP_BASE_PATH "/examples/dtmc/crowds/crowds20_5.lab", "", "");
std::shared_ptr<storm::models::Dtmc<double>> dtmc = abstractModel->as<storm::models::Dtmc<double>>();
std::shared_ptr<storm::models::sparse::Dtmc<double>> dtmc = abstractModel->as<storm::models::sparse::Dtmc<double>>();
storm::storage::StronglyConnectedComponentDecomposition<double> sccDecomposition;
@ -25,7 +25,7 @@ TEST(StronglyConnectedComponentDecomposition, Crowds) {
TEST(StronglyConnectedComponentDecomposition, SynchronousLeader) {
std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/dtmc/synchronous_leader/leader6_9.tra", STORM_CPP_BASE_PATH "/examples/dtmc/synchronous_leader/leader6_9.lab", "", "");
std::shared_ptr<storm::models::Dtmc<double>> dtmc = abstractModel->as<storm::models::Dtmc<double>>();
std::shared_ptr<storm::models::sparse::Dtmc<double>> dtmc = abstractModel->as<storm::models::sparse::Dtmc<double>>();
storm::storage::StronglyConnectedComponentDecomposition<double> sccDecomposition;
@ -43,7 +43,7 @@ TEST(StronglyConnectedComponentDecomposition, SynchronousLeader) {
TEST(StronglyConnectedComponentDecomposition, AsynchronousLeader) {
std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/mdp/asynchronous_leader/leader7.tra", STORM_CPP_BASE_PATH "/examples/mdp/asynchronous_leader/leader7.lab", "", "");
std::shared_ptr<storm::models::Mdp<double>> mdp = abstractModel->as<storm::models::Mdp<double>>();
std::shared_ptr<storm::models::sparse::Mdp<double>> mdp = abstractModel->as<storm::models::sparse::Mdp<double>>();
storm::storage::StronglyConnectedComponentDecomposition<double> sccDecomposition;
@ -61,7 +61,7 @@ TEST(StronglyConnectedComponentDecomposition, AsynchronousLeader) {
TEST(StronglyConnectedComponentDecomposition, Consensus) {
std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser::parseModel(STORM_CPP_BASE_PATH "/examples/mdp/consensus/coin6_4.tra", STORM_CPP_BASE_PATH "/examples/mdp/consensus/coin6_4.lab", "", "");
std::shared_ptr<storm::models::Mdp<double>> mdp = abstractModel->as<storm::models::Mdp<double>>();
std::shared_ptr<storm::models::sparse::Mdp<double>> mdp = abstractModel->as<storm::models::sparse::Mdp<double>>();
storm::storage::StronglyConnectedComponentDecomposition<double> sccDecomposition;

Loading…
Cancel
Save