Lexon enables no-code smart contracts that read like plain English.
Lexon texts are plain English program code, making smart contracts readable for all, by deterministically compiling English to Solidity.
Current milestone 0.4: enhancing the language to work for DAOs, on the way to implement the grammar as exemplified in the Oversimplicated DAO example.
Also see the Hybrid AI project for effortless smart contract creation via text chat and the space game concept Stardust that uses Lexon for crafting and custom clan rules.
Created by Henning Diedrich
⟶ The Lexon Book.
⟶ The Lexon site.
Lexon is a plain-text programming language for law and smart contracts. It is the first of a new generation of languages. Its grammar describes the intersection of natural human language and higher order logic in the way that Wittgenstein demanded. To a degree, it ends the quest for an unambiguous universal language for philosophy and pure thought as envisioned by Leibniz, Frege, Russel, or Carnap. The key to this is how Lexon maps natural language to compiler building tools, which is intuitively convincing, and in line with what the tools were designed for, but different from what computer sciences had gotten used to.
Lexon is the language that Robotic Laws will be articulated in, to embed unambiguous limitations into autonomous machines, written by lawmakers, the code being official law, created and approved in the democratic process. Lexon thus solves a long-standing quest of Computational Law. It works for blockchain smart contracts as well as off-line, and also off-machine. For its advantages in transparency and accessibility, it may become a mainstream programming language. Beyond its uses in connection with computers, it may over time replace today's legalese as a more useful language for law and contracting. The counter arguments of the legal profession are addressed in the available publications that discuss Lexon. The work of professors of law about Lexon may serve as invitation to imagine that progress is possible, also for a two thousand years old industry.
Lexon is the language of lawmakers and programmers alike, enabling the coming profession of the legal engineer.
Lexon is under development. The current consistent distribution is 1.2. It unites compiler binaries, source code and documentation in a consistent package.
https://github.com/lexonian/lexon/releases/tag/Lexon-Distribution-1.2
.
More examples are collected (with links that enumerate each word’s use), at
https://www.lexon.org/vocabulary.html#examples
and at:
https://github.com/lexonian/lexon/tree/master/examples (see descriptions in README).
This is an example of a Lexon text:
LEX Escrow.
"Payer" is a person.
"Payee" is a person.
"Arbiter" is a person.
"Payment" is an amount.
"Fee" is an amount.
The Payer pays a Payment into escrow,
appoints the Payee,
appoints the Arbiter,
and also fixes the Fee.
CLAUSE: Pay Out.
The Arbiter may pay from escrow the Fee to the Arbiter,
and afterwards pay the remainder of the escrow to the Payee.
CLAUSE: Pay Back.
The Arbiter may pay from escrow the Fee to the Arbiter,
and afterwards return the remainder of the escrow to the Payer.
This is a smart contract. You compile it to Solidity with
lexon --sol escrow.lex
The result looks like this https://github.com/lexonian/lexon/blob/master/tests/escrow.0.solx.exp
(Please star the repo, thanks.)
Anyone can read this Lexon text—this digital contract—and understand what it means. It can be shown to a judge, it can be understood by business partners and customers as well as a company’s management and legal department; and it can also – as is – be run as a program, for example on a blockchain, i.e. as smart contract.
Soon, any type of program can be written this way. And any type of agreement can be automated and made impossible to be broken. This will uncouple business necessities from the judicative and executive powers, their astronomical costs and glacial speed. Digital Contracts cost pennies to set in motion and can securely make any sum of money change hands in minutes. This will be a game changer for a massive slice of commercial activity and enable a long tail of private trade. It will also change the standards for governance and government.
.
Everyone — Lexon is designed to broaden crypto adoption by including non-programmers. It can also be used off-chain with Javascript.
Particularly, blockchain-affine lawyers have been excited about Lexon (see papers).
To the degree that smart contracts are used as legal agreements, judges are a relevant target group.
.
Blockchain technology was made by hackers for hackers – but with Lexon, anyone can read programs now without any knowledge of programming. And thus, consumers, as well as businesspeople, judges, jury members, even lawmakers will be able to read any smart contract about which they might be tasked to decide about, investigate, legislate, to verify or enter. Through this, contracting may become part of the definition of literacy and a silver arrow in the quiver of democracy.
.
As lawyers confirm, the code above is a legally enforceable contract: it can be used to demonstrate to a judge what the meeting of the minds of the parties to the contract was. There are no style requirements for a contract. There can't be any, or else a typo or poor grasp of grammar could render contracts invalid. But smart contract code, e.g., written in Solidity or Sophia, would always lead to a battle of experts if brought to court. Because non-programmers cannot read them.
Not all contracts need to be in writing. The ‘contract’ itself is always the abstract agreement of two parties, no matter how it was expressed. A signed paper merely proves it.
Now, a readable, digitally signed program can prove and perform this will.
The goal is to make smart contracts part of daily life for everyone like a smart phone. In the form of bespoke agreements tailored to the plethora of situations of real life, to onboard the next billion users to blockchain generally and the Ethereum ecosystem specifically.
The current roadmap for the language has its focus on creating a Hybrid AI interface to ease the effort of writing Lexon texts; extending the Lexon grammar for DAOs; creating awareness and traction for Lexon by demonstrating its power in the shape of an MMORPG project; and finding first professional customers—law firms—with a groundbreaking implementation of the new U.S. trade law on the blockchain.
The online compiler, around which this application revolves, did in an earlier iteration have the capability to create smart contracts with one click, on Ethereum. This is too expensive for small contracts at this point in time.
.
Lexon generally helps overcoming the hurdles to mainstreaming crypto, because it reduces the opaqueness of smart contract technology, making it more transparent and acceptable.
This can solve the question, whether smart contracts are real contracts. With Lexon, an English-language legal agreement and the smart contract become the same.
In sum, this could address the problem of the exclusion of weaker and poorer demographics from digital commerce: Lexon can enable a very long tail of markets that cannot exist at this point, because the cost of policing them would be higher than their margins. Crypto should in theory be able to do that on its own. But Lexon might provide the necessary accessibility and free compatibility with the existing legal system.
Lexon also addresses the dilemma that a fork-lift replacement of many existing processes by crypto is unrealistic. Instead, Lexon makes crypto “backwards compatible” —simply: readable— which allows for a smooth step-by-step transition. Because language is the medium of commerce and law. Lexon makes crypto compatible with the legacy protocol. This is no aphorism. It is very concrete and powerful.
.
Lexon leverages natural language processing research, going as far back as the 80s to employ the fitting approach to ‘calculate with words’ (Leibniz). Language is not used as a specification with Lexon, but immediately executed, as if it was a program.
Industry standard compiler-building is used to implement a natural language like a programming language, interpreting English grammar like a programming language grammar.
This is not a statistical approach but linguistic, and precise. It creates fully transparent and repeatable results. It has an internal representation of meaning that is grammatical and directly accessible. It is not generative AI, although there are similarities. The Lexon compiler is an AI tool in the same sense that a Prolog compiler is. However, Lexon is more precise.
.
The Lexon concept has been validated in-depth through interviews, tests and workshops with target groups, including lawyers and judges. It is subject of academic papers. There is ongoing work to pinpoint Lexon’s killer app.
Asst. prof. Carla Reyes — Cryptolaw
https://scholarlycommons.law.wlu.edu/wlulr/vol78/iss4/7/
Prof. Christopher Clack — Languages
https://arxiv.org/abs/2104.03764
The underlying linguistic and CS concept has been proven by creating the Lexon compiler 0.3, which implements the natural language programming approach and is conceptually clean and stable within its scope.
https://github.com/lexonian/lexon/releases/tag/Lexon-Distribution-1.2
.
Overcoming the opaqueness of smart contracts is rated a key factor to encourage participation in smart contract technology. Lexon allows everyone concerned to verify what a smart contract means.
It has also been shown that Lexon can be used to write law. This feature may become the crucial tool to evolve our democratic processes, regain trust in institutions, and help countries to avoid suffocating themselves with red tape.
For its propensity of making crypto superpowers available to mundane and key processes, Lexon might play an essential role in retaining evolutionary capacity of governance and politics, providing a path to meaningful change and a dial back of current excesses.
.
The accessibility and inclusivity Lexon brings can make trustless technology appealing to a much wider audience, helping to drive adoption.
Lexon’s transparency should help unlock the potential of smart contracts for SME.
For the crypto community, Lexon revives the vision of DIY smart contracts, created for one specific use case.
Lexon aligns with blockchains in the Ethereum ecosystem naturally as it is globally available free, open source, can be used with complete privacy, without restrictions, and is not controlled by any company.
.
Lexon is a tool that empowers developers to create applications that are more accessible for their users: i.e., it empowers multiple layers across the crypto user community.
Small, situational smart contracts, in natural language, may become part of the notion of digital literacy.
.
The Lexon language and compiler are free and open source, they are not monetized.
The expectation is that projects that use Lexon, and the crypto ecosystem at large will take part in developing Lexon, contributing code and grants, and eventually having employees dedicated to it, like in the gcc ecosystem.
Being open source, Lexon should stay the focal point for natural language programming, because being open source should have the effect of bundling efforts in this technological direction: anyone can use it and/or improve it, reducing the incentive to create a competing project.
For the near future, the same diligence and grass roots work that brought Lexon to where it is now will carry it forward: a lot of communication with the target group and iterations to make sure to arrive at simplicity and accessibility, based on sound technical foundations that draw on deep experience in crypto, linguistics and programming language design, in both theory and practice.
On the conceptual side, the complete argument about its relevance is laid out in the book Characteristica Universalis (https://www.amazon.com/dp/B0D8Y6F8DW).
Lexon is not just a theory but working code, it proves the controversial idea about language and programming that it is based on.
Once the current gen AI focus has relaxed, it will be easier to recognize Lexon as a pioneering effort in breaking down the border between natural language and programming, by interpreting natural language as if it were a program.
.
A blood feud between generic and symbolic AI research has been going for some decades.
Accordingly, some casual observers have dismissed Lexon’s approach as worthless.
To others, it is obvious that Lexon has a place in the history of logic.
While goals are similar, priorities are not. Lexon has a different workflow and different strengths. It “just” makes machine execution transparent for everyone. This is the opposite of gen AI.
Lexon does so by unfailing accessibility, providing perfect agency. It is aligned by design.
How similar Lexon code is to tensors see:
https://github.com/lexonian/lexon/blob/dbb46e554c7c444bbf3d114c15a1f6faa11f76ff/build/scanner.c#L456
These tables are the translated model of the grammar:
https://github.com/lexonian/lexon/blob/master/grammar/english.lgf
The tables can be small, because they are precise.
.
.
More relevant predecessors and contemporaries to Lexon are discussed in the LEXON BIBLE, Appendix III (https://www.amazon.com/dp/1656262665). Here are the most important similar projects:
Lexon is fully transparent, thus accessible, and aligned, has an internal representation of meaning, and is fully deterministic, thus always precise.
See above, “ON AI.”
Logical English also reads like natural language. But it does not execute language like a program, instead, it interprets language as first-order logic rules. Its execution is not deterministic and logic programming, in general, does not work well with time and change.
The artificial human language Loglan has a regular, unambiguous logical grammar, like Lexon. But it does not read like natural language (at all) and it does not include a mapping of programming paradigms to natural language, as Lexon does.
Lexon can compile English to Solidity, which indicates that the two compilers are complementary and not in competition. Lexon is concerned with the very last mile that separates humans and machines.
Visual coding tools have a focus on program creation. Lexon’s main contribution is that texts are readable without any training and can double as normal contracts.
The grant application is submitted by the creator of Lexon.
I wrote the first book on Ethereum, debugged geth for IBM in 2016, been to every Devcon, architected IBM’s blockchain, and DeBeers’ diamond chain.
I did decades of freelance and open source programming. Love crypto for the tech & its world-changing potential.
As a freelancer, I had to experience that it can be difficult to get paid if people decide to just not honor a contract. That is definitely part of why I love smart contracts.
I created systems, blockchains and worked across the full stack, and beyond, creating languages, database drivers, twitch games.
I have always been interested in AI, and acquired strong opinions about it. I believe that understanding the limits of AI well allowed me to navigate the edge of what is possible.
My interest in computer languages lead me to learning and using two dozen different ones, from mainstream to arcane. I find they have different characters, different feels, different communities of course, and hence different vibes. I sure love creating them. I used 23 computer languages professionally, and created 2 relevant domain specific languages (for insurance and law).
I often use bleeding edge, newest tech to build new apps. But very old, very stable tech to build new tools.
The way I build is usually with a lot of responsibility, including creating the spec, interviewing future users, to find out what is really needed.
Crypto is my daily bread for 10 years, since Ethereum came to Berlin. I grew interested in the legal side of smart contracts while giving talks and being exposed to fellow speakers with a legal education.
IBM later tapped me to become their “Mr. Blockchain,” as I got called. And I became the first architect of IBM’s own blockchain, Hyperledger.
I have created a successful (proprietary) programming language before, specialized for a financial industry: retail insurances.
The essential, linguistic element of Lexon likely benefits from my experience as a performing artist. This might have helped to pinpoint the program-like elements in natural grammar.
I am in blockchain tech for 10 years.
Please note that to READ Lexon texts, NO preparation is necessary.
The Lexon subset of English is optimized for readability—because any program, and contract, is more often read than written (Brian J. Fox).
Most documentation below revolves around writing Lexon. Some literature on Lexon is scientific and philosophic, comparing it to similar approaches and suggesting its place in the history of logic.
Lexon is documented in articles, books, and academic papers, and supported by hands-on documentation: a manual, tutorial, etc. The central place to learn about it is the lexon site at https://www.lexon.org
The source code is at github.com/lexonian/lexon.
Because Lexon is self-explanatory by its very nature, examples are a great start.
These example texts are cross-linked to detailed explanations:
www.lexon.org/vocabulary.html#examples.
To check out the tech, consider a review of the source repo, including the README:
https://www.github.com/lexonian/lexon.
Casually browsing—cherry-picking—the Lexon BIBLE should be a great way to go deeper:
https://www.amazon.com/dp/1656262665
Remarkable academic papers have been written that inspect Lexon. One demonstrates how to write statute (law) in Lexon. The other compares Lexon to other attempts to make language computable.
a. Asst. prof. Carla Reyes — Cryptolaw
https://scholarlycommons.law.wlu.edu/wlulr/vol78/iss4/7/
b. Prof. Christopher Clack — Languages
https://arxiv.org/abs/2104.03764
The book Characteristica Universalis explains the philosophy behind Lexon:
https://www.amazon.com/dp/B0D8Y6F8DW
More information is presented at the Lexon site, especially the resources page:
https://www.lexon.org/resources.html
Join @Lexonians on Telegram https://t.me/lexonians