LUPOSDATE Logo

Rule Documentation

All Packages - Package Correct Operatorgraph - Package Logical Optimization - Package Physical OptimizationFRAMES - NO FRAMES

Rule Constant Propagation of filter with ORs

Short Description:

This rule implements constant propagation for a set of constants.

See also:

Constant Propagation, Variable Propagation

Long Description:

If there Filter expressions with a equal-comparision of a variable with a set of constant values, e.g. Filter(?X=<http://myURL.de> || ?X="hello" || ?X="myContent"^^myURL:myDatatype), then this constant values can be propagated to preceding (RDF3X/Hexastore) Index operators in certain cases. Afterwards, the corresponding variable (here ?X) must be bound with the constant values (here <http://myURL.de>, "hello" and "myContent"^^myURL:myDatatype), e.g. ?Y ?Z ?X. Filter(?X=<http://myURL.de> || ?X="hello" || ?X="myContent"^^myURL:myDatatype) is transformed into {?Y ?Z <http://myURL.de>. AddBinding(?X=<http://myURL.de>)} UNION {?Y ?Z "hello". AddBinding(?X="hello")} UNION { ?Y ?Z "myContent"^^myURL:myDatatype. AddBinding(?X="myContent"^^myURL:myDatatype)}. However, there are problems with this approach if one of the constant values can be value-equal with another constant value using a different representation, e.g. +01^^xsd:int is value-equal, but not identical to 1^^xsd:int. Thus, this transformation rule is not applied whenever one of the constant values is a numerical value or a language tagged literal.

The following figure contains the graphical representation of the transformation rule.


Constant propagation
All Packages - Package Correct Operatorgraph - Package Logical Optimization - Package Physical OptimizationFRAMES - NO FRAMES