#pragma once #include "storm/settings/SettingsManager.h" #include "storm/utility/DirectEncodingExporter.h" #include "storm/utility/DDEncodingExporter.h" #include "storm/utility/file.h" #include "storm/utility/macros.h" #include "storm/storage/Scheduler.h" namespace storm { namespace jani { class Model; } namespace api { void exportJaniModelAsDot(storm::jani::Model const& model, std::string const& filename); template void exportSparseModelAsDrn(std::shared_ptr> const& model, std::string const& filename, std::vector const& parameterNames = {}) { std::ofstream stream; storm::utility::openFile(filename, stream); storm::exporter::explicitExportSparseModel(stream, model, parameterNames); storm::utility::closeFile(stream); } template void exportSparseModelAsDrdd(std::shared_ptr> const& model, std::string const& filename) { storm::exporter::explicitExportSymbolicModel(filename, model); } template void exportSparseModelAsDot(std::shared_ptr> const& model, std::string const& filename, size_t maxWidth = 30) { std::ofstream stream; storm::utility::openFile(filename, stream); model->writeDotToStream(stream, maxWidth); storm::utility::closeFile(stream); } template void exportSymbolicModelAsDot(std::shared_ptr> const& model, std::string const& filename) { model->writeDotToFile(filename); } template void exportScheduler(std::shared_ptr> const& model, storm::storage::Scheduler const& scheduler, std::string const& filename) { std::ofstream stream; storm::utility::openFile(filename, stream); scheduler.printToStream(stream, model); storm::utility::closeFile(stream); } } }