Logical English
Rules as English sentences over a logic program, each traced to its quote, verified and tested.
What it is
Logical English is controlled English that reads as prose and executes as a logic program, from Robert Kowalski and colleagues. NormEngineer writes for LE2, the current implementation (Apache-2.0), with its deontic library for what parties are obliged, permitted or forbidden to do.
Good for
- Rules a lawyer can read as English and a computer can execute.
- Asking who is obliged to do what, and who is in breach, for a scenario.
- Keeping the verbatim quote next to each rule, where the verifier checks it.
What an extraction gives you
One program per act: a rule per norm, labelled with its ELI and the verbatim source quote it confers, saying when it applies and what a party is obliged, permitted or forbidden to do; overriding norms appear as it is not the case that.
The download
One file, logical-english.le: a Logical English program for LE2. The disclaimer and the fidelity summary are % comments at the top of the file.
How norms appear
The graph and the file name each part of a norm in Logical English's own terms.
| In the act | In Logical English |
|---|---|
| A party the norm addresses | Party |
| Obligation | obliged that |
| Permission | permitted that |
| Prohibition | forbidden that |
| What the party does | Sentence |
| Condition | Condition (if) |
| Exception | it is not the case that |
| Precedence over another norm | unless it applies |
section article 19 is:
% Art. 19(1): dora.art19.1, obligation of Financial entity
rule dora_art19_1 with provenance "http://data.europa.eu/eli/reg/2022/2554/art_19/par_1/oj",
confer "Financial entities shall report major ICT-related incidents to the relevant competent authority":
the conditions of the norm "dora.art19.1" hold for a party if
the party counts as "financial entity"
and for the party an ICT related incident is classified as major.
the norm "dora.art19.1" applies to a party if
the conditions of the norm "dora.art19.1" hold for the party.
a party is obliged that the party report the incident to the relevant competent authority if
the norm "dora.art19.1" applies to the party.
the norm "dora.art19.1" is directed at "relevant competent authority".
scenario tests is:
p1 counts as "financial entity".
p2 counts as "financial entity".
for p2 an ICT related incident is classified as major.
dora_art5_1_applies expects answers ["the norm dora.art5.1 applies to p1"].
dora_art19_1_applies expects answers ["the norm dora.art19.1 applies to p2"].On the extraction's page
- Graph
- The norms as a 2D or 3D graph in Logical English's vocabulary, each traced to its source quote.
- Source
- The Logical English file with its validation result, to read and download.
- Fidelity
- How fully each norm is expressed in Logical English, and which checks ran.
How it is checked
- Every source quote is verified against the act.
- NormEngineer's structural validator checks the Logical English file of every extraction.
- The official toolchain, the LE2 verifier and its test runner, does not check each extraction. NormEngineer's tests check sample output written the same way with it; check your download with it to confirm.
- The file includes a scenario of yes/no tests, one per norm, and queries for obligations, violations and breaches; NormEngineer does not execute them on your extraction.
The Fidelity tab of each extraction says which checks ran on it. An extraction is AI-generated and not legal advice.
How fully it expresses a norm
Obligations, permissions and prohibitions, their parties, conditions, exceptions, precedence and measured conditions are LE's own sentences, and due dates in days, months or years are computed.
What Logical English does not express fully
- Partly expressed
The deadline, or part of it, is in a comment or prose and is not computed.
When a deadline is in hours.
- Partly expressed
A precedence over another norm is left out because it would make the rules circular.
Rarely: when two norms would each take precedence over the other.
Each extraction's fidelity report counts the norms each of these applies to.