Skip to content

Commit 05fcf17

Browse files
authored
Add a reference to Kruskal in the relational specs part of the report
Add a reference to Kruskal in the relational specs part of the report.
1 parent fa5d276 commit 05fcf17

1 file changed

Lines changed: 8 additions & 16 deletions

File tree

autoclrs/TEST_REVIEW_REPORT.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -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
120120
outputs 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
124126
common style of specification that does not overly constrain implementations,
125127
while also providing useful, abstract specifications to clients.
126128

127129
In such cases, we have instructed agents to author test cases that enumerate all
128130
possible 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

Comments
 (0)