3#include <boost/lexical_cast.hpp>
4#include <nlohmann/json.hpp>
11using json = nlohmann::json;
44 std::unique_ptr<data_flow::DataFlowGraph> dataflow_;
112 std::unique_ptr<types::IType> type_;
120 const std::string&
data,
133 const std::string&
data()
const;
Element(size_t element_id, const DebugInfo &debug_info)
size_t element_id() const
const DebugInfo & debug_info() const
virtual ElementType type_id() const =0
Returns the type of the element.
Definition sdfg_builder.h:13
const types::IType & type() const
Returns the type of the constant being returned.
void replace(const symbolic::Expression old_expression, const symbolic::Expression new_expression) override
Replaces symbolic expressions in the return state.
bool is_data() const
Checks if this return state returns a data container.
bool is_constant() const
Checks if this return state returns a constant value.
ReturnState(const ReturnState &state)=delete
ReturnState & operator=(const ReturnState &)=delete
void validate(const Function &function) const override
Validates the return state within the context of a function.
const std::string & data() const
Returns the data or constant value being returned.
ElementType type_id() const override
Returns the type of the element.
Definition state.h:54
void validate(const Function &function) const override
Validates the state within the context of a function.
State & operator=(const State &)=delete
State(size_t element_id, const DebugInfo &debug_info, const graph::Vertex vertex)
const data_flow::DataFlowGraph & dataflow() const
Returns the data-flow graph of this state (const version).
graph::Vertex vertex() const
Returns the graph vertex representing this state.
void replace(const symbolic::Expression old_expression, const symbolic::Expression new_expression) override
Replaces symbolic expressions in the state's data-flow graph.
data_flow::DataFlowGraph & dataflow()
Returns the data-flow graph of this state (mutable version).
static bool classof(const Element &element)
Definition state.h:58
State(const State &state)=delete
Definition data_flow_graph.h:29
Abstract base interface for all types in the sdfglib type system.
Definition type.h:625
SymEngine::RCP< const SymEngine::Basic > Expression
Reference-counted pointer to a symbolic expression (SymEngine Basic).
Definition symbolic.h:83
nlohmann::json json
Definition interstate_edge.h:14
Definition function_builder.h:10
Definition interstate_edge.h:22
boost::graph_traits< Graph >::vertex_descriptor Vertex
Definition graph.h:25
ElementType
Definition element.h:72
@ State
Definition element.h:73