mirror of
https://github.com/powdr-labs/powdr.git
synced 2026-04-20 03:03:25 -04:00
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.
674 B
674 B