Awali
Another Weighted Automata library
Functions
awali::dyn::lift Namespace Reference

Namespace containing the functions allowing to execute the state elimination algorithm (aut_to_exp) step-by-step; probably will be moved elsewhere in the future. More...

Functions

void eliminate_state (automaton_t aut, state_t s)
 Deletes a state from a lifted automaton. More...
 
void eliminate_state_by_name (automaton_t aut, std::string state_name)
 Deletes a state from a lifted automaton. More...
 
automaton_t lift (automaton_t aut)
 Builds some kind of copy of aut with weights that are rational expressions with the context of aut, and with no labels. More...
 

Detailed Description

Namespace containing the functions allowing to execute the state elimination algorithm (aut_to_exp) step-by-step; probably will be moved elsewhere in the future.

Function Documentation

◆ eliminate_state()

void awali::dyn::lift::eliminate_state ( automaton_t  aut,
state_t  s 
)

Deletes a state from a lifted automaton.

Parameters
autLifted automaton in which the state will be deleted
sstate to delete
Precondition
aut needs to accept rational expressions as labels; hence must result from function lift.

◆ eliminate_state_by_name()

void awali::dyn::lift::eliminate_state_by_name ( automaton_t  aut,
std::string  state_name 
)

Deletes a state from a lifted automaton.

Parameters
autLifted automaton in which the state will be deleted
state_nameName of the state to delete
Precondition
aut needs to accept rational expressions as labels; hence must result from function lift.

◆ lift()

automaton_t awali::dyn::lift::lift ( automaton_t  aut)

Builds some kind of copy of aut with weights that are rational expressions with the context of aut, and with no labels.

The result is a normalized automaton: there are two extra states, a single initial state and a final extra state.

This is the first step in order to execute a step-by-step state elimination process. (See eliminate_state).

Parameters
aut
Returns
a new automaton

Example

automaton_t aut = .. // some boolean automaton over alphabet {a,b}
automaton_t lifted = lift(aut); // lifted is an automaton whose weights
// are boolean ratexp over {a,b}
state_t s = lifted->add_state();
lifted->set_transition(s,s,"","(a+b)*");
automaton_t lift(automaton_t aut)
Builds some kind of copy of aut with weights that are rational expressions with the context of aut,...
unsigned state_t
Type representing automata states; currently simply identifiers of type unsigned, but this might chan...
Definition: typedefs.hh:28