• DocumentCode
    1703716
  • Title

    Fast, flexible syntactic pattern matching and processing

  • Author

    Griswold, William G. ; Atkinson, Darren C. ; McCurdy, Collin

  • Author_Institution
    Dept. of Comput. Sci. & Eng., California Univ., San Diego, La Jolla, CA, USA
  • fYear
    1996
  • Firstpage
    144
  • Lastpage
    153
  • Abstract
    Program understanding can be assisted by tools that match patterns in the program source. Lexical pattern matchers provide excellent performance and ease of use, but have a limited vocabulary. Syntactic matchers provide more precision, but may sacrifice performance, retargetability, ease of use, or generality. To achieve more of the benefits of both models, we extend the pattern syntax of AWK to support matching of abstract syntax trees, as demonstrated in a tool called TAWK. Its pattern syntax is language-independent, based on abstract tree patterns. As in AWK, patterns can have associated actions, which in TAWK are written in C for generality, familiarity, and performance. The use of C is simplified by high-level libraries and dynamic linking. To allow processing of program files containing non-syntactic constructs, mechanisms have been designed that allow transparent matching in a syntactic fashion. So far TAWK has been retargeted to the MUMPS and C programming languages. We survey and apply prototypical approaches to concretely demonstrate the tradeoffs. Our results indicate that TAWK can be used to quickly and easily perform a variety of common software engineering tasks, and the extensions to accommodate non-syntactic features significantly extend the generality of syntactic matchers
  • Keywords
    C language; pattern matching; program diagnostics; reverse engineering; software libraries; software performance evaluation; software tools; AWK; C; MUMPS; TAWK; abstract syntax trees; dynamic linking; ease of use; generality; high-level libraries; lexical pattern matchers; pattern processing; pattern syntax; performance; program source; program understanding; prototype; retargetability; software engineering; software tools; syntactic pattern matching; vocabulary; Computer languages; Computer science; Joining processes; Libraries; Pattern matching; Programming profession; Prototypes; Software performance; Software prototyping; Vocabulary;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Program Comprehension, 1996, Proceedings., Fourth Workshop on
  • Conference_Location
    Berlin
  • ISSN
    1092-8138
  • Print_ISBN
    0-8186-7283-8
  • Type

    conf

  • DOI
    10.1109/WPC.1996.501129
  • Filename
    501129