Unambiguous automata inference by means of states-merging methods François Coste, Daniel Fredouille

Slides:



Advertisements
Similar presentations
CS 3240: Languages and Computation
Advertisements

CSC 361NFA vs. DFA1. CSC 361NFA vs. DFA2 NFAs vs. DFAs NFAs can be constructed from DFAs using transitions: Called NFA- Suppose M 1 accepts L 1, M 2 accepts.
Lecture 6 Nondeterministic Finite Automata (NFA)
Pushdown Automata Section 2.2 CSC 4170 Theory of Computation.
Complexity and Computability Theory I Lecture #4 Rina Zviel-Girshin Leah Epstein Winter
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
CPSC Compiler Tutorial 4 Midterm Review. Deterministic Finite Automata (DFA) Q: finite set of states Σ: finite set of “letters” (input alphabet)
Sandro Spina, John Abela Department of CS & AI, University of Malta. Mutually compatible and incompatible merges for the search of the smallest consistent.
DFA Minimization Jeremy Mange CS 6800 Summer 2009.
Finite Automata CPSC 388 Ellen Walker Hiram College.
Applied Computer Science II Chapter 1 : Regular Languages Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany.
Introduction to Computability Theory
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Finite Automata Finite-state machine with no output. FA consists of States, Transitions between states FA is a 5-tuple Example! A string x is recognized.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
1 Finite state automaton (FSA) LING 570 Fei Xia Week 2: 10/07/09 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAA.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
1 Non-Deterministic Automata Regular Expressions.
1.Defs. a)Finite Automaton: A Finite Automaton ( FA ) has finite set of ‘states’ ( Q={q 0, q 1, q 2, ….. ) and its ‘control’ moves from state to state.
Finite Automata Costas Busch - RPI.
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
Costas Busch - LSU1 Non-Deterministic Finite Automata.
1 Non-Deterministic Finite Automata. 2 Alphabet = Nondeterministic Finite Automaton (NFA)
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
REGULAR LANGUAGES.
CS-5800 Theory of Computation II PROJECT PRESENTATION By Quincy Campbell & Sandeep Ravikanti.
By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String 
1 For each language, give a regular expression that generates the language and a DFA that accepts it. L 1 = { w  {0, 1}* : has both 00 and 11 as substrings}
2. Scanning College of Information and Communications Prof. Heejin Park.
4b 4b Lexical analysis Finite Automata. Finite Automata (FA) FA also called Finite State Machine (FSM) –Abstract model of a computing entity. –Decides.
TRANSITION DIAGRAM BASED LEXICAL ANALYZER and FINITE AUTOMATA Class date : 12 August, 2013 Prepared by : Karimgailiu R Panmei Roll no. : 11CS10020 GROUP.
Regular Languages: Deterministic Finite Automata (DFA) a a a a b b bb DFA = NFA (Non-deterministic) = REG {w  {a,b} * | # a W and # a W both even}
Finite Automata – Definition and Examples Lecture 6 Section 1.1 Mon, Sep 3, 2007.
D E C I D A B I L I T Y 1. 2 Objectives To investigate the power of algorithms to solve problems. To explore the limits of algorithmic solvability. To.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
Exercise 1 Consider a language with the following tokens and token classes: ID ::= letter (letter|digit)* LT ::= " " shiftL ::= " >" dot ::= "." LP ::=
1 For each language, give a DFA that accepts it. L 1 = { w  {a, b}* : w at most 2 a’s} L 2 = { w  {0, 1}* : has both 00 and 11 as substrings} L 3 = {
using Deterministic Finite Automata & Nondeterministic Finite Automata
Nondeterministic Finite Automata (NFAs). Reminder: Deterministic Finite Automata (DFA) q For every state q in Q and every character  in , one and only.
98 Nondeterministic Automata vs Deterministic Automata We learned that NFA is a convenient model for showing the relationships among regular grammars,
Algorithms for hard problems Automata and tree automata Juris Viksna, 2015.
BİL711 Natural Language Processing1 Regular Expressions & FSAs Any regular expression can be realized as a finite state automaton (FSA) There are two kinds.
Theory of Computation Automata Theory Dr. Ayman Srour.
Deterministic Finite Automata Nondeterministic Finite Automata.
Compiler Construction Lecture Three: Lexical Analysis - Part Two CSC 2103: Compiler Construction Lecture Three: Lexical Analysis - Part Two Joyce Nakatumba-Nabende.
1 Finite Automata. 2 Introductory Example An automaton that accepts all legal Pascal identifiers: Letter Digit Letter or Digit "yes" "no" 2.
WELCOME TO A JOURNEY TO CS419 Dr. Hussien Sharaf Dr. Mohammad Nassef Department of Computer Science, Faculty of Computers and Information, Cairo University.
6. Pushdown Automata CIS Automata and Formal Languages – Pei Wang.
Nondeterminism The Chinese University of Hong Kong Fall 2011
CIS Automata and Formal Languages – Pei Wang
Non Deterministic Automata
Theory of Computation Lecture # 9-10.
Finite Automata & Regular Languages
Chapter 2 FINITE AUTOMATA.
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU.
Non-Deterministic Finite Automata
Non-Deterministic Finite Automata
CSE322 Definition and description of finite Automata
Nondeterministic Finite Automata
Non Deterministic Automata
NFAs and Transition Graphs
Finite Automata.
Chapter 1 Regular Language
NFAs and Transition Graphs
Non Deterministic Automata
Lexical Analysis Uses formalism of Regular Languages
Presentation transcript:

Unambiguous automata inference by means of states-merging methods François Coste, Daniel Fredouille IRISA-INRIA, Campus de Beaulieu Rennes Cedex France

D. Fredouille and F. Coste, Unambiguous Automata Inference2 Definitions n Alphabet:  = {a,b} n Word:abbabbabbaaa  n Language:L n Automaton:  *  *  I- Automata inference L={a+b}*a{a+b}

D. Fredouille and F. Coste, Unambiguous Automata Inference3 Classes of automata (1/3) n Nondeterministic Automata (NFA) n Deterministic Automata (DFA) –one outgoing transition per input symbol I- Automata inference a a L={a+b}*a{a+b}

D. Fredouille and F. Coste, Unambiguous Automata Inference4 Classes of automata (2/3) n Unambiguous Automata (UFA) [SH85] –one acceptance per word I- Automata inference a b a b b a a b b b L={a+b}*a{a+b} n NFA  UFA  DFA

D. Fredouille and F. Coste, Unambiguous Automata Inference5 Automata inference Examples Counter-examples I- Automata inference S ={aa,abab} + S ={ba,abbb} - L={a+b}*a{a+b}

D. Fredouille and F. Coste, Unambiguous Automata Inference6 Why this study ? n State of the art: DFA inference n Our goal: introducing some amount of non-determinism n Why ? –NFA << DFA –inferring with less data –inferring “explicit” representations n Method: –extending classical DFA inference algorithm I- Automata inference

D. Fredouille and F. Coste, Unambiguous Automata Inference7 II - Study of the DFA inference framework

D. Fredouille and F. Coste, Unambiguous Automata Inference8 Search space for NFAs [DMV94] UA MCA II - The DFA search space

D. Fredouille and F. Coste, Unambiguous Automata Inference9 Counter-examples : compatibility UA S  L   - S  L =  - (compatible) (incompatible) MCA II - The DFA search space

D. Fredouille and F. Coste, Unambiguous Automata Inference10 The search space for DFA UA MCA Deterministic merging State merging II - The DFA search space

D. Fredouille and F. Coste, Unambiguous Automata Inference11  q1,q2  Q,  w   *: w  pref(q1)  w  pref(q2)  state-merging(q1,q2) II - The DFA search space Merging for determinisation procedure

D. Fredouille and F. Coste, Unambiguous Automata Inference12  q1,q2  Q,  w   *: w  pref(q1)  w  pref(q2)  state-merging(q1,q2) II - The DFA search space Merging for determinization procedure

D. Fredouille and F. Coste, Unambiguous Automata Inference13  q1,q2  Q,  w   *: w  pref(q1)  w  pref(q2)  state-merging(q1,q2) II - The DFA search space Merging for determinization procedure

D. Fredouille and F. Coste, Unambiguous Automata Inference14 Deterministic merging operator = state-merging + merging for determinization II - The DFA search space n Very commonly used [OG92, LPP98,...] n Demonstration of formal properties –Merging for determinization Enables to reach the “closest” DFA from the original NFA –Deterministic merging Enables to reach all derived DFA from a given DFA –... (see tech. rep.)

D. Fredouille and F. Coste, Unambiguous Automata Inference15 IV - From DFA to UFA inference or how to introduce some amount of non- determinism in inference

D. Fredouille and F. Coste, Unambiguous Automata Inference16 Inferring non-deterministic representations: the choice of UFA III - DFA to UFA inference n Why UFA ? –unity in the search space (like DFA) NFA UFA DFA UA MCA({aaaaa})

D. Fredouille and F. Coste, Unambiguous Automata Inference17 Merging for disambiguisation procedure III - DFA to UFA inference  q1,q2  Q,  w1,w2   *: w1  pref(q1)  w1  pref(q2)  w2  suff(q1)  w2  suff(q2)  state-merging(q1,q2)

D. Fredouille and F. Coste, Unambiguous Automata Inference18 Merging for disambiguisation procedure III - DFA to UFA inference  q1,q2  Q,  w1,w2   *: w1  pref(q1)  w1  pref(q2)  w2  suff(q1)  w2  suff(q2)  state-merging(q1,q2)

D. Fredouille and F. Coste, Unambiguous Automata Inference19 Unambiguous merging = state-merging + merging for disambiguisation III - DFA to UFA inference n Finer operator than merging for determinization n Demonstration of formal properties –Merging for disambiguisation Enables to reach the “closest” UFA from the original NFA –unambiguous merging Enables to reach all derived UFA from a given UFA –... (see tech. rep.)

D. Fredouille and F. Coste, Unambiguous Automata Inference20 IV - Comparative experiments - Inference algorithms - Benchmarks - Experimental results

D. Fredouille and F. Coste, Unambiguous Automata Inference21 Algorithms n UFA –Hill-climbing heuristic n DFA –EDSM heuristic [LPP98] n RFSA –DeLeTe II [DLT01] IV - Comparative experiments –Hill-climbing heuristic

D. Fredouille and F. Coste, Unambiguous Automata Inference22 Counter-example use for DFA and UFA inference n Compatibility [DMV94] –generalization of, stopped by n Functionality [AS95] –generalization of and, stopped by empty intersection IV - Comparative experiments S + S - S + S -

D. Fredouille and F. Coste, Unambiguous Automata Inference23 Benchmarks n [DLT01] –Generation: DFA, NFA, Regular Expression –4 sizes of training sample –30 languages generated for each generation mode and sample size n + UFA generator n Evaluation based on –average recognition level on test sets –matches between recognition level IV - Comparative experiments

D. Fredouille and F. Coste, Unambiguous Automata Inference24 Results n Best algorithms w.r.t. benchmarks –DFA bench:UFA inference with hill-climbing –UFA bench:DFA inference with hill-climbing  UFA inference with hill-climbing –NFA bench: RFSA inference –Reg. Expr.:RFSA inference  DFA inference with hill-climbing ? IV - Comparative experiments

D. Fredouille and F. Coste, Unambiguous Automata Inference25 Results n Heuristic: –Hill-climbing >> EDSM when inferring DFAs for NFA/Regular Expression/UFA bench. n Counter-examples: –Compatibility  Functionality IV - Comparative experiments

D. Fredouille and F. Coste, Unambiguous Automata Inference26 Results (matches) IV - Comparative experiments

D. Fredouille and F. Coste, Unambiguous Automata Inference27 Conclusion n UFA inference –Merging for disambiguisation –Heuristic n Comparison with EDSM & DeLeTe II Perspectives n Speeding up the algorithm n Application n Using properties of the DFA/UFA space

D. Fredouille and F. Coste, Unambiguous Automata Inference28 References n [AS95] Alquézar, Sanfeliu, “Incremental grammatical inference from positive and negative data using unbiased finite state automata”, SSPR’94 n [DMV94] Dupont and al. “What is the search space of the regular inference ?”, ICGI ’94 n [DLT00] Denis and al., “Learning regular languages using nondeterministic automata”, ICGI ’00 n [SH85] Stearns, Hunt, “On the equivalence and containment problems for unambiguous regular expressions, regular grammars and finite automata”, SIAM vol 14 n [tech. rep.] Coste, Fredouille “What is the search space for NFA, UFA and DFA inference ?”, IRISA