14. A computer program product comprising a computer usable medium including computer usable program code stored thereon for automatically generating a query to test a query processing engine that processes queries received by the query processing engine when executed in a memory, the computer program product comprising: computer usable program code for describing data and occurrence using a sequence type; computer usable program code for matching the data and the occurrence from the sequence type to a sequence type pattern; computer usable program code for automatically generating sentences in a query language using the sequence type pattern; computer usable program code for testing an ability of the query processing engine to interpret queries using the sentences that are automatically generated; computer usable program code for defining a grammar wherein the grammar uses the sequence type pattern to drive sentence generation by producing a plurality of tokens in the grammar automatically, wherein the plurality of tokens is consistent with the sequence type pattern, and translating the plurality of tokens into a syntactically valid query in a target language automatically; and computer usable program code for defining the sequence type pattern wherein the sequence type pattern abstracts a class of query.
15. The computer program product of claim 14 , further comprising: computer usable program code for generating code for a rule clause; computer usable program code for executing the rule clause to generate a syntax tree; and computer usable program code for processing the syntax tree to perform data generation.