Go to the documentation of this file.
33 #ifndef TTA_OPERATION_DAG_BUILDER_HH
34 #define TTA_OPERATION_DAG_BUILDER_HH
std::pair< OperationDAGNode *, int > VariableBinding
Node and operand which is referred by a variable.
OperationNode * currentOperation_
Currently created handled operation.
std::map< std::string, VariableBinding > variableBindings_
Node and operand which are referred by IO(x) or declared variable.
const TokenizerData::TokenTreeNode & rootNode_
Root of tokenized data parsed from OSAL DAG source code.
std::map< long, VariableBinding > constantBindings_
Node representing constant value.
std::map< std::string, TerminalBinding > ioVariables_
IO(x) variables and corresponding TerminalNodes and operand indices.
VariableBinding & getConstantBinding(long value)
OperationDAGBuilder(const OperationPimpl &operation, OperationDAG &dag, const TokenizerData::TokenTreeNode &root)
void assignVariable(const TokenizerData::TokenTreeNode *dst, VariableBinding &src)
void connectOperandToNode(const TokenizerData::TokenTreeNode *var, unsigned int operandIndex)
const OperationPimpl & operation_
OperationDAG * dag_
DAG where all nodes and edges are added.
std::string getVariableName(const TokenizerData::TokenTreeNode *var)
void parseNode(const TokenizerData::TokenTreeNode *node)
void createOperationNode(const std::string &operation)
void declareVariable(const TokenizerData::TokenTreeNode *var)
unsigned int getIOOperand(const TokenizerData::TokenTreeNode *var)
std::pair< TerminalNode *, unsigned int > TerminalBinding
Information of object and index of operand of a variable.
VariableBinding & getBinding(const TokenizerData::TokenTreeNode *var)