Coinward / simplicity

Simplicity is a blockchain programming language designed as an alternative to Bitcoin script.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simplicity

Simplicity is a blockchain programming language designed as an alternative to Bitcoin script.

The language and implementation is still under development.

Contents

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.

Build

Building with Nix

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.

Building without Nix

To build the Coq project, we first need to build the VST dependency.

  1. Download and extract the lastest VST from https://github.com/PrincetonUniversity/VST/archive/v2.4.tar.gz.
  2. Build the VST project by running make in the extracted directory. If you are in a rush it is sufficent to run make sha/functional_prog.vo. (Tip: if you have a newer version of Coq, you can try setting the environment variable IGNORECOQVERSION=true.)
  3. Install the VST project into your user's .local/share (or XDG_DATA_HOME) directory by running
    1. mkdir -p ${XDG_DATA_HOME:-$HOME/.local/share}/coq/VST
    2. cp -r msl sepcomp veric floyd ${XDG_DATA_HOME:-$HOME/.local/share}/coq/VST
    3. cp -r compcert sha ${XDG_DATA_HOME:-$HOME/.local/share}/coq

Now we can build the Simplicity project.

  1. Enter the Coq directory.
  2. Execute coq_makefile -f _CoqProject -o CoqMakefile.
  3. Build the project by executing make -f CoqMakefile.

Documentation

Detailed documentation can be found in the Simplicity-TR.tm TeXmacs file. A recent PDF version can be found in the pdf branch.

Further Resources

Contact

Interested parties are welcome to join the Simplicity mailing list. Issues and pull-requests can be made through GitHub's interface.

About

Simplicity is a blockchain programming language designed as an alternative to Bitcoin script.

License:MIT License


Languages

Language:Tcl 33.1%Language:C 29.4%Language:Haskell 22.0%Language:Coq 12.7%Language:HTML 1.5%Language:TeX 0.7%Language:Nix 0.3%Language:C++ 0.2%Language:Makefile 0.1%Language:Objective-C 0.1%