At his talk in San Diego yesterday, @guillaumebrunerie showed that making certain functions opaque can help with evaluating nasty terms. The problem is that sometimes the opaque functions have to be unfolded.
Here's my idea: annotate functions with evaluation priority levels. Using the convention that higher numbers correspond to higher priorities and that the default priority level is 0, we can replace opaque functions with priority level (-1) functions. Then the evaluator would treat them as opaque until it gets stuck, then try to evaluate them.
We can also play with partial evaluation by setting everything below a certain priority level as opaque.
At his talk in San Diego yesterday, @guillaumebrunerie showed that making certain functions opaque can help with evaluating nasty terms. The problem is that sometimes the opaque functions have to be unfolded.
Here's my idea: annotate functions with evaluation priority levels. Using the convention that higher numbers correspond to higher priorities and that the default priority level is 0, we can replace opaque functions with priority level (-1) functions. Then the evaluator would treat them as opaque until it gets stuck, then try to evaluate them.
We can also play with partial evaluation by setting everything below a certain priority level as opaque.