diff --git a/Project.toml b/Project.toml index 5c8096072b..e1000f36ad 100644 --- a/Project.toml +++ b/Project.toml @@ -96,7 +96,7 @@ Libdl = "1" LinearAlgebra = "1" MLStyle = "0.4.17" NaNMath = "0.3, 1" -NonlinearSolve = "3.12" +NonlinearSolve = "3.14" OrderedCollections = "1" OrdinaryDiffEq = "6.82.0" PrecompileTools = "1" @@ -112,8 +112,8 @@ SparseArrays = "1" SpecialFunctions = "0.7, 0.8, 0.9, 0.10, 1.0, 2" StaticArrays = "0.10, 0.11, 0.12, 1.0" SymbolicIndexingInterface = "0.3.28" -SymbolicUtils = "2.1" -Symbolics = "5.32" +SymbolicUtils = "3.1.2" +Symbolics = "6" URIs = "1" UnPack = "0.1, 1.0" Unitful = "1.1" diff --git a/docs/Project.toml b/docs/Project.toml index 6db512409c..aa8f7ba8f8 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -37,6 +37,6 @@ Plots = "1.36" SciMLStructures = "1.1" StochasticDiffEq = "6" SymbolicIndexingInterface = "0.3.1" -SymbolicUtils = "2, 3" -Symbolics = "5" +SymbolicUtils = "3" +Symbolics = "6" Unitful = "1.12" diff --git a/src/debugging.jl b/src/debugging.jl index 3e72fdd0e5..06e3edf0d8 100644 --- a/src/debugging.jl +++ b/src/debugging.jl @@ -32,5 +32,5 @@ function debug_sub(ex) f = operation(ex) args = map(debug_sub, arguments(ex)) f in LOGGED_FUN ? logged_fun(f, args...) : - maketerm(typeof(ex), f, args, symtype(t), metadata(ex)) + maketerm(typeof(ex), f, args, metadata(ex)) end diff --git a/src/structural_transformation/utils.jl b/src/structural_transformation/utils.jl index 7f5039f872..90bf4e033d 100644 --- a/src/structural_transformation/utils.jl +++ b/src/structural_transformation/utils.jl @@ -449,6 +449,6 @@ function simplify_shifts(var) return simplify_shifts(ModelingToolkit.Shift(t1 === nothing ? t2 : t1, s1 + s2)(vv2)) else return maketerm(typeof(var), operation(var), simplify_shifts.(arguments(var)), - Symbolics.symtype(var), unwrap(var).metadata) + unwrap(var).metadata) end end diff --git a/src/systems/abstractsystem.jl b/src/systems/abstractsystem.jl index f772ecf8d5..0c3309d1f7 100644 --- a/src/systems/abstractsystem.jl +++ b/src/systems/abstractsystem.jl @@ -1090,7 +1090,7 @@ function _apply_to_variables(f::F, ex) where {F} iscall(ex) || return ex maketerm(typeof(ex), _apply_to_variables(f, operation(ex)), map(Base.Fix1(_apply_to_variables, f), arguments(ex)), - symtype(ex), metadata(ex)) + metadata(ex)) end abstract type SymScope end @@ -1102,7 +1102,7 @@ function LocalScope(sym::Union{Num, Symbolic, Symbolics.Arr{Num}}) args = arguments(sym) a1 = setmetadata(args[1], SymScope, LocalScope()) maketerm(typeof(sym), operation(sym), [a1, args[2:end]...], - symtype(sym), metadata(sym)) + metadata(sym)) else setmetadata(sym, SymScope, LocalScope()) end @@ -1119,7 +1119,7 @@ function ParentScope(sym::Union{Num, Symbolic, Symbolics.Arr{Num}}) a1 = setmetadata(args[1], SymScope, ParentScope(getmetadata(value(args[1]), SymScope, LocalScope()))) maketerm(typeof(sym), operation(sym), [a1, args[2:end]...], - symtype(sym), metadata(sym)) + metadata(sym)) else setmetadata(sym, SymScope, ParentScope(getmetadata(value(sym), SymScope, LocalScope()))) @@ -1138,7 +1138,7 @@ function DelayParentScope(sym::Union{Num, Symbolic, Symbolics.Arr{Num}}, N) a1 = setmetadata(args[1], SymScope, DelayParentScope(getmetadata(value(args[1]), SymScope, LocalScope()), N)) maketerm(typeof(sym), operation(sym), [a1, args[2:end]...], - symtype(sym), metadata(sym)) + metadata(sym)) else setmetadata(sym, SymScope, DelayParentScope(getmetadata(value(sym), SymScope, LocalScope()), N)) @@ -1154,7 +1154,7 @@ function GlobalScope(sym::Union{Num, Symbolic, Symbolics.Arr{Num}}) args = arguments(sym) a1 = setmetadata(args[1], SymScope, GlobalScope()) maketerm(typeof(sym), operation(sym), [a1, args[2:end]...], - symtype(sym), metadata(sym)) + metadata(sym)) else setmetadata(sym, SymScope, GlobalScope()) end @@ -1172,13 +1172,13 @@ function renamespace(sys, x) if iscall(x) && operation(x) isa Operator return maketerm(typeof(x), operation(x), Any[renamespace(sys, only(arguments(x)))], - symtype(x), metadata(x))::T + metadata(x))::T end if iscall(x) && operation(x) === getindex args = arguments(x) return maketerm( typeof(x), operation(x), vcat(renamespace(sys, args[1]), args[2:end]), - symtype(x), metadata(x))::T + metadata(x))::T end let scope = getmetadata(x, SymScope, LocalScope()) if scope isa LocalScope @@ -1263,13 +1263,12 @@ function namespace_expr( # metadata from the rescoped variable rescoped = renamespace(n, O) maketerm(typeof(rescoped), operation(rescoped), renamed, - symtype(rescoped), metadata(rescoped)) elseif Symbolics.isarraysymbolic(O) # promote_symtype doesn't work for array symbolics - maketerm(typeof(O), operation(O), renamed, symtype(O), metadata(O)) + maketerm(typeof(O), operation(O), renamed, metadata(O)) else - maketerm(typeof(O), operation(O), renamed, symtype(O), metadata(O)) + maketerm(typeof(O), operation(O), renamed, metadata(O)) end elseif isvariable(O) renamespace(n, O) diff --git a/src/systems/clock_inference.jl b/src/systems/clock_inference.jl index 3e5239ab3d..a8f19a0e21 100644 --- a/src/systems/clock_inference.jl +++ b/src/systems/clock_inference.jl @@ -63,7 +63,7 @@ function substitute_sample_time(ex, dt) end new_args[i] = ex_arg end - maketerm(typeof(ex), op, new_args, symtype(ex), metadata(ex)) + maketerm(typeof(ex), op, new_args, metadata(ex)) end end diff --git a/src/systems/diffeqs/abstractodesystem.jl b/src/systems/diffeqs/abstractodesystem.jl index e134d8c8b1..89001227e5 100644 --- a/src/systems/diffeqs/abstractodesystem.jl +++ b/src/systems/diffeqs/abstractodesystem.jl @@ -238,7 +238,7 @@ function delay_to_function(expr, iv, sts, ps, h) return maketerm(typeof(expr), operation(expr), map(x -> delay_to_function(x, iv, sts, ps, h), arguments(expr)), - symtype(expr), metadata(expr)) + metadata(expr)) else return expr end diff --git a/src/systems/diffeqs/odesystem.jl b/src/systems/diffeqs/odesystem.jl index f45a7626a8..b6fc986a7b 100644 --- a/src/systems/diffeqs/odesystem.jl +++ b/src/systems/diffeqs/odesystem.jl @@ -569,7 +569,7 @@ function convert_system(::Type{<:ODESystem}, sys, t; name = nameof(sys)) continue end ns = maketerm(typeof(s), operation(s), Any[t], - SymbolicUtils.symtype(s), SymbolicUtils.metadata(s)) + SymbolicUtils.metadata(s)) newsts[i] = ns varmap[s] = ns else diff --git a/src/systems/systemstructure.jl b/src/systems/systemstructure.jl index 2cbf820d0d..1b0b58d09a 100644 --- a/src/systems/systemstructure.jl +++ b/src/systems/systemstructure.jl @@ -20,7 +20,7 @@ using SparseArrays function quick_cancel_expr(expr) Rewriters.Postwalk(quick_cancel, similarterm = (x, f, args; kws...) -> maketerm(typeof(x), f, args, - SymbolicUtils.symtype(x), SymbolicUtils.metadata(x), + SymbolicUtils.metadata(x), kws...))(expr) end diff --git a/src/utils.jl b/src/utils.jl index acd7a8686d..8df1d4f69b 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -33,7 +33,7 @@ function detime_dvs(op) Sym{Real}(nameof(operation(op))) else maketerm(typeof(op), operation(op), detime_dvs.(arguments(op)), - symtype(op), metadata(op)) + metadata(op)) end end @@ -41,7 +41,7 @@ function retime_dvs(op, dvs, iv) issym(op) && return Sym{FnType{Tuple{symtype(iv)}, Real}}(nameof(op))(iv) iscall(op) ? maketerm(typeof(op), operation(op), retime_dvs.(arguments(op), (dvs,), (iv,)), - symtype(op), metadata(op)) : + metadata(op)) : op end @@ -833,7 +833,7 @@ end function fold_constants(ex) if iscall(ex) maketerm(typeof(ex), operation(ex), map(fold_constants, arguments(ex)), - symtype(ex), metadata(ex)) + metadata(ex)) elseif issym(ex) && isconstant(ex) getdefault(ex) else diff --git a/src/variables.jl b/src/variables.jl index 6177748d9b..8bcea4e79b 100644 --- a/src/variables.jl +++ b/src/variables.jl @@ -244,7 +244,7 @@ ishistory(x::Symbolic) = getmetadata(x, IsHistory, false) hist(x, t) = wrap(hist(unwrap(x), t)) function hist(x::Symbolic, t) setmetadata( - toparam(maketerm(typeof(x), operation(x), [unwrap(t)], symtype(x), metadata(x))), + toparam(maketerm(typeof(x), operation(x), [unwrap(t)], metadata(x))), IsHistory, true) end