I prefer reference implementations to specifications

I've had this thought bouncing in my head for a while. Why do we publish specifications, when we could be publishing reference implementations?
If you publish a reference implementation rather than a freeform description:
If an undesirable behavior gets discovered for a given input, you can just write a test against that. Then your patch to the reference can unequivocally fix the issue.
There is no question of interpretation. For a given input, you must produce the same output as the reference implementation.
Automated test case generation: if you can program the computer to generate all possible inputs, you can run the reference implementation and your implementation in parallel against those auto-generated inputs and report whenever reference and test implementation differ.
No more "undefined behavior" cop-outs. Pick what the behavior has to be, but it must be one arbitrary thing rather than a hundred different arbitrary things.