Skip to main content

First-Order Logic Definability of Free Languages

  • Conference paper
  • First Online:
Computer Science -- Theory and Applications (CSR 2015)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9139))

Included in the following conference series:

Abstract

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.

Work partially supported by MIUR project PRIN 2010LYA9RH-006.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    This less usual but equivalent definition of axioms as a set has been adopted for parenthesis languages [19] and other input-driven languages; we chose it for this paper to simplify some notations and constructions.

  2. 2.

    An example language that cannot be generated with an \(\doteq \)-acyclic OPM is the following: \(\mathcal {L} = \{a^n {(b c)}^n \mid n\ge 0\} \cup \{b^n {(c a)}^n \mid n\ge 0\} \cup \{c^n (a b)^n \mid n\ge 0\} \).

  3. 3.

    The grammars presented here have been produced by the Flup tool (the whole package, which includes various utilities for the general class of OPLs, is available at [1]). In the future we plan to couple Flup with an additional tool that minimizes the original grammar by applying the classical procedure introduced in [19].

References

  1. Flup. https://github.com/bzoto/flup

  2. Alur, R., Arenas, M., Barceló, P., Etessami, K., Immerman, N., Libkin, L.: First-order and temporal logics for nested words. Log. Methods Comput. Sci. 4(4), 1–14 (2008)

    Article  Google Scholar 

  3. Alur, R., Madhusudan, P.: Adding nesting structure to words. J. ACM 56(3), 1–43 (2009)

    Article  MathSciNet  Google Scholar 

  4. Barenghi, A., Crespi Reghizzi, S., Mandrioli, D., Panella, F., Pradella, M.: The PAPAGENO parallel-parser generator. In: Cohen, A. (ed.) CC 2014 (ETAPS). LNCS, vol. 8409, pp. 192–196. Springer, Heidelberg (2014)

    Chapter  Google Scholar 

  5. Brainerd, W.S.: The minimization of tree automata. Inf. Control 13(5), 484–491 (1968)

    Article  MATH  MathSciNet  Google Scholar 

  6. Crespi Reghizzi, S., Guida, G., Mandrioli, D.: Noncounting context-free languages. J. ACM 25, 571–580 (1978)

    Article  MATH  MathSciNet  Google Scholar 

  7. Crespi Reghizzi, S., Mandrioli, D.: A class of grammars generating non-counting languages. Inf. Process. Lett. 7(1), 24–26 (1978)

    Article  MathSciNet  Google Scholar 

  8. Crespi Reghizzi, S., Mandrioli, D.: Operator precedence and the visibly pushdown property. J. Comput. Syst. Sci. 78(6), 1837–1867 (2012)

    Article  MATH  MathSciNet  Google Scholar 

  9. Crespi Reghizzi, S., Mandrioli, D., Martin, D.F.: Algebraic properties of operator precedence languages. Inf. Control 37(2), 115–133 (1978)

    Article  MATH  MathSciNet  Google Scholar 

  10. Crespi Reghizzi, S., Melkanoff, M.A., Lichten, L.: The use of grammatical inference for designing programming languages. Commun. ACM 16(2), 83–90 (1973)

    Article  MATH  MathSciNet  Google Scholar 

  11. D’Ulizia, A., Ferri, F., Grifoni, P.: A survey of grammatical inference methods for natural language learning. Artif. Intell. Rev. 36(1), 1–27 (2011). http://dx.doi.org/10.1007/s10462-010-9199-1

    Article  Google Scholar 

  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 

  16. Lautemann, C., Schwentick, T., Thérien, D.: Logics for context-free languages. In: Pacholski, L., Tiuryn, J. (eds.) CSL 1994. LNCS, vol. 933, pp. 205–216. Springer, Heidelberg (1995)

    Chapter  Google Scholar 

  17. Lonati, V., Mandrioli, D., Pradella, M.: Precedence automata and languages. In: Kulikov, A., Vereshchagin, N. (eds.) CSR 2011. LNCS, vol. 6651, pp. 291–304. Springer, Heidelberg (2011)

    Chapter  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)

    Chapter  Google Scholar 

  19. McNaughton, R.: Parenthesis grammars. J. ACM 14(3), 490–500 (1967)

    Article  MATH  MathSciNet  Google Scholar 

  20. McNaughton, R., Papert, S.: Counter-Free Automata. MIT Press, Cambridge (1971)

    MATH  Google Scholar 

  21. Panella, F., Pradella, M., Lonati, V., Mandrioli, D.: Operator precedence \(\omega \)-languages. In: Béal, M.-P., Carton, O. (eds.) DLT 2013. LNCS, vol. 7907, pp. 396–408. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Matteo Pradella .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Lonati, V., Mandrioli, D., Panella, F., Pradella, M. (2015). First-Order Logic Definability of Free Languages. In: Beklemishev, L., Musatov, D. (eds) Computer Science -- Theory and Applications. CSR 2015. Lecture Notes in Computer Science(), vol 9139. Springer, Cham. https://doi.org/10.1007/978-3-319-20297-6_20

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-20297-6_20

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-20296-9

  • Online ISBN: 978-3-319-20297-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics