Crates inherited version/license/edition from [workspace.package] but not `repository`, so every crate published without a repository link. Add `repository.workspace = true` uniformly, completing the description+version+license+repository metadata `cargo publish` and crates.io expect. No build impact. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lawsynth-expr
Language-neutral scalar expression IR with a deterministic parser, printer, evaluator, and local simplification primitives. It is used by world laws and feature libraries; expression evaluation is pure and accepts values only through an explicit environment.
Use
use lawsynth_core::Identifier;
use lawsynth_expr::{Environment, evaluate, parse, print};
let expression = parse("rate * population - loss")?;
let environment = Environment::from([
(Identifier::new("rate")?, 0.2),
(Identifier::new("population")?, 10.0),
(Identifier::new("loss")?, 1.0),
]);
assert_eq!(evaluate(&expression, &environment)?, 1.0);
assert_eq!(print(&expression), "rate * population - loss");
# Ok::<(), Box<dyn std::error::Error>>(())
Parsing rejects malformed syntax and evaluation rejects missing symbols and
non-finite results. The crate represents scalar arithmetic only; dimensional
checking belongs to lawsynth-units, while equivalence saturation belongs to
lawsynth-egraph.