12 : name(name), type(type), parameters(parameters), functionBody(functionBody) {
34 STORM_LOG_THROW(arguments.size() == parameters.size(), storm::exceptions::InvalidArgumentException,
35 "The number of arguments does not match the number of parameters.");
36 const bool substituteTranscendentalNumbers =
true;
37 std::unordered_map<storm::expressions::Variable, storm::expressions::Expression> parameterSubstitution;
38 for (uint64_t i = 0; i < arguments.size(); ++i) {
39 parameterSubstitution.emplace(parameters[i], arguments[i]);
45 bool const substituteTranscendentalNumbers) {
storm::expressions::Expression const & getFunctionBody() const
Retrieves the expression that defines the function.
void substitute(std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution, bool const substituteTranscendentalNumbers)
storm::expressions::Expression call(std::vector< std::shared_ptr< storm::expressions::BaseExpression const > > const &arguments) const
Calls the function with the given arguments.
std::string const & getName() const
Retrieves the name of the function.
std::vector< storm::expressions::Variable > const & getParameters() const
Retrieves the parameters of the function.
FunctionDefinition(std::string const &name, storm::expressions::Type const &type, std::vector< storm::expressions::Variable > const ¶meters, storm::expressions::Expression const &functionBody)
Creates a functionDefinition.
storm::expressions::Type const & getType() const
Retrieves the type of the function.
void setFunctionBody(storm::expressions::Expression const &body)
sets the expression that defines the function
#define STORM_LOG_THROW(cond, exception, message)
storm::expressions::Expression substituteJaniExpression(storm::expressions::Expression const &expression, std::map< storm::expressions::Variable, storm::expressions::Expression > const &identifierToExpressionMap, bool const substituteTranscendentalNumbers)