First-Order Logic Definability of Free Languages
Operator Precedence Grammars (OPGs) define a deterministic class of context-free languages, which extend input-driven languages and still enjoy many properties: they are closed w.r.t. Boolean operations, concatenation and Kleene star; the emptiness problem is decidable; they are recognized by a suitable model of pushdown automaton; they can be characterized in terms of a monadic second-order logic. Also, they admit efficient parallel parsing.
In this paper we introduce a subclass of OPGs, namely Free Grammars (FrGs); we prove some of its basic properties, and that, for each such grammar G, a first-order logic formula \(\psi \) can effectively be built so that L(G) is the set of all and only strings satisfying \(\psi \).
FrGs were originally introduced for grammatical inference of programming languages. Our result can naturally boost their applicability; to this end, a tool is made freely available for the semiautomatic construction of FrGs.
- 12.Fischer, M.J.: Some properties of precedence languages. In: STOC 1969, pp. 181–190 (1969)Google Scholar
- 13.Grune, D., Jacobs, C.J.: Parsing Techniques: A Practical Guide. Springer, New York (2008)Google Scholar
- 14.de la Higuera, C.: Grammatical Inference: Learning Automata and Grammars. Cambridge University Press, New York (2010)Google Scholar
- 15.Kamp, H.: Tense logic and the theory of linear order. Ph.D. thesis. University of California, Los Angeles (1968)Google Scholar
- 18.Lonati, V., Mandrioli, D., Pradella, M.: Logic characterization of invisibly structured languages: the case of floyd languages. In: van Emde Boas, P., Groen, F.C.A., Italiano, G.F., Nawrocki, J., Sack, H. (eds.) SOFSEM 2013. LNCS, vol. 7741, pp. 307–318. Springer, Heidelberg (2013) CrossRefGoogle Scholar