13#include <boost/algorithm/string.hpp>
20 std::map<storm::expressions::Variable, storm::expressions::Expression>
const& constantDefinitions) {
32 std::vector<std::reference_wrapper<storm::prism::Constant const>> undefinedConstants = program.
getUndefinedConstants();
33 std::stringstream stream;
34 bool printComma =
false;
35 for (
auto const& constant : undefinedConstants) {
41 stream << constant.get().getName() <<
" (" << constant.get().getType() <<
")";
44 STORM_LOG_THROW(
false, storm::exceptions::InvalidArgumentException,
"Program still contains these undefined constants: " + stream.str());
Program defineUndefinedConstants(std::map< storm::expressions::Variable, storm::expressions::Expression > const &constantDefinitions) const
Defines the undefined constants according to the given map and returns the resulting program.
std::vector< std::reference_wrapper< Constant const > > getUndefinedConstants() const
Retrieves the undefined constants in the program.
Program substituteConstantsFormulas(bool substituteConstants=true, bool substituteFormulas=true) const
Substitutes all constants and/or formulas appearing in the expressions of the program by their defini...
storm::expressions::ExpressionManager & getManager() const
Retrieves the manager responsible for the expressions of this program.
bool hasUndefinedConstants() const
Retrieves whether there are undefined constants of any type in the program.
#define STORM_LOG_THROW(cond, exception, message)
std::map< storm::expressions::Variable, storm::expressions::Expression > parseConstantDefinitionString(storm::expressions::ExpressionManager const &manager, std::string const &constantDefinitionString)
storm::prism::Program preprocess(storm::prism::Program const &program, std::map< storm::expressions::Variable, storm::expressions::Expression > const &constantDefinitions)
void requireNoUndefinedConstants(storm::prism::Program const &program)