11 research outputs found

    Linear Parsing Expression Grammars

    Full text link
    PEGs were formalized by Ford in 2004, and have several pragmatic operators (such as ordered choice and unlimited lookahead) for better expressing modern programming language syntax. Since these operators are not explicitly defined in the classic formal language theory, it is significant and still challenging to argue PEGs' expressiveness in the context of formal language theory.Since PEGs are relatively new, there are several unsolved problems.One of the problems is revealing a subclass of PEGs that is equivalent to DFAs. This allows application of some techniques from the theory of regular grammar to PEGs. In this paper, we define Linear PEGs (LPEGs), a subclass of PEGs that is equivalent to DFAs. Surprisingly, LPEGs are formalized by only excluding some patterns of recursive nonterminal in PEGs, and include the full set of ordered choice, unlimited lookahead, and greedy repetition, which are characteristic of PEGs. Although the conversion judgement of parsing expressions into DFAs is undecidable in general, the formalism of LPEGs allows for a syntactical judgement of parsing expressions.Comment: Parsing expression grammars, Boolean finite automata, Packrat parsin

    Operations on Boolean and Alternating Finite Automata

    Full text link
    We examine the complexity of basic regular operations on languages represented by Boolean and alternating finite automata. We get tight upper bounds m+n and m+n+1 for union, intersection, and difference, 2^m+n and 2^m+n+1 for concatenation, 2^n+n and 2^n+n+1 for square, m and m+1 for left quotient, 2^m and 2^m+1 for right quotient. We also show that in both models, the complexity of complementation and symmetric difference is n and m+n, respectively, while the complexity of star and reversal is 2^n. All our witnesses are described over a unary or binary alphabets, and whenever we use a binary alphabet, it is always optimal.Comment: In Proceedings AFL 2023, arXiv:2309.0112

    The Cost of Monitoring Alone

    Full text link
    We compare the succinctness of two monitoring systems for properties of infinite traces, namely parallel and regular monitors. Although a parallel monitor can be turned into an equivalent regular monitor, the cost of this transformation is a double-exponential blowup in the syntactic size of the monitors, and a triple-exponential blowup when the goal is a deterministic monitor. We show that these bounds are tight and that they also hold for translations between corresponding fragments of Hennessy-Milner logic with recursion over infinite traces.Comment: 22 page

    Lower bounds for the state complexity of probabilistic languages and the language of prime numbers

    Full text link
    This paper studies the complexity of languages of finite words using automata theory. To go beyond the class of regular languages, we consider infinite automata and the notion of state complexity defined by Karp. Motivated by the seminal paper of Rabin from 1963 introducing probabilistic automata, we study the (deterministic) state complexity of probabilistic languages and prove that probabilistic languages can have arbitrarily high deterministic state complexity. We then look at alternating automata as introduced by Chandra, Kozen and Stockmeyer: such machines run independent computations on the word and gather their answers through boolean combinations. We devise a lower bound technique relying on boundedly generated lattices of languages, and give two applications of this technique. The first is a hierarchy theorem, stating that there are languages of arbitrarily high polynomial alternating state complexity, and the second is a linear lower bound on the alternating state complexity of the prime numbers written in binary. This second result strengthens a result of Hartmanis and Shank from 1968, which implies an exponentially worse lower bound for the same model.Comment: Submitted to the Journal of Logic and Computation, Special Issue on LFCS'2016) (Logical Foundations of Computer Science). Guest Editors: S. Artemov and A. Nerode. This journal version extends two conference papers: the first published in the proceedings of LFCS'2016 and the second in the proceedings of LICS'2018. arXiv admin note: substantial text overlap with arXiv:1607.0025

    Optimal simulations between unary automata

    Get PDF
    We consider the problem of computing the costs---{ in terms of states---of optimal simulations between different kinds of finite automata recognizing unary languages. Our main result is a tight simulation of unary n-state two-way nondeterministic automata by O(enlnn)O({{\rm e}^{\sqrt{{n}\ln{n}}}})-state one-way deterministic automata. In addition, we show that, given a unary n-state two-way nondeterministic automaton, one can construct an equivalent O(n^2)-state two-way nondeterministic automaton performing both input head reversals and nondeterministic choices only at the ends of the input tape. Further results on simulating unary one-way alternating finite automata are also discussed

    Distributed XML Design

    Get PDF
    A distributed XML document is an XML document that spans several machines. We assume that a distribution design of the document tree is given, consisting of an XML kernel-document T[f1,...,fn] where some leaves are "docking points" for external resources providing XML subtrees (f1,...,fn, standing, e.g., for Web services or peers at remote locations). The top-down design problem consists in, given a type (a schema document that may vary from a DTD to a tree automaton) for the distributed document, "propagating" locally this type into a collection of types, that we call typing, while preserving desirable properties. We also consider the bottom-up design which consists in, given a type for each external resource, exhibiting a global type that is enforced by the local types, again with natural desirable properties. In the article, we lay out the fundamentals of a theory of distributed XML design, analyze problems concerning typing issues in this setting, and study their complexity.Comment: "56 pages, 4 figures

    Adventures in monitorability: From branching time to linear time and back again.

    Get PDF
    This paper establishes a comprehensive theory of runtime monitorability for Hennessy-Milner logic with recursion, a very expressive variant of the modal µ-calculus. It investigates the monitorability of that logic with a linear-time semantics and then compares the obtained results with ones that were previously presented in the literature for a branching-time setting. Our work establishes an expressiveness hierarchy of monitorable fragments of Hennessy-Milner logic with recursion in a linear-time setting and exactly identifies what kinds of guarantees can be given using runtime monitors for each fragment in the hierarchy. Each fragment is shown to be complete, in the sense that it can express all properties that can be monitored under the corresponding guarantees. The study is carried out using a principled approach to monitoring that connects the semantics of the logic and the operational semantics of monitors. The proposed framework supports the automatic, compositional synthesis of correct monitors from monitorable properties

    To Heck With Ethics: Thinking About Public Issues With a Framework for CS Students

    Get PDF
    This paper proposes that the ethics class in the CS curriculum incorporate the Lawrence Lessig model of regulation as an analytical tool for social issues. Lessig’s use of the notion of architecture, the rules and boundaries of the sometimes artificial world within which social issues play out, is particularly resonant with computing professionals. The CS curriculum guidelines include only ethical frameworks as the tool for our students to engage with societal issues. The regulation framework shows how the market, law, social norms, and architecture can all be applied toward understanding social issues

    Context-free games on strings and nested words

    Get PDF
    Kontextfreie Spiele sind ein formales Modell, welches in seiner einfachsten Form den Ableitungsmechanismus kontextfreier Grammatiken zu einem Spiel für zwei Spieler (genannt Juliet und Romeo) verallgemeinert; dabei wählt in einer gegebenen Satzform (d.h. einer Zeichenkette aus Terminal- und Nichtterminalsymbolen) jeweils Juliet ein zu ersetzendes Nichtterminalsymbol aus, worauf Romeo jeweils entsprechend den Ableitungsregeln entscheidet, wodurch dieses Nichtterminalsymbol ersetzt werden soll. Die Gewinnbedingung für Juliet in einem solchen Spiel ist das Erreichen einer Satzform aus einer gegebenen Zielsprache, wohingegen Romeo die Aufgabe hat, dies zu verhindern. Das zentrale algorithmische Problem in kontextfreien Spielen stellt die Frage, gegeben ein Spiel und eine initiale Satzform, ob Juliet in dem gegebenen Spiel auf der Satzform eine Gewinnstrategie hat. Die zentrale praktische Anwendung kontextfreier Spiele liegt in der Modellierung von Active XML-Dokumenten, d.h. XML-Dokumenten, die Referenzen auf externe Quellen enthalten, welche zur Laufzeit aufgerufen werden können um aktuelle Daten in das Dokument einzufügen. Vor diesem Hintergrund ist es sinnvoll, Erweiterungen der oben genannten kontextfreien Spiele auf verschachtelte Wörter zu betrachten, also auf XML-artige Linearisierungen von Bäumen in Zeichenketten. Weitere praktisch motivierte Verallgemeinerungen beinhalten unter anderem die Modellierung von syntaktischer oder semantischer Behandlung von Aufrufparametern beim Aufruf externer Referenzen. Ziel dieser Dissertation ist, einen weitgehend vollständigen Überblick über den aktuellen Stand der Forschung zu kontextfreien Spielen auf Zeichenketten und verschachtelten Wörtern zu liefern. Dazu liefert sie jeweils komplexitätstheoretische Klassifizierungen des Gewinnproblems (und verwandter Probleme) für diverse Varianten kontextfreie Spiele auf Zeichenketten und verschachtelten Wörtern und gibt einen Überblick über Beweismethoden und algorithmische Techniken zur Behandlung dieses Gewinnproblems. Als Teil dieser Betrachtung stellt sie darüber hinaus grundlegende Ergebnisse zu relevanten Automatenmodellen auf verschachtelten Wörtern dar, darunter Varianten von alternierenden Automaten und Transducern
    corecore