Logical English Extensions
Logical English and Logic Production Systems are open source. Two licensed products extend them: the Logical English Translators, with the LE Contract Assistant, and the InsurLE language extensions. Both run on the hosted editors, so nothing has to be installed: sign in with Google or GitHub on either site, and a licence attached to your email address unlocks the product on both.
Logical English Translators
Rules for law and business are written in many notations. The Logical English Translators read the programs of twelve other rule systems into Logical English, where they can be read without training, run, explained and tested, and they write some of them back. Each translation follows fixed rules, with no language model involved, so the same file always gives the same result.
| System | Into Logical English | Back out |
|---|---|---|
| LegalRuleML (the OASIS standard for legal norms) | yes | yes |
| s(CASP) and Prolog, including Logical English 1 | yes | as s(CASP) |
| Bitcoin Miniscript spending policies | yes | yes |
| Blawx (rules as code, Canada) | yes | |
| Epilog (Stanford) | rulesets as rules; games as LPS programs | |
| L4 (Singapore Management University, Legalese) | rules as rules; contracts as LPS programs | |
| Oracle Intelligent Advisor projects | yes | |
| Socotra insurance product configurations | yes | |
| Oracle Insurance Policy Administration (OIPA) transactions | yes | |
| Drools rule files (DRL) | stateful rules as LPS programs; decision services as rules | |
| Solidity contracts (Ethereum) | as LPS programs | yes, Deploy as Solidity |
| Daml contracts (Canton) | as LPS programs | yes |
What a translation gives you. The Logical English program; the source’s own tests, written as scenarios with the answers the source gives; and a ledger, a table with one row for each element of the source, saying whether the element was encoded, approximated (with a note on how its meaning changed) or left as residue for a person to translate. A translator never gives up on a whole file because of one fragment: the fragment is kept in the program, word for word, marked as work to do. When the way back exists and the program says something the other system cannot express, the export refuses and names the lines, rather than writing something that quietly means something else.
Checked against the source’s own engine. Every translator was run on published programs of its source system, and the translations, called twins, were checked against the answers of that system’s own engine: Blawx’s reasoner, s(CASP), a Drools session, a Canton sandbox, L4’s evaluator, a Solidity compiler and a virtual machine replaying real transactions. The twins whose sources may be redistributed are among the public examples of the two editors, with the sources, the tests and the ledger beside each one. The Socotra, Oracle Intelligent Advisor and Epilog twins are not published, because their sources carry no licence that allows it.
What is not covered. The translators do not read Guidewire, Catala, OpenFisca or Duck Creek; Solidity contracts that use loops, external calls or assembly leave those parts for translation by hand; the L4 translator has no way back yet. We say exactly what each translator leaves out in its documentation, in the Help menu of each editor.
The LE Contract Assistant
The Logical English Translators also include the LE Contract Assistant, which writes the first draft of a program from a contract that has no program yet. You give it the wording (a file, or the web address where it is published), the schedules, and claims or other cases with the outcomes a person recorded for them. It writes the program in competing drafts, each by a language model you choose; you may pair, say, an OpenAI model with a model whose weights are published. It tests every draft against the cases, repairs what fails, keeps some cases back to score the drafts on cases they have not seen, and delivers the best one.
The program it delivers cites the wording: each rule names the clause it encodes and quotes it, and every quotation is checked against the text. The rules are grouped as the decision is: does the contract apply, is the case covered, what follows. The program comes with a screen for the people who decide cases, chosen by the kind of contract: a claims desk for an insurance policy, an interview for an eligibility rule. A report lists, clause by clause, what was encoded, what was left out on purpose and what is still missing.
The language models write the draft. Once delivered, the program answers without any model: the same case gives the same answer, with the clauses it rests on. A draft is a draft: a person who knows the contract reads it, as they would read a colleague’s.
Licensing. The translators and the Contract Assistant are licensed on the hosted editors, without installation: please contact licensing@logicalcontracts.com. Academic teaching and research, open-source projects and public-sector pilots get free access, in exchange for permission to name the user; simply email us indicating an institutional email, and an account will be created shortly after.
A free twin of one of your programs
Send us one program of yours: an Oracle Intelligent Advisor project, a Drools rule file, a Blawx project, a Miniscript policy, a Socotra product, a Solidity contract, a Daml module, a LegalRuleML document or an L4 file. Within five working days you get back its Logical English twin, its ledger, and a link that runs it in the browser. Free, and yours to keep. We publish nothing without your written permission. Write to licensing@logicalcontracts.com, or use the contact form.
InsurLE: language extensions for contracts and statutes
Contract and statute text is written with devices that plain Logical English does not have. The InsurLE extensions add them, so that a program can follow more closely the text as it is written:
- a which in the conclusion of a rule: a claim is covered if the policy covers the loss which the claim reports;
- conditions introduced by unless;
- groups of conditions under either, any of or all of;
- conditions numbered 1., 2., 3., as a clause numbers its paragraphs;
- chains of prepositions in a template.
The extensions come with InsurLE’s own example programs, written from insurance policies and regulations. They are licensed through Axiome Partners: see https://www.axiomepartners.com.
Signing in
Choose Login at the top right of either editor, https://le2.logicalcontracts.com or https://lps2.logicalcontracts.com, and sign in with Google or GitHub. Alternativey email us for creation of an acount using other email addresses. One sign-in covers both sites. Google and GitHub tell us your email address and nothing else. Without a licence, signing in changes nothing: everything open stays open. The privacy notice says what the sites keep about you.
