code: private double getUsedScore( VarBindingDef binding, boolean onceOnly)
      {
      // Since used tuples are in least-recently-used-first order, start from the end of the list and look
      // for the first tuple that includes this binding. This is the most recent use of this binding.
      // Return the distance of this tuple from the start of the list, as percentage of the size of the list.
      int index;
      int usedCount;
      Tuple nextTuple;
      for( usedCount = used_.size(),
             index = usedCount - 1;
  
           index >= 0
             && (nextTuple = used_.get( index)) != null
             && !((!onceOnly || nextTuple.isOnce()) && nextTuple.contains( binding));
  
           index--);
  
      return
        index < 0
        ? 0.0
  
        : (double)(index + 1) / (usedCount + 1);
      }
docs: Returns a measure of the "used-ness" of the given binding. If <CODE>onceOnly</CODE> is true, consider only once-only tuples.
  Returns a value between 0 and 1 (exclusive) -- a higher value means a binding is more used.