diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 88e0a396f..2f3141a02 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,6 +9,7 @@ file(GLOB_RECURSE STORM_HEADERS_CLI ${PROJECT_SOURCE_DIR}/src/cli/*.h) file(GLOB_RECURSE STORM_SOURCES_WITHOUT_MAIN ${PROJECT_SOURCE_DIR}/src/*/*.cpp) file(GLOB_RECURSE STORM_SOURCES_CLI ${PROJECT_SOURCE_DIR}/src/cli/*.cpp) file(GLOB_RECURSE STORM_MAIN_FILE ${PROJECT_SOURCE_DIR}/src/storm.cpp) +file(GLOB_RECURSE STORM_GSPN_FILE ${PROJECT_SOURCE_DIR}/src/storm-gspn.cpp) file(GLOB_RECURSE STORM_ADAPTERS_FILES ${PROJECT_SOURCE_DIR}/src/adapters/*.h ${PROJECT_SOURCE_DIR}/src/adapters/*.cpp) file(GLOB_RECURSE STORM_BUILDER_FILES ${PROJECT_SOURCE_DIR}/src/builder/*.h ${PROJECT_SOURCE_DIR}/src/builder/*.cpp) file(GLOB_RECURSE STORM_CLI_FILES ${PROJECT_SOURCE_DIR}/src/cli/*.h ${PROJECT_SOURCE_DIR}/src/cli/*.cpp) @@ -28,6 +29,7 @@ file(GLOB STORM_MODELS_FILES ${PROJECT_SOURCE_DIR}/src/models/*.h ${PROJECT_SOUR file(GLOB_RECURSE STORM_MODELS_SPARSE_FILES ${PROJECT_SOURCE_DIR}/src/models/sparse/*.h ${PROJECT_SOURCE_DIR}/src/models/sparse/*.cpp) file(GLOB_RECURSE STORM_MODELS_SYMBOLIC_FILES ${PROJECT_SOURCE_DIR}/src/models/symbolic/*.h ${PROJECT_SOURCE_DIR}/src/models/symbolic/*.cpp) file(GLOB STORM_PARSER_FILES ${PROJECT_SOURCE_DIR}/src/parser/*.h ${PROJECT_SOURCE_DIR}/src/parser/*.cpp) +file(GLOB_RECURSE STORM_PARSER_GSPNPARSER_FILIES ${PROJECT_SOURCE_DIR}/src/parser/gsnpparser/*.h ${PROJECT_SOURCE_DIR}/src/parser/gspnparser/*.cpp) file(GLOB_RECURSE STORM_PARSER_PRISMPARSER_FILES ${PROJECT_SOURCE_DIR}/src/parser/prismparser/*.h ${PROJECT_SOURCE_DIR}/src/parser/prismparser/*.cpp) file(GLOB STORM_SETTINGS_FILES ${PROJECT_SOURCE_DIR}/src/settings/*.h ${PROJECT_SOURCE_DIR}/src/settings/*.cpp) file(GLOB STORM_SETTINGS_MODULES_FILES ${PROJECT_SOURCE_DIR}/src/settings/modules/*.h ${PROJECT_SOURCE_DIR}/src/settings/modules/*.cpp) @@ -35,6 +37,7 @@ file(GLOB_RECURSE STORM_SOLVER_FILES ${PROJECT_SOURCE_DIR}/src/solver/*.h ${PROJ file(GLOB STORM_STORAGE_FILES ${PROJECT_SOURCE_DIR}/src/storage/*.h ${PROJECT_SOURCE_DIR}/src/storage/*.cpp) file(GLOB_RECURSE STORM_STORAGE_DD_FILES ${PROJECT_SOURCE_DIR}/src/storage/dd/*.h ${PROJECT_SOURCE_DIR}/src/storage/dd/*.cpp) file(GLOB_RECURSE STORM_STORAGE_EXPRESSIONS_FILES ${PROJECT_SOURCE_DIR}/src/storage/expressions/*.h ${PROJECT_SOURCE_DIR}/src/storage/expressions/*.cpp) +file(GLOB_RECURSE STORM_STORAGE_GSPN_FILES ${PROJECT_SOURCE_DIR}/src/storage/gspn/*.h ${PROJECT_SOURCE_DIR}/src/storage/gspn/*.cpp) file(GLOB_RECURSE STORM_STORAGE_PRISM_FILES ${PROJECT_SOURCE_DIR}/src/storage/prism/*.h ${PROJECT_SOURCE_DIR}/src/storage/prism/*.cpp) file(GLOB_RECURSE STORM_STORAGE_SPARSE_FILES ${PROJECT_SOURCE_DIR}/src/storage/sparse/*.h ${PROJECT_SOURCE_DIR}/src/storage/sparse/*.cpp) file(GLOB_RECURSE STORM_UTILITY_FILES ${PROJECT_SOURCE_DIR}/src/utility/*.h ${PROJECT_SOURCE_DIR}/src/utility/*.cpp) @@ -50,6 +53,7 @@ list(REMOVE_ITEM STORM_LIB_HEADERS ${STORM_HEADERS_CLI}) set(STORM_MAIN_SOURCES ${STORM_SOURCES_CLI} ${STORM_MAIN_FILE}) set(STORM_MAIN_HEADERS ${STORM_HEADERS_CLI}) + # Group the headers and sources source_group(main FILES ${STORM_MAIN_FILE}) source_group(adapters FILES ${STORM_ADAPTERS_FILES}) @@ -73,6 +77,7 @@ source_group(models\\sparse FILES ${STORM_MODELS_SPARSE_FILES}) source_group(models\\symbolic FILES ${STORM_MODELS_SYMBOLIC_FILES}) source_group(parser FILES ${STORM_PARSER_FILES}) source_group(parser\\prismparser FILES ${STORM_PARSER_PRISMPARSER_FILES}) +source_group(parser\\gspnparser FILES ${STORM_PARSER_GSPNPARSER_FILES}) source_group(settings FILES ${STORM_SETTINGS_FILES}) source_group(settings\\modules FILES ${STORM_SETTINGS_MODULES_FILES}) source_group(solver FILES ${STORM_SOLVER_FILES}) @@ -81,6 +86,7 @@ source_group(storage\\dd FILES ${STORM_STORAGE_DD_FILES}) source_group(storage\\expressions FILES ${STORM_STORAGE_EXPRESSIONS_FILES}) source_group(storage\\prism FILES ${STORM_STORAGE_PRISM_FILES}) source_group(storage\\sparse FILES ${STORM_STORAGE_SPARSE_FILES}) +source_group(storage\\gspn FILES {STORM_STORAGE_GSPN_FILES}) source_group(utility FILES ${STORM_UTILITY_FILES}) # Add custom additional include or link directories @@ -105,7 +111,8 @@ add_dependencies(storm xercesc) add_executable(storm-main ${STORM_MAIN_SOURCES} ${STORM_MAIN_HEADERS}) target_link_libraries(storm-main storm) # Adding headers for xcode set_target_properties(storm-main PROPERTIES OUTPUT_NAME "storm") - +add_executable(storm-gspn ${STORM_GSPN_FILE}) +target_link_libraries(storm-gspn storm) target_link_libraries(storm ${STORM_LINK_LIBRARIES}) diff --git a/src/builder/ExplicitGspnModelBuilder.h b/src/builder/ExplicitGspnModelBuilder.h index 98613e681..3d8159c1d 100644 --- a/src/builder/ExplicitGspnModelBuilder.h +++ b/src/builder/ExplicitGspnModelBuilder.h @@ -1,8 +1,11 @@ -// -// Created by Sebastian Junges on 08/10/15. -// - #ifndef STORM_EXPLICITGSPNMODELBUILDER_H #define STORM_EXPLICITGSPNMODELBUILDER_H + +namespace storm { + namespace builder { + // Takes a GSPN, builds an MA. + } +} + #endif //STORM_EXPLICITGSPNMODELBUILDER_H diff --git a/src/parser/GspnParser.h b/src/parser/GspnParser.h index 570294823..a24f1b1d9 100644 --- a/src/parser/GspnParser.h +++ b/src/parser/GspnParser.h @@ -1,8 +1,10 @@ -// -// Created by Sebastian Junges on 08/10/15. -// - #ifndef STORM_GSPNPARSER_H #define STORM_GSPNPARSER_H +namespace storm { + namespace parser { + // Parses a GSPN in xml format + } +} + #endif //STORM_GSPNPARSER_H diff --git a/src/storage/gspn/GSPN.h b/src/storage/gspn/GSPN.h index fdaa092e0..aedfe5f58 100644 --- a/src/storage/gspn/GSPN.h +++ b/src/storage/gspn/GSPN.h @@ -1,8 +1,15 @@ -// -// Created by Sebastian Junges on 08/10/15. -// - #ifndef STORM_GSPN_H #define STORM_GSPN_H +namespace storm { + namespace gspn { + // Stores a GSPN + class GSPN { + // Later, the rates and probabilities type should become a template, for now, let it be doubles. + typedef ValueType double; + + }; + } +} + #endif //STORM_GSPN_H diff --git a/src/storm-gspn.cpp b/src/storm-gspn.cpp index 3de0a9d0e..52e8c6069 100644 --- a/src/storm-gspn.cpp +++ b/src/storm-gspn.cpp @@ -1,3 +1,7 @@ +#include "src/exceptions/BaseException.h" +#include "src/utility/macros.h" +#include "src/utility/initialize.h" + int main(const int argc, const char** argv) { try { storm::utility::setUp(); diff --git a/src/utility/storm.cpp b/src/utility/storm.cpp index 49ca3e48a..f93bb3799 100644 --- a/src/utility/storm.cpp +++ b/src/utility/storm.cpp @@ -8,9 +8,10 @@ namespace storm { - storm::prism::Program parseProgram(std::string const& path) { + storm::prism::Program parseProgram(std::string const& path) { storm::prism::Program program= storm::parser::PrismParser::parse(path).simplify().simplify(); program.checkValidity(); + std::cout << program << std::endl; return program; }