2022-03-16 14:03:24 +03:00
|
|
|
## Article
|
|
|
|
|
|
|
|
```catala
|
|
|
|
declaration enumeration E:
|
|
|
|
-- C1
|
|
|
|
-- C2
|
|
|
|
|
|
|
|
declaration scope A:
|
2023-06-03 19:02:57 +03:00
|
|
|
internal x content E
|
|
|
|
output y content integer
|
2022-03-16 14:03:24 +03:00
|
|
|
|
|
|
|
scope A:
|
|
|
|
definition x equals C1
|
|
|
|
definition y under condition x = C1 consequence equals 1
|
|
|
|
definition y under condition x = C2 consequence equals 2
|
|
|
|
```
|
2022-07-08 17:23:09 +03:00
|
|
|
|
2023-12-05 18:54:14 +03:00
|
|
|
|
|
|
|
|
|
|
|
```catala-test-inline
|
2023-12-05 14:00:15 +03:00
|
|
|
$ catala Typecheck --check-invariants
|
2024-05-03 13:20:09 +03:00
|
|
|
┌─[RESULT]─
|
2024-05-03 16:12:52 +03:00
|
|
|
│ All invariant checks passed
|
2024-05-03 13:20:09 +03:00
|
|
|
└─
|
|
|
|
┌─[RESULT]─
|
2024-05-03 16:12:52 +03:00
|
|
|
│ Typechecking successful!
|
2024-05-03 13:20:09 +03:00
|
|
|
└─
|
2023-12-05 18:54:14 +03:00
|
|
|
```
|
|
|
|
|
2022-09-23 15:04:13 +03:00
|
|
|
```catala-test-inline
|
2023-12-05 14:00:15 +03:00
|
|
|
$ catala Proof --disable-counterexamples
|
2024-05-03 13:20:09 +03:00
|
|
|
┌─[RESULT]─
|
2024-05-03 16:12:52 +03:00
|
|
|
│ No errors found during the proof mode run.
|
2024-05-03 13:20:09 +03:00
|
|
|
└─
|
2022-07-08 17:23:09 +03:00
|
|
|
```
|