3#include <boost/algorithm/string.hpp>
22 gspn.writeDotToStream(fs);
48 gspn.writeStatsToStream(out);
54 gspn.writeStatsToStream(fs);
63 auto properties = janiPropertyGetter(
builder);
65 auto deadlockProperties =
builder.getDeadlockProperties(model);
66 properties.insert(properties.end(), deadlockProperties.begin(), deadlockProperties.end());
77 std::unordered_map<std::string, storm::expressions::Expression> identifierMapping;
78 for (
auto const& var :
gspn.getExpressionManager()->getVariables()) {
79 identifierMapping.emplace(var.getName(), var.getExpression());
84 std::unordered_map<std::string, uint64_t> map;
91 std::vector<std::string> strs;
92 boost::split(strs, line, boost::is_any_of(
"\t "));
93 STORM_LOG_THROW(strs.size() == 2, storm::exceptions::WrongFormatException,
"Expect key value pairs.");
95 if (!
gspn.getConstantsSubstitution().empty()) {
99 "The capacity expression '" << strs[1] <<
"' still contains undefined constants.");
int_fast64_t evaluateAsInt(Valuation const *valuation=nullptr) const
Evaluates the expression under the valuation of variables given by the valuation and returns the resu...
bool containsVariables() const
Retrieves whether the expression contains a variable.
Expression substitute(std::map< Variable, Expression > const &variableToExpressionMap) const
Substitutes all occurrences of the variables according to the given map.
storm::expressions::Expression parseFromString(std::string const &expressionString, bool ignoreError=false) const
Parses an expression from the given string.
void setIdentifierMapping(qi::symbols< char, storm::expressions::Expression > const *identifiers_)
Sets an identifier mapping that is used to determine valid variables in the expression.
void setAcceptDoubleLiterals(bool flag)
Sets whether double literals are to be accepted or not.
#define STORM_LOG_THROW(cond, exception, message)
void exportGspnToJani(storm::gspn::GSPN const &gspn, std::string const &filename, GspnJaniExportOptions const &options, std::function< std::vector< storm::jani::Property >(storm::builder::JaniGSPNBuilder const &)> const &janiPropertyGetter)
void transformJani(storm::jani::Model &janiModel, std::vector< storm::jani::Property > &properties, storm::converter::JaniConversionOptions const &options, std::shared_ptr< storm::utility::solver::SmtSolverFactory > smtSolverFactory)
void exportJaniToFile(storm::jani::Model const &model, std::vector< storm::jani::Property > const &properties, std::string const &filename, bool compact)
void exportGspnToPnpro(storm::gspn::GSPN const &gspn, std::string const &filename)
void exportGspnToPnml(storm::gspn::GSPN const &gspn, std::string const &filename)
storm::jani::Model * buildJani(storm::gspn::GSPN const &gspn)
Builds JANI model from GSPN.
void exportGspnToJson(storm::gspn::GSPN const &gspn, std::string const &filename)
void exportGspnToDot(storm::gspn::GSPN const &gspn, std::string const &filename)
std::unordered_map< std::string, uint64_t > parseCapacitiesList(std::string const &filename, storm::gspn::GSPN const &gspn)
void exportGspnStatsToFile(storm::gspn::GSPN const &gspn, std::string const &filename)
void printGspnStatsToStream(storm::gspn::GSPN const &gspn, std::ostream &out)
std::basic_istream< CharT, Traits > & getline(std::basic_istream< CharT, Traits > &input, std::basic_string< CharT, Traits, Allocator > &str)
Overloaded getline function which handles different types of newline ( and \r).
void closeFile(std::ofstream &stream)
Close the given file after writing.
void openFile(std::string const &filepath, std::ofstream &filestream, bool append=false, bool silent=false)
Open the given file for writing.
Options for exporting a GSPN as a JANI model.
storm::converter::JaniConversionOptions janiConversionOptions
std::shared_ptr< storm::utility::solver::SmtSolverFactory > smtSolverFactory
bool addDeadlockProperties