subtabledirectory contains formalization of Lasso-style lookups, Jolt subtables, and multilinear extensionsinstructionsdirectory contains formalization of Jolt instructionsjoltdirectory contains a snapshot of the Jolt zkVM source code, with extra printing macros added injolt/jolt-core/src/jolt/subtable/print.rsandjolt/jolt-core/src/jolt/instruction/print.rsfor validation purposes
- Follow the official ACL2 instalation instructions, which includes steps to:
- Install a Common Lisp implementation
- Install ACL2
- Certify some basic books
- Certify GL
Note: MacOS laptops and Arm-based Apple silicon (e.g. M1) Macs are known to have issues with verifying Quicklisp books -- in both cases, the solution is to follow the official ACL2 Quicklisp documentation:
- Install OpenSSL via Homebrew
brew install openssl - (If on Arm64 machine) Create symlinks to Homebrew’s OpenSSL library files in
/usr/local/lib:ln -s /opt/homebrew/opt/openssl/lib/*.dylib /usr/local/lib
For convenience, we include the following instructions which worked for one author, but in case of any discrepancies between the official ACL2 instructions and the below, or in case of any installation issues, one should fall back to the official ACL2 instructions.
-
Install Dependencies:
- For macOS (make sure Homebrew is installed):
brew install sbcl - For Ubuntu:
sudo apt-get install sbcl make gcc - Install Rust
rustup update nightlyrustup default nightly
- For macOS (make sure Homebrew is installed):
-
Download ACL2:
git clone https://github.com/acl2/acl2.git cd acl2 git checkout 8.5 -
Build ACL2:
make LISP=sbcl ln -s saved_acl2 acl2 -
Add ACL2 to your PATH:
- For Bash:
echo 'export PATH=$PATH:/path/to/acl2' >> ~/.bashrc - For Zsh:
echo 'export PATH=$PATH:/path/to/acl2' >> ~/.zshrcReplace/path/to/acl2with the actual path where you cloned ACL2.
- For Bash:
-
Reload your shell configuration:
source ~/.bashrcorsource ~/.zshrc
-
Certify FGL:
cd /path/to/acl2/books/centaur/fgl ../../build/cert.pl top.lisp -
Certify GL:
cd /path/to/acl2/books/centaur/gl ../../build/cert.pl gl.lisp
Check that our formalization is correct by certifying our top file in the main directory:
/path/to/acl2/books/build/cert.pl top.lisp
Run the following script to validate the subtables. If this passes, then it means that the materialized subtables (for the size 2 ^ 16 as used in instruction lookups) are the same between Rust and ACL2.
./compare-subtables.sh
Run the following script to validate the instructions. This ensures that the instruction implementations in Rust and ACL2 produce the same results for a number of fuzzing inputs (see print-instructions.lisp for details).
./compare-instructions.sh