Learning Cover Context-Free Grammars from Structural Data

  • Mircea Marin
  • Gabriel Istrate
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8687)


We consider the problem of learning an unknown context-free grammar when the only knowledge available and of interest to the learner is about its structural descriptions with depth at most ℓ. The goal is to learn a cover context-free grammar (CCFG) with respect to ℓ, that is, a CFG whose structural descriptions with depth at most ℓ agree with those of the unknown CFG. We propose an algorithm, called LA , that efficiently learns a CCFG using two types of queries: structural equivalence and structural membership. We show that LA runs in time polynomial in the number of states of a minimal deterministic finite cover tree automaton (DCTA) with respect to ℓ. This number is often much smaller than the number of states of a minimum deterministic finite tree automaton for the structural descriptions of the unknown grammar.


automata theory and formal languages structural descriptions grammatical inference 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Angluin, D.: Learning regular sets from queries and counterexamples. Information and Computation 75, 87–106 (1987)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Angluin, D., Kharitonov, M.: When won’t membership queries help? Journal of Computer and System Sciences 50(2), 336–355 (1995)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Brainerd, W.S.: The minimalization of tree automata. Information and Control 13(5), 484–491 (1968)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Farzan, A., Chen, Y.-F., Clarke, E.M., Tsay, Y.-K., Wang, B.-Y.: Extending automated compositional verification to the full class of omega-regular languages. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 2–17. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  5. 5.
    De la Higuera, C.: Grammatical inference: learning automata and grammars. Cambridge University Press (2010)Google Scholar
  6. 6.
    Holzer, M., Jakobi, S.: From equivalence to almost-equivalence, and beyond—minimizing automata with errors. In: Yen, H.-C., Ibarra, O.H. (eds.) DLT 2012. LNCS, vol. 7410, pp. 190–201. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  7. 7.
    Hopcroft, J.E., Motwani, R., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation, 2nd edn. Pearson Addison Wesley (2003)Google Scholar
  8. 8.
    Ipate, F.: Learning finite cover automata from queries. Journal of Computer and System Sciences 78(1), 221–244 (2012)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Kumar, V., Madhusudan, P., Viswanathan, M.: Minimization, learning, and conformance testing of boolean programs. In: Baier, C., Hermanns, H. (eds.) CONCUR 2006. LNCS, vol. 4137, pp. 203–217. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  10. 10.
    Levy, L.S., Joshi, A.K.: Skeletal structural descriptions. Information and Control 39(3), 192–211 (1978)MathSciNetCrossRefzbMATHGoogle Scholar
  11. 11.
    Maler, O., Pnueli, A.: On the learnability of infinitary regular sets. Information and Computation 118(2), 316–326 (1995)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Sakakibara, Y.: Learning context-free grammars from structural data in polynomial time. Theoretical Computer Science 76, 223–242 (1990)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Sipser, M.: Introduction to the Theory of Computation, 2nd edn. Thomson (2006)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Mircea Marin
    • 1
  • Gabriel Istrate
    • 1
    • 2
  1. 1.Department of Computer ScienceWest University of TimişoaraTimişoaraRomania
  2. 2.e-Austria Research InstituteTimişoaraRomania

Personalised recommendations