private static Binding graphResultsToBinding(Binding parent, Domain d, Var[] projectionVars) { // Copy out Binding binding = new BindingMap(parent) ; for ( int i = 0 ; i < projectionVars.length ; i++ ) { Var var = projectionVars[i] ; Node n = d.get(i) ; if ( n == null ) // There was no variable of this name. continue ; binding.add(var, n) ; } return binding ; }