Skip to content

Commit c82a816

Browse files
committed
Fixes
1 parent ee54ba2 commit c82a816

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

src/2-1-basic-blocks.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ of specification into the Catala program amounts to copy-pasting the
3333
text and formatting it in Markdown syntax inside the source code file.
3434

3535
Without further ado, let us introduce the first bit of specification for
36-
our fictional income tax, Article 1 of the CTTC (Catala Tutorial Tax Code):
36+
our fictional income tax, article 1 of the CTTC (Catala Tutorial Tax Code):
3737

3838
```admonish quote title="Article 1"
3939
The income tax for an individual is defined as a fixed percentage of the
@@ -42,8 +42,8 @@ individual's income over a year.
4242

4343
The spirit of writing code in Catala is to stick to the specification at all
4444
times in order to put the code snippets where they belong. Hence, we will
45-
introduce below the Catala code snippets that translate Article 1, which
46-
should be put just below Article 1 in the Catala source code file.
45+
introduce below the Catala code snippets that translate article 1, which
46+
should be put just below article 1 in the Catala source code file.
4747

4848
These code
4949
snippets should describe the program that computes the income tax, and contain
@@ -53,7 +53,7 @@ to dive into Catala as a programming language.
5353

5454
```catala
5555
# We will soon learn what to write here in order to translate the meaning
56-
# of Article 1 into Catala code.
56+
# of article 1 into Catala code.
5757
5858
# To create a block of Catala code in your file, bound it with Markdown-style
5959
# "```catala" and "```" delimiters. You can write comments in Catala code blocks
@@ -63,7 +63,7 @@ to dive into Catala as a programming language.
6363
## Setting up data structures
6464

6565

66-
The content of Article 1 assumes a lot of implicit context: there exists an
66+
The content of article 1 assumes a lot of implicit context: there exists an
6767
individual with an income, as well as an income tax that the individual has
6868
to pay each year. Even if this implicit context is not verbatim in the law,
6969
we have to explicit it in the computer code, in the form of data structures
@@ -143,7 +143,7 @@ Catala is called a *scope*. A scope is comprised of :
143143
* internal variables (similar to local variables),
144144
* output variables (that together form the return type of the function).
145145

146-
For instance, Article 1 declares a scope for computing the income tax:
146+
For instance, article 1 declares a scope for computing the income tax:
147147

148148
~~~admonish note title="Declaring a scope"
149149
```catala
@@ -176,7 +176,7 @@ Note that a variable can also be simultaneously an input and an output of the
176176
scope, in that case it should be annotated with `input output`.
177177

178178
Once the scope has been declared, we can use it to define our computation
179-
rules and finally code up Article 1!
179+
rules and finally code up article 1!
180180

181181

182182
## Defining variables and formulas

src/2-2-conditionals-exceptions.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Specifications coming from legal text do not always
2222
neatly divide up each variable definition into its own article. Sometimes, and this
2323
is a very common pattern, a later article redefines a variable already
2424
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:
2626

2727
~~~admonish quote title="Article 3"
2828
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
8282
more general definition that we gave above. To correctly model situations like
8383
this, Catala allows us to define precedence of one conditional definitions
8484
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:
8686

8787
~~~admonish quote title="Article 3"
8888
If the individual is in charge of 2 or more children, then the fixed
@@ -98,8 +98,8 @@ scope IncomeTaxComputation:
9898
```
9999
~~~
100100

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
103103
`exception` mechanism is modeled on the logic of legal drafting: it is the key
104104
mechanism that lets us split our variables definition to match the structure of
105105
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
129129
of the program, by providing a priority between conditional definitions of a
130130
variable that Catala can use at execution time when hesitating between multiple
131131
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
134134
different priority lines among dozens of different conditional definitions for a
135135
same variable. Let us explore this mechanism on a more complex example.
136136

@@ -203,7 +203,7 @@ the taxpayer to pay $0 in tax rather than 15 % of their income, we can make the
203203
legal decision to prioritize the exception of article 4 over the exception of
204204
article 3. Now, let us see how to write that with Catala. Because article 2 is
205205
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
207207
articles 2 and 3 an explicit `label` so that the `exception` keywords in article
208208
3 and 4 can refer to those labels:
209209

theme/highlight.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3840,7 +3840,7 @@ if (typeof exports === 'object' && typeof module !== 'undefined') { module.expor
38403840
keyword: ['match', 'with', 'pattern', 'but', 'replace', 'we', 'have',
38413841
'let', 'in', 'such', 'that', 'exists', 'among', 'for', 'all',
38423842
'of', 'if', 'then', 'else', 'initial',
3843-
'scope', 'depends on', 'result', 'declaration', 'includes',
3843+
'scope', 'depends', 'on', 'result', 'declaration', 'includes',
38443844
'content', 'optional', 'structure', 'enumeration',
38453845
'context', 'input', 'output', 'internal', 'rule',
38463846
'under', 'condition', 'data', 'consequence',

0 commit comments

Comments
 (0)