Coder Social home page Coder Social logo

yatima-lang's Introduction

yatima

Yatima is a Lean 4 compiler backend targeting the the Lurk language for recursive zkSNARKs, enabling zero-knowledge proofs of Lean 4 execution. Additionally, Yatima has its own Lean 4 implementation of a kernel for the Lean 4 core language, which can be compiled to Lurk to allow zero-knowledge proofs of Lean 4 typechecking. By verifying a zero knowledge proof that a Lean 4 declaration has passed the typechecker, one can verify that the declaration is type-safe without re-running the typechecker.

Yatima also implements nameless content-addressing for Lean 4, allowing each expression, declaration and environment to receive unique hash identifiers, independent of computationally-irrelevant naming (such as the names of definitions and local variables).

Install

Run lake run setup, which will build the yatima binary and ask you where to place it. You can choose a directory that's already in your path, for example.

Running the setup script will also compile the Yatima typechecker and store it in the FS, under the $HOME/.yatima directory.

Usage

The subcommands planned to be available for the yatima CLI are:

  • Main commands
    • ca: content-addresses Lean 4 code to Yatima IR
    • prove: generates Lurk code for typechecking a content-addressed declaration
  • Auxiliary commands
    • tc: typechecks Yatima IR
    • gen: generates Lurk code from Lean 4 code
    • pin: edits the TypecheckM.lean file with the hashes for primitive operations and allowed axioms
    • gentc: compiles the Yatima typechecker to Lurk
  • Network
    • ipfs put: sends Yatima IR to IPFS
    • ipfs get: retrieves Yatima IR from IPFS

Don't hesitate to call yatima --help for more information.

Constraints:

  • The ca subcommand must be triggered from within a Lean project that uses Lake
  • The Lean 4 code to be content-addressed must use the same toolchain as the one used to compile the yatima binary. To see the needed toolchain, call yatima --version and check the content before the pipe |
  • To compile a Lean 4 file that imports others, the imported olean files must be available

yatima-lang's People

Contributors

arthurpaulino avatar winston-h-zhang avatar rish987 avatar johnchandlerburnham avatar gabriel-barrett avatar mpenciak avatar cognivore avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.