#pragma once #include #include #include #include #include "src/storage/jani/Model.h" #include "src/builder/JitModelBuilderInterface.h" namespace storm { namespace models { namespace sparse { template class Model; template class StandardRewardModel; } } namespace builder { template class ExplicitJitJaniModelBuilder { public: typedef JitModelBuilderInterface* (CreateFunctionType)(); typedef boost::function ImportFunctionType; ExplicitJitJaniModelBuilder(storm::jani::Model const& model); std::shared_ptr>> build(); private: void createBuilder(boost::filesystem::path const& dynamicLibraryPath); std::string createSourceCode(); boost::filesystem::path writeSourceToTemporaryFile(std::string const& source); boost::filesystem::path compileSourceToSharedLibrary(boost::filesystem::path const& sourceFile); static boost::optional execute(std::string command); storm::jani::Model const& model; typename ExplicitJitJaniModelBuilder::ImportFunctionType jitBuilderGetFunction; std::unique_ptr> builder; }; } }