Abstract

We propose an approach to non-deterministic finite automaton (NFA) inductive synthesis that is based on answer set programming (ASP) solvers. To that end, we explain how an NFA and its response to input samples can be encoded as rules in a logic program. We then ask an ASP solver to find an answer set for the program, which we use to extract the automaton of the required size. We conduct a series of experiments on some benchmark sets, using the implementation of our approach. The results show that our method outperforms, in terms of CPU time, a SAT approach and other exact algorithms on all benchmarks.

Highlights

  • The main problem investigated in this paper is as follows

  • While comparing our approach with randomized algorithm using Parallelization Scheme 1 (RA-Parallelization Scheme 1 (PS1)), randomized algorithm using Parallelization Scheme 2 (RA-Parallelization Scheme 2 (PS2)), ordered algorithm using Parallelization Scheme 1 (OA-PS1), and ordered algorithm using Parallelization Scheme 2 (OA-PS2), all programs ran on an 8-core processor

  • We used a set of 40 samples based on randomly generated regular expressions

Read more

Summary

Introduction

The main problem investigated in this paper is as follows. Given a finite alphabet Σ, two finite subsets S+ , S− ⊆ Σ∗ , and an integer k > 0, find a k-state NFA A that recognizes a language L ⊆ Σ∗. Even if we specify the regular language by a deterministic finite automaton (DFA), the problem remains PSPACE-complete [7]. In contrast to the NFAs, for a given regular language there is always exactly one minimum-size DFA (i.e., there is no other non-isomorphic DFA with the same minimal number of states). The first objective is to devise an algorithm for the smallest non-deterministic automaton problem It entails preparing logical rules (this set of rules will be called an AnsProlog program) before starting the searching process. The Python scripting language is used only for generating the appropriate AnsProlog facts and running Clingo, an ASP solver Another line of research concerns the induction of DFAs. The original idea of SAT encoding in this context comes from the work made by Heule and Verwer [12].

Words and Languages
Non-Deterministic Finite Automata
Answer Set Programming
Proposed Encoding for the Induction of NFA
Experimental Results
Benchmarks
Compared Algorithms
Performance Comparison
Conclusions

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.