Browse Source

Moved GSPN code to a separate lib

tempestpy_adaptions
sjunges 8 years ago
parent
commit
5967cdea1e
  1. 2
      resources/3rdparty/include_xerces.cmake
  2. 2
      src/CMakeLists.txt
  3. 3
      src/storm-gspn-cli/CMakeLists.txt
  4. 12
      src/storm-gspn-cli/storm-gspn.cpp
  5. 13
      src/storm-gspn/CMakeLists.txt
  6. 0
      src/storm-gspn/adapters/XercesAdapter.h
  7. 0
      src/storm-gspn/builder/ExplicitGspnModelBuilder.cpp
  8. 0
      src/storm-gspn/builder/ExplicitGspnModelBuilder.h
  9. 0
      src/storm-gspn/builder/JaniGSPNBuilder.cpp
  10. 2
      src/storm-gspn/builder/JaniGSPNBuilder.h
  11. 0
      src/storm-gspn/parser/GreatSpnEditorProjectParser.cpp
  12. 0
      src/storm-gspn/parser/GreatSpnEditorProjectParser.h
  13. 2
      src/storm-gspn/parser/GspnParser.cpp
  14. 2
      src/storm-gspn/parser/GspnParser.h
  15. 2
      src/storm-gspn/parser/PnmlParser.cpp
  16. 0
      src/storm-gspn/parser/PnmlParser.h
  17. 9
      src/storm-gspn/storage/gspn/GSPN.cpp
  18. 8
      src/storm-gspn/storage/gspn/GSPN.h
  19. 4
      src/storm-gspn/storage/gspn/GspnBuilder.cpp
  20. 0
      src/storm-gspn/storage/gspn/GspnBuilder.h
  21. 7
      src/storm-gspn/storage/gspn/ImmediateTransition.h
  22. 5
      src/storm-gspn/storage/gspn/Marking.cpp
  23. 0
      src/storm-gspn/storage/gspn/Marking.h
  24. 0
      src/storm-gspn/storage/gspn/Place.cpp
  25. 0
      src/storm-gspn/storage/gspn/Place.h
  26. 9
      src/storm-gspn/storage/gspn/TimedTransition.h
  27. 2
      src/storm-gspn/storage/gspn/Transition.cpp
  28. 4
      src/storm-gspn/storage/gspn/Transition.h
  29. 6
      src/storm/CMakeLists.txt

2
resources/3rdparty/include_xerces.cmake

@ -42,7 +42,7 @@ if(USE_XERCESC)
mark_as_advanced(CORESERVICES_LIBRARY)
endif()
find_package(CURL)
list(APPEND STORM_LINK_LIBRARIES ${XERCESC_LIBRARIES} ${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY} ${CURL_LIBRARIES})
list(APPEND STORM_GSPN_LINK_LIBRARIES ${XERCESC_LIBRARIES} ${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY} ${CURL_LIBRARIES})
else()
message (WARNING "Storm - Building without Xerces disables parsing XML formats (for GSPNs)")
endif(USE_XERCESC)

2
src/CMakeLists.txt

@ -1,4 +1,6 @@
add_subdirectory(storm)
add_subdirectory(storm-pgcl)
add_subdirectory(storm-pgcl-cli)
add_subdirectory(storm-gspn)
add_subdirectory(storm-gspn-cli)
add_subdirectory(test)

3
src/storm-gspn-cli/CMakeLists.txt

@ -0,0 +1,3 @@
add_executable(storm-gspn-cli ${PROJECT_SOURCE_DIR}/src/storm-gspn-cli/storm-gspn.cpp)
target_link_libraries(storm-gspn-cli storm-gspn) # Adding headers for xcode
set_target_properties(storm-gspn-cli PROPERTIES OUTPUT_NAME "storm-gspn")

12
src/storm/storm-gspn.cpp → src/storm-gspn-cli/storm-gspn.cpp

@ -1,9 +1,12 @@
#include "storm/builder/ExplicitGspnModelBuilder.h"
#include "storm-gspn/builder/ExplicitGspnModelBuilder.h"
#include "storm-gspn/parser/GspnParser.h"
#include "storm-gspn/storage/gspn/GSPN.h"
#include "storm-gspn/storage/gspn/GspnBuilder.h"
#include "storm-gspn/builder/JaniGSPNBuilder.h"
#include "storm/exceptions/BaseException.h"
#include "storm/exceptions/WrongFormatException.h"
#include "storm/parser/GspnParser.h"
#include "storm/storage/gspn/GSPN.h"
#include "storm/storage/gspn/GspnBuilder.h"
#include "storm/utility/macros.h"
#include "storm/utility/initialize.h"
@ -13,7 +16,6 @@
#include "storm/storage/expressions/ExpressionManager.h"
#include "storm/storage/jani/Model.h"
#include "storm/storage/jani/JSONExporter.h"
#include "storm/builder/JaniGSPNBuilder.h"
#include <fstream>
#include <iostream>
#include <string>

13
src/storm-gspn/CMakeLists.txt

@ -0,0 +1,13 @@
file(GLOB_RECURSE ALL_FILES ${PROJECT_SOURCE_DIR}/src/storm-gspn/*.h ${PROJECT_SOURCE_DIR}/src/storm-gspn/*.cpp)
register_source_groups_from_filestructure("${ALL_FILES}" storm-gspn)
file(GLOB_RECURSE STORM_GSPN_SOURCES ${PROJECT_SOURCE_DIR}/src/storm-gspn/*/*.cpp)
file(GLOB_RECURSE STORM_GSPN_HEADERS ${PROJECT_SOURCE_DIR}/src/storm-gspn/*/*.h)
# Create storm-pgcl.
add_library(storm-gspn SHARED ${STORM_GSPN_SOURCES} ${STORM_GSPN_HEADERS})
target_link_libraries(storm-gspn storm ${STORM_GSPN_LINK_LIBRARIES})

0
src/storm/adapters/XercesAdapter.h → src/storm-gspn/adapters/XercesAdapter.h

0
src/storm/builder/ExplicitGspnModelBuilder.cpp → src/storm-gspn/builder/ExplicitGspnModelBuilder.cpp

0
src/storm/builder/ExplicitGspnModelBuilder.h → src/storm-gspn/builder/ExplicitGspnModelBuilder.h

0
src/storm/builder/JaniGSPNBuilder.cpp → src/storm-gspn/builder/JaniGSPNBuilder.cpp

2
src/storm/builder/JaniGSPNBuilder.h → src/storm-gspn/builder/JaniGSPNBuilder.h

@ -1,6 +1,6 @@
#pragma once
#include "storm/storage/gspn/GSPN.h"
#include "storm-gspn/storage/gspn/GSPN.h"
#include "storm/storage/jani/Model.h"
#include "storm/storage/expressions/ExpressionManager.h"

0
src/storm/parser/GreatSpnEditorProjectParser.cpp → src/storm-gspn/parser/GreatSpnEditorProjectParser.cpp

0
src/storm/parser/GreatSpnEditorProjectParser.h → src/storm-gspn/parser/GreatSpnEditorProjectParser.h

2
src/storm/parser/GspnParser.cpp → src/storm-gspn/parser/GspnParser.cpp

@ -1,6 +1,6 @@
#include "GspnParser.h"
#include "storm-config.h"
#include "storm/adapters/XercesAdapter.h"
#include "storm-gspn/adapters/XercesAdapter.h"
#include "storm/exceptions/UnexpectedException.h"
#include "storm/exceptions/WrongFormatException.h"

2
src/storm/parser/GspnParser.h → src/storm-gspn/parser/GspnParser.h

@ -1,4 +1,4 @@
#include "storm/storage/gspn/GSPN.h"
#include "storm-gspn/storage/gspn/GSPN.h"
namespace storm {
namespace parser {

2
src/storm/parser/PnmlParser.cpp → src/storm-gspn/parser/PnmlParser.cpp

@ -1,5 +1,5 @@
#include "storm/parser/PnmlParser.h"
#include "storm-gspn/parser/PnmlParser.h"
#ifdef USE_XERCES
#include <iostream>

0
src/storm/parser/PnmlParser.h → src/storm-gspn/parser/PnmlParser.h

9
src/storm/storage/gspn/GSPN.cpp → src/storm-gspn/storage/gspn/GSPN.cpp

@ -1,11 +1,14 @@
#include "storm/storage/gspn/GSPN.h"
#include "storm/utility/macros.h"
#include "storm/exceptions/InvalidArgumentException.h"
#include "GSPN.h"
#include <unordered_map>
#include <boost/lexical_cast.hpp>
#include "storm/utility/macros.h"
#include "storm/exceptions/InvalidArgumentException.h"
namespace storm {
namespace gspn {
uint64_t GSPN::timedTransitionIdToTransitionId(uint64_t ttId) {

8
src/storm/storage/gspn/GSPN.h → src/storm-gspn/storage/gspn/GSPN.h

@ -6,10 +6,10 @@
#include <memory>
#include <unordered_map>
#include "storm/storage/gspn/ImmediateTransition.h"
#include "storm/storage/gspn/Marking.h"
#include "storm/storage/gspn/Place.h"
#include "storm/storage/gspn/TimedTransition.h"
#include "storm-gspn/storage/gspn/ImmediateTransition.h"
#include "storm-gspn/storage/gspn/Marking.h"
#include "storm-gspn/storage/gspn/Place.h"
#include "storm-gspn/storage/gspn/TimedTransition.h"
namespace storm {
namespace gspn {

4
src/storm/storage/gspn/GspnBuilder.cpp → src/storm-gspn/storage/gspn/GspnBuilder.cpp

@ -1,6 +1,8 @@
#include "storm/exceptions/IllegalFunctionCallException.h"
#include "GspnBuilder.h"
#include "storm/exceptions/IllegalFunctionCallException.h"
#include "storm/utility/macros.h"
#include "storm/exceptions/IllegalFunctionCallException.h"
#include "storm/exceptions/InvalidArgumentException.h"

0
src/storm/storage/gspn/GspnBuilder.h → src/storm-gspn/storage/gspn/GspnBuilder.h

7
src/storm/storage/gspn/ImmediateTransition.h → src/storm-gspn/storage/gspn/ImmediateTransition.h

@ -1,7 +1,6 @@
#ifndef STORM_STORAGE_GSPN_IMMEDIATETRANSITION_H_
#define STORM_STORAGE_GSPN_IMMEDIATETRANSITION_H_
#pragma once
#include "storm/storage/gspn/Transition.h"
#include "storm-gspn/storage/gspn/Transition.h"
#include "storm/utility/constants.h"
namespace storm {
@ -39,5 +38,3 @@ namespace storm {
};
}
}
#endif //STORM_STORAGE_GSPN_IMMEDIATETRANSITION_H_

5
src/storm/storage/gspn/Marking.cpp → src/storm-gspn/storage/gspn/Marking.cpp

@ -1,5 +1,8 @@
#include "Marking.h"
#include <stdint.h>
#include "storm/storage/gspn/Marking.h"
namespace storm {
namespace gspn {

0
src/storm/storage/gspn/Marking.h → src/storm-gspn/storage/gspn/Marking.h

0
src/storm/storage/gspn/Place.cpp → src/storm-gspn/storage/gspn/Place.cpp

0
src/storm/storage/gspn/Place.h → src/storm-gspn/storage/gspn/Place.h

9
src/storm/storage/gspn/TimedTransition.h → src/storm-gspn/storage/gspn/TimedTransition.h

@ -1,7 +1,6 @@
#ifndef STORM_STORAGE_GSPN_TIMEDTRANSITION_H_
#define STORM_STORAGE_GSPN_TIMEDTRANSITION_H_
#pragma once
#include "storm/storage/gspn/Transition.h"
#include "storm-gspn/storage/gspn/Transition.h"
namespace storm {
namespace gspn {
@ -31,6 +30,4 @@ namespace storm {
RateType rate;
};
}
}
#endif //STORM_STORAGE_GSPN_TIMEDTRANSITION_H_
}

2
src/storm/storage/gspn/Transition.cpp → src/storm-gspn/storage/gspn/Transition.cpp

@ -1,4 +1,4 @@
#include "storm/storage/gspn/Transition.h"
#include "Transition.h"
#include "storm/utility/macros.h"

4
src/storm/storage/gspn/Transition.h → src/storm-gspn/storage/gspn/Transition.h

@ -3,8 +3,8 @@
#include <map>
#include <unordered_map>
#include <vector>
#include "storm/storage/gspn/Marking.h"
#include "storm/storage/gspn/Place.h"
#include "storm-gspn/storage/gspn/Marking.h"
#include "storm-gspn/storage/gspn/Place.h"
namespace storm {
namespace gspn {

6
src/storm/CMakeLists.txt

@ -11,7 +11,6 @@ file(GLOB_RECURSE STORM_HEADERS ${PROJECT_SOURCE_DIR}/src/storm/*.h)
file(GLOB_RECURSE STORM_SOURCES_WITHOUT_MAIN ${PROJECT_SOURCE_DIR}/src/storm/*/*.cpp)
file(GLOB_RECURSE STORM_MAIN_FILE ${PROJECT_SOURCE_DIR}/src/storm/storm.cpp)
file(GLOB_RECURSE STORM_DFT_MAIN_FILE ${PROJECT_SOURCE_DIR}/src/storm/storm-dyftee.cpp)
file(GLOB_RECURSE STORM_GSPN_MAIN_FILE ${PROJECT_SOURCE_DIR}/src/storm/storm-gspn.cpp)
# Additional include files like the storm-config.h
file(GLOB_RECURSE STORM_BUILD_HEADERS ${PROJECT_BINARY_DIR}/include/*.h)
@ -20,7 +19,6 @@ set(STORM_LIB_SOURCES ${STORM_SOURCES_WITHOUT_MAIN})
set(STORM_LIB_HEADERS ${STORM_HEADERS})
set(STORM_MAIN_SOURCES ${STORM_MAIN_FILE})
set(STORM_DFT_MAIN_SOURCES ${STORM_DFT_MAIN_FILE})
set(STORM_GSPN_MAIN_SOURCES ${STORM_GSPN_MAIN_FILE})
# Add custom additional include or link directories
if (ADDITIONAL_INCLUDE_DIRS)
@ -55,10 +53,6 @@ add_executable(storm-dft-main ${STORM_DFT_MAIN_SOURCES} ${STORM_MAIN_HEADERS})
target_link_libraries(storm-dft-main storm) # Adding headers for xcode
set_target_properties(storm-dft-main PROPERTIES OUTPUT_NAME "storm-dft")
add_executable(storm-gspn-main ${STORM_GSPN_MAIN_SOURCES} ${STORM_MAIN_HEADERS})
target_link_libraries(storm-gspn-main storm) # Adding headers for xcode
set_target_properties(storm-gspn-main PROPERTIES OUTPUT_NAME "storm-gspn")
# Install storm headers to include directory.
foreach(HEADER ${STORM_LIB_HEADERS})
string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/src/?" "" RELATIVE_HEADER_PATH ${HEADER})

Loading…
Cancel
Save