/** * n is the index in Exp stack where Node is bound */ boolean push(Node node, Node target, int n) { if (node.isConstant()) { return true; } int index = node.getIndex(); if (nodes[index] == null) { // (nbNodes[index] > 0){ nodes[index] = target; qNodes[index] = node; nbNode++; nbNodes[index]++; // exp stack index where node is bound stackIndex[index] = n; return true; } else if (target == null) { // may happen with aggregate or subquery return false; } else if (match.same(node, nodes[index], target, this)) { nbNodes[index]++; return true; } // Query node already bound but target not equal to binding // also process use case: ?x ?p ?p return false; }