This should work, except there is one extra bit needed, which is that you need to configure your backend SAIL to use a ExtendedEvaluationStrategy instead of the default evaluation strategy. For example, if you're using a MemoryStore, you can do something like this:
MemoryStoreConfig storeConfig = new MemoryStoreConfig();
storeConfig.setEvaluationStrategyFactoryClassName(ExtendedEvaluationStrategyFactory.class.getName());
RepositoryImplConfig repConfig = new SailRepositoryConfig(storeConfig);
SailRepositoryFactory factory = new SailRepositoryFactory();
Repository rep = factory.getRepository(repConfig);
As an aside, despite SPIN being deprecated, one of the things we do want to preserve is its set of custom (tuple) functions, because they can be useful even outside of a SPIN context. If you're interested in helping out, we welcome contributors!
Cheers,
Jeen