Inference Rules

The definitions of superclass–subclass relationships between classes and of transitivity properties for associations already allow powerful inferencing of knowledge not coded in the topic map. But a topic map may contain further knowledge that could be inferred if we specify the inference rules.

Below is an inference rule for our example, assuming that projects are run only by employees and not by freelancers (where $employee is an instance of the class employee).

If $employee is a team member in project $project

And $employee works for company $company

And $project has customer $customer

Then $company has customer $customer.

Here's the rule in a more verbose form, which is closer to the topic map constructs.

If topic $employee

Get XML Topic Maps: Creating and Using Topic Maps for the Web now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.