r/ProgrammingLanguages • u/mttd • Jul 01 '26
The Expensive Fictions of Low-Level Programming Languages
https://stng.substack.com/p/the-expensive-fictions-of-low-level
19
Upvotes
r/ProgrammingLanguages • u/mttd • Jul 01 '26
View all comments
Show parent comment
1
u/matthieum Jul 01 '26
I remember an article about how for ages the specification of Ada SPARK
sortwas insufficient: it merely required that the output be sorted, which means a conforming implementation could just always return an empty array, or an array of N times one of the original elements, etc...I do think, though, that specs themselves can be tested. In particular, for any deterministic function, a specification which allows for two or more outputs for a single input is clearly insufficient.
I wonder if other properties, such as progress or algorithmic complexity for example, could similarly be checked by verifying the specification itself.