Figure 7(a) shows the A
goVista type hierarchy.
Only some of these types are directly expressible in QL. For
example, even though A
goVista has a set type, there is no
concrete QL syntax for sets. Rather, as we will see in
Section 5, query transformations
are responsible for inferring a collection of possible types
from a QL query, including that a vector
[1,2,3]
could represent the set
.
This allows checklets
to be very specific about what types of queries they will
accept, and it allows A
goVista users to be very non-specific
in how they formulate their queries. For example,
an unsophisticated user might issue the query
in the search for the set union operation. He is not required by the A([1,2,3],[3,2,4])==>[1,2,3,4]
The set union checklet, on the other hand, can specify explicitly that it will only accept queries that map two sets to a third set, i.e. that has the signature
Map(Pair(Set(Int),Set(Int)),Set(Int)).Type-checking queries and checklets will prevent a query such as
from being submitted to the set union checklet since one of the vectors is not a set.([1,2,2],[2,3,4])==>[1,2,3,4]
Figure 7(b) shows the mapping from QL queries to type signatures. Figure 7(c) gives some examples.