Awali
Another Weighted Automata library
Functions
Products

This group contains the functions that take two (or more) automata/transducers as input. More...

Functions

automaton_t awali::dyn::concatenate (automaton_t aut1, automaton_t aut2, options_t opts={})
 
automaton_t awali::dyn::eval_tdc (automaton_t aut, transducer_t tdc)
 
automaton_t awali::dyn::infiltration (automaton_t aut1, automaton_t aut2, options_t opts={})
 
automaton_t awali::dyn::power (automaton_t aut, unsigned int n)
 
automaton_t awali::dyn::product (automaton_t aut1, automaton_t aut2, options_t opts={})
 
automaton_t awali::dyn::shuffle (automaton_t aut1, automaton_t aut2, options_t opts={})
 
automaton_t awali::dyn::sum (automaton_t aut1, automaton_t aut2, options_t opts={})
 

Detailed Description

This group contains the functions that take two (or more) automata/transducers as input.

Function Documentation

◆ concatenate()

automaton_t awali::dyn::concatenate ( automaton_t  aut1,
automaton_t  aut2,
options_t  opts = {} 
)

Concatenates aut2 to aut1 or computes a new standard automaton

Parameters
aut1Left operand of the concatenation.
aut2Right operand of the concatenation.
optsA set of option. Only IN_PLACE is meaningful.
Returns
a new automaton, or aut1 if IN_PLACE was set to true.
Precondition
Automata aut1 and aut2 must have the same weightset and labelset, and both be standard.

◆ eval_tdc()

automaton_t awali::dyn::eval_tdc ( automaton_t  aut,
transducer_t  tdc 
)

◆ infiltration()

automaton_t awali::dyn::infiltration ( automaton_t  aut1,
automaton_t  aut2,
options_t  opts = {} 
)

Computes the infiltration product of aut1 and aut2.

Notes: A word u belongs to the infiltration of two languages L,K if u may be factorised as u = u0.v0.w0.u1.v1.w1...un.vn.wn such that u0.v0.u1.v1...un.vn belongs to L and u0.w0.u1.w1...un.wn belongs to K.

Parameters
aut1
aut2
optsA set of options. Only KEEP_HISTORY is meaningful.
Returns
A new automaton.

◆ power()

automaton_t awali::dyn::power ( automaton_t  aut,
unsigned int  n 
)

Build the n -th power of aut.

Builds the product aut * aut * ... * aut (n times).

If n is 1, a copy of aut is returned. If n is 0, the automaton returned is such that its product with aut gives aut again.

Parameters
aut
n
Returns
a new automaton
See also
product

◆ product()

automaton_t awali::dyn::product ( automaton_t  aut1,
automaton_t  aut2,
options_t  opts = {} 
)

Computes the classical product of aut1 and aut2.

If aut1 and aut2 are boolean automata, a word is accepted by the returned automaton if it is accepted by both aut1 and aut2.

If aut1 and aut2 are weighted automata, this function computes the Hadamard product of aut1 and aut2. The weight associated with a word w in the returned automaton is the product of the weights associated with w in aut1 and aut2.

Parameters
aut1
aut2
optsA set of options. Meaningful options: KEEP_HISTORY.
Returns
A new automaton
Precondition
aut1 and aut2 must have compatible weightsets.

◆ shuffle()

automaton_t awali::dyn::shuffle ( automaton_t  aut1,
automaton_t  aut2,
options_t  opts = {} 
)

Computes the shuffle product of aut1 and aut2.

Notes: A word u belongs to the shuffle of two languages L, K if u may be factorised as u = v0.w0.v1.w1...vn.wn such that v0.v1...vn belongs to L and w0.w1...wn belongs to K.

Parameters
aut1
aut2
optsA set of options. Meaningful options: KEEP_HISTORY.
Returns
A new automaton.

◆ sum()

automaton_t awali::dyn::sum ( automaton_t  aut1,
automaton_t  aut2,
options_t  opts = {} 
)

Computes the parallele union of aut1 and aut2.

If option IN_PLACE is true in opts, then aut1 is modified and returned; otherwise, a new automaton a returned.

Parameters
aut1
aut2
optsA set of options. Only IN_PLACE is meaningful.
Returns
A new automaton or aut1