Prune the final specification so that only the builtins that are needed are in the specification.