Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
d96f4f1
chore: increment crate versions to v0.5.0
bobbinth Jun 21, 2025
1f2dba2
chore: standardize formatting
bobbinth Jun 21, 2025
0627987
chore: fix lints
bobbinth Jun 21, 2025
4373b2a
chore: remove unused deps check
bobbinth Jun 21, 2025
0b0ab79
chore: remove rust-cache from CI
bobbinth Jun 21, 2025
2896bfc
chore: run stable clippy in CI
bobbinth Jun 21, 2025
c6af6a1
chore: set read permission for lint jobs
bobbinth Jun 21, 2025
08ecd1e
refactor(bus boundaries): Add `PublicInputTable` node type to IR to h…
adr1anh Jul 2, 2025
5fcf7f6
feature(ACE): Handle variable length public inputs and generate power…
adr1anh Jul 2, 2025
51ff2df
chore: fix typos
bobbinth Jul 10, 2025
eaa2220
Fixes some bugs and clean up (#420)
Al-Kindi-0 Jul 15, 2025
0b79d8c
feat: Allow bus operations in libraries and evaluators (#410)
Leo-Besancon Jul 21, 2025
b117894
refactor: Remove the deprecated --without-mir pipeline (#424)
Leo-Besancon Jul 25, 2025
2e0119a
feat: combine constraints generated by selector expressions (#413)
Leo-Besancon Jul 29, 2025
ad0b823
refactor: define TraceSegment enum for Main and Aux traces (#438)
Leo-Besancon Aug 11, 2025
d3a5b5a
feat: add default compilation pipeline (#437)
Leo-Besancon Aug 12, 2025
e3168a1
chore: upgrade rust-toolchain installs in CI (#443)
huitseeker Aug 18, 2025
2b4d19e
chore: minor CI changes
bobbinth Aug 18, 2025
b238d8b
chore: increment MSRV to 1.89
bobbinth Aug 18, 2025
509e860
chore: split CI workflow into build and test
bobbinth Aug 18, 2025
78d0811
chore: fix build.yml extension
bobbinth Aug 18, 2025
4841d74
feat: add Constant Propagation pass after MIR passes (#439)
Leo-Besancon Aug 20, 2025
c229fd7
feat: Add a pass for common subexpression elimination in the constrai…
Leo-Besancon Aug 22, 2025
04c0ac1
refactor: split MIR unrolling pass into multiple modules (#434)
Leo-Besancon Sep 4, 2025
032e637
fix: regressions on MIR and list_comprehensions (#449)
Leo-Besancon Sep 5, 2025
90bc486
Update ACE README.md (#457)
adr1anh Sep 11, 2025
918803d
fix: remove_integrity_constraints_root to target integrity list (#453)
radik878 Sep 11, 2025
22f243b
compile examples & check links in CI
huitseeker Aug 21, 2025
7f2e40e
run examples used in doc through air script compilation
huitseeker Aug 27, 2025
73eaeb9
fix: mdbook syntax
huitseeker Aug 27, 2025
44c8b9e
add test-docs target and run in CI
huitseeker Aug 27, 2025
6360b3d
chore: Changelog
huitseeker Aug 27, 2025
5535023
review comments
huitseeker Aug 27, 2025
ca3c0dd
chore: add missing newlines
huitseeker Sep 12, 2025
4ee80e8
ci: run lychee on schedule, open issue if failure
huitseeker Sep 17, 2025
a6d893d
Merge pull request #451 from huitseeker/doc_update
huitseeker Sep 17, 2025
a20aac2
Merge pull request #459 from huitseeker/fix-docbuild
huitseeker Sep 17, 2025
d9595cd
fix: Make docs_sync() test work on windows (#462)
Leo-Besancon Sep 21, 2025
b251ed2
refactor: reorder match optimizer (#440)
Leo-Besancon Sep 22, 2025
14fdb13
chore: fix lints
bobbinth Sep 22, 2025
8f8924c
chore: propagate code generation errors instead of panicking (#469)
sashass1315 Sep 25, 2025
1aab47c
chore: fix typos
bobbinth Sep 29, 2025
ce653df
chore: add rust-toolchain.toml + script to check MSRV (#478)
huitseeker Sep 29, 2025
e7f8af5
chore: remove codgen trait from mir (#479)
bobbinth Sep 29, 2025
8bbdefe
test: remove boilerplate in tests with test macro (#480)
huitseeker Oct 1, 2025
067b9f6
refactor: improve trace segment handling by introducing `TraceShape<T…
surajk-m Oct 2, 2025
23fe0e9
refactor: remove binary operation unrolling from MIR (#460)
Leo-Besancon Oct 14, 2025
9d69e2d
Allow support for computed indices (#444)
Leo-Besancon Oct 15, 2025
0b61534
fix: vector unrolling issue in nested match evaluation (#491)
Leo-Besancon Oct 17, 2025
047d363
Fix evaluator argument vector slice expansion (#495)
Soulthym Nov 5, 2025
fba3d1c
feat: Support importing hierarchical modules (#507)
Leo-Besancon Nov 14, 2025
15539d6
fix: pin mdbook version to 0.4.48 (#520)
Leo-Besancon Dec 3, 2025
dddafdf
docs: Add comprehensive documentation for AlgebraicGraph::node_detail…
DeVikingMark Dec 4, 2025
054af78
fix(mir): constant propagation folds 0^0 to 1 (#509)
Galoretka Dec 16, 2025
0eb72bb
fix: Import::Partial equality to be symmetric (#517)
MozirDmitriy Dec 18, 2025
ab89962
fix inlining loop on cross imports (#524)
Soulthym Dec 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,41 +26,3 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Install minimal stable with clippy
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
override: true

- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all -- -D clippy::all -D warnings

rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Install minimal stable with rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
override: true

- name: rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
62 changes: 62 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Runs linting related jobs.

name: lint

# Limits workflow concurrency to only the latest commit in the PR.
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

on:
push:
branches: [main, next]
pull_request:
types: [opened, reopened, synchronize]

jobs:
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: Swatinem/rust-cache@v2
with:
# Only update the cache on push onto the next branch. This strikes a nice balance between
# cache hits and cache evictions (github has a 10GB cache limit).
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/next' }}
- name: Clippy
run: |
rustup update --no-self-update
rustup component add clippy
make clippy

rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: Swatinem/rust-cache@v2
with:
# Only update the cache on push onto the next branch. This strikes a nice balance between
# cache hits and cache evictions (github has a 10GB cache limit).
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/next' }}
- name: Rustfmt
run: |
rustup update --no-self-update nightly
rustup +nightly component add rustfmt
make format-check

doc:
name: doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: Swatinem/rust-cache@v2
with:
# Only update the cache on push onto the next branch. This strikes a nice balance between
# cache hits and cache evictions (github has a 10GB cache limit).
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/next' }}
- name: Build docs
run: |
rustup update --no-self-update
make doc
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,14 @@ format-check: ## Run Format using nightly toolchain but only in check mode

.PHONY: lint
lint: format fix clippy ## Run all linting tasks at once (Clippy, fixing, formatting)

# --- docs ----------------------------------------------------------------------------------------

.PHONY: doc
doc: ## Generates & checks documentation
cargo doc --keep-going --release


.PHONY: book
book: ## Builds the book & serves documentation site
mdbook serve --open docs
14 changes: 7 additions & 7 deletions air-script/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "air-script"
version = "0.4.0"
version = "0.5.0"
description = "AirScript language compiler"
authors.workspace = true
readme = "README.md"
Expand All @@ -17,15 +17,15 @@ name = "airc"
path = "src/main.rs"

[dependencies]
air-codegen-winter = { package = "air-codegen-winter", path = "../codegen/winterfell", version = "0.4" }
air-ir = { package = "air-ir", path = "../air", version = "0.4" }
air-parser = { package = "air-parser", path = "../parser", version = "0.4" }
air-pass = { package = "air-pass", path = "../pass", version = "0.4" }
clap = { version = "4.2", features = ["derive"] }
air-codegen-winter = { package = "air-codegen-winter", path = "../codegen/winterfell", version = "0.5" }
air-ir = { package = "air-ir", path = "../air", version = "0.5" }
air-parser = { package = "air-parser", path = "../parser", version = "0.5" }
air-pass = { package = "air-pass", path = "../pass", version = "0.5" }
clap = { version = "4.5", features = ["derive"] }
env_logger = "0.11"
log = { version = "0.4", default-features = false }
miden-diagnostics = { workspace = true }
mir = { package = "air-mir", path = "../mir", version = "0.4" }
mir = { package = "air-mir", path = "../mir", version = "0.5" }

[dev-dependencies]
expect-test = "1.4"
Expand Down
17 changes: 6 additions & 11 deletions air-script/src/cli/transpile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::{fs, path::PathBuf, sync::Arc};

use air_ir::{CodeGenerator, CompileError};
use air_pass::Pass;

use clap::{Args, ValueEnum};
use miden_diagnostics::{
CodeMap, DefaultEmitter, DiagnosticsHandler, term::termcolor::ColorChoice,
Expand Down Expand Up @@ -37,11 +36,7 @@ pub struct Transpile {
)]
output: Option<PathBuf>,

#[arg(
short,
long,
help = "Defines the target language, defaults to Winterfell"
)]
#[arg(short, long, help = "Defines the target language, defaults to Winterfell")]
target: Option<Target>,

#[arg(
Expand Down Expand Up @@ -79,7 +74,7 @@ impl Transpile {
.chain(air_ir::passes::BusOpExpand::new(&diagnostics));
pipeline.run(ast)
})
}
},
Pipeline::WithoutMIR => {
println!("Transpiling without Mir pipeline...");
air_parser::parse_file(&diagnostics, codemap, input_path)
Expand All @@ -91,7 +86,7 @@ impl Transpile {
.chain(air_ir::passes::AstToAir::new(&diagnostics));
pipeline.run(ast)
})
}
},
};

match air {
Expand All @@ -109,7 +104,7 @@ impl Transpile {
let mut path = input_path.clone();
path.set_extension(target.extension());
path
}
},
};
let code = backend.generate(&air).expect("code generation failed");
if let Err(err) = fs::write(&output_path, code) {
Expand All @@ -120,11 +115,11 @@ impl Transpile {
println!("============================================================");

Ok(())
}
},
Err(err) => {
diagnostics.emit(err);
Err("compilation failed".into())
}
},
}
}
}
3 changes: 2 additions & 1 deletion air-script/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use clap::{Parser, Subcommand};
use std::io::Write;

use clap::{Parser, Subcommand};

mod cli;

#[derive(Parser)]
Expand Down
5 changes: 1 addition & 4 deletions air-script/tests/buses/test_air.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ impl AirTester for BusesAirTester {
aux_trace.update_row(length - 2, &[Felt::new(1), Felt::new(0)]);
let aux_rand_elements = AuxRandElements::new(vec![Felt::new(0); num_rand_values]);

let aux_trace_with_meta = AuxTraceWithMetadata {
aux_trace,
aux_rand_elements,
};
let aux_trace_with_meta = AuxTraceWithMetadata { aux_trace, aux_rand_elements };
Some(aux_trace_with_meta)
}
}
Expand Down
3 changes: 2 additions & 1 deletion air-script/tests/codegen/winterfell_with_mir.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use super::helpers::{Pipeline, Target, Test};
use expect_test::expect_file;

use super::helpers::{Pipeline, Target, Test};

// tests_wo_mir
// ================================================================================================

Expand Down
3 changes: 2 additions & 1 deletion air-script/tests/codegen/winterfell_wo_mir.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use super::helpers::{Pipeline, Target, Test};
use expect_test::expect_file;

use super::helpers::{Pipeline, Target, Test};

// tests_wo_mir
// ================================================================================================

Expand Down
7 changes: 4 additions & 3 deletions air-script/tests/functions/test_air.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ impl AirTester for FunctionsAirTester {
16, // blowup factor
0, // grinding factor
FieldExtension::None,
8, // FRI folding factor
31, // FRI max remainder polynomial degree
BatchingMethod::Linear, // method of batching used in computing constraint composition polynomial
8, // FRI folding factor
31, // FRI max remainder polynomial degree
BatchingMethod::Linear, /* method of batching used in computing constraint
* composition polynomial */
BatchingMethod::Linear, // method of batching used in computing DEEP polynomial
)
}
Expand Down
12 changes: 7 additions & 5 deletions air-script/tests/helpers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ use winter_air::{BatchingMethod, EvaluationFrame, FieldExtension, ProofOptions,
use winter_math::fields::f64::BaseElement as Felt;
use winterfell::{AuxTraceWithMetadata, Trace, TraceTable, matrix::ColMatrix};

/// We need to encapsulate the trace table in a struct to manually implement the `aux_trace_width` method of the `Table` trait.
/// Otherwise, using only a TraceTable<Felt> will return an `aux_trace_width` of 0 even if we provide a non-empty aux trace in `Trace::validate`,
/// We need to encapsulate the trace table in a struct to manually implement the `aux_trace_width`
/// method of the `Table` trait. Otherwise, using only a TraceTable<Felt> will return an
/// `aux_trace_width` of 0 even if we provide a non-empty aux trace in `Trace::validate`,
/// and it fails the tests.
pub struct MyTraceTable {
pub trace: TraceTable<Felt>,
Expand Down Expand Up @@ -62,9 +63,10 @@ pub trait AirTester {
8, // blowup factor
0, // grinding factor
FieldExtension::None,
8, // FRI folding factor
31, // FRI max remainder polynomial degree
BatchingMethod::Linear, // method of batching used in computing constraint composition polynomial
8, // FRI folding factor
31, // FRI max remainder polynomial degree
BatchingMethod::Linear, /* method of batching used in computing constraint
* composition polynomial */
BatchingMethod::Linear, // method of batching used in computing DEEP polynomial
)
}
Expand Down
8 changes: 4 additions & 4 deletions air/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "air-ir"
version = "0.4.0"
version = "0.5.0"
description = "Intermediate representation for the AirScript language"
authors.workspace = true
readme = "README.md"
Expand All @@ -12,9 +12,9 @@ rust-version.workspace = true
edition.workspace = true

[dependencies]
air-parser = { package = "air-parser", path = "../parser", version = "0.4" }
air-pass = { package = "air-pass", path = "../pass", version = "0.4" }
air-parser = { package = "air-parser", path = "../parser", version = "0.5" }
air-pass = { package = "air-pass", path = "../pass", version = "0.5" }
anyhow = { workspace = true }
miden-diagnostics = { workspace = true }
mir = { package = "air-mir", path = "../mir", version = "0.4" }
mir = { package = "air-mir", path = "../mir", version = "0.5" }
thiserror = { workspace = true }
16 changes: 8 additions & 8 deletions air/src/graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ impl AlgebraicGraph {
);
// the default domain for [IntegrityConstraints] is `EveryRow`
Ok((DEFAULT_SEGMENT, ConstraintDomain::EveryRow))
}
},
Value::PublicInput(_) => {
assert!(
!default_domain.is_integrity(),
"unexpected access to public input in integrity constraint"
);
Ok((DEFAULT_SEGMENT, default_domain))
}
},
Value::TraceAccess(trace_access) => {
let domain = if default_domain.is_boundary() {
assert_eq!(
Expand All @@ -132,7 +132,7 @@ impl AlgebraicGraph {
};

Ok((trace_access.segment, domain))
}
},
},
Operation::Add(lhs, rhs) | Operation::Sub(lhs, rhs) | Operation::Mul(lhs, rhs) => {
let (lhs_segment, lhs_domain) = self.node_details(lhs, default_domain)?;
Expand All @@ -142,7 +142,7 @@ impl AlgebraicGraph {
let domain = lhs_domain.merge(rhs_domain)?;

Ok((trace_segment, domain))
}
},
}
}

Expand Down Expand Up @@ -177,23 +177,23 @@ impl AlgebraicGraph {
Value::PeriodicColumn(pc) => {
cycles.insert(pc.name, pc.cycle);
0
}
},
},
Operation::Add(lhs, rhs) => {
let lhs_base = self.accumulate_degree(cycles, lhs);
let rhs_base = self.accumulate_degree(cycles, rhs);
lhs_base.max(rhs_base)
}
},
Operation::Sub(lhs, rhs) => {
let lhs_base = self.accumulate_degree(cycles, lhs);
let rhs_base = self.accumulate_degree(cycles, rhs);
lhs_base.max(rhs_base)
}
},
Operation::Mul(lhs, rhs) => {
let lhs_base = self.accumulate_degree(cycles, lhs);
let rhs_base = self.accumulate_degree(cycles, rhs);
lhs_base + rhs_base
}
},
}
}
}
Loading
Loading