Class Predicate


  • public final class Predicate
    extends java.lang.Object
    The Predicate class provides static methods to create predefined transformation rulesets to use with NodeTransformer.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.Enum<?>,​TransformerRule> getStandardRuleset()
      Create ruleset for standard predicate transformations.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getStandardRuleset

        public static java.util.Map<java.lang.Enum<?>,​TransformerRule> getStandardRuleset()
        Create ruleset for standard predicate transformations. Complete list of transformations is as follows:
         
         en - expression, cn - constant
         (neq x y z ...) -> (and (not (= x y)) (not (= x z)) (not (= y z)) ...)
         (<= ...) -> (or (< ...) (= ...))
         (> ...) -> (and (not (< ...)) (not (= ...)))
         (>= ...) -> (not (< ...))
         (not true/false) -> false/true
         (not (not expr)) -> expr
         (= true e) -> e
         (= false e) -> (not e)
         (= true e0 ...) -> (and e0 ...)
         (= false e0 ...) -> (and (not e0) ...)
         (= c0 c0 e0 ...) -> (= c0 ...)
         (= c0 c1 e1 ...) -> false
         (= c0 c0 ... c0) -> true
         (=> e0 ... en) -> (or (not e0) ... en)
         (and false ...) -> false
         (and true ...) -> (and ...)
         (or true ...) -> true
         (or false ...) -> (or ...)
         (ite true e0 e1) -> e0
         (ite false e0 e1) -> e1
         
         
        Returns:
        Map of transformer rulers.