Browse Source

Minor changes

tempestpy_adaptions
Thomas Heinemann 12 years ago
committed by Lanchid
parent
commit
556da4de5e
  1. 13
      src/dtmc/labelling.h
  2. 17
      src/mrmc-cpp.cpp

13
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 <map>
#define MAP std::map
#endif
#include <stdexcept>
@ -29,7 +37,7 @@ class labelling {
virtual ~labelling() {
//deleting all the labelling vectors in the map.
boost::unordered_map<std::string, AtomicProposition*>::iterator it;
MAP<std::string, AtomicProposition*>::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<std::string, AtomicProposition*> proposition_map;
MAP<std::string, AtomicProposition*> proposition_map;
//boost::unordered_map<std::string, AtomicProposition*> proposition_map;
};
} //namespace dtmc

17
src/mrmc-cpp.cpp

@ -15,6 +15,8 @@
#include <iostream>
#include <cstdio>
#include <ctime>
#include <pantheios/pantheios.hpp>
#include <pantheios/backends/bec.file.h>
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;
}

Loading…
Cancel
Save