pounce_nl/lib.rs
1//! AMPL `.nl` reader, reverse-mode AD tape, and TNLP evaluator.
2//!
3//! This crate holds the `.nl` pipeline that used to live in `pounce-cli`:
4//!
5//! - [`nl_reader`] parses a `.nl` file into an [`nl_reader::NlProblem`] (the
6//! `Expr` DAG, linear parts, bounds, names, starting point) and provides
7//! [`nl_reader::NlTnlp`], a [`pounce_nlp::tnlp::TNLP`] implementation that
8//! evaluates objective/gradient/Hessian and constraints/Jacobian.
9//! - [`nl_tape`] flattens an `Expr` DAG into a reverse-mode AD tape with
10//! colored forward-over-reverse Hessian products.
11//! - [`nl_external`] supports AMPL imported (external) functions via the
12//! `funcadd_ASL` ABI.
13//! - [`nl_fbbt_translate`] lowers an `Expr` to an `FbbtTape` for
14//! feasibility-based bound tightening.
15//!
16//! It is a leaf crate (depends only on `pounce-common` and `pounce-nlp`) so
17//! both the CLI and the Python bindings can read and evaluate `.nl` models
18//! without depending on each other.
19
20pub mod nl_external;
21pub mod nl_fbbt_translate;
22pub mod nl_reader;
23pub mod nl_tape;