Simplicity is a blockchain programming language designed as an alternative to Bitcoin script.
The language and implementation is still under development.
This project contains
- A Haskell implementation of Simplicity's language semantics, type inference engine, serialization functions, and some example Simplicity code.
- A Coq implementation of Simplicity's formal denotational and operational semantics.
Software artifacts can be built using Nix.
- To build the Haskell project, run
nix-build -A haskell
. - To use the Haskell project, try
nix-shell -p "(import ./default.nix {}).haskellPackages.ghcWithPackages (pkgs: [pkgs.Simplicity])"
. - To build the Coq project, run
nix-build -A coq
.
To build the Coq project, we first need to build the VST dependency.
- Download and extract the lastest VST from https://github.com/PrincetonUniversity/VST/archive/v2.4.tar.gz.
- Build the VST project by running
make
in the extracted directory. If you are in a rush it is sufficent to runmake sha/functional_prog.vo
. (Tip: if you have a newer version of Coq, you can try setting the environment variableIGNORECOQVERSION=true
.) - Install the VST project into your user's
.local/share
(orXDG_DATA_HOME
) directory by runningmkdir -p ${XDG_DATA_HOME:-$HOME/.local/share}/coq/VST
cp -r msl sepcomp veric floyd ${XDG_DATA_HOME:-$HOME/.local/share}/coq/VST
cp -r compcert sha ${XDG_DATA_HOME:-$HOME/.local/share}/coq
Now we can build the Simplicity project.
- Enter the
Coq
directory. - Execute
coq_makefile -f _CoqProject -o CoqMakefile
. - Build the project by executing
make -f CoqMakefile
.
Detailed documentation can be found in the Simplicity-TR.tm
TeXmacs file.
A recent PDF version can be found in the pdf branch.
- Our paper that originally introduced Simplicity. Some of the finer details are out of date, but it is still a good introduction.
- BPASE 2018 presentation of the above paper (slides).
- Scale by the Bay 2018 presentation that illustrates formal verification of Simplicity in Agda (slides).
Interested parties are welcome to join the Simplicity mailing list. Issues and pull-requests can be made through GitHub's interface.