From aba470960fd76e0595d6d62bff7d2930be73fd82 Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 14 Jan 2013 20:55:01 +0100 Subject: [PATCH] Intermediate commit to test code under linux. --- src/adapters/IntermediateRepresentationAdapter.h | 12 +++++++----- src/storm.cpp | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/adapters/IntermediateRepresentationAdapter.h b/src/adapters/IntermediateRepresentationAdapter.h index de35d81a5..fad0217ad 100644 --- a/src/adapters/IntermediateRepresentationAdapter.h +++ b/src/adapters/IntermediateRepresentationAdapter.h @@ -8,6 +8,8 @@ #ifndef STORM_IR_INTERMEDIATEREPRESENTATIONADAPTER_H_ #define STORM_IR_INTERMEDIATEREPRESENTATIONADAPTER_H_ +#include "src/storage/SparseMatrix.h" + #include #include #include @@ -45,7 +47,7 @@ public: class IntermediateRepresentationAdapter { public: template - static storm::storage::SquareSparseMatrix* toSparseMatrix(storm::ir::Program const& program) { + static storm::storage::SparseMatrix* toSparseMatrix(storm::ir::Program const& program) { uint_fast64_t numberOfIntegerVariables = 0; uint_fast64_t numberOfBooleanVariables = 0; @@ -162,7 +164,7 @@ public: std::cout << "Found " << allStates.size() << " reachable states and " << totalNumberOfTransitions << " transitions."; - storm::storage::SquareSparseMatrix* resultMatrix = new storm::storage::SquareSparseMatrix(allStates.size()); + storm::storage::SparseMatrix* resultMatrix = new storm::storage::SparseMatrix(allStates.size()); resultMatrix->initialize(totalNumberOfTransitions); uint_fast64_t currentIndex = 0; @@ -204,9 +206,9 @@ public: } // Now insert the actual values into the matrix. - //for (auto targetIndex : stateIndexToProbabilityMap) { - // resultMatrix->addNextValue(currentIndex, targetIndex.first, targetIndex.second); - //} + for (auto targetIndex : stateIndexToProbabilityMap) { + resultMatrix->addNextValue(currentIndex, targetIndex.first, targetIndex.second); + } } } } diff --git a/src/storm.cpp b/src/storm.cpp index a8390a7e4..dfb2109e5 100644 --- a/src/storm.cpp +++ b/src/storm.cpp @@ -25,7 +25,7 @@ #include "src/modelChecker/EigenDtmcPrctlModelChecker.h" #include "src/modelChecker/GmmxxDtmcPrctlModelChecker.h" #include "src/parser/AutoParser.h" -#include "src/parser/PrctlParser.h" +//#include "src/parser/PrctlParser.h" #include "src/solver/GraphAnalyzer.h" #include "src/utility/Settings.h" #include "src/formula/Formulas.h" @@ -246,7 +246,7 @@ int main(const int argc, const char* argv[]) { storm::parser::PrismParser parser; std::shared_ptr program = parser.parseFile("test.input"); - storm::storage::SquareSparseMatrix* result = storm::adapters::IntermediateRepresentationAdapter::toSparseMatrix(*program); + storm::storage::SparseMatrix* result = storm::adapters::IntermediateRepresentationAdapter::toSparseMatrix(*program); result->print(); delete result;