From 556da4de5e9ee6fb2985758053a66cd4e78128fa Mon Sep 17 00:00:00 2001 From: Thomas Heinemann Date: Mon, 17 Sep 2012 12:18:40 +0200 Subject: [PATCH] Minor changes --- src/dtmc/labelling.h | 13 +++++++++++-- src/mrmc-cpp.cpp | 17 +++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/dtmc/labelling.h b/src/dtmc/labelling.h index 742b44e46..ee3ce4199 100644 --- a/src/dtmc/labelling.h +++ b/src/dtmc/labelling.h @@ -10,7 +10,15 @@ #include "atomic_proposition.h" +#define UNORDERED_MAP + +#ifdef UNORDERED_MAP #include "boost/unordered_map.hpp" +#define MAP boost::unordered_map +#else +#include +#define MAP std::map +#endif #include @@ -29,7 +37,7 @@ class labelling { virtual ~labelling() { //deleting all the labelling vectors in the map. - boost::unordered_map::iterator it; + MAP::iterator it; for (it = proposition_map.begin(); it != proposition_map.end(); ++it) { if (it->second != NULL) { delete (it->second); @@ -75,7 +83,8 @@ class labelling { private: uint_fast32_t nodes; - boost::unordered_map proposition_map; + MAP proposition_map; + //boost::unordered_map proposition_map; }; } //namespace dtmc diff --git a/src/mrmc-cpp.cpp b/src/mrmc-cpp.cpp index 7c5730f45..5b9bd59ef 100644 --- a/src/mrmc-cpp.cpp +++ b/src/mrmc-cpp.cpp @@ -15,6 +15,8 @@ #include #include +#include + #include #include PANTHEIOS_EXTERN_C PAN_CHAR_T const PANTHEIOS_FE_PROCESS_IDENTITY[] = "mrmc-cpp"; @@ -23,12 +25,26 @@ PANTHEIOS_EXTERN_C PAN_CHAR_T const PANTHEIOS_FE_PROCESS_IDENTITY[] = "mrmc-cpp" #include "src/sparse/static_sparse_matrix.h" #include "src/dtmc/atomic_proposition.h" +#include "src/parser/read_lab_file.h" int main(int argc, char* argv[]) { // Logging init pantheios_be_file_setFilePath("log.all"); pantheios::log_INFORMATIONAL("MRMC-Cpp started."); + mrmc::dtmc::labelling *lab; + + time_t start = std::clock(); + + lab = mrmc::parser::read_lab_file(20302, "csl_unbounded_until_sim_06.lab"); + + time_t end = std::clock(); + + printf("Time needed was %f", ((float)end-start)/CLOCKS_PER_SEC); + + delete lab; + + /* std::cout << "Hello, World." << std::endl; std::cout << "This is MRMC-Cpp Version " << MRMC_CPP_VERSION_MAJOR << "." << MRMC_CPP_VERSION_MINOR << std::endl; @@ -63,6 +79,7 @@ int main(int argc, char* argv[]) { } delete ssm; + */ return 0; }