Structured search in source code
Abstract
Architecture allows a programmer to answer questions about the source code the programmer is authoring, questions that cannot be answered by other means. A searching mechanism is provided over a much more structured presentation of the source code. The architecture utilizes components that provide an intimate knowledge about the structure of the text, namely, the source code of some particular programming language. The search mechanism employs an abstract syntax tree representation of the code over which the search is conducted. The program source code (as edited by the programmer) is transformed into the abstract syntax tree to embody the structure of the program. If the syntax tree is provided in XML, for example, an XML search mechanism such as Xpath can be utilized to perform the actual searching. This tree is then queried, allowing richer searching criteria to be expressed (by virtue of the structured format of the tree).
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 25 · Forward citations: 4.
Claims (3 — 2 Independent, 1 Dependent)
- Claim 1Independent Claim
A computer-implemented search system, the search system comprising: a processor; and a memory in communication with the processor, the memory comprising computer-executable instructions that, when executed by the processor, cause the processor to represent, utilizing a conversion component, a grammar of a program code as an abstract syntax tree; and search, utilizing a search component, the abstract syntax tree based on a code-related query to obtain code results, the code-related query comprising an expression in a form of a grammatical unit, the processing of which by the search component in
- Claim 2Depends on #1
The system of claim 1 , wherein the abstract syntax tree is represented in extensible markup language (XML).
- Claim 3Independent Claim
The system of claim
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (4 of 4 total)
References Cited — Backward Prior Art (25)
Non-Patent Literature (5)
- "Search Implementation", retrieved at <<http://jackrabbit.apache.org/search-implementation.html>>, Oct. 3, 2008, p. 1-2.
- "Search Implementation", retrieved at >, Oct. 3, 2008, p. 1-2.
- "XML and Scheme ", retrieved at <<http://okmij.org/ftp/Scheme/SXML-short-paper.html>>, Mar. 4, 2001, p. 1-6.
- "XML and Scheme ", retrieved at >, Mar. 4, 2001, p. 1-6.
- Hughes, Kevin, "Projects:Source Code Search with Syntax-Based Heuristics", retrieved at <<http://cs343-spr0607.stanford.edu/index.php/Projects:Source-Code-Search-with-Syntax-Based-Heuristics>>, Jun. 13, 2007, p. 1-8.