Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
FunctionDefinition.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <vector>
5
6#include <boost/optional.hpp>
7
10
11namespace storm {
12namespace jani {
13
15 public:
19 FunctionDefinition(std::string const& name, storm::expressions::Type const& type, std::vector<storm::expressions::Variable> const& parameters,
20 storm::expressions::Expression const& functionBody);
21
25 std::string const& getName() const;
26
30 storm::expressions::Type const& getType() const;
31
35 std::vector<storm::expressions::Variable> const& getParameters() const;
36
41
46
50 storm::expressions::Expression call(std::vector<std::shared_ptr<storm::expressions::BaseExpression const>> const& arguments) const;
51
52 void substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution, bool const substituteTranscendentalNumbers);
53
54 private:
55 // The name of the function.
56 std::string name;
57
58 // The type of the function
60
61 // The parameters
62 std::vector<storm::expressions::Variable> parameters;
63
64 // The body of the function
66};
67
68} // namespace jani
69} // namespace storm
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.
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
LabParser.cpp.
Definition cli.cpp:18