Isekai verifiable computation project
Clone or download
Latest commit 54a743c Jan 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docker Build docker image Jan 5, 2019
spec Add DFGExpr and operations on this Dec 27, 2018
src Add DFGExpr and operations on this Dec 27, 2018
.gitignore Add .gitignore Dec 20, 2018
LICENSE Switch to MIT license Dec 20, 2018
Makefile Add container_test Make target Jan 5, 2019
README.md Add shards update Jan 5, 2019
shard.yml Add shards dependencies Dec 20, 2018

README.md

isekai

Isekai verifiable computation project

Description

Isekai is a tool which parses the C program and outputs the arithmetic and/or boolean circuit representing the expression equivalent to the input program. Isekai uses libclang to parse the C program, so most of the preprocessor (including the includes) is available. Isekai is written using crystal programming language allowing for a strong type safety and it is compiled to a native executable, ensuring maximum efficiency in parsing.

Building the project

Compiling

The project comes with the Makefile and in order to compile the project, running make will be enough. That will create isekai binary file in the current directory. To run tests make test should be used.

Alternatively, crystal build src/isekai.cr or crystal test can be used.

Dependencies

The project is written in Crystal language. Follow the Official instructions for instructions how to install Crystal lang.

Since the project depends on several libclang patches which are not yet merged in the libclang (https://www.mail-archive.com/cfe-commits@cs.uiuc.edu/msg95414.html, http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20140428/104048.html), the easiest is to use the provided pre-build binary and to build and run the software inside a container.

Installing docker

To install docker on Ubuntu, follow the official instructions

Building and running inside docker container

To build a docker image with the isekai tag, enter docker directory and run make image. This will build isekai image which then you can use to spawn a container and mount the main directory:

Note

You may need crystal lang dependencies before running this step:

shards update
docker run --rm -w $PWD -v $PWD:$PWD -ti isekai /bin/bash

where you can run make, make test and run the built binaries.

If you don't want to enter the interactive console, it's enough to run make within the container:

docker run --rm -w $PWD -v $PWD:$PWD isekai make test