search
top

Program Query Languages

Needless to say that query languages have gained a huge success across various application domains, especially business related solutions. Query languages are simple languages that are intended to facilitate making queries against repositories of resources such as data or information. For instance, most business applications use some sort of data storage such as a database or XML which can be easily queried against using SQL and XPath respectively.

The thing about query languages is that it enables programmers to describe the problem rather than how to solve it. This fact inspired a number of researchers to look at programs and source code as resources to be queried. As a result a new kind of query languages showed up called program query language. The purpose of program query languages is to enable programmers to make queries against:

  • Source code such as ASTLog and JTransformer. (Static Analysis)
  • Running Programs. (Dynamic Analysis)
  • Both such as SOUL, PQL, and .QL. (Hybrid)

Programmers and researchers have found a number of substantial uses of program query languages. One of the most important uses is finding bugs and errors, especially the runtime ones. For example, forcing code practices, such as closing a stream after it’s been used, is hard to detect. However PQL uses a very simple query to detect such a problem among others.

For those of you who understand by examples, click here for examples from the proprietary .QL language website. Also, don’t forget that PQL is the open source alternative.

So, tell me what do you think about program query languages? would you use them? what for? are they really usefull as their authors claim? Please, share your thoughts

Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
top