Commit f22cd52
authored
Refactor the constrained generators to get rid of the Fn stuff (#4921)
* Started refactoring constrained generators to get rid of the Fn stuff.
Broke up src/Constrained/Base into several files
src/Constrained/Experiment/Genrics
src/Constrained/Experiment/Base
defines Specification, HasSpec, Term, Pred,
Generic default methods for HasSpec
replaces the FunctionLike and Functions classes
with Syntax, Semantics and Logic classes
src/Constrained/Experiment/Syntax
src/Constrained/Experiment/Conformance
conformance functions, Monoid and Semigroup instances for Specification
src/Constrained/Experiment/NumSpec
OrdLike and NumLike
src/Constrained/Experiment/TheKnot
Ties the mutually recursive objects
genfromSpecT, simplifySpec, HasSpec Integer, HasSpec Sum, HasSpec Prod, HasSpec Bool
This mutual recursion is why the old Base.hs was so large 6400 lines
Added the Constrained/Experiment/Specs directory
with files that define HasSpec instances for List, Fold, Set, Map, Tree
Translated all the examples Constrained/Experiment/Examples
Translated all the tests Constrained/Experiment/Tests
* Applied the changes to the module constrained-generators
* Applied the changes to the cardano-ledger-test module
* Applied the changes to the cardano-ledger-conformance module.
* Finally fixed the type of mapTypeSpec
* final self review
* Remove references to Proof and PrettyCore
* Address comments and fix conflicts
* added Manual.md1 parent 655b552 commit f22cd52
File tree
82 files changed
+11249
-9281
lines changed- docs/constrained-generators
- libs
- cardano-ledger-conformance
- src/Test/Cardano/Ledger/Conformance
- ExecSpecRule
- Conway
- SpecTranslate/Conway
- test/Test/Cardano/Ledger/Conformance
- ExecSpecRule
- Imp
- Spec
- cardano-ledger-repl-environment/src
- cardano-ledger-test
- bench/Bench/Constrained
- src/Test/Cardano/Ledger
- Constrained/Conway
- Instances
- LedgerTypes
- constrained-generators
- bench/Constrained
- src
- Constrained
- Examples
- Spec
- test/Constrained
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
82 files changed
+11249
-9281
lines changedLarge diffs are not rendered by default.
Lines changed: 36 additions & 48 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
152 | | - | |
153 | | - | |
| 153 | + | |
| 154 | + | |
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
157 | | - | |
158 | | - | |
159 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
167 | | - | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | | - | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| |||
259 | 260 | | |
260 | 261 | | |
261 | 262 | | |
262 | | - | |
| 263 | + | |
263 | 264 | | |
264 | | - | |
265 | | - | |
266 | | - | |
| 265 | + | |
| 266 | + | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
| 273 | + | |
277 | 274 | | |
278 | | - | |
| 275 | + | |
279 | 276 | | |
280 | 277 | | |
281 | 278 | | |
| |||
351 | 348 | | |
352 | 349 | | |
353 | 350 | | |
354 | | - | |
355 | 351 | | |
356 | 352 | | |
357 | | - | |
| 353 | + | |
358 | 354 | | |
359 | 355 | | |
360 | 356 | | |
| |||
387 | 383 | | |
388 | 384 | | |
389 | 385 | | |
390 | | - | |
| 386 | + | |
391 | 387 | | |
392 | 388 | | |
393 | 389 | | |
394 | 390 | | |
395 | 391 | | |
396 | | - | |
397 | | - | |
398 | | - | |
| 392 | + | |
| 393 | + | |
399 | 394 | | |
400 | 395 | | |
401 | 396 | | |
| |||
405 | 400 | | |
406 | 401 | | |
407 | 402 | | |
408 | | - | |
409 | 403 | | |
410 | | - | |
| 404 | + | |
411 | 405 | | |
412 | 406 | | |
413 | 407 | | |
414 | 408 | | |
415 | 409 | | |
416 | 410 | | |
417 | 411 | | |
418 | | - | |
419 | | - | |
| 412 | + | |
| 413 | + | |
420 | 414 | | |
421 | 415 | | |
422 | 416 | | |
| |||
471 | 465 | | |
472 | 466 | | |
473 | 467 | | |
474 | | - | |
| 468 | + | |
475 | 469 | | |
476 | 470 | | |
477 | 471 | | |
| |||
531 | 525 | | |
532 | 526 | | |
533 | 527 | | |
534 | | - | |
535 | 528 | | |
536 | 529 | | |
537 | 530 | | |
538 | | - | |
| 531 | + | |
539 | 532 | | |
540 | 533 | | |
541 | 534 | | |
| |||
563 | 556 | | |
564 | 557 | | |
565 | 558 | | |
566 | | - | |
567 | 559 | | |
568 | 560 | | |
569 | | - | |
| 561 | + | |
570 | 562 | | |
571 | 563 | | |
572 | 564 | | |
573 | 565 | | |
574 | 566 | | |
575 | 567 | | |
576 | 568 | | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
582 | 574 | | |
583 | 575 | | |
584 | 576 | | |
| |||
602 | 594 | | |
603 | 595 | | |
604 | 596 | | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
610 | 600 | | |
611 | 601 | | |
612 | 602 | | |
| |||
621 | 611 | | |
622 | 612 | | |
623 | 613 | | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
629 | 617 | | |
630 | 618 | | |
631 | 619 | | |
| |||
Lines changed: 7 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 28 | + | |
| 29 | + | |
33 | 30 | | |
34 | 31 | | |
35 | 32 | | |
36 | | - | |
| 33 | + | |
37 | 34 | | |
38 | 35 | | |
39 | | - | |
| 36 | + | |
40 | 37 | | |
41 | 38 | | |
42 | | - | |
| 39 | + | |
43 | 40 | | |
44 | | - | |
| 41 | + | |
45 | 42 | | |
46 | 43 | | |
47 | 44 | | |
| |||
Lines changed: 10 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 29 | + | |
| 30 | + | |
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
37 | | - | |
| 34 | + | |
38 | 35 | | |
39 | 36 | | |
40 | 37 | | |
41 | 38 | | |
42 | 39 | | |
43 | 40 | | |
44 | 41 | | |
45 | | - | |
46 | | - | |
| 42 | + | |
| 43 | + | |
47 | 44 | | |
48 | 45 | | |
49 | 46 | | |
50 | 47 | | |
51 | | - | |
| 48 | + | |
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
| |||
57 | 54 | | |
58 | 55 | | |
59 | 56 | | |
60 | | - | |
| 57 | + | |
61 | 58 | | |
62 | 59 | | |
63 | | - | |
| 60 | + | |
64 | 61 | | |
65 | 62 | | |
66 | 63 | | |
| |||
77 | 74 | | |
78 | 75 | | |
79 | 76 | | |
80 | | - | |
| 77 | + | |
81 | 78 | | |
82 | 79 | | |
83 | 80 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 27 | + | |
| 28 | + | |
31 | 29 | | |
32 | | - | |
| 30 | + | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
| |||
libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/ExecSpecRule/Conway/GovCert.hs
Lines changed: 5 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 37 | + | |
| 38 | + | |
42 | 39 | | |
43 | 40 | | |
44 | 41 | | |
45 | | - | |
| 42 | + | |
46 | 43 | | |
47 | 44 | | |
48 | 45 | | |
49 | 46 | | |
50 | 47 | | |
51 | | - | |
| 48 | + | |
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
| |||
0 commit comments