87 research outputs found

    Small NFAs from Regular Expressions: Some Experimental Results

    Full text link
    Regular expressions (res), because of their succinctness and clear syntax, are the common choice to represent regular languages. However, efficient pattern matching or word recognition depend on the size of the equivalent nondeterministic finite automata (NFA). We present the implementation of several algorithms for constructing small epsilon-free NFAss from res within the FAdo system, and a comparison of regular expression measures and NFA sizes based on experimental results obtained from uniform random generated res. For this analysis, nonredundant res and reduced res in star normal form were considered.Comment: Proceedings of 6th Conference on Computability in Europe (CIE 2010), pages 194-203, Ponta Delgada, Azores, Portugal, June/July 201

    Automated Grading and Feedback of Regular Expressions

    Get PDF
    To keep up with the current spread of education, there has arisen the need to have automated tools to evaluate assignments. As a part of this thesis, we have developed a technique to evaluate assignments on regular expressions (regexes). Every student is different and so is their solution, thus making it hard to have a single approach to grade it all. Hence, in addition to the existing techniques, we offer a new way of evaluating regexes. We call this the regex edit distance. The idea behind this is to find the minimal changes that we could make in a wrong answer to make its language equivalent to that of a correct answer. This approach is along the lines of the one used by Automata Tutor to grade DFAs. We also spoke to different graders and observed that they were in some sense computing the regex edit distance to assign partial credit. Computing the regex edit distance is a PSPACE-hard problem and seems computationally intractable even for college level submissions. To deal with this intractability, we look at a simpler version of regex edit distance that can be computed for many college level submissions. We hypothesize that our version of regex edit distance is a good metric for evaluating and awarding partial credit for regexes. We ran an initial study and we observed a strong relation between the partial credit awarded and our version of regex edit distance

    A technique for converting NFA\u27s and DFA\u27s to regular expressions in Lex

    Get PDF
    In the design and creation of compilers, a compiler-writer is called upon to make assumptions and declarations about how their language\u27s syntax performs and behaves. Lex is a software tool used to create grammar rules. A flat file is read as input to lex, and the corresponding C code is output. However, in order to properly format the flat file, the compiler-writer creates the lex expression either on a hunch, or based on some given set of criteria. Among these criteria are: case sensitivity, the introduction of special characters and symbols, the handling of a space character, and the handling of escape sequence characters, namely the tab, new-line, and carriage return symbols. Lex can create the code to perform such verification, but it is up to the compiler-writer to provide lex with the rules. Sometimes the rules can be seen more easily diagrammatically through an NFA or a DFA. Once the FA is created, it is just a matter of extracting the rules from the diagram. The following technique can be employed to create lex rules from the Finite Automata

    Decision Procedure for Synchronous Kleene Algebra

    Get PDF
    Kleene Algebra (KA) is an algebraic system that has many applications both in mathematics and computer science. It was named after Stephen Cole Kleene who extensively studied regular expressions and finite automata [Kle56]. Moreover it is often used to reason about programs, as it can represent sequential composition, choice and finite iteration. Furthermore, the need to reason about actions which can be executed concurrently, spawned SKA. SKA is an extension of KA introduced by Cristian Prisacariu in [Pri10] that adopts a notion of concurrent actions. Laguange equivalence is an imperishable problem in computer science. In this thesis we present the reader with a detailed explanation of a decision procedure for SKA terms and an OCaml implementation of said procedure as well.A Kleene Algebra (KA) é um sistema algébrico que tem bastantes aplicações quer no campo da matemática como também da informática. Foi batizada com o nome do seu inventor Stephen Cole Kleene, que ao longo da sua carreira fez um estudo intensivo sobre expressões regulares e autómatos finitos [Kle56]. Quando há necessidade de raciocinar equacionalmente sobre programas, recorre-se frequentemente à Kleene Algebra, visto que esta consegue exprimir noções de escolha, composição sequencial e até a noção de iteração. A necessidade de raciocinar equacionalmente sobre ações que podem ser executadas de forma concorrente levou ao aparecimento da Algebra de Kleene Síncrona ou Synchronous Kleene Algebra (SKA). Esta última foi introduzida por Cristian Prisacariu em 2010 no seu artigo [Pri10] como uma extensão à Kleene Algebra mas que contém uma noção de ação concorrente. A equivalência de linguagens é um problema perene em ciências da computação. Nesta dissertação iremos apresentar ao leitor uma explicação detalhada de um processo de decisão para termos de Synchronous Kleene Algebra (SKA) bem como a sua implementação utilizando a linguagem de programação OCaml

    Implementation of Code Properties via Transducers

    Get PDF
    The FAdo system is a symbolic manipulator of formal language objects, implemented in Python. In this work, we extend its capabilities by implementing methods to manipulate transducers and we go one level higher than existing formal language systems and implement methods to manipulate objects representing classes of independent languages (widely known as code properties). Our methods allow users to define their own code properties and combine them between themselves or with fixed properties such as prefix codes, suffix codes, error detecting codes, etc. The satisfaction and maximality decision questions are solvable for any of the definable properties. The new online system LaSer allows one to query about a code property and obtain the answer in a batch mode. Our work is founded on independence theory as well as the theory of rational relations and transducers, and contributes with improved algorithms on these objects
    corecore