Table of Contents
Modern integrated development environments include some sort of code browser; the browser understands the elements and structure of your source code and presents that structure in various ways to help you navigate your code base. BBQ has the same basic purpose: to help you find things in your code. What BBQ lets you do that a conventional browser does not is specify just what you want to find with as much precision and complexity as you desire; it will then find just the spots in your code in which you're interested. When you are developing a program, you have a mental model of what will need to be changed next: BBQ is intended to make it possible to express that mental model and get a view of just those aspects of your system in which you are interested. The bigger the system, or the more unfamiliar with it you are, the more valuable BBQ will be.
To make this possible for you, BBQ introduces a new language, a language specialized for finding things in your code. The assumption is that programmers are skilled at expressing complex ideas by composing expressions--why not let them use this skill to more effectively navigate their code base? Most database programmers wouldn't dream of working without the ability to compose ad hoc SQL queries to show what is in the database. Why shouldn't you use a similar facility to help you work with the thousands of classes, variables and methods in your system?
The purpose of BBQ is to easily find constructs in your code, any of the things BBQ keeps track of: class definitions, method definitions, method calls, field references and more. The language is intended to allow you to express what you are interested in, if not in plain english, at least in a form that is reasonably close to how you might think. You write an expression, a set expression, that defines the set of program constructs you want to see.[1] BBQ then finds all the parts of your code that match the expression. Typically, BBQ will have read your code (known as the analyzed system) into an object-oriented database. The set expression specifies a query on this database.
One of a few simple set expressions forms the basis
for any query. These are simple noun phrases that describe
a set of program constructs: all classes
represents
all the classes in your program; class "java.util.ArrayList"
represents a single class.
You go from the simple set expressions to the exact set expression you want by applying modifiers to the simple expression. BBQ has a library of built-in modifiers--transforms and filters[2]--that represent the relationships between program objects. Using these modifiers in the set expression tells BBQ how to follow these relationships to retrieve the desired results.
[1] Those familiar with regular expressions may find that BBQ set expressions are analogous; instead of finding instances of matching character strings, set expressions let you find instances of matching program constructs.
[2] This terminology is generic and might be confusing to those familiar with Unix shell programming, since a BBQ transform is in fact comparable to a Unix filter command, while a BBQ filter is more specialized.
browse-by-query home | antlersoft free software | sourceforge project page |