Previous Next

Grammar level Queries (Grammar level Composite Categories)

The which operator allows us to build up composite categories which have been sanctioned at the sensible level. Often we want to ask queries which are more general than are allowed by the sensible level sanctions. For example, we only have sanctions to say that a RoadVehicle can sensibly be owned by a Person. This says nothing about a Vehicle in general. (We might, for example, want to build a model in which RailVehicles could only sensibly be owned by companies.) However, it is perfectly reasonable to want to find all of the vehicles which are owned by men.

However, there is a grammatical sanction allowing us to talk about a Vehicle owned by any LivingThing, or conversely a LivingThing which owns a Vehicle. To ask a general query allowed by this grammatical sanction, we use the whichG operator (G for grammatical categories).

We can browse:

Person whichG isOwnerOf Vehicle.

This represents the concept of a Person who owns a Vehicle (remember that this may not be sensible if the Vehicle is, say, a Train or a StealthBomber).

Note that Person which isOwnerOf RoadVehicle is classified automatically under Person whichG isOwnerOf Vehicle. Note the + sign before Person whichG isOwnerOf Vehicle (indicating that it has children). Select it and expand it, and underneath will be CarOwner which will have been classified automatically and put in the correct place in the hierarchy according to the rules for formal subsumption.

Grammar level composite categories exist primarily to be used as a query mechanism as shown above. They can also be used for adding general knowledge, but should be used with caution. As an example of using grammar level composite categories for simple rules, consider the idea of insurance ratings for owners of Vehicles:

DomainAttribute newAttribute hasInsuranceRating isRatingOf
  allAll manyOne.

(Person whichG isOwnerOf Vehicle) grammaticallyAndSensibly
  hasInsuranceRating IntegerValueType.

We don’t want just to have a rating for owners of vehicles on the roads, but for all vehicle owners - even owners of kinds of vehicles we have not yet thought of. This statement guarantees that when we do think of new kinds of vehicles and extend the model to include them, then the sanctioning for having an insurance rating will also apply to owners of these as-yet-un-thought-of kinds of vehicles.

Previous Next
Making the impossible very difficult, ©OpenGALEN.org, All rights reserved