private boolean isDefinitelyPrimitive(ExpressionNode node, TransformContext context) {
        try {
            return node.type(context.types()).rank() == 0;
        }
        catch (IllegalArgumentException e) {
            // Types can only be reliably resolved top down, which has not done here.
            // E.g
            // function(nameArg) {
            //    attribute(nameArg)
            // }
            // is supported.
            // So, we return false when something cannot be resolved.
            return false;
        }
    }
Transforms
       a &amp;&amp; b into if(a, b, false)
and
       a || b into if(a, true, b)
to avoid computing b if a is false and true respectively.

This may increase performance since boolean expressions are not short-circuited.

@author bratseth
config-model/src/main/java/com/yahoo/schema/expressiontransforms/BooleanExpressionTransformer.java