File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1016,6 +1016,10 @@ FUZZ_TARGET(clusterlin_simple_linearize)
10161016 auto perm_chunking = ChunkLinearization (depgraph, perm_linearization);
10171017 auto cmp = CompareChunks (simple_chunking, perm_chunking);
10181018 assert (cmp >= 0 );
1019+ // If perm_chunking is diagram-optimal, it cannot have more chunks than
1020+ // simple_chunking (as simple_chunking claims to be optimal, which implies minimal
1021+ // chunks.
1022+ if (cmp == 0 ) assert (simple_chunking.size () >= perm_chunking.size ());
10191023 } else {
10201024 // Otherwise, fast forward to the last permutation with the same non-topological
10211025 // prefix.
@@ -1110,6 +1114,9 @@ FUZZ_TARGET(clusterlin_linearize)
11101114 // If SimpleLinearize finds the optimal result too, they must be equal (if not,
11111115 // SimpleLinearize is broken).
11121116 if (simple_optimal) assert (cmp == 0 );
1117+ // If simple_chunking is diagram-optimal, it cannot have more chunks than chunking (as
1118+ // chunking is claimed to be optimal, which implies minimal chunks).
1119+ if (cmp == 0 ) assert (chunking.size () >= simple_chunking.size ());
11131120
11141121 // Compare with a linearization read from the fuzz input.
11151122 auto read = ReadLinearization (depgraph, reader);
You can’t perform that action at this time.
0 commit comments