From 066b93cb84a2fb5e3e67700659ab45da84d1f380 Mon Sep 17 00:00:00 2001 From: Sam Isaacson Date: Tue, 17 Nov 2026 16:47:42 -0500 Subject: [PATCH] Avoid an inference hang in reduce_ode_mod_p on Julia 1.14.0-beta1 `new_type` is not inferable here, so the reduced equation dicts infer as `Dict{_A, Union{FracFieldElem{_A1}, _A1}} where {_A, _A1}`. Building a `Dict` whose values are those dicts, only to iterate over the two (old, new) pairs, sends type inference on Julia 1.14.0-beta1 (and master) into a loop of ever larger `Memory{Union{FracFieldElem{_A}, FracFieldElem{_A1}, ...}}` types, so compiling `assess_identifiability` never finishes. Iterate over a tuple of the pairs instead; this also avoids the two pairs colliding as keys when `x_equations == y_equations`. Co-Authored-By: Claude Opus 5.5 --- src/ODE.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ODE.jl b/src/ODE.jl index e7f5b7825..26478da5f 100644 --- a/src/ODE.jl +++ b/src/ODE.jl @@ -232,7 +232,7 @@ function reduce_ode_mod_p(ode::ODE{<:MPolyRingElem{Nemo.QQFieldElem}}, p::Intege new_y = map(y -> switch_ring(y, new_ring), ode.y_vars) new_x_eqs = Dict{new_type, ExtendedFraction{new_type}}() new_y_eqs = Dict{new_type, ExtendedFraction{new_type}}() - for (old, new) in Dict(ode.x_equations => new_x_eqs, ode.y_equations => new_y_eqs) + for (old, new) in ((ode.x_equations, new_x_eqs), (ode.y_equations, new_y_eqs)) for (v, f) in old new_v = switch_ring(v, new_ring) new[new_v] = _reduce_mod_p(f, p)