Files
powdr/expression/Cargo.toml
Georg Wiese 0e04662254 New expression type (#2831)
This PR adds a new `powdr_expression` crate, containing a simplified
version of `powdr_ast::analyzed::AlgebraicExpression`. The idea here is
that this decouples our Autoprecompiles code from the PowdrVM & PIL
codebase. This will allow us to gradually change the expression type
according to our needs. See #2832 and #2833 as work-in-progress
examples.

Differences to previous `AlgebraicExpression`:
- Generic over the reference type (but
`powdr_autoprecompiles::legacy_expression` adds `AlgebraicReference` and
defines `type AlgebraicExpression<T> = ActualAlgebraicExpression<T,
AlgebraicReference>`, for now)
- Removed `AlgebraicExpression::{PublicReference,Challenge}` variants
- Removed `AlgebraicBinaryOperator::Pow` variant
- `degree_with_cache()` -> `degree()`, as we don't have intermediate
polynomials anymore

I included a `powdr_ast::analyzed::AlgebraicExpression <-->
powdr_autoprecompiles::legacy_expression::AlgebraicExpression`
conversion, which is only used to interact with the `powdr_pilopt`
crate, which still is used by the APC codebase and the PowdrVM / PIL
codebase.
2025-06-06 12:59:15 +00:00

28 lines
674 B
TOML

[package]
name = "powdr-expression"
description = "powdr expression type"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
homepage = { workspace = true }
repository = { workspace = true }
[dependencies]
powdr-number.workspace = true
itertools = "0.13"
num-traits = "0.2.15"
derive_more = "0.99.17"
serde = { version = "1.0", default-features = false, features = ["alloc", "derive", "rc"] }
schemars = { version = "0.8.16", features = ["preserve_order"]}
[dev-dependencies]
test-log = "0.2.12"
pretty_assertions = "1.4.0"
[lints]
workspace = true
[lib]
bench = false # See https://github.com/bheisler/criterion.rs/issues/458