@@ -22,7 +22,7 @@ Specifications coming from legal text do not always
22
22
neatly divide up each variable definition into its own article. Sometimes, and this
23
23
is a very common pattern, a later article redefines a variable already
24
24
defined previously, but with a twist in a certain exceptional situation.
25
- For instance, Article 3 of CTTC:
25
+ For instance, article 3 of CTTC:
26
26
27
27
~~~ admonish quote title="Article 3"
28
28
If the individual is in charge of 2 or more children, then the fixed
@@ -82,7 +82,7 @@ times. Here, however, our definition of `tax_rate` conflicts with the
82
82
more general definition that we gave above. To correctly model situations like
83
83
this, Catala allows us to define precedence of one conditional definitions
84
84
over another. It is as simple as adding ` exception ` before the definition.
85
- For instance, here is a more correct version of the code for Article 3:
85
+ For instance, here is a more correct version of the code for article 3:
86
86
87
87
~~~ admonish quote title="Article 3"
88
88
If the individual is in charge of 2 or more children, then the fixed
@@ -98,8 +98,8 @@ scope IncomeTaxComputation:
98
98
```
99
99
~~~
100
100
101
- With ` exception ` , the conditional definition at Article 3 will be picked over
102
- the base case at Article 1 when the individual has two children or more. This
101
+ With ` exception ` , the conditional definition at article 3 will be picked over
102
+ the base case at article 1 when the individual has two children or more. This
103
103
` exception ` mechanism is modeled on the logic of legal drafting: it is the key
104
104
mechanism that lets us split our variables definition to match the structure of
105
105
the specification. Without ` exception ` , it is not possible to use the literate
@@ -129,8 +129,8 @@ As described above, putting `exception` in a Catala program alters the behavior
129
129
of the program, by providing a priority between conditional definitions of a
130
130
variable that Catala can use at execution time when hesitating between multiple
131
131
definitions that apply at the same time. So far, we have seen a very simple
132
- situation with one base definition (in Article 2) and a single exception (in
133
- Article 3). But the ` exception ` mechanism can be much broader and help set
132
+ situation with one base definition (in article 2) and a single exception (in
133
+ article 3). But the ` exception ` mechanism can be much broader and help set
134
134
different priority lines among dozens of different conditional definitions for a
135
135
same variable. Let us explore this mechanism on a more complex example.
136
136
@@ -203,7 +203,7 @@ the taxpayer to pay $0 in tax rather than 15 % of their income, we can make the
203
203
legal decision to prioritize the exception of article 4 over the exception of
204
204
article 3. Now, let us see how to write that with Catala. Because article 2 is
205
205
the base case for the exception of article 3, and article 3 is the base case for
206
- the exception of Article 4, we need to give the definitions of ` tax_rate ` at
206
+ the exception of article 4, we need to give the definitions of ` tax_rate ` at
207
207
articles 2 and 3 an explicit ` label ` so that the ` exception ` keywords in article
208
208
3 and 4 can refer to those labels:
209
209
0 commit comments