@@ -116,30 +116,22 @@ fn test_create_free ()
116116
117117### Relational Specifications
118118
119- Some specifications are inherently relational, meaning the allow multiple valid
119+ Some specifications are inherently relational, meaning they allow multiple valid
120120outputs for a given input.
121121
122- A good example of this is CLRS.Ch22.TopologicalSort.Impl, which only proves that
123- it returns a valid topological sort, of which there may be many. This is a
122+ A good example of this is CLRS.Ch23.Kruskal.Impl,
123+ which only proves that
124+ it returns a valid minimal spanning tree, of which there may be several; and further, the order
125+ of edges in the predecessor array is undetermined. This is a
124126common style of specification that does not overly constrain implementations,
125127while also providing useful, abstract specifications to clients.
126128
127129In such cases, we have instructed agents to author test cases that enumerate all
128130possible correct outputs and prove that the postcondition is sufficiently strong
129- to prove that
131+ to prove that the output satisfies a disjunction of all the legal outputs.
130132
131- - each correct output is admissible by the postcondition
132- - no other outputs are admissible by the postcondition
133-
134- However, so far, we have yet to have agents generate such strong tests for
135- relational specifications.
136-
137- For example, for the case of topological sort, the test proves that the expected
138- output is indeed a valid topological sort, but does not prove that the returned
139- sort is exact one expected, nor does it enumerate all the legal outputs:
140- https://github.com/FStarLang/AlgoStar/blob/_address_reviews/autoclrs/ch22-elementary-graph/CLRS.Ch22.TopologicalSort.ImplTest.md#what-is-not-proven
141-
142- We are working to improve this.
133+ You can see an example of such a disjunctive assertion in a test of Kruskal here:
134+ https://github.com/FStarLang/AlgoStar/blob/main/autoclrs/ch23-mst/CLRS.Ch23.Kruskal.ImplTest.fst#L162
143135
144136## Summary of Results
145137
0 commit comments