Algebraic properties of operator precedence languages (original) (raw)
Related papers
Operator Precedence Languages: Their Automata-Theoretic and Logic Characterization
SIAM Journal on Computing, 2015
Operator precedence languages were introduced half a century ago by Robert Floyd to support deterministic and efficient parsing of context-free languages. Recently, we renewed our interest in this class of languages thanks to a few distinguishing properties that make them attractive for exploiting various modern technologies. Precisely, their local parsability enables parallel and incremental parsing, whereas their closure properties make them amenable for automatic verification techniques, including model checking. In this paper we provide a fairly complete theory of this class of languages: we introduce a class of automata with the same recognizing power as the generative power of their grammars; we provide a characterization of their sentences in terms of monadic second order logic as it has been done in previous literature for more restricted language classes such as regular, parenthesis, and input-driven ones; we investigate preserved and lost properties when extending the language sentences from finite length to infinite length (ω-languages). As a result, we obtain a class of languages that enjoys many nice properties of regular languages (closure and decidability properties, logic characterization) but is considerably larger than other families-typically parenthesis and input-driven ones-with the same properties, covering "almost" all deterministic languages. 1
Higher-Order Operator Precedence Languages
Electronic Proceedings in Theoretical Computer Science
Floyd's Operator Precedence (OP) languages are a deterministic context-free family having many desirable properties. They are locally and parallely parsable, and languages having a compatible structure are closed under Boolean operations, concatenation and star; they properly include the family of Visibly Pushdown (or Input Driven) languages. OP languages are based on three relations between any two consecutive terminal symbols, which assign syntax structure to words. We extend such relations to k-tuples of consecutive terminal symbols, by using the model of strictly locally testable regular languages of order k ≥ 3. The new corresponding class of Higher-order Operator Precedence languages (HOP) properly includes the OP languages, and it is still included in the deterministic (also in reverse) context free family. We prove Boolean closure for each subfamily of structurally compatible HOP languages. In each subfamily, the top language is called max-language. We show that such languages are defined by a simple cancellation rule and we prove several properties, in particular that max-languages make an infinite hierarchy ordered by parameter k. HOP languages are a candidate for replacing OP languages in the various applications where they have have been successful though sometimes too restrictive.
Weighted Operator Precedence Languages
2017
In the last years renewed investigation of operator precedence languages (OPL) led to discover important properties thereof: OPL are closed with respect to all major operations, are characterized, besides the original grammar family, in terms of an automata family (OPA) and an MSO logic; furthermore they significantly generalize the well-known visibly pushdown languages (VPL). In another area of research, quantitative models of systems are also greatly in demand. In this paper, we lay the foundation to marry these two research fields. We introduce weighted operator precedence automata and show how they are both strict extensions of OPA and weighted visibly pushdown automata. We prove a Nivat-like result which shows that quantitative OPL can be described by unweighted OPA and very particular weighted OPA. In a Buchi-like theorem, we show that weighted OPA are expressively equivalent to a weighted MSO-logic for OPL.
Precedence Automata and Languages
Lecture Notes in Computer Science, 2011
Operator precedence grammars define a classical Boolean and deterministic context-free family (called Floyd languages or FLs). FLs have been shown to strictly include the well-known visibly pushdown languages, and enjoy the same nice closure properties. We introduce here Floyd automata, an equivalent operational formalism for defining FLs. This also permits to extend the class to deal with infinite strings to perform for instance model checking.
Aperiodicity, Star-freeness, and First-order Logic Definability of Operator Precedence Languages
Logical Methods in Computer Science, 2023
A classic result in formal language theory is the equivalence among noncounting, or aperiodic, regular languages, and languages defined through star-free regular expressions, or first-order logic. Past attempts to extend this result beyond the realm of regular languages have met with difficulties: for instance it is known that star-free tree languages may violate the non-counting property and there are aperiodic tree languages that cannot be defined through first-order logic. We extend such classic equivalence results to a significant family of deterministic contextfree languages, the operator-precedence languages (OPL), which strictly includes the widely investigated visibly pushdown, alias input-driven, family and other structured context-free languages. The OP model originated in the '60s for defining programming languages and is still used by high performance compilers; its rich algebraic properties have been investigated initially in connection with grammar learning and recently completed with further closure properties and with monadic second order logic definition. We introduce an extension of regular expressions, the OP-expressions (OPE) which define the OPLs and, under the star-free hypothesis, define first-order definable and non-counting OPLs. Then, we prove, through a fairly articulated grammar transformation, that aperiodic OPLs are first-order definable. Thus, the classic equivalence of star-freeness, aperiodicity, and first-order definability is established for the large and powerful class of OPLs. We argue that the same approach can be exploited to obtain analogous results for visibly pushdown languages too.
A Study and Analysis of Precedence Functions for Operator Precedence Parser in Compiler Design
The performance of a computer system rely on compiler technology which states that compiler is used as a mechanism in evaluating architectural approaches before a computer is manufactured. In compiler the parser obtains a string of symbols from the lexical analyzer and ascertains that the string of token names can be accepted by the grammar for the source language. Operator precedence parsing is implementation of shift reduce grammar. In this paper we have studied problem found in the operator precedence relation and precedence relation table. It takes a lot of space in memory to parse a given string. We try to design an algorithm by which one can construct a directed graph and derive the precedence function table for context free grammar by which less memory space is enough for parsing an input string and to motivate the researcher, while showing the future aspects in the area of compiler designing and error solving.
Word- and Tree-based Temporal Logics for Operator Precedence Languages
Italian Conference on Theoretical Computer Science, 2019
In recent years we resumed the study of operator precedence languages (OPL), inspired by their algebraic and parallel parsability properties. OPL significantly generalize visibly pushdown languages in expressive power. We have shown that OPL enjoy a characterization in terms of monadic second order logic in the style of the traditional one for regular languages. We are investigating a characterization of a subclass of OPL in terms of first-order logic, retracing the literature on regular languages. The algebraic properties of OPL naturally suggested a further step, devoted to devising model checking techniques for them. In this communication we briefly report on early steps already moved in this direction and we outline a roadmap for next developments. In doing so, we plan to exploit a distinguishing feature of OPL which allows to manage them both as string languages and as tree-structured languages, thus joining two traditional but different approaches to the study of context-free languages. We expect to achieve a temporal logic-style language that is well suited to express properties of systems in application fields wider than those based on regular languages. We anticipate to obtain model-checking procedures with comparable performances.
Operator Precedence ω-languages
Recent literature extended the analysis of ω-languages from the regular ones to various classes of languages with "visible syntax structure", such as visibly pushdown languages (VPLs). Operator precedence languages (OPLs), instead, were originally defined to support deterministic parsing and exhibit interesting relations with these classes of languages: OPLs strictly include VPLs, enjoy all relevant closure properties and have been characterized by a suitable automata family and a logic notation. We introduce here operator precedence ω-languages (ωOPLs), investigating various acceptance criteria and their closure properties. Whereas some properties are natural extensions of those holding for regular languages, others require novel investigation techniques. Applicationoriented examples show the gain in expressiveness and verifiability offered by ωOPLs w.r.t. smaller classes.
Algebraic properties of structured context-free languages: old approaches and novel developments
Eprint Arxiv 0907 2130, 2009
The historical research line on the algebraic properties of structured CF languages initiated by McNaughton's Parenthesis Languages has recently attracted much renewed interest with the Balanced Languages, the Visibly Pushdown Automata languages (VPDA), the Synchronized Languages, and the Height-deterministic ones. Such families preserve to a varying degree the basic algebraic properties of Regular languages: boolean closure, closure under reversal, under concatenation, and Kleene star. We prove that the VPDA family is strictly contained within the Floyd Grammars (FG) family historically known as operator precedence. Languages over the same precedence matrix are known to be closed under boolean operations, and are recognized by a machine whose pop or push operations on the stack are purely determined by terminal letters. We characterize VPDA's as the subclass of FG having a peculiarly structured set of precedence relations, and balanced grammars as a further restricted case. The non-counting invariance property of FG has a direct implication for VPDA too.
Operator Precedence\ omega-languages
2013
ω-languages are becoming more and more relevant nowadays when most applications are "ever-running". Recent literature, mainly under the motivation of widening the application of model checking techniques, extended the analysis of these languages from the simple regular ones to various classes of languages with "visible syntax structure", such as visibly pushdown languages (VPLs). Operator precedence languages (OPLs), instead, were originally defined to support deterministic parsing and, though seemingly unrelated, exhibit interesting relations with these classes of languages: OPLs strictly include VPLs, enjoy all relevant closure properties and have been characterized by a suitable automata family and a logic notation. In this paper we introduce operator precedence ω-languages (ωOPLs), investigating various acceptance criteria and their closure properties. Whereas some properties are natural extensions of those holding for regular languages, others required novel investigation techniques. Application-oriented examples show the gain in expressiveness and verifiability offered by ωOPLs w.r.t. smaller classes.