TaPAS  0.2
Data Fields
sataf_mao_methods_st Struct Reference

Structure gathering the methods applied to a Marked Automaton Object. More...

#include <sataf.h>

Data Fields

const char * type
 A constant string of characters indicating the type of the MAO. More...
 
size_t(* size )(sataf_mao *self)
 Returnsthe actual size of the object self. More...
 
void(* destroy )(sataf_mao *self)
 Free ressources allocated to this MAO. More...
 
int(* no_cache )(sataf_mao *self)
 Caching this MAO is not relevant. More...
 
void(* is_root_of_scc )(sataf_mao *self, sataf_sa *sa, int q0)
 Notify the MAO that it has been identified as the root of a SCC. More...
 
sataf_msa *(* simplify )(sataf_mao *self)
 Direct computation of the equivalent MSA. More...
 
uint32_t(* get_alphabet_size )(sataf_mao *self)
 Size of the reference alphabet. More...
 
char *(* to_string )(sataf_mao *self)
 Human readable version of self. More...
 
sataf_mao *(* succ )(sataf_mao *self, uint32_t a)
 Compute the successor MAO of self by the letter a. More...
 
int(* is_final )(sataf_mao *self)
 Indicates if self is accepting. More...
 
int(* equals )(sataf_mao *self, sataf_mao *other)
 Check if two instance are equal. More...
 
unsigned int(* hashcode )(sataf_mao *self)
 Hashcode for the MAO self. More...
 
void(* to_dot )(ccl_log_type log, sataf_mao *self, const char **alphabet, const char *graph_name, const char *graph_type)
 Display the automaton in DOT file format. More...
 

Detailed Description

Structure gathering the methods applied to a Marked Automaton Object.

Definition at line 109 of file sataf.h.

Field Documentation

void(* sataf_mao_methods_st::destroy)(sataf_mao *self)

Free ressources allocated to this MAO.

If this method is implemented it is called when the reference counter of self falls to zero.

Precondition
self != NULL
See Also
sataf_mao_del_reference

Definition at line 136 of file sataf.h.

int(* sataf_mao_methods_st::equals)(sataf_mao *self, sataf_mao *other)

Check if two instance are equal.

This function returns a non-null value iff the language recognized from self and the one recognized from other are equal.

Remarks
This method MUST be implemented.
Precondition
self != NULL && other != NULL
self->type == other->type
sataf_mao_get_alphabet_size (self) == sataf_mao_get_alphabet_size (other)

Definition at line 227 of file sataf.h.

uint32_t(* sataf_mao_methods_st::get_alphabet_size)(sataf_mao *self)

Size of the reference alphabet.

This method is called to get the number of letters of the alphabet used by self.

Remarks
This function MUST be implemented.
Precondition
self != NULL
Postcondition
result > 0

Definition at line 180 of file sataf.h.

unsigned int(* sataf_mao_methods_st::hashcode)(sataf_mao *self)

Hashcode for the MAO self.

Precondition
self != NULL

Definition at line 234 of file sataf.h.

int(* sataf_mao_methods_st::is_final)(sataf_mao *self)

Indicates if self is accepting.

This function returns a non-null value iff the state defining self is a final state of the automaton self.

Remarks
This method MUST be implemented.
Precondition
self != NULL

Definition at line 213 of file sataf.h.

void(* sataf_mao_methods_st::is_root_of_scc)(sataf_mao *self, sataf_sa *sa, int q0)

Notify the MAO that it has been identified as the root of a SCC.

This method indicates to the implementation of the MAO that the sharing algorithm has identified this node to be the root of some SCC i.e. a shared automaton.

Precondition
self != NULL
sa != NULL

Definition at line 158 of file sataf.h.

int(* sataf_mao_methods_st::no_cache)(sataf_mao *self)

Caching this MAO is not relevant.

This method indicates to the sharing algorithm that it does not have to put self in its computation cache. If this method is not implemented all instances of this MAO class are cached.

Precondition
self != NULL

Definition at line 146 of file sataf.h.

sataf_msa*(* sataf_mao_methods_st::simplify)(sataf_mao *self)

Direct computation of the equivalent MSA.

This function is used by the sharing algorithm to check if it is possible to obtain directly the MSA equivalent to self without using the canonicalization algorithm. This is particularly useful when self is known to be equal to the empty or full set.

Precondition
self != NULL

Definition at line 169 of file sataf.h.

size_t(* sataf_mao_methods_st::size)(sataf_mao *self)

Returnsthe actual size of the object self.

This method is used to store MAOs by pages (see ccl-pool.h).

Precondition
self != NULL

Definition at line 126 of file sataf.h.

sataf_mao*(* sataf_mao_methods_st::succ)(sataf_mao *self, uint32_t a)

Compute the successor MAO of self by the letter a.

This function returns the MAO corresponding to the underlying automaton of self but marked by the successor by a of the state marking self.

Remarks
  • This method MUST be implemented.
  • This method MUST verify the following constraint: sataf_mao_equals (sataf_mao_succ (self, a), sataf_mao_succ (self, a))
Precondition
self != NULL
letter <= sataf_mao_get_alphabet_size(self)

Definition at line 202 of file sataf.h.

void(* sataf_mao_methods_st::to_dot)(ccl_log_type log, sataf_mao *self, const char **alphabet, const char *graph_name, const char *graph_type)

Display the automaton in DOT file format.

Precondition
self != NULL

Definition at line 241 of file sataf.h.

char*(* sataf_mao_methods_st::to_string)(sataf_mao *self)

Human readable version of self.

This function is used when self is displayed to a user.

Precondition
self != NULL

Definition at line 188 of file sataf.h.

const char* sataf_mao_methods_st::type

A constant string of characters indicating the type of the MAO.

This field is used, in particular, to check if two MAOs are equal.

See Also
sataf_mao_equals

Definition at line 118 of file sataf.h.


The documentation for this struct was generated from the following file: