code: private Tuple toTuple( List<VarDef> combinedVars, TupleRef tupleRef)
      {
      if( tupleRef.size() != getTupleSize())
        {
        throw new IllegalStateException( String.valueOf( tupleRef) + " does not match combiner tuple size=" + getTupleSize());
        }
  
      Tuple tuple = new Tuple();
      for( Iterator<VarBinding> bindings = tupleRef.getVarBindings(); bindings.hasNext(); )
        {
        VarBinding binding = bindings.next();
        VarDef var = findVarPath( combinedVars, binding.getVar());
        if( var == null)
          {
          throw new IllegalStateException( "Var=" + binding.getVar() + " is not included in this combination");
          }
  
        VarValueDef value = var.getValue( binding.getValue());
        if( value == null)
          {
          throw new IllegalStateException( "Value=" + binding.getValue() + " is not defined for var=" + binding.getVar());
          }
  
        if( !value.isValid())
          {
          throw new IllegalStateException( "Value=" + binding.getValue() + " is a failure value for var=" + binding.getVar());
          }
  
        tuple.add( new VarBindingDef( var, value));
        }
  
      return tuple;
      }
docs: Converts a reference to a tuple of combined variables.