Copra
Copra is the fixed part of the CoCoNut framework and depends on the generated code. It provides functions to interact with the CoCoNut runtime.
phase_driver.h
Enums
Functions
-
void CCNrun(node_st *node)
-
void CCNcycleNotify()
Notify CoCoNut that a fixed point is not reached in current cycle.
-
size_t CCNgetCurrentActionId()
-
void CCNerrorPhase()
Signal an phase error. As a result, CoCoNut will call CTIabortCompilation at the end of the phase this error was signalled in.
-
void CCNerrorAction()
Signal an action error. CoCoNut will call CTIabortCompilation after the action this error was signalled in.
-
void CCNsetBreakpoint(char *breakpoint)
Set a breakpoint at which CoCoNut will stop and call the handler: BreakpointHandler.
- Parameters:
breakpoint – The breakpoint in format: <phase>.<phase>.<action>
-
void CCNsetBreakpointWithID(size_t id)
-
void CCNsetCycles(size_t cycle_count)
Set the maximum number of cycles for a cycle. Can be changed at runtime.
- Parameters:
cycle_count – the maximum number of cycles.
-
void CCNsetVerbosity(enum pd_verbosity type)
Set the verbosity level of CoCoNut.
- Parameters:
type – the type of verbosity.
-
void CCNsetTreeCheck(bool enable)
Enable or disable consistency checking your tree.
- Parameters:
enable – when true, consistency checking is performed.
-
void CCNshowTree()
Gives a structured representation of your compiler structure.
dynamic_core.h
Functions
-
struct ccn_node *TRAVerror(struct ccn_node *arg_node)
-
struct ccn_node *PASSerror(struct ccn_node *arg_node)
-
struct ccn_node *TRAVopt(struct ccn_node *arg_node)
Optional traverse function. Adds a null check to signify optional child nodes
-
struct ccn_node *TRAVstart(struct ccn_node *syntaxtree, enum ccn_traversal_type trav_type)
-
struct ccn_node *PASSstart(struct ccn_node *syntaxtree, enum ccn_pass_type trav_type)
-
struct ccn_node *TRAVdo(struct ccn_node *arg_node)
Traverse the supplied node. This function requires that arg_node != NULL
-
void TRAVpush(enum ccn_traversal_type trav_type)
-
void TRAVpop()
-
struct ccn_node *TRAVchildren(struct ccn_node *arg_node)
Helper function that traverses all children in a node. This function assigns the result of the traversals to it respective child. The order is determined by the order in the specification file.
-
struct ccn_node *TRAVnop(struct ccn_node *arg_node)
-
void TRAVdataNOP(ccn_trav_st*)
-
ccn_trav_st *TRAVgetCurrent(void)
-
struct ccn_node *CCNcopy(struct ccn_node *arg_node)
Makes a deep copy of the given node.
-
struct ccn_node *CCNfree(struct ccn_node *arg_node)
Free a node, all its children, and allocated attributes.
-
struct ccn_trav