Techniques for improving grammar Flow Analysis

  • Martin Jourdan
  • Didier Parigot
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 432)


Grammar Flow Analysis (GFA) is a computation framework that can be applied to a large number of problems expressed on context-free grammars. In this framework, as was done on programs with Data Flow Analysis, those problems are split into a general resolution procedure and a set of specific propagation functions. This paper presents a number of improvement techniques that act on the resolution procedure, and hence apply to every GFA problem: grammar partitioning, non-terminals static ordering, weak stability and semantic stability. Practical experiments using circularity tests for attribute grammars will show the benefit of these improvements. This paper is a shortened version of [JoP90].


  1. [ASU86]
    A. V. Aho, R. Sethi & J. D. Ullman, Compilers: Principles, Techniques and Tools, Addison Wesley, Reading, MA, 1986.Google Scholar
  2. [Che81]
    K. S. Chebotar, “Some Modifications of Knuth's Algorithm for Verifying Cyclicity of Attribute Grammars,” Progr. and Computer Software 7, 1 (Jan. 1981), 58–61.Google Scholar
  3. [Che85]
    —, private communication, 1985.Google Scholar
  4. [CoC79]
    P. Cousot & R. Cousot, “Systematic Design of Program Analysis Frameworks,” in 6th ACM Symp. on Principles of Progr. Languages, San Antonio, TX, 269–282, Jan. 1979.Google Scholar
  5. [DJL84]
    P. Deransart, M. Jourdan & B. Lorho, “Speeding up Circularity Tests for Attribute Grammars,” Acta Inform. 21 (Dec. 1984), 375–391.CrossRefGoogle Scholar
  6. [DJL88]
    —, Attribute Grammars: Definitions, Systems and Bibliography, Lect. Notes in Comp. Sci. #323, Springer-Verlag, New York-Heidelberg-Berlin, Aug. 1988.Google Scholar
  7. [EnF82]
    J. Engelfriet & G. Filè, “Simple Multi-Visit Attribute Grammars,” J. Comput. System Sci. 24, 3 (June 1982), 283–314.CrossRefGoogle Scholar
  8. [HoO82]
    C. M. Hoffmann & M. J. O'Donnell, “Pattern Matching in Trees,” J. ACM 29, 1 (Jan. 1982), 68–95.CrossRefGoogle Scholar
  9. [JoM81]
    N. D. Jones & S. S. Muchnick, eds., Program Flow Analysis: Theory and Applications, Prentice-Hall, Englewood Cliffs, NJ, 1981.Google Scholar
  10. [JoP88]
    M. Jourdan & D. Parigot, “More on Speeding up Circularity Tests for Attribute Grammars,” rapport RR-828, INRIA, Rocquencourt, Apr. 1988.Google Scholar
  11. [JoP89]
    —, The FNC-2 System User's Guide and Reference Manual release 0.4, INRIA, Rocquencourt, Feb. 1989. This manual is periodically updated.Google Scholar
  12. [JoP90]
    —, “Techniques for Improving Grammar Flow Analysis,” report to appear, INRIA, Rocquencourt, 1990.Google Scholar
  13. [Knu68]
    D. E. Knuth, “Semantics of Context-free Languages,” Math. Systems Theory 2, 2 (June 1968), 127–145. Correction: Math. Systems Theory 5, 1 (Mar. 1971), 95–96.CrossRefGoogle Scholar
  14. [LoP75]
    B. Lorho & C. Pair, “Algorithms for Checking Consistency of Attribute Grammars,” in Proving and Improving Programs, Arc et Senans, G. Huet & G. Kahn, eds., 29–54, INRIA, Rocquencourt, July 1975.Google Scholar
  15. [Mön85]
    U. Möncke, “Generierung von Systemen zur Transformation attributierter Operatorbäume: Komponenten des Systems und Mechanismen der Generierung,” Diplomarbeit, Univ. des Saarlandes, Saarbrücken, 1985.Google Scholar
  16. [Mön87]
    —, “Grammar Flow Analysis,” ESPRIT PROSPECTRA Project report S.1.3.-R-2.2, Univ. des Saarlandes, Saarbrücken, Mar. 1986, revised Jan. 1987. To appear in ACM Trans. Progr. Languages and Systems.Google Scholar
  17. [MöW82]
    U. Möncke & R. Wilhelm, “Iterative Algorithms on Grammar Graphs,” in Conf. on Graphtheoretic Concepts in Computer Science (WG'82), Neunkirchen a.Br., H. J. Schneider & H. Göttler, eds., 177–194, Hanser Verlag, München, June 1982.Google Scholar
  18. [Par85]
    D. Parigot, “Un système interactif de trace des circularités dans une grammaire attribuée et optimisation du test de circularité,” rapport de DEA, Univ. de Paris-Sud, Orsay, Sept. 1985.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1990

Authors and Affiliations

  • Martin Jourdan
    • 1
  • Didier Parigot
    • 1
  1. 1.Domaine de Voulceau, RocquencourtINRIALe Chesnay CedexFrance

Personalised recommendations