}
private static void finishPermuation(TreeLogger logger, Permutation perm,
FileBackedObject<PermutationResult> resultFile,
StandardLinkerContext linkerContext) throws UnableToCompleteException {
StandardCompilationResult compilation = linkerContext.getCompilation(
logger, resultFile);
StaticPropertyOracle[] propOracles = perm.getPropertyOracles();
for (StaticPropertyOracle propOracle : propOracles) {
BindingProperty[] orderedProps = propOracle.getOrderedProps();
String[] orderedPropValues = propOracle.getOrderedPropValues();
Map<SelectionProperty, String> unboundProperties = new HashMap<SelectionProperty, String>();
for (int i = 0; i < orderedProps.length; i++) {
SelectionProperty key = linkerContext.getProperty(orderedProps[i].getName());
if (key.tryGetValue() != null) {
/*
* The view of the Permutation doesn't include properties with defined
* values.
*/
continue;
} else if (key.isDerived()) {
/*
* The property provider does not need to be invoked, because the
* value is determined entirely by other properties.
*/
continue;
}
unboundProperties.put(key, orderedPropValues[i]);
}
compilation.addSelectionPermutation(unboundProperties);
}
logScriptSize(logger, perm.getId(), compilation);
}