Commit e23df09
committed
copilot-theorem: Add XEmptyArray and XArray cases for valFromExpr. Refs #589.
Currently, the `Copilot.Theorem.What4.prove` function returns a list of
results, where each result contains a `SatResult` that describes whether a
property is `Valid`, `Invalid`, or `Unknown`. The `Invalid` result has the
limitation that it does not give any information about a specific
counterexample that could drive Copilot into falsifying the property, however.
This makes it challenging to interpret what the results of prove mean.
The `valFromExpr` function (which produces concrete values when making a
counterexample) was lacking cases for `XEmptyArray` and `XArray`, so it would
fail if the function was called on these values.
This commit adds these missing cases, which make use of the `Typed` evidence
added to `XEmptyArray` and `XArray` in a previous commit. We do not yet add a
case for structs, which prove more challenging.1 parent 86d7543 commit e23df09
1 file changed
+29
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
387 | 389 | | |
388 | 390 | | |
389 | 391 | | |
390 | | - | |
391 | | - | |
392 | | - | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
393 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
394 | 400 | | |
395 | 401 | | |
396 | 402 | | |
| |||
420 | 426 | | |
421 | 427 | | |
422 | 428 | | |
423 | | - | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
424 | 446 | | |
425 | 447 | | |
426 | 448 | | |
| |||
0 commit comments