strata-org /Strata

★ 302⑂ 63👁 6⑃ 1,170● 333▤ 0
LeanApache-2.0Created 2025-07-23strata-org.github.io/Strata/
+1
Daily
302
stars
63
forks
6
watchers
1,170
prs
333
issues
0
releases

README

!Strata Logo

 Strata

Strata offers a unified platform for formalizing language syntax and
semantics, and implementing automated reasoning applications. Strata
provides a family of intermediate representations via _dialects_ that
model specific programming constructs, and is extensible by tool
developers to customize additional features to their needs.

This README will help you get started with using and extending
Strata. Also see the Architecture document
that introduces some terminology and describes Strata's components,
and a Getting Started guide that describes
how to create a new dialect and analysis using existing features.
Language-specific manuals live alongside the code: Laurel,
Strata's intermediate verification language, is documented by three
guides indexed in
StrataLaurel/Implementation/README.md,
and the Python front-end guide describes how
Python is compiled through Laurel.

N.B.: Strata is under active development, and there may be breaking
changes!

 Prerequisites

1. Lean4: Strata is built on Lean4; see the version specified in the
   lean-toolchain file.

   Install Lean4 by following the instructions at lean-lang.org.

2. SMT Solvers: The verification pipeline and tests require SMT solvers
   (cvc5 and z3). See Installing dependencies → SMT Solvers
   below.

3. Java JDK (11 or later): required for Java code generation tests.
   See Installing dependencies → Java below.

4. ion-java jar (1.11.11): required for the Java/Ion integration test.
   See Installing dependencies → Java below.

 Installing dependencies

 SMT Solvers

Download static builds (single binary, no library dependencies) and
place them on your PATH:

- cvc5 releases: https://github.com/cvc5/cvc5/releases
- z3 releases: https://github.com/Z3Prover/z3/releases

bash
 Download the appropriate static build for your platform from the
 release pages above, then copy the binaries somewhere on your PATH:
cp /path/to/cvc5 /path/to/z3 ~/.local/bin/
 or: sudo cp /path/to/cvc5 /path/to/z3 /usr/local/bin/


 Java (for code generation tests)

A JDK (11+) providing javac must be on your PATH. For running the
Java/Ion integration test, download the ion-java jar:

bash
wget -q -O StrataTestExtra/Languages/Java/testdata/ion-java-1.11.11.jar \
  https://github.com/amazon-ion/ion-java/releases/download/v1.11.11/ion-java-1.11.11.jar


 Verifying your setup

bash
cvc5 --version     should print version info
z3 --version       should print version info


 Build

Build and test the code in Lean's standard way:

bash
lake build && lake test


Unit tests are run with guard_msgs commands. No output means the tests passed.
For how to write a new test, see docs/Testing.md.

To build executable files only and omit proof checks that might take a long time, use

bash
lake build StrataToCBMC


 Running specific test subsets

Two kinds of tests coexist in this repo:

- Elaboration-time tests (guard_msgs) live under StrataTest/ and run as
  part of lake build. No output means they passed.
- 

Top issues

Discussions

Snapshot: 2026-11-27T22:26:53Z · Data license Apache-2.0 · JSON