Abstract
Given two context-free grammars (CFGs), G 1 and G 2, the language generated by the union of the grammars is not the union of the languages generated by each grammar: L(G 1∪ G 2)≠ L(G 1∪ L(G 2). In order to account for modularity of grammars, another way of defining the meaning of grammars is needed. This paper adapts results from the semantics of logic programming languages to CFGs. We discuss alternative approaches for defining the denotation of a grammar, culminating in one which we show to be both compositional and fully-abstract. We then show how grammar modules can be defined such that their semantics retains these desirable properties. This gives a clear, mathematically sound way for composing parts of grammars.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Basili, R., M.T. Pazienza and F.M. Zanzotto. Customizable modular lexicalized parsing. In Proceedings of the Sixth International Workshop on Parsing Technologies (IWPT 2000), 41–52, Trento, Italy, 2000.
Bredenkamp, A., T. Declerck, F. Fouvry, B. Music and A. Theofilidis. 'Linguistic engineering using ALEP'. In Proceedings of RANLP'97, Tzigov Chark, Bulgaria, 1997.
Brogi, A., E. Lamma and P. Mello. Compositional model-theoretic semantics for logic programs, New Generation Computing 11: 1–21, 1992.
Bugliesi, M., E. Lamma, and P. Mello. Modularity in logic programming, Journal of Logic Programming 19/20: 443–502, 1994.
Callmeier, U. PET - a platform for experimentation with efficient HPSG processing techniques, Natural Language Engineering 6(1): 99–107, 2000.
Carpenter, B. and G. Penn. ALE: The Attribute Logic Engine - User's Guide. Technical Report, Lucent Technologies and Universität Tübingen, 1999.
Copestake, A. The (new) LKB system. Technical Report, Stanford University, 1999.
Copestake, A. and D. Flickinger. An open-source grammar development environment and broadcoverage English grammar using HPSG. In Proceedings of the Second Conference on Language Resources and Evaluation (LREC-2000), Athens, Greece, 2000.
Donahue, J. E. Complementary Definitions of Programming Language Semantics, vol. 42 of Lecture Notes in Computer Science, Berlin, Springer, 1976.
Dueck, G.D.P. and G.V. Cormack. Modular attribute grammars, The Computer Journal 33(2): 164–172, 1990.
Erbach, G. and H. Uszkoreit. Grammar engineering: problems and prospects. CLAUS Report 1, University of the Saarland and German Research Center for Artificial Intelligence, 1990.
Gaifman, H. and E. Shapiro. Fully abstract compositional semantics for logic programming. In Proceedings of the 16th Annual ACM Symposium on Principles of Logic Programming, 134–142, Austin, Texas, 1989.
Ghezzi, C. and M. Jazayeri. Programming Language Concepts, John Wiley & Sons, New York, 2nd edition, 1987.
Kasper, W. and H.-U. Krieger. Modularizing codescriptive grammars for efficient parsing. In Proceedings of the 16th Conference on Computational Linguistics, Kopenhagen, 628–633, 1996.
Keselj, V. Modular HPSG. Technical Report CS-2001-05, Department of Computer Science, University of Waterloo, Waterloo, Ontario, Canada, 2001.
Lassez, J.-L. and M.J. Maher. Closures and fairness in the semantics of programming logic, Theoretical Computer Science 29: 167–184, 1984.
Lehmann, S., D. Estival, and M. van der Kraan. A Modular organization for TFS grammar. In Integrative Ansätze in der Computerlinguistik, DGfS/CL95, Düsseldorf, 55-60, 1995.
Maher, M.J. Equivalences of logic programs. In J. Minker, editor, Foundations of Deductive Databases and Logic Programming, 627–658, Morgan Kaufmann, Los Altos CA, Chapter 16, 1988.
Malouf, R., J. Carroll, and A. Copestake. Efficient feature structure operations without compilation, Natural Language Engineering 6(1): 29–46, 2000.
Mancarella, P. and D. Pedreschi. An algebra of logic programs. In R.A. Kowalski and K.A. Bowen, editors, Logic Programming: Proceedings of the Fifth International Conference and Symposium, 1006-1023, MIT Press, Cambridge, MA, 1988.
Milner, R. Processes: a mathematical model of computing agents. In H.E. Rose and J.C. Shepherdson, editors, Logic Colloquium '73, 157–174, North-Holland, Amsterdam, 1975.
Oepen, S., D. Flickinger, H. Uszkoreit and J.-I. Tsujii. Introduction to this special issue, Natural Language Engineering 6(1): 1–14, 2000.
Pereira, F.C.N. and S.M. Shieber. The semantics of grammar formalisms seen as computer languages. In Proceedings of the 10th International Conference on Computational Linguistics and the 22nd Annual Meeting of the Association for Computational Linguistics, 123–129, Stanford, CA, 1984.
Pereira, F.C.N. and D.H.D. Warren. Parsing as deduction. In Proceedings of the 21st Annual Meeting of the Association for Computational Linguistics, 137–144, 1983.
Sarkar, A., F. Xia, and A. Joshi. Some experiments on indicators of parsing complexity for lexicalized grammars. In Efficiency in Large-Scale Parsing Systems: Workshop held at COLING 2000, Luxembourg, 2000.
Scott, D.S. and C. Strachey. Towards a mathematical semantics for computer languages. In J. Fox, editor, Proceedings of the Symposium on Computers and Automata, 19–46, Polytechnic Institute of Brooklyn Press, New York, 1971.
Shieber, S., Y. Schabes, and F. Pereira. Principles and implementation of deductive parsing, Journal of Logic Programming 24(12): 3–36, 1995.
Tennet, R.D. Semantics of Programming Languages, Prentice Hall International Series in Computer Science, Prentice Hall, Englewood Cliffs, NJ, 1991.
The XTAG Research Group. A Lexicalized tree adjoining grammar for English. IRCS Report 98-18, Institute for Research in Cognitive Science, University of Pennsylvania, Philadelphia, 1998.
Theofilidis, A., P. Schmidt, and T. Declerck. Grammar modularization for efficient processing: language engineering devices and their instantiations. In Proceedings of the DGFS/CL, Heidelberg, 1997.
Van Emden, M.H. and R.A. Kowalski. The semantics of predicate logic as a programming language, Journal of the Association for Computing Machinery 23(4): 733–742, 1976.
Wahlster, W. VERBMOBIL: Erkennung, Analyse, Transfer, Generierung und Synthese von Spontansprache. Verbmobil-Report 198 198, Deutsches Forschungszentrum für Künstliche Intelligenz, Saarbrücken, Germany, 1997.
Wintner, S. Compositional semantics for linguistic formalisms. In Proceedings of the 37th Annual Meeting of the Association for Computational Linguistics, 96–103, 1999a.
Wintner, S. Compositional semantics for unification-based linguistic formalisms. IRCS Report 99-05, Institute for Research in Cognitive Science, University of Pennsylvania, Philadelphia, PA, 1999b.
Wintner, S. Modularized context-free grammars. In Proceedings of MOL6 - Sixth Meeting onMathematics of Language. Orlando, FL, 61–72, 1999c.
Wintner, S. and N. Francez. Efficient implementation of unification-based grammars, Journal of Language and Computation 1(1): 53–92, 1999.
Woszczyna, M., M. Broadhead, D. Gates, M. Gavaldà, A. Lavie, L. Levin, and A. Waibel. A modular approach to spoken language translation for large domains. In Proceedings of AMTA-98, 1998.
Zajac, R. and J.W. Amtrup. Modular unification-based parsers. In Proceedings of the Sixth International Workshop on Parsing Technologies (IWPT 2000), 278–288, Trento, Italy, 2000.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Wintner, S. Modular Context-Free Grammars. Grammars 5, 41–63 (2002). https://doi.org/10.1023/A:1014216630973
Issue Date:
DOI: https://doi.org/10.1023/A:1014216630973