Any semantic question about the program (semantic = about input/output relation, as opposed to syntactic = about the source code itself). Note that this is uncomputable due to rice's theorem. "Output" includes whether the computation halts.
Find a semantically equivalent computation that fulfills/maximizes some criterion:
Find a computation that is semantically equivalent after applying some mapping to the input and/or output:
Any question about the set of programs performing the same computation.
Treat the program as an anthropological artifact.
(Thanks for reminding me why I love CS so much!)
Substituting parts of the computation (replace a slow, correct algorithm for part of the computation with a fast, approximate one)
The process used to generate a valid computation could itself be a valuable compression/training process of some sort. Characteristics of the final computation might be useful as feedback. I guess generalizing is just taking your listed use cases and seeing the computation in question as either up or downstream from the thing we really care about.
Consider this function
This is valid code that returns True.
Note that you can tell it returns true without doing operations, and a good compiler could too.
Shouldn't this also be valid code?
There are a whole space of "programs" that cant be computed directly, but can still be reasoned about. Computing directly is a subset of reasoning.
In imperative programming languages, the main purpose of a program is to specify a computation, which we then run. But it seems a rather... unimaginative use of a computation, simply to run it.
Having specified a computation, what else might one want to do with it?
Some examples:
I'm also interested in more general meta-use-cases for computations, which generate use-cases that aren't just "run the computation". For instance, some patterns in the examples above: