Awali
Another Weighted Automata library
|
Contains all enums describing the different algorithms to execute a transformation, and the option mechanism used at dyn layer. More...
Enumerations | |
enum | awali::direction_t { awali::FORWARD , awali::BACKWARD } |
Used in some algorithms in which one may considers transitions forward or backwards. More... | |
enum | awali::exp_to_aut_algo_t { awali::GLUSHKOV , awali::STANDARD =GLUSHKOV , awali::DERIVED_TERM , awali::BREAKING_DERIVED_TERM , awali::BREAKING = BREAKING_DERIVED_TERM , awali::THOMPSON , awali::COMPACT_THOMPSON , awali::WEIGHTED_THOMPSON , awali::NET =WEIGHTED_THOMPSON , awali::STANDARD_AND_QUOTIENT } |
The different algorithms for transforming an expression into an automaton. More... | |
enum class | awali::history_kind_t { awali::SINGLE , awali::TUPLE , awali::RATEXP , awali::STRING , awali::NO_HISTORY , awali::PARTITION } |
The different kinds of history. More... | |
enum | awali::io_format_t { awali::FSM_JSON_V1 = 0x101 , awali::JSON = FSM_JSON_V1 , awali::TEXT = 1 , awali::FADO , awali::GRAIL , awali::DOT , awali::PDF , awali::SVG , awali::FSM_JSON_V0 } |
The different format for input/output of automata and expressions. More... | |
enum | awali::layout_t { awali::VERTICAL , awali::HORIZONTAL , awali::CIRCULAR } |
The different layout that we may pass to program dot to compute geometry of automata. More... | |
enum | awali::minim_algo_t { awali::DETERMINIZE_QUOTIENT , awali::BRZOZOWSKI } |
The different algorithms for computing the minimal automaton. More... | |
enum | awali::quotient_algo_t { awali::MOORE , awali::HOPCROFT } |
The different algorithms for computing the minimal quotient. More... | |
enum | awali::star_status_t { awali::STARRABLE , awali::NON_STARRABLE , awali::TOPS , awali::ABSVAL } |
The different behaviours a weightset may have with respect to the star. More... | |
enum | awali::state_elim_order_t { awali::MIN_INOUT_DEGREE , awali::MIN_ID , awali::ID_ORDER =MIN_ID } |
The different strategies for choosing which state to eliminate first when transforming an automaton into an expression. More... | |
Functions | |
bool | awali::is_json_like (io_format_t format) |
bool | awali::is_true_json (io_format_t format) |
Variables | |
internal::option_t< bool > | awali::dyn::AUTOPROMOTE |
Option used to specify whether to automatically promote an automaton (or automata) if its context does not allow to perform an operation, but a more general context allows it. More... | |
internal::option_t< direction_t > | awali::dyn::DIRECTION |
Option used when there are "forward" or "backward" strategies. More... | |
internal::option_t< exp_to_aut_algo_t > | awali::dyn::EXP_TO_AUT_ALGO |
Option used when a rational expression is computed from an automaton. More... | |
internal::option_t< bool > | awali::dyn::IN_PLACE |
Option used when an algorithm may be done in place. More... | |
internal::option_t< io_format_t > | awali::dyn::IO_FORMAT |
Option used to specify an input or output format. More... | |
internal::option_t< bool > | awali::dyn::KEEP_HISTORY |
Option used to specify whether to keep the history of states. More... | |
internal::option_t< layout_t > | awali::dyn::LAYOUT |
Option used when displaying an automaton with dot. More... | |
internal::option_t< minim_algo_t > | awali::dyn::MINIM_ALGO |
Option used to specify the algorithm to use for computing minimization. More... | |
internal::option_t< bool > | awali::dyn::PREPOST_PARADIGM |
Option used to specify whether to consider initial/final status of states as normal transitions. More... | |
internal::option_t< bool > | awali::dyn::PRUNE |
Option used when in the process of the algorithm, some elements (e.g. More... | |
internal::option_t< quotient_algo_t > | awali::dyn::QUOTIENT_ALGO |
Option used to specify the algorithm to use for computing quotients. More... | |
internal::option_t< bool > | awali::dyn::SAFE |
Option used when performing some test is costly or impossible. More... | |
internal::option_t< state_elim_order_t > | awali::dyn::STATE_ELIM_ORDER |
Option used to specify the order in which states should be eliminated (typically in functions such as awali::dyn::exp_to_aut). More... | |
Contains all enums describing the different algorithms to execute a transformation, and the option mechanism used at dyn layer.
The options mechanism emulates the named arguments paradigm that is included in more recent languages.
enum awali::direction_t |
The different algorithms for transforming an expression into an automaton.
Enumerator | |
---|---|
GLUSHKOV | This automaton without epsilon-transitions is incrementally built from the expression. It is isomorphic to the Position automaton. It has n+1 states, where n is the litteral length of the expression, i.e. the number of letters. |
STANDARD | Alias to GLUSHKOV. |
DERIVED_TERM | Also known as Partial derived terms. Described by Antomirov for Boolean semrings; extension to weighted automata by Lombardy and Sakarovitch. It is a quotient of the Standard automaton. |
BREAKING_DERIVED_TERM | A variant of the Derived term automaton where left factors of expressions which are sums are "broken". |
BREAKING | Alias to BREAKING_DERIVED_TERM. |
THOMPSON | The classical Thompson automaton, with epsilon-transitions. It has exactly 2n states, where n is the size of the expressions (letters + operators). The maximal out- and in-degree of every state is 2; if it is 2, the labels of transitions are epsilon. It has one and only one initial (resp. final) state with no incoming (resp. outgoing) transition. |
COMPACT_THOMPSON | A variant of the Thompson automaton, with fewer states. |
WEIGHTED_THOMPSON | A variant of the Thompson automaton, with no circuit of epsilon-transitions; in this variant, the initial state may be another final state. |
NET | Alias to NET. |
STANDARD_AND_QUOTIENT | Standard automaton followed by quotient. |
|
strong |
The different kinds of history.
This class represents the different kinds of history a state may have. For instance, if an automaton is the result of a determinisation, then the history of a state is of kind PARTITION.
enum awali::io_format_t |
The different format for input/output of automata and expressions.
enum awali::layout_t |
enum awali::minim_algo_t |
The different algorithms for computing the minimal automaton.
Enumerator | |
---|---|
DETERMINIZE_QUOTIENT | Determinizes, then computes the minimal quotient (see quotient_algo_t). |
BRZOZOWSKI | Transposes, then determinizes, then transposes, then determinizes. |
enum awali::star_status_t |
The different strategies for choosing which state to eliminate first when transforming an automaton into an expression.
Enumerator | |
---|---|
MIN_INOUT_DEGREE | States are eliminated by increasing in-out degree. The in-out degree of a state is the product of the number of incoming transition by the number of outgoing transitions. |
MIN_ID | States are eliminated by increasing id number (that is, in an arbitrary order). |
ID_ORDER | Alias to MIN_ID. |
bool awali::is_json_like | ( | io_format_t | format | ) |
bool awali::is_true_json | ( | io_format_t | format | ) |
|
extern |
Option used to specify whether to automatically promote an automaton (or automata) if its context does not allow to perform an operation, but a more general context allows it.
Used typically in functions such as awali::dyn::product. Defaults to false
.
|
extern |
Option used when there are "forward" or "backward" strategies.
Defaults to BACKWARD.
|
extern |
Option used when a rational expression is computed from an automaton.
Defaults to STANDARD_AND_QUOTIENT.
|
extern |
Option used when an algorithm may be done in place.
If set, the automaton is modified (and returned), if unset, the function copies input automaton before executing the algorithm.
Defaults to false
.
|
extern |
Option used to specify an input or output format.
Defaults to JSON.
|
extern |
Option used to specify whether to keep the history of states.
true
, each state in the resulting automaton is endowed with its history (e.g., with a set of states for determinization).true
, the history will be shown in states (instead of names). Defaults to true.
|
extern |
Option used when displaying an automaton with dot.
Defaults to HORIZONTAL.
|
extern |
Option used to specify the algorithm to use for computing minimization.
Defaults to DETERMINIZE_QUOTIENT; note that it makes QUOTIENT_ALGO meaningful.
|
extern |
Option used to specify whether to consider initial/final status of states as normal transitions.
In this paradigm:
If set to true
, some functions will return these additionals states and transitions. Defaults to false
.
|
extern |
Option used when in the process of the algorithm, some elements (e.g.
states) may be found to be useless. If set to true
, these elements are deleted. ( Setting this to false
is mostly useful for pedagogical purpose.)
Defaults to true
.
|
extern |
Option used to specify the algorithm to use for computing quotients.
Note that it is also used by default when making a minimization.
Defaults to MOORE.
|
extern |
Option used when performing some test is costly or impossible.
If set to false
the program will assume the precondition is satisfied. This may result in inconsistent automata or infinite loops.
Defaults to true
.
|
extern |
Option used to specify the order in which states should be eliminated (typically in functions such as awali::dyn::exp_to_aut).
Defaults to MIN_INOUT_DEGREE.