Awali
Another Weighted Automata library
Namespaces | Data Structures | Typedefs | Enumerations | Functions
awali Namespace Reference

Main namespace of Awali. More...

Namespaces

 deprecated
 Namespace that contains deprecated functions accessible for compatibility with earlier versions.
 
 docstring
 
 dyn
 Namespace for the dynamical layer of Awali.
 
 internal
 Namespace containing implementation details of elements common to sttc and dyn layers (not stable).
 
 json
 
 json_ast
 
 priority
 Namespace that contains helper class and function to allow one algorithm to be choosen at compile time depending on context, among a sorted list of possibly available functions.
 
 py
 Namespace containing the C++ that simplify type for easier to Python.
 
 sttc
 Namespace for the static layer of Awali.
 
 utils
 
 version
 

Data Structures

class  linked_map_t
 Implemention of a linked hash-map. More...
 
struct  no_such_file_exception
 
struct  parse_exception
 Exceptions thrown during parsing. More...
 
class  pointed_equal_t
 This class takes a type E that computes equality for type K and allows to compute equality for type K const* by calling deferencing both values and calling E on them. More...
 
class  pointed_hash_t
 This class takes a hasher for type K and makes a hasher for type K const* that hash the pointed value and not the pointer. More...
 
class  q_fraction_t
 

Typedefs

template<typename T >
using is_iterable = decltype(internal::is_iterable_aux1< T >(priority::value))
 Trait to test whether type T can be iterated over. More...
 
template<typename T , typename X >
using is_iterable_with = decltype(internal::is_iterable_aux2< T, X >(priority::value))
 Trait to test whether type T can be iterated over and assign its values to type X. More...
 
using json_ast_t = std::shared_ptr< json::object_t >
 
using state_t = unsigned
 
using transition_t = unsigned
 

Enumerations

enum  direction_t { FORWARD , BACKWARD }
 Used in some algorithms in which one may considers transitions forward or backwards. More...
 
enum  exp_to_aut_algo_t {
  GLUSHKOV , STANDARD =GLUSHKOV , DERIVED_TERM , BREAKING_DERIVED_TERM ,
  BREAKING = BREAKING_DERIVED_TERM , THOMPSON , COMPACT_THOMPSON , WEIGHTED_THOMPSON ,
  NET =WEIGHTED_THOMPSON , STANDARD_AND_QUOTIENT
}
 The different algorithms for transforming an expression into an automaton. More...
 
enum class  history_kind_t {
  SINGLE , TUPLE , RATEXP , STRING ,
  NO_HISTORY , PARTITION
}
 The different kinds of history. More...
 
enum  io_format_t {
  FSM_JSON_V1 = 0x101 , JSON = FSM_JSON_V1 , TEXT = 1 , FADO ,
  GRAIL , DOT , PDF , SVG ,
  FSM_JSON_V0
}
 The different format for input/output of automata and expressions. More...
 
enum  layout_t { VERTICAL , HORIZONTAL , CIRCULAR }
 The different layout that we may pass to program dot to compute geometry of automata. More...
 
enum  minim_algo_t { DETERMINIZE_QUOTIENT , BRZOZOWSKI }
 The different algorithms for computing the minimal automaton. More...
 
enum  quotient_algo_t { MOORE , HOPCROFT }
 The different algorithms for computing the minimal quotient. More...
 
enum  star_status_t { STARRABLE , NON_STARRABLE , TOPS , ABSVAL }
 The different behaviours a weightset may have with respect to the star. More...
 
enum  state_elim_order_t { MIN_INOUT_DEGREE , MIN_ID , ID_ORDER =MIN_ID }
 The different strategies for choosing which state to eliminate first when transforming an automaton into an expression. More...
 

Functions

template<bool... B>
constexpr bool all_ ()
 
template<bool... B>
constexpr bool any_ ()
 Static evaluation of the 'or' of the template parameters. More...
 
std::string default_extension_of (io_format_t val)
 Return the default extension of a file written in given format. More...
 
bool is_json_like (io_format_t format)
 
bool is_true_json (io_format_t format)
 
direction_t make_direction (std::string const &name)
 Builds a direction_t from a string describing its name. More...
 
exp_to_aut_algo_t make_exp_to_aut_algo (std::string const &name)
 Builds a exp_to_aut_algo_t from a string describing its name. More...
 
io_format_t make_io_format (std::string const &name)
 Builds a io_format_t from a string describing its name. More...
 
layout_t make_layout (std::string const &name)
 Builds a layout_t from a string describing its name. More...
 
quotient_algo_t make_quotient_algo (std::string const &name)
 Builds a quotient_algo_t from a string describing its name. More...
 
state_elim_order_t make_state_elim_order_t (std::string const &name)
 Builds a state_elim_order_t from a string describing its name. More...
 
std::string name_of (direction_t val)
 Return the canonical string reprensation of given direction_t. More...
 
std::string name_of (exp_to_aut_algo_t val)
 Return the canonical string reprensation of given exp_to_aut_algo_t. More...
 
std::string name_of (io_format_t val)
 Return the canonical string reprensation of given io_format_t. More...
 
std::string name_of (layout_t val)
 Return the canonical string reprensation of given layout_t. More...
 
std::string name_of (quotient_algo_t val)
 Return the canonical string reprensation of given quotient_algo_t. More...
 
std::string name_of (state_elim_order_t val)
 Return the canonical string reprensation of given state_elim_order_t. More...
 
std::ostream & operator<< (std::ostream &o, const q_fraction_t &v)
 
std::ostream & put (json_ast_t tree, std::ostream &out)
 
int strict_atoi (const std::string &s)
 
unsigned strict_atou (const std::string &s)
 

Detailed Description

Main namespace of Awali.

Typedef Documentation

◆ is_iterable

template<typename T >
using awali::is_iterable = typedef decltype(internal::is_iterable_aux1<T>(priority::value))

Trait to test whether type T can be iterated over.

◆ is_iterable_with

template<typename T , typename X >
using awali::is_iterable_with = typedef decltype(internal::is_iterable_aux2<T,X>(priority::value))

Trait to test whether type T can be iterated over and assign its values to type X.

This simply does not work...

◆ json_ast_t

using awali::json_ast_t = typedef std::shared_ptr<json::object_t>

◆ state_t

using awali::state_t = typedef unsigned

◆ transition_t

using awali::transition_t = typedef unsigned

Function Documentation

◆ all_()

template<bool... B>
constexpr bool awali::all_ ( )
constexpr

◆ any_()

template<bool... B>
constexpr bool awali::any_ ( )
constexpr

Static evaluation of the 'or' of the template parameters.

◆ default_extension_of()

std::string awali::default_extension_of ( io_format_t  val)

Return the default extension of a file written in given format.

◆ make_direction()

direction_t awali::make_direction ( std::string const &  name)

Builds a direction_t from a string describing its name.

Parameters
nameString-representation of the enum value to return; case-insensitive; char ‘’-'or'_'` can be used indifferently.
Exceptions
std::domain_errorif name does not represent any value of direction_t

◆ make_exp_to_aut_algo()

exp_to_aut_algo_t awali::make_exp_to_aut_algo ( std::string const &  name)

Builds a exp_to_aut_algo_t from a string describing its name.

Parameters
nameString-representation of the enum value to return; case-insensitive; char ‘’-'or'_'` can be used indifferently.
Exceptions
std::domain_errorif name does not represent any value of exp_to_aut_algo_t

◆ make_io_format()

io_format_t awali::make_io_format ( std::string const &  name)

Builds a io_format_t from a string describing its name.

Parameters
nameString-representation of the enum value to return; case-insensitive; char ‘’-'or'_'` can be used indifferently.
Exceptions
std::domain_errorif name does not represent any value of io_format_t

◆ make_layout()

layout_t awali::make_layout ( std::string const &  name)

Builds a layout_t from a string describing its name.

Parameters
nameString-representation of the enum value to return; case-insensitive; char ‘’-'or'_'` can be used indifferently.
Exceptions
std::domain_errorif name does not represent any value of layout_t

◆ make_quotient_algo()

quotient_algo_t awali::make_quotient_algo ( std::string const &  name)

Builds a quotient_algo_t from a string describing its name.

Parameters
nameString-representation of the enum value to return; case-insensitive; char ‘’-'or'_'` can be used indifferently.
Exceptions
std::domain_errorif name does not represent any value of quotient_algo_t

◆ make_state_elim_order_t()

state_elim_order_t awali::make_state_elim_order_t ( std::string const &  name)

Builds a state_elim_order_t from a string describing its name.

Parameters
nameString-representation of the enum value to return; case-insensitive; char ‘’-'or'_'` can be used indifferently.
Exceptions
std::domain_errorif name does not represent any value of state_elim_order_t

◆ name_of() [1/6]

std::string awali::name_of ( direction_t  val)

Return the canonical string reprensation of given direction_t.

◆ name_of() [2/6]

std::string awali::name_of ( exp_to_aut_algo_t  val)

Return the canonical string reprensation of given exp_to_aut_algo_t.

◆ name_of() [3/6]

std::string awali::name_of ( io_format_t  val)

Return the canonical string reprensation of given io_format_t.

◆ name_of() [4/6]

std::string awali::name_of ( layout_t  val)

Return the canonical string reprensation of given layout_t.

◆ name_of() [5/6]

std::string awali::name_of ( quotient_algo_t  val)

Return the canonical string reprensation of given quotient_algo_t.

◆ name_of() [6/6]

std::string awali::name_of ( state_elim_order_t  val)

Return the canonical string reprensation of given state_elim_order_t.

◆ operator<<()

std::ostream& awali::operator<< ( std::ostream &  o,
const q_fraction_t v 
)

◆ put()

std::ostream& awali::put ( json_ast_t  tree,
std::ostream &  out 
)

◆ strict_atoi()

int awali::strict_atoi ( const std::string &  s)

◆ strict_atou()

unsigned awali::strict_atou ( const std::string &  s)