29 #ifndef __SATAF_INLINE_H__ 
   30 # define __SATAF_INLINE_H__ 
   33 # include <sataf/sataf.h> 
   55   uint32_t alphabet_size;
 
   56   uint32_t nb_local_states;
 
   57   uint32_t nb_exit_states;
 
   59   uint32_t successor[1];
 
   93     sataf_mao_destroy (a);
 
   98 static inline const char *
 
  102   return self->methods->type;
 
  107 static inline uint32_t
 
  115 static inline uint32_t 
 
  118   return 1 + (index << 1);
 
  123 static inline uint32_t
 
  134   return (successor & 0x1) != 0;
 
  147 static inline uint32_t
 
  151   return ea->alphabet_size;
 
  156 static inline uint32_t
 
  160   return ea->nb_local_states;
 
  165 static inline uint32_t
 
  169   return ea->nb_exit_states;
 
  178   return ea->is_final[s];
 
  183 static inline uint32_t
 
  187   ccl_pre (state < ea->nb_local_states);
 
  188   ccl_pre (a < ea->alphabet_size);
 
  190   return ea->successor[ea->alphabet_size * state + a];
 
  215   return ea->nb_local_states == 1 && ea->nb_exit_states == 0;
 
  224   ccl_pre (s < ea->nb_local_states);
 
  226   ea->is_final[s] = is_final?1:0;
 
  251   if (sa->refcount == 0)
 
  252     sataf_sa_destroy (sa);
 
  257 static inline uint32_t
 
  293 static inline uint32_t
 
  322   if (msa->refcount == 0)
 
  323     sataf_msa_destroy (msa);
 
  339 static inline uint32_t
 
static int sataf_sa_is_one(sataf_sa *sa)
Return if sa is the shared automaton accepting any word. 
static uint32_t sataf_ea_get_nb_states(sataf_ea *ea)
Return the number of local states of ea. 
static int sataf_sa_is_zero(sataf_sa *sa)
Return if sa is the shared automaton accepting no word. 
Structure gathering the methods applied to a Marked Automaton Object. 
static uint32_t sataf_sa_get_alphabet_size(sataf_sa *sa)
Return the size of the alphabet. 
struct sataf_ea_st sataf_ea
Type for the data structure encoding Exit Automata. 
static uint32_t sataf_msa_get_alphabet_size(sataf_msa *msa)
Return the size of the alphabet. 
static uint32_t sataf_msa_get_state(sataf_msa *msa)
Return the marked state defining msa. 
static int sataf_msa_is_final(sataf_msa *msa)
Return if msa accepts the empty word. 
static int sataf_ea_is_one(sataf_ea *ea)
Check if ea accepts any word. 
static const char * sataf_mao_get_type(sataf_mao *self)
Return the type of the MAO self. 
static int sataf_ea_is_zero(sataf_ea *ea)
Check if ea accepts nothing. 
static int sataf_msa_is_one(sataf_msa *msa)
Check if msa is the one recognizing everything. 
static sataf_mao * sataf_mao_add_reference(sataf_mao *a)
Increments the number of references to this MAP. 
#define ccl_pre(_cond_)
Checks if the pre-condition cond is satisfied. 
static uint32_t sataf_ea_encode_succ_as_exit_state(uint32_t index)
Encode the successor state index as an exit state. 
static int sataf_ea_is_exit_state(uint32_t successor)
Check if the given successor corresponds to an exit state or not. 
static sataf_msa * sataf_msa_add_reference(sataf_msa *msa)
Increment the counter of references of msa. 
static sataf_msa * sataf_msa_compute(sataf_mao *A)
Minimize, canonicalize and share the given MAO A. 
struct sataf_mao_st sataf_mao
Type of a Marked Automaton Object (MAO). 
static sataf_sa * sataf_msa_get_sa(sataf_msa *msa)
Return the shared automaton defining msa. 
static int sataf_ea_is_final(sataf_ea *ea, uint32_t s)
Return a non null value is the local state s of ea is accepting or not. 
static void sataf_ea_set_final(sataf_ea *ea, uint32_t s, int is_final)
Change the acceptance condition for the state s. 
static int sataf_ea_is_local_state(uint32_t successor)
Check if the given successor corresponds to a local state or not. 
static int sataf_msa_is_zero_or_one(sataf_msa *msa)
Check if msa is one of the two elementary MSAs i.e. either the one recognizing everything or the one ...
sataf_msa * sataf_msa_compute_with_transformer(sataf_mao *A, sataf_sa_transformer *T)
Minimize, canonicalize and share the given MAO A. 
static int sataf_msa_is_zero(sataf_msa *msa)
Check if msa is the one recognizing nothing. 
static uint32_t sataf_ea_get_alphabet_size(sataf_ea *ea)
Return the size of this alphabet used by the exit automaton ea. 
static int sataf_ea_is_zero_or_one(sataf_ea *ea)
Check if ea recognizes anything or nothing. 
static void sataf_sa_del_reference(sataf_sa *sa)
Decrement the number of references to sa. 
static sataf_sa * sataf_sa_add_reference(sataf_sa *sa)
Add one the counter of references to sa. 
static int sataf_sa_is_zero_or_one(sataf_sa *sa)
Check if sa accepts nothing or accepts nothing. 
static uint32_t sataf_ea_encode_succ_as_local_state(uint32_t index)
Encode the successor state index as a local state. 
static void sataf_mao_del_reference(sataf_mao *a)
Decrements the number of references to the given MAO. 
static sataf_sa * sataf_msa_get_sa_no_ref(sataf_msa *msa)
Return the shared automaton defining msa but without incrementing its counter of references. 
static uint32_t sataf_ea_get_successor(sataf_ea *ea, uint32_t state, uint32_t a)
Get the successor of state by the letter a. 
static uint32_t sataf_ea_decode_succ_state(uint32_t index)
Decode the successor state index. 
Macros allowing to set assertions into the code. 
static void sataf_msa_del_reference(sataf_msa *msa)
Decrement the counter of references of msa. 
struct sataf_sa_st sataf_sa
Type for the data structure encoding Shared Automata. 
struct sataf_msa_st sataf_msa
Type for the data structure encoding Marked Shared Automata. 
static uint32_t sataf_ea_get_nb_exits(sataf_ea *ea)
Return the number of exit states of ea.