Logical ContractsClarity in smartcontracts

Logic Production Systems

Logic Production Systems, LPS for short, is a language for programs that act over time: a contract, a process, a game, a robot’s rules. An LPS program describes a world that changes. The program says which facts hold at each moment, which events change those facts, how the program should react to what happens, and what must never be the case. LPS2 runs such a program cycle by cycle, shows what happened, and explains why.

LPS was created by Robert Kowalski and Fariba Sadri at Imperial College London. LPS2 is a new implementation that succeeds the original one and runs its programs. It was built by Logical Contracts with Kowalski and Jacinto Dávila, and it is open source under the Apache 2.0 licence since October 2026.

What you get

Try it

In your browser. Open https://lps2.logicalcontracts.com/ide, choose an example from the Examples menu, and press Run. The wolf, goat and cabbage puzzle is a good first one: the puzzle is stated, not solved, and LPS2 finds the crossings itself. No account is needed. The Help menu holds the tutorial, the guide to the editor and the language reference.

On your own machine. You need SWI-Prolog and Node.js:

git clone https://github.com/LogicalContractsOrg/lps2.git
cd lps2/ui && npm install && npm run build
cd .. && ./lps ide

The editor is then at http://localhost:3060/. To run programs written in Logical English, point LPS2 at a copy of Logical English 2, as the README says.

Open source. https://github.com/LogicalContractsOrg/lps2 (Apache 2.0), with the documentation, the examples and a conformance suite checked against the original implementation.

Videos

Short narrated recordings of the editor at work. All are on our YouTube channel.

VideoLength
Smart contracts on LPS: a Solidity token and a Daml contract8:12
Interactive fiction on LPS7:22
Introducing interactive fiction on LPS5:01
Solidity on LPS5:22
Daml in Logical English3:42
Drools in Logical English3:34
Miniscript in Logical English3:36
Epilog in Logical English2:49

What is licensed

Everything above is open. Three things are not: Deploy as Solidity, which writes a program back out as an Ethereum contract; the reader of Drools rule files; and the translators that open Solidity, Daml, Epilog, L4 and Drools programs as Logical English. They are part of the Logical English Translators, and the hosted editor offers them to visitors who hold that licence.