void
Trace_append_from_list_input_state(
Trace_ptr self,
node_ptr path
)
- All the BDDs inside the list /"path/" are referenced. So that
caller of this function can safely destroy the list. The first element of
the list is supposed to be the initial state, and will be skipped since
it is supposed to be already set in the Trace
void
Trace_append_from_list_state(
Trace_ptr self,
node_ptr path
)
- All the BDDs inside the list /"path/" are referenced. So that
caller of this function can safely destroy the list. The first element of
the list is supposed to be the initial state, and will be skipped since
it is supposed to be already set in the Trace
void
Trace_append(
Trace_ptr self,
BddInputs inp_i,
BddStates state_i
)
- This function takes next input "inp_i" and the next state
"state_i" and appends it to the "self". The BDDs state_i and inp_i would be
referenced.
TraceIterator_ptr
Trace_begin(
const Trace_ptr self
)
- Returns an iterator to iterate the "self".
Trace_ptr
Trace_copy_prefix_until_iterator(
const Trace_ptr self,
const TraceIterator_ptr until_here
)
- Copies "self" to "other".
Trace_ptr
Trace_copy(
const Trace_ptr self
)
- Copy constructor.
Trace_ptr
Trace_create_from_state_input_list(
BddEnc_ptr enc,
const char* desc,
const TraceType type,
node_ptr path
)
- Trace constructor. It takes a list of states and construct a
trace out of it. path is a sequence of "states (inputs states)*"
Trace_ptr
Trace_create_from_state_list(
BddEnc_ptr enc,
const char* desc,
const TraceType type,
node_ptr path
)
- Trace constructor. It takes a list of states and construct a
trace out of it (all the inputs are bdd_one)
Trace_ptr
Trace_create(
BddEnc_ptr enc,
const char* desc,
const TraceType type,
BddStates start_state
)
- Allocates and initializes a trace. As arguments this function
takes pointer to the DdManager "dd", description of the trace "desc",
type of the Trace "type" and initial state of the trace "start_state". It
returns a pointer to the allocated Trace object.
/"start state/" bdd is referenced by this function.
- See Also
Trace_destroy
void
Trace_destroy(
Trace_ptr self
)
- This function destroys the trace and all the trace node
instances inside it. In order to destroy a trace directly, it should not be
registered with TraceManager because in that case it's ownership is with
TraceManager and only that can destroy it.
- See Also
Trace_create
array_t*
Trace_get_all_loopbacks(
const Trace_ptr self
)
- This function returns an array of TraceNodes containing pointers
to the TraceNodes which have same state as the last one.
const char*
Trace_get_desc(
const Trace_ptr self
)
- Returned string must not be freed.
BddEnc_ptr
Trace_get_enc(
Trace_ptr self
)
- Returns the bdd encoder associated with the trace.
int
Trace_get_id(
const Trace_ptr self
)
- This ID correspond to the index of the trace inside the trace
manager. If the trace is not registeres with the trace manager, this ID would
be TRACE_UNREGISTERED.
TraceIterator_ptr
Trace_get_iterator(
const Trace_ptr self,
const TraceNode_ptr node
)
- Returns an iterator pointing to the given trace-node of the
"self".
TraceNode_ptr
Trace_get_ith_node(
const Trace_ptr self,
int i
)
- The ownership of the returned node is not transfered to the
caller. Caller must not free the returned TraceNode object.
BddStates
Trace_get_ith_state(
const Trace_ptr self,
int i
)
- returned BDD is referenced. Please note that initial state is 0th
state.
TraceNode_ptr
Trace_get_last_node(
const Trace_ptr self
)
- The ownership of the returned object is not transfered to the
caller of this function. It means that caller of this function must not free
the returned traceNode.
int
Trace_get_length(
const Trace_ptr self
)
- Returns the length of the trace.
TraceNode_ptr
Trace_get_loopback(
const Trace_ptr self
)
- It returns a pointer to the first trace node having same state
as the last one. It returns NULL otherwise. The ownership of the returned
traceNode object is not transferred to the caller. Caller must not free the
returned object.
TraceNode_ptr
Trace_get_node(
const Trace_ptr self,
const TraceIterator_ptr iter
)
- The ownership of the returned node is not transfered to the
caller. Caller must not free the returned TraceNode object.
TraceType
Trace_get_type(
const Trace_ptr self
)
- Returns the type of the trace.
boolean
Trace_is_equal(
const Trace_ptr self,
const Trace_ptr other
)
- Returns true if they are equal, false otherwise.
boolean
Trace_is_registered(
const Trace_ptr self
)
- Checks whether trace is registered with the trace manager.
boolean
Trace_is_valid(
Trace_ptr self
)
- This function checks the validity of a trace by checking if the
starting state of the trace is initial state and consecutive states are
related by transition relation.
void
Trace_set_ID(
Trace_ptr self,
int ID
)
- TraceManager uses this function to assign a unique identifier ID
to each registered trace. ONLY TraceManager and Trace should use this
function.
void
Trace_set_desc(
Trace_ptr self,
const char* desc
)
- It allocates the memory for the description string. So the
ownership of the passed desc string remains with the caller.
void
Trace_set_start_state(
Trace_ptr self,
BddStates s
)
- Sets the start state of the Trace.
void
Trace_set_type(
Trace_ptr self,
const TraceType type
)
- Set the type of the trace.
void
Trace_unregister(
Trace_ptr self
)
- Only TraceManager should access this function. This function
resets the Trace ID to TRACE_UNREGISTERED (-1).
TraceNode_ptr
trace_node_get_next(
const TraceNode_ptr self
)
- returns the value of the next pointer.
TraceNode_ptr
trace_node_get_prev(
const TraceNode_ptr self
)
- returns the value of the prev pointer.
boolean
trace_node_is_first(
const TraceNode_ptr self
)
- Checks whether it is the first node.
boolean
trace_node_is_last(
const TraceNode_ptr self
)
- Checks whether it is the last node.
void
trace_node_set_next(
TraceNode_ptr self,
TraceNode_ptr next
)
- Sets the value of the next pointer to "next".
void
trace_node_set_prev(
TraceNode_ptr self,
TraceNode_ptr prev
)
- Sets the value of the prev pointer to "prev"