Inside Vaucanson The Vaucanson group LRDE / EPITA - LIAFA / Paris 7 - - PowerPoint PPT Presentation

inside vaucanson
SMART_READER_LITE
LIVE PREVIEW

Inside Vaucanson The Vaucanson group LRDE / EPITA - LIAFA / Paris 7 - - PowerPoint PPT Presentation

Inside Vaucanson Inside Vaucanson The Vaucanson group LRDE / EPITA - LIAFA / Paris 7 - LTCI / ENST June 27, 2005 The Vaucanson group Inside Vaucanson 1 / 39 Inside Vaucanson Outline 1 Introduction 2 Automata A first example Weighted automata 3


slide-1
SLIDE 1

Inside Vaucanson

Inside Vaucanson

The Vaucanson group

LRDE / EPITA - LIAFA / Paris 7 - LTCI / ENST

June 27, 2005

The Vaucanson group Inside Vaucanson 1 / 39

slide-2
SLIDE 2

Inside Vaucanson Outline

1 Introduction 2 Automata

A first example Weighted automata

3 Algorithms 4 Transducers

Overview Composition

5 Conclusion

The Vaucanson group Inside Vaucanson 2 / 39

slide-3
SLIDE 3

Inside Vaucanson Introduction

Aim of this talk

About the Vaucanson platform: starts to be usable, recently released version 0.7.1, new algorithms have been implemented, new organization of the library.

The Vaucanson group Inside Vaucanson 3 / 39

slide-4
SLIDE 4

Inside Vaucanson Introduction

Overview of Vaucanson features

Vaucanson deals with: automata with any multiplicity (B, Z, R, Q, . . . ), rational expressions (including weighted expressions), transducers. Vaucanson Input / Output: FSM library, XML.

The Vaucanson group Inside Vaucanson 4 / 39

slide-5
SLIDE 5

Inside Vaucanson Introduction

Overview of Vaucanson features

Vaucanson deals with: automata with any multiplicity (B, Z, R, Q, . . . ), rational expressions (including weighted expressions), transducers. Vaucanson Input / Output: FSM library, XML.

The Vaucanson group Inside Vaucanson 4 / 39

slide-6
SLIDE 6

Inside Vaucanson Introduction

Some caracteristic features

Programming concerns: all components are generic, context headers (i.e. predefined types) are introduced. ⇒ Library manipulation easiness is improved. Some predefined types: Boolean automaton, weighted automaton (R, tropical, . . . ), transducers.

The Vaucanson group Inside Vaucanson 5 / 39

slide-7
SLIDE 7

Inside Vaucanson Introduction

Some caracteristic features

Programming concerns: all components are generic, context headers (i.e. predefined types) are introduced. ⇒ Library manipulation easiness is improved. Some predefined types: Boolean automaton, weighted automaton (R, tropical, . . . ), transducers.

The Vaucanson group Inside Vaucanson 5 / 39

slide-8
SLIDE 8

Inside Vaucanson Introduction

Some caracteristic features

Programming concerns: all components are generic, context headers (i.e. predefined types) are introduced. ⇒ Library manipulation easiness is improved. Some predefined types: Boolean automaton, weighted automaton (R, tropical, . . . ), transducers.

The Vaucanson group Inside Vaucanson 5 / 39

slide-9
SLIDE 9

Inside Vaucanson Automata A first example

Coding the B1 automaton

Example

#include <vaucanson/boolean_automaton.hh> using namespace vcsn; using namespace vcsn::boolean_automaton; int main() { alphabet_t alpha; alpha.insert(’a’); alpha.insert(’b’); automaton_t B1 = new_automaton(alpha); hstate_t p = B1.add_state(); hstate_t q = B1.add_state(); B1.set_initial(p); B1.set_final(q); B1.add_letter_edge(p, p, ’a’); B1.add_letter_edge(p, p, ’b’); B1.add_letter_edge(q, q, ’a’); B1.add_letter_edge(q, q, ’b’); B1.add_letter_edge(p, q, ’b’); } p q b a a b b The Vaucanson group Inside Vaucanson 7 / 39

slide-10
SLIDE 10

Inside Vaucanson Automata A first example

nth power of B1

Compute the nth power of B1: Example

automaton_t p = a; for (int i = 1; i < n; ++i) p = product(p, a);

The Vaucanson group Inside Vaucanson 9 / 39

slide-11
SLIDE 11

Inside Vaucanson Automata Weighted automata

B1 seen as a Z-automaton

Example

#include <vaucanson/z_automaton.hh> using namespace vcsn; using namespace vcsn::z_automaton; int main() { alphabet_t alpha; alpha.insert(’a’); alpha.insert(’b’); automaton_t BZ1 = new_automaton(alpha); hstate_t p = BZ1.add_state(); hstate_t q = BZ1.add_state(); BZ1.set_initial(p); BZ1.set_final(q); BZ1.add_letter_edge(p, p, ’a’); BZ1.add_letter_edge(p, p, ’b’); BZ1.add_letter_edge(q, q, ’a’); BZ1.add_letter_edge(q, q, ’b’); BZ1.add_letter_edge(p, q, ’b’); } p q b a a b b The Vaucanson group Inside Vaucanson 11 / 39

slide-12
SLIDE 12

Inside Vaucanson Algorithms

Algorithms in Vaucanson

Over than 50 algorithms are available, implementation supports weights whenever it is possible. Some special algorithms: computation of the minimal quotient, partial derivatives automaton, . . .

The Vaucanson group Inside Vaucanson 12 / 39

slide-13
SLIDE 13

Inside Vaucanson Algorithms

Partial derivatives

generalization of Antimirov’s method to weighted expressions, extend implementation proposed on unweighted expressions by Champarnaud and Ziadi, complexity is likely to be quadratic, Derived term automaton is a quotient of Glushkov(E).

The Vaucanson group Inside Vaucanson 13 / 39

slide-14
SLIDE 14

Inside Vaucanson Algorithms

Some results

Experiment: let A15 be an automaton with 15 states, provided its determinist equivalent has 215 states. We compute expressions from the automaton, with a random chooser on state ordering.

Derived term AE Standard SE Class lE AE states time VE states time 1 110 24 0.123 24 0.012 7 410 53 0.470 51 0.050 14 1035 66 1.169 60 0.138 20 7821 90 13.412 78 1.418

Results enlights: partial derivative algorithm gives smaller results but: is slower than Quotient(Glushkov(E)).

The Vaucanson group Inside Vaucanson 14 / 39

slide-15
SLIDE 15

Inside Vaucanson Transducers Overview

Reminder on transducers

A transducer is an automaton labeled by pair of words. Theorem A transducer can be normalized. A transducer can be put in the form of an automaton on A∗ with weights in Rat(B∗). In Vaucanson, both transducer forms are available.

The Vaucanson group Inside Vaucanson 15 / 39

slide-16
SLIDE 16

Inside Vaucanson Transducers Composition

About composition in Vaucanson

Two composition algorithms available: composition of transducers with weights in Rat(B∗) (Sch¨ utzenberger 61), composition of (sub-) normalized transducers.

The Vaucanson group Inside Vaucanson 16 / 39

slide-17
SLIDE 17

Inside Vaucanson Transducers Composition

Composition of unweighted transducers

T1

1|y 1|x b|1 a|1

U1

x |1 y |1 1|u 1|v

Figure: Composition Theorem on Boolean transducers

The Vaucanson group Inside Vaucanson 18 / 39

slide-18
SLIDE 18

Inside Vaucanson Transducers Composition

Composition of unweighted transducers

T1

1|y 1|x b|1 a|1

U1

x |1 y |1 1|u 1|v

Figure: Composition Theorem on Boolean transducers

The Vaucanson group Inside Vaucanson 20 / 39

slide-19
SLIDE 19

Inside Vaucanson Transducers Composition

Composition of unweighted transducers

T1

1|y 1|x b|1 a|1

U1

x |1 y |1 1|u 1|v

b|1 a|1 b|1 a|1 b|1 a|1 Figure: Composition Theorem on Boolean transducers

The Vaucanson group Inside Vaucanson 22 / 39

slide-20
SLIDE 20

Inside Vaucanson Transducers Composition

Composition of unweighted transducers

T1

1|y 1|x b|1 a|1

U1

x |1 y |1 1|u 1|v

b|1 a|1 b|1 a|1 b|1 a|1 1|u 1|v 1|u 1|v 1|u 1|v Figure: Composition Theorem on Boolean transducers

The Vaucanson group Inside Vaucanson 24 / 39

slide-21
SLIDE 21

Inside Vaucanson Transducers Composition

Composition of unweighted transducers

T1

1|y 1|x b|1 a|1

U1

x |1 y |1 1|u 1|v

b|1 a|1 b|1 a|1 b|1 a|1 1|u 1|v 1|u 1|v 1|u 1|v

1|1 1|1

Figure: Composition Theorem on Boolean transducers

The Vaucanson group Inside Vaucanson 26 / 39

slide-22
SLIDE 22

Inside Vaucanson Transducers Composition

Composition of unweighted transducers

T1

1|y 1|x b|1 a|1

U1

x |1 y |1 1|u 1|v

b|1 a|1 1|v 1|u b|1 1|v a|1 1|u Figure: Composition Theorem on Boolean transducers

The Vaucanson group Inside Vaucanson 28 / 39

slide-23
SLIDE 23

Inside Vaucanson Transducers Composition

Composition of weighted transducers

Two possible solutions: instanciation of an empty word and apply a filter after the composition (Mohri, Pereira, Riley 96-00), modify the composed transducers before the composition.

The Vaucanson group Inside Vaucanson 29 / 39

slide-24
SLIDE 24

Inside Vaucanson Transducers Composition

Proposed algorithm for weighted transducers

Principle: Modify the input transducers and suppress the problematic states after the composition. Algorithm Out-splitting on first transducer: separate states which have empty outputs, in-splitting on second transducer: separate states which have empty inputs, mark problematic states, compose transducers, suppress intersection of marked states.

The Vaucanson group Inside Vaucanson 30 / 39

slide-25
SLIDE 25

Inside Vaucanson Transducers Composition

Out-splitting

a b c

T1

1|y 1|x b|1 a|1 a1 b a2 c

1|y 1|y 1|x b|1 b|1 a|1

Figure: Out-splitting

The Vaucanson group Inside Vaucanson 32 / 39

slide-26
SLIDE 26

Inside Vaucanson Transducers Composition

In-splitting

x y z

U1

x |1 y |1 1|u 1|v x1 z x2 y x |1 y |1 y |1 1|u 1|v 1|v

Figure: In-splitting

The Vaucanson group Inside Vaucanson 34 / 39

slide-27
SLIDE 27

Inside Vaucanson Transducers Composition

A composition that preserves multiplicity

1|y 1|y 1|x b|1 b|1 a|1 x |1 y |1 y |1 1|u 1|v 1|v 1|v 1|v b|1 b|1 a|1 1|u a|1 a|1 1|u 1|u

The Vaucanson group Inside Vaucanson 36 / 39

slide-28
SLIDE 28

Inside Vaucanson Transducers Composition

Some results

Composition of the left sequential transducer and the right sequential transducer for the rewriting rule abn → ban:

Algorithm n

  • Nb. states
  • Nb. transitions

Time Sub-normalized 20 30084 40356 0.551 transducer 40 232564 305506 4.849 Representation 20 441 882 2.042 40 1681 3362 36.195

The Vaucanson group Inside Vaucanson 37 / 39

slide-29
SLIDE 29

Inside Vaucanson Conclusion

Summary

Vaucanson is a generic framework for automata manipulation. The library offers several services on: various automaton types, rational expressions, various transducer types. Get Vaucanson: http://vaucanson.lrde.epita.fr

The Vaucanson group Inside Vaucanson 38 / 39

slide-30
SLIDE 30

Inside Vaucanson Questions

Questions

The Vaucanson group Inside Vaucanson 39 / 39