Next: 7. Query Optimization
Up: AgoVista A Search Engine
Previous: 5. Query Transformations
6. Checklet Design
Extending the A
goVista coop with a new checklet may seem like an involved
process, but, fortunately, much has been automated. A typical upload
involves the following steps:
- 1.
- Produce an example query, for example
(1,2)==>3
for the IntAdd checklet.
- 2.
- Submit the example query to A
goVista's checklet template
generator. Figure 11 shows the
template produced from the query
(1,2)==>3
.
- 3.
- Fill in the Description() method with a short
description of the problem the checklet tests for.
- 4.
- Fill in the References() method with a list of
hyper-references to on-line resources related to
the problem.
- 5.
- Replace ``return false'' in the Check()
method with the relevant program checking code that
returns true if the checklet accepts a query,
and false otherwise. The Check() method
takes an AlgoVista.CL.Object as argument,
essentially the abstract syntax tree of a parsed
query. The template already contains code to unpack
this representation. For example, in Figure 11
intVal0 and intVal1 contain the input part
of the query, and intVal2 the output part.
Hence, in our example, ``return false'' would be
replaced by ``return (intVal0+intVal1)==intVal2''
- 6.
- Upload the new checklet to the A
goVista server where it
will be compiled, verified, and tested. A
goVista will possibly
return a list of compilation errors or security violations
that have to be fixed before the checklet will be accepted
into the coop.
The most difficult part is certainly constructing the actual program
checking code. Inspiration can sometimes be had from the result checking
literature [10,4,5,19,6,16,17],
but more often by examining existing checklets. A
goVista supports this by making the
source code of checklets available for perusal.
Next: 7. Query Optimization
Up: AgoVista A Search Engine
Previous: 5. Query Transformations
Christian S. Collberg
2000-01-27