From 2e64c276dda74835b564ca1cc7419fa28e9057c1 Mon Sep 17 00:00:00 2001 From: Olivier Cots Date: Mon, 31 Aug 2026 20:54:24 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20adopt=20CTParser=200.9.5-beta=20?= =?UTF-8?q?=E2=80=94=20#343/#344=20fixed=20upstream?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CTParser 0.9.5-beta (PRs #345 / #347) fixes the two rough edges E1 filed while making abstract-syntax.md executable: - #343: a constraint *bound* referencing the variable / state / control / time is now rejected with a CTBase.ParsingError naming the cause and the fix, instead of a leaked internal gensym `UndefVarError`. The `!!! warning` on abstract-syntax.md no longer says "the message is currently not explicit", and now covers all four kinds of dependency. - #344: `@def name … end true` trace mode prints the parsed model once, not twice — the `!!! hint` block renders a single copy now (no prose change). [compat] CTParser = "0.9" already admits 0.9.5-beta, so no Project.toml change. docs/src/assets/Manifest.toml (the tracked reproducibility snapshot) records CTParser 0.9.5-beta and CTDirect 1.1.6-beta (a docs-only release the resolver pulled in, CTDirect#631 — no source change). Verified with a full docs build: exit 0, 0 unresolved @ref, 0 failed @example; #343 renders the ParsingError, #344 renders one trace block. Co-Authored-By: Claude Sonnet 5 --- docs/src/assets/Manifest.toml | 8 ++++---- docs/src/modelling/abstract-syntax.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/src/assets/Manifest.toml b/docs/src/assets/Manifest.toml index fc085e62d..42734b9b4 100644 --- a/docs/src/assets/Manifest.toml +++ b/docs/src/assets/Manifest.toml @@ -225,9 +225,9 @@ version = "0.30.2-beta" [[deps.CTDirect]] deps = ["ADNLPModels", "CTBase", "CTModels", "CTParser", "CTSolvers", "DocStringExtensions", "ExaModels", "SolverCore", "SparseArrays", "SparseConnectivityTracer"] -git-tree-sha1 = "f5b16f5b312265d2000cf1ce2a46ad219b1e4717" +git-tree-sha1 = "f88e02b5c7102b24efa7e89c558c6d8fc67015e5" uuid = "790bbbee-bee9-49ee-8912-a9de031322d5" -version = "1.1.5-beta" +version = "1.1.6-beta" [[deps.CTFlows]] deps = ["ADTypes", "CTBase", "CTModels", "CTSolvers", "CommonSolve", "DocStringExtensions", "GPUArraysCore", "RecipesBase"] @@ -274,9 +274,9 @@ version = "0.19.2-beta" [[deps.CTParser]] deps = ["CTBase", "DocStringExtensions", "MLStyle", "OrderedCollections", "Parameters", "Unicode"] -git-tree-sha1 = "5b64179056b79c42ee4fd748e55e98e5a1e3f5e9" +git-tree-sha1 = "3f745c73919729ca654d02e1091fce5583facacc" uuid = "32681960-a1b1-40db-9bff-a1ca817385d1" -version = "0.9.4-beta" +version = "0.9.5-beta" weakdeps = ["ExaModels", "LinearAlgebra"] [deps.CTParser.extensions] diff --git a/docs/src/modelling/abstract-syntax.md b/docs/src/modelling/abstract-syntax.md index 83ee1b3e9..003337ece 100644 --- a/docs/src/modelling/abstract-syntax.md +++ b/docs/src/modelling/abstract-syntax.md @@ -421,7 +421,7 @@ nothing # hide ``` !!! warning - Constraint bounds must be *effective*, that is must not depend on a variable. For instance, the following is rejected (the message is currently not explicit — the cause is `x₂(0) == v` using the variable `v` as a bound): + A constraint *bound* must be constant — it may not depend on the variable, the state, the control or the time. The following is rejected, with a message naming the cause: ```@repl abs try # hide @@ -432,7 +432,7 @@ nothing # hide u ∈ R, control -1 ≤ v ≤ 1 x₁(0) == -1 - x₂(0) == v # wrong: the bound is not effective (it depends on the variable) + x₂(0) == v # wrong: the bound v depends on the variable x(1) == [0, 0] ẋ(t) == [x₂(t), u(t)] ∫(0.5u(t)^2) → min @@ -442,7 +442,7 @@ nothing # hide end # hide ``` - Write instead a boundary constraint, which *may* involve the variable: + Write instead a boundary constraint, moving the term to the constrained side — that side *may* involve the variable: ```@example abs @def begin