context.setComputationTargetResolver(context.getRawComputationTargetResolver().atVersionCorrection(properties.getResolutionTime()));
builder.setCompilationContext(context);
final Collection<ResolutionRule> rules = _builderContext.getFunctionResolver().compile((properties.getValuationTime() != null) ? properties.getValuationTime() : Instant.now())
.getAllResolutionRules();
// TODO: allow transformation rules
final DefaultCompiledFunctionResolver functions = new DefaultCompiledFunctionResolver(context, rules);
functions.compileRules();
builder.setFunctionResolver(functions);
builder.setFunctionExclusionGroups(_builderContext.getFunctionExclusionGroups());
// TODO this isn't used. is this OK?
final UserPrincipal marketDataUser = UserPrincipal.getLocalUser();
final MarketDataProviderResolver resolver = _builderContext.getMarketDataProviderResolver();