• DocumentCode
    3081864
  • Title

    Semantic grep: regular expressions + relational abstraction

  • Author

    Bull, R. Ian ; Trevors, Andrew ; Malton, Andrew J. ; Godfrey, Michael W.

  • Author_Institution
    Software Archit. Group, Waterloo Univ., Ont., Canada
  • fYear
    2002
  • fDate
    2002
  • Firstpage
    267
  • Lastpage
    276
  • Abstract
    Searching source code is one of the most common activities of software engineers. Text editors and other support tools normally provide searching based on lexical expressions (regular expressions). Some more advanced editors provide a way to add semantic direction to some of the searches. Recent research has focused on advancing the semantic options available to text-based queries. Most of these results make use of heavy weight relational database management technology. In this paper we explore the extension of lexical pattern matching by means of light weight relational queries, implemented using a tool called grok. A "semantic grep" (sgrep) command was implemented, which translates queries in a mixed algebraic and lexical language into a combination of grok queries and grep commands. This paper presents the design decisions behind sgrep, and example queries that can be posed. The paper concludes with a case study in which sgrep was used to identify architectural anomalies in PostgreSQL, an open source Database Management System.
  • Keywords
    pattern matching; relational databases; reverse engineering; software engineering; browsing; lexical pattern matching; relational database management; relational queries; searching; semantic grep; software architecture; software engineers; Computer architecture; Data engineering; Database systems; Documentation; Open source software; Pattern matching; Relational databases; Software architecture; Software tools; Technology management;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Reverse Engineering, 2002. Proceedings. Ninth Working Conference on
  • ISSN
    1095-1350
  • Print_ISBN
    0-7695-1799-4
  • Type

    conf

  • DOI
    10.1109/WCRE.2002.1173084
  • Filename
    1173084