Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

QueryablePool Class Reference

A QueryablePool is a pool which goes beyond TripleSource.fetch to actually do full query matching. More...

#include <QueryablePool.h>

Inheritance diagram for QueryablePool::

Pool TripleSource TripleSink DeductivePool XSBPool Collaboration diagram for QueryablePool:

Collaboration graph
List of all members.

Public Methods

Detailed Description

A QueryablePool is a pool which goes beyond TripleSource.fetch to actually do full query matching.

Querying is attached to a Pool this way on the assumption that one usually does multiple queries on the same fairly-static Pool.

Definition at line 18 of file QueryablePool.h.

Member Function Documentation

virtual Query* QueryablePool::query const TripleSource   pattern [pure virtual]

Create a new query, trying to match the given pattern.

The formal semantics of the query are "does the formula ('this') logically entail the formula 'pattern'?" (If it does, then I might want proof or maybe just some bindings.) The different kinds of queries one might want correspond to different kinds of logical entailment. If the query allows variables in the pattern to match constants in the pool (not just variables in the pool), that means the entailment proceedure includes existential instantiation. Variables in the pool matching constants in the pattern would be like "someone has a car" entailing "Sam has a car", which is probably not what you want.

Some pools (eg XSBPool) can only support one query per Agent. Calling query() again before the previous one has been closed is an error.
a pointer to a new Query object, which you should delete when you're done.

Reimplemented in XSBPool.

TripleSource * QueryablePool::unionWith const TripleSource   other [virtual]

Computer the set union.

This is called "unionWith" instead of "union" because union is a C++ keyword.

Reimplemented from TripleSource.

Definition at line 65 of file QueryablePool.cpp.

Home to blindfold. This page generated via doxygen Wed Oct 10 16:40:36 2001.