The Predicate Tree

The Leaf Node of a Query Tree contains a pointer to a Predicate Tree. It can always be written out as an Objectivity predicate string. The Predicate Tree has the following nodes:



Leaf Nodes  

Operational Nodes
Symbol Name
&& Logical conjunction operator
|| Logical disjunction operator
! Logical negation operator, unary
> Greater than
< Less than
>= Greater equal
<= Less equal
=, == Equality relation
<>, != Inequality
=~ Regular expression string comparison
!~ NOT form of regular expression string comparison
=~~ Case insensitive regular expression string comparison
!~~ Case insensitive NOT form of regular expresstion string comp
+ Addition
- Subtraction or unary minus
* Multiplication
/ Division
% Remainder

The Domain Classes

There are two Domains:
  Each of these should has a method to print itself into a predicate string that is understood by Objectivity.

The Domain classes shold contain some methods for self-optimization. If a new Domain is generated from two Domains by logical AND or OR, it may well be that the outcoming Domain is much simpler than the initial ones. This optimization is needed since the optimization of the Predicate Trees in the Parser involves such operations on Domains.