From 5622f047125a2a2504c305a56c9b16bca4fdb234 Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Fri, 8 Aug 2025 11:52:23 +0200 Subject: [PATCH 1/4] test non-static state variables in C code --- Manifest.toml | 443 +++++++++++++++------------------- README.md | 2 +- src/SymbolicControlSystems.jl | 76 +++++- test/runtests.jl | 139 +++++++++++ 4 files changed, 413 insertions(+), 247 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index 3979d01..d63b3fb 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -1,9 +1,9 @@ # This file is machine-generated - editing it directly is not advised [[ADTypes]] -git-tree-sha1 = "72af59f5b8f09faee36b4ec48e014a79210f2f4f" +git-tree-sha1 = "7927b9af540ee964cc5d1b73293f1eb0b761a3a1" uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -version = "1.11.0" +version = "1.16.0" [ADTypes.extensions] ADTypesChainRulesCoreExt = "ChainRulesCore" @@ -15,17 +15,6 @@ version = "1.11.0" ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" -[[AbstractFFTs]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" -uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" -version = "1.5.0" -weakdeps = ["ChainRulesCore", "Test"] - - [AbstractFFTs.extensions] - AbstractFFTsChainRulesCoreExt = "ChainRulesCore" - AbstractFFTsTestExt = "Test" - [[AbstractTrees]] git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177" uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" @@ -33,9 +22,9 @@ version = "0.4.5" [[Accessors]] deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] -git-tree-sha1 = "0ba8f4c1f06707985ffb4804fdad1bf97b233897" +git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" -version = "0.1.41" +version = "0.1.42" [Accessors.extensions] AxisKeysExt = "AxisKeys" @@ -50,7 +39,6 @@ version = "0.1.41" AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - Requires = "ae029012-a4dd-5104-9daa-d747884805df" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" @@ -58,12 +46,13 @@ version = "0.1.41" [[Adapt]] deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "50c3c56a52972d78e8be9fd135bfb91c9574c140" +git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.1.1" -weakdeps = ["StaticArrays"] +version = "4.3.0" +weakdeps = ["SparseArrays", "StaticArrays"] [Adapt.extensions] + AdaptSparseArraysExt = "SparseArrays" AdaptStaticArraysExt = "StaticArrays" [[AliasTables]] @@ -78,9 +67,9 @@ version = "1.1.2" [[ArrayInterface]] deps = ["Adapt", "LinearAlgebra"] -git-tree-sha1 = "017fcb757f8e921fb44ee063a7aafe5f89b86dd1" +git-tree-sha1 = "9606d7832795cbef89e06a550475be300364a8aa" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.18.0" +version = "7.19.0" [ArrayInterface.extensions] ArrayInterfaceBandedMatricesExt = "BandedMatrices" @@ -116,30 +105,25 @@ version = "1.11.0" uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" version = "1.11.0" -[[Bessels]] -git-tree-sha1 = "4435559dc39793d53a9e3d278e185e920b4619ef" -uuid = "0e736298-9ec6-45e8-9647-e4fc86a2fe38" -version = "0.2.8" - [[Bijections]] -git-tree-sha1 = "d8b0439d2be438a5f2cd68ec158fe08a7b2595b7" +git-tree-sha1 = "a2d308fcd4c2fb90e943cf9cd2fbfa9c32b69733" uuid = "e2ed5e7c-b2de-5872-ae92-c73ca462fb04" -version = "0.1.9" +version = "0.2.2" [[ChainRulesCore]] deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" +git-tree-sha1 = "06ee8d1aa558d2833aa799f6f0b31b30cada405f" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.25.1" +version = "1.25.2" weakdeps = ["SparseArrays"] [ChainRulesCore.extensions] ChainRulesCoreSparseArraysExt = "SparseArrays" [[Combinatorics]] -git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" +git-tree-sha1 = "8010b6bb3388abe68d95743dcbea77650bb2eddf" uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" -version = "1.0.2" +version = "1.0.3" [[CommonEq]] git-tree-sha1 = "6b0f0354b8eb954cdba708fb262ef00ee7274468" @@ -164,9 +148,9 @@ version = "1.0.0" [[Compat]] deps = ["TOML", "UUIDs"] -git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" +git-tree-sha1 = "0037835448781bb46feb39866934e243886d756a" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.16.0" +version = "4.18.0" weakdeps = ["Dates", "LinearAlgebra"] [Compat.extensions] @@ -198,9 +182,9 @@ uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d" version = "1.10.2" [[ConstructionBase]] -git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" +git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.8" +version = "1.6.0" weakdeps = ["IntervalSets", "LinearAlgebra", "StaticArrays"] [ConstructionBase.extensions] @@ -209,29 +193,24 @@ weakdeps = ["IntervalSets", "LinearAlgebra", "StaticArrays"] ConstructionBaseStaticArraysExt = "StaticArrays" [[ControlSystemsBase]] -deps = ["DSP", "ForwardDiff", "IterTools", "LaTeXStrings", "LinearAlgebra", "MacroTools", "MatrixEquations", "MatrixPencils", "Polynomials", "PrecompileTools", "Printf", "Random", "RecipesBase", "SparseArrays", "StaticArraysCore", "UUIDs"] -git-tree-sha1 = "f6f1fb86628cfce19c422146541dba3072eca276" +deps = ["ForwardDiff", "Hungarian", "LinearAlgebra", "MacroTools", "MatrixEquations", "MatrixPencils", "Polynomials", "PrecompileTools", "Printf", "Random", "RecipesBase", "StaticArraysCore", "UUIDs"] +git-tree-sha1 = "eaf7f2115e11f7ca5cafaa1f92a7227ede917d35" uuid = "aaaaaaaa-a6ca-5380-bf3e-84a91bcd477e" -version = "1.13.1" +version = "1.18.2" [ControlSystemsBase.extensions] + ControlSystemsBaseDSPExt = ["DSP"] ControlSystemsBaseImplicitDifferentiationExt = ["ImplicitDifferentiation", "ComponentArrays"] [ControlSystemsBase.weakdeps] ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" + DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2" ImplicitDifferentiation = "57b37032-215b-411a-8a7c-41a003a55207" -[[DSP]] -deps = ["Bessels", "FFTW", "IterTools", "LinearAlgebra", "Polynomials", "Random", "Reexport", "SpecialFunctions", "Statistics"] -git-tree-sha1 = "489db9d78b53e44fb753d225c58832632d74ab10" -uuid = "717857b8-e6f2-59f4-9121-6e50c889abd2" -version = "0.8.0" - - [DSP.extensions] - OffsetArraysExt = "OffsetArrays" - - [DSP.weakdeps] - OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +[[Crayons]] +git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" +uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" +version = "4.1.1" [[DataAPI]] git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" @@ -240,9 +219,9 @@ version = "1.16.0" [[DataStructures]] deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "1d0a14036acb104d9e89698bd408f63ab58cdc82" +git-tree-sha1 = "4e1fe97fdaed23e9dc21d4d664bea76b65fc50a0" uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.20" +version = "0.18.22" [[DataValueInterfaces]] git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" @@ -273,9 +252,9 @@ version = "1.11.0" [[Distributions]] deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] -git-tree-sha1 = "7901a6117656e29fa2c74a58adb682f380922c47" +git-tree-sha1 = "3e6d038b77f22791b8e3472b7c633acea1ecac06" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.116" +version = "0.25.120" [Distributions.extensions] DistributionsChainRulesCoreExt = "ChainRulesCore" @@ -288,22 +267,23 @@ version = "0.25.116" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [[DocStringExtensions]] -deps = ["LibGit2"] -git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" +git-tree-sha1 = "7442a5dfe1ebb773c29cc2962a8980f47221d76c" uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.3" +version = "0.9.5" [[DomainSets]] -deps = ["CompositeTypes", "IntervalSets", "LinearAlgebra", "Random", "StaticArrays"] -git-tree-sha1 = "490392af2c7d63183bfa2c8aaa6ab981c5ba7561" +deps = ["CompositeTypes", "IntervalSets", "LinearAlgebra", "StaticArrays"] +git-tree-sha1 = "c249d86e97a7e8398ce2068dce4c078a1c3464de" uuid = "5b8099bc-c8ec-5219-889f-1d9e522a28bf" -version = "0.7.14" +version = "0.7.16" [DomainSets.extensions] DomainSetsMakieExt = "Makie" + DomainSetsRandomExt = "Random" [DomainSets.weakdeps] Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" + Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] @@ -312,37 +292,24 @@ version = "1.6.0" [[DynamicPolynomials]] deps = ["Future", "LinearAlgebra", "MultivariatePolynomials", "MutableArithmetics", "Reexport", "Test"] -git-tree-sha1 = "9a3ae38b460449cc9e7dd0cfb059c76028724627" +git-tree-sha1 = "98c4bb95af37e5d980129261fdd6dab0392c6607" uuid = "7c1d4256-1411-5781-91ec-d7bc3513ac07" -version = "0.6.1" +version = "0.6.2" [[EnumX]] -git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" +git-tree-sha1 = "bddad79635af6aec424f53ed8aad5d7555dc6f00" uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" -version = "1.0.4" +version = "1.0.5" [[ExprTools]] git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" version = "0.1.10" -[[Expronicon]] -deps = ["MLStyle", "Pkg", "TOML"] -git-tree-sha1 = "fc3951d4d398b5515f91d7fe5d45fc31dccb3c9b" -uuid = "6b7a57c9-7cc1-4fdf-b7f5-e857abae3636" -version = "0.8.5" - -[[FFTW]] -deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] -git-tree-sha1 = "4820348781ae578893311153d69049a93d05f39d" -uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" -version = "1.8.0" - -[[FFTW_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "4d81ed14783ec49ce9f2e168208a12ce1815aa25" -uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" -version = "3.3.10+3" +[[ExproniconLite]] +git-tree-sha1 = "c13f0b150373771b0fdc1713c97860f8df12e6c2" +uuid = "55351af7-c7e9-48d6-89ff-24e801d99491" +version = "0.10.14" [[FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" @@ -367,9 +334,9 @@ version = "1.3.7" [[ForwardDiff]] deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "a2df1b776752e3f344e5116c06d75a10436ab853" +git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "0.10.38" +version = "1.0.1" weakdeps = ["StaticArrays"] [ForwardDiff.extensions] @@ -397,27 +364,22 @@ git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" uuid = "46192b85-c4d5-4398-a991-12ede77f4527" version = "0.2.0" +[[Hungarian]] +deps = ["LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "4f84db415ccb0ea750b10738bfecdd55388fd1b6" +uuid = "e91730f6-4275-51fb-a7a0-7064cfbd3b39" +version = "0.7.0" + [[HypergeometricFunctions]] deps = ["LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] -git-tree-sha1 = "b1c2585431c382e3fe5805874bda6aea90a95de9" +git-tree-sha1 = "68c173f4f449de5b438ee67ed0c9c748dc31a2ec" uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" -version = "0.3.25" - -[[IfElse]] -git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" -uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" -version = "0.1.1" +version = "0.3.28" [[IntegerMathUtils]] -git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" +git-tree-sha1 = "4c1acff2dc6b6967e7e750633c50bc3b8d83e617" uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" -version = "0.1.2" - -[[IntelOpenMP_jll]] -deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] -git-tree-sha1 = "10bd689145d2c3b2a9844005d01087cc1194e79e" -uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" -version = "2024.2.1+0" +version = "0.1.3" [[InteractiveUtils]] deps = ["Markdown"] @@ -425,9 +387,9 @@ uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" version = "1.11.0" [[IntervalSets]] -git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" +git-tree-sha1 = "5fbb102dcb8b1a858111ae81d56682376130517d" uuid = "8197267c-284f-5f27-9208-e0e47529a953" -version = "0.7.10" +version = "0.7.11" weakdeps = ["Random", "RecipesBase", "Statistics"] [IntervalSets.extensions] @@ -446,14 +408,9 @@ weakdeps = ["Dates", "Test"] InverseFunctionsTestExt = "Test" [[IrrationalConstants]] -git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" +git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.2" - -[[IterTools]] -git-tree-sha1 = "42d5f897009e7ff2cf88db414a389e5ed1bdd023" -uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" -version = "1.10.0" +version = "0.2.4" [[IteratorInterfaceExtensions]] git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" @@ -462,9 +419,9 @@ version = "1.0.0" [[JLLWrappers]] deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" +git-tree-sha1 = "0533e564aae234aff59ab625543145446d8b6ec2" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.0" +version = "1.7.1" [[JSON]] deps = ["Dates", "Mmap", "Parsers", "Unicode"] @@ -472,6 +429,12 @@ git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" version = "0.21.4" +[[Jieko]] +deps = ["ExproniconLite"] +git-tree-sha1 = "2f05ed29618da60c06a87e9c033982d4f71d0b6c" +uuid = "ae98c720-c025-4a4a-838c-29b094483192" +version = "0.2.1" + [[LaTeXStrings]] git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" @@ -479,24 +442,21 @@ version = "1.4.0" [[Latexify]] deps = ["Format", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] -git-tree-sha1 = "ce5f5621cac23a86011836badfedf664a612cee4" +git-tree-sha1 = "4f34eaabe49ecb3fb0d58d6015e32fd31a733199" uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.5" +version = "0.16.8" [Latexify.extensions] DataFramesExt = "DataFrames" SparseArraysExt = "SparseArrays" SymEngineExt = "SymEngine" + TectonicExt = "tectonic_jll" [Latexify.weakdeps] DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" - -[[LazyArtifacts]] -deps = ["Artifacts", "Pkg"] -uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" -version = "1.11.0" + tectonic_jll = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5" [[LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] @@ -508,16 +468,6 @@ deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2 uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" version = "8.6.0+0" -[[LibGit2]] -deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -version = "1.11.0" - -[[LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] -uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.7.2+0" - [[LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" @@ -534,9 +484,9 @@ version = "1.11.0" [[LinearMaps]] deps = ["LinearAlgebra"] -git-tree-sha1 = "ee79c3208e55786de58f8dcccca098ced79f743f" +git-tree-sha1 = "7f6be2e4cdaaf558623d93113d6ddade7b916209" uuid = "7a12625a-238d-50fd-b39a-03d52299707e" -version = "3.11.3" +version = "3.11.4" weakdeps = ["ChainRulesCore", "SparseArrays", "Statistics"] [LinearMaps.extensions] @@ -564,21 +514,10 @@ version = "0.3.29" uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" version = "1.11.0" -[[MKL_jll]] -deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"] -git-tree-sha1 = "f046ccd0c6db2832a9f639e2c669c6fe867e5f4f" -uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" -version = "2024.2.0+0" - -[[MLStyle]] -git-tree-sha1 = "bc38dff0548128765760c79eb7388a4b37fae2c8" -uuid = "d8e11817-5142-5d16-987a-aa16d5891078" -version = "0.4.17" - [[MacroTools]] -git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" +git-tree-sha1 = "1e0228a030642014fe5cfe68c2c0a818f9e3f522" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.15" +version = "0.5.16" [[Markdown]] deps = ["Base64"] @@ -587,15 +526,15 @@ version = "1.11.0" [[MatrixEquations]] deps = ["LinearAlgebra", "LinearMaps"] -git-tree-sha1 = "f765b4eda3ea9be8e644b9127809ca5151f3d9ea" +git-tree-sha1 = "580fbac12840a360bd7937b05e44aba699be16b7" uuid = "99c1a7ee-ab34-5fd5-8076-27c950a045f4" -version = "2.4.2" +version = "2.5.3" [[MatrixPencils]] deps = ["LinearAlgebra", "Polynomials", "Random"] -git-tree-sha1 = "c00a086f4f1df792c77dc1bd674357044aa08d74" +git-tree-sha1 = "7f63bbf568058c9b95d48a35bb38c6c311ba8e5e" uuid = "48965c70-4690-11ea-1f13-43a2532b2fa8" -version = "1.8.0" +version = "1.8.6" [[MbedTLS_jll]] deps = ["Artifacts", "Libdl"] @@ -612,32 +551,47 @@ version = "1.2.0" uuid = "a63ad114-7e13-5084-954f-fe012c677804" version = "1.11.0" +[[Moshi]] +deps = ["ExproniconLite", "Jieko"] +git-tree-sha1 = "53f817d3e84537d84545e0ad749e483412dd6b2a" +uuid = "2e0e35c7-a2e4-4343-998d-7ef72827ed2d" +version = "0.3.7" + [[MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" version = "2023.12.12" [[MultivariatePolynomials]] deps = ["ChainRulesCore", "DataStructures", "LinearAlgebra", "MutableArithmetics"] -git-tree-sha1 = "8d39779e29f80aa6c071e7ac17101c6e31f075d7" +git-tree-sha1 = "fade91fe9bee7b142d332fc6ab3f0deea29f637b" uuid = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3" -version = "0.5.7" +version = "0.5.9" [[MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] -git-tree-sha1 = "43122df26d27424b23577d59e2d8020f28386516" +git-tree-sha1 = "491bdcdc943fcbc4c005900d7463c9f216aabf4c" uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" -version = "1.6.2" +version = "1.6.4" [[NaNMath]] deps = ["OpenLibm_jll"] -git-tree-sha1 = "030ea22804ef91648f29b7ad3fc15fa49d0e6e71" +git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.0.3" +version = "1.1.3" [[NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" +[[OffsetArrays]] +git-tree-sha1 = "117432e406b5c023f665fa73dc26e79ec3630151" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.17.0" +weakdeps = ["Adapt"] + + [OffsetArrays.extensions] + OffsetArraysAdaptExt = "Adapt" + [[OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" @@ -646,7 +600,7 @@ version = "0.3.27+1" [[OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+2" +version = "0.8.5+0" [[OpenSpecFun_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] @@ -655,49 +609,38 @@ uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" version = "0.5.6+0" [[OrderedCollections]] -git-tree-sha1 = "12f1439c4f986bb868acda6ea33ebc78e19b95ad" +git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.7.0" +version = "1.8.1" [[PDMats]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "949347156c25054de2db3b166c52ac4728cbad65" +git-tree-sha1 = "f07c06228a1c670ae4c87d1276b92c7c597fdda0" uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" -version = "0.11.31" +version = "0.11.35" [[Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821" +git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.8.1" - -[[Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.11.0" - - [Pkg.extensions] - REPLExt = "REPL" - - [Pkg.weakdeps] - REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" +version = "2.8.3" [[Polynomials]] deps = ["LinearAlgebra", "OrderedCollections", "RecipesBase", "Requires", "Setfield", "SparseArrays"] -git-tree-sha1 = "27f6107dc202e2499f0750c628a848ce5d6e77f5" +git-tree-sha1 = "972089912ba299fba87671b025cd0da74f5f54f7" uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45" -version = "4.0.13" +version = "4.1.0" [Polynomials.extensions] PolynomialsChainRulesCoreExt = "ChainRulesCore" PolynomialsFFTWExt = "FFTW" - PolynomialsMakieCoreExt = "MakieCore" + PolynomialsMakieExt = "Makie" PolynomialsMutableArithmeticsExt = "MutableArithmetics" [Polynomials.weakdeps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" - MakieCore = "20f20a25-4f0e-4fdf-b5d1-57303727442b" + Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" MutableArithmetics = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" [[PrecompileTools]] @@ -712,11 +655,17 @@ git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" uuid = "21216c6a-2e73-6563-6e65-726566657250" version = "1.4.3" +[[PrettyTables]] +deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "Reexport", "StringManipulation", "Tables"] +git-tree-sha1 = "1101cd475833706e4d0e7b122218257178f48f34" +uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" +version = "2.4.0" + [[Primes]] deps = ["IntegerMathUtils"] -git-tree-sha1 = "cb420f77dc474d23ee47ca8d14c90810cafe69e7" +git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" -version = "0.5.6" +version = "0.5.7" [[Printf]] deps = ["Unicode"] @@ -736,9 +685,9 @@ version = "1.96.4" [[QuadGK]] deps = ["DataStructures", "LinearAlgebra"] -git-tree-sha1 = "cda3b045cf9ef07a08ad46731f5a3165e56cf3da" +git-tree-sha1 = "9da16da70037ba9d701192e27befedefb91ec284" uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" -version = "2.11.1" +version = "2.11.2" [QuadGK.extensions] QuadGKEnzymeExt = "Enzyme" @@ -759,13 +708,14 @@ version = "1.3.4" [[RecursiveArrayTools]] deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "32f824db4e5bab64e25a12b22483a30a6b813d08" +git-tree-sha1 = "f8726bd5a8b7f5f5d3f6c0ce4793454a599b5243" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "3.27.4" +version = "3.36.0" [RecursiveArrayTools.extensions] RecursiveArrayToolsFastBroadcastExt = "FastBroadcast" RecursiveArrayToolsForwardDiffExt = "ForwardDiff" + RecursiveArrayToolsKernelAbstractionsExt = "KernelAbstractions" RecursiveArrayToolsMeasurementsExt = "Measurements" RecursiveArrayToolsMonteCarloMeasurementsExt = "MonteCarloMeasurements" RecursiveArrayToolsReverseDiffExt = ["ReverseDiff", "Zygote"] @@ -777,6 +727,7 @@ version = "3.27.4" [RecursiveArrayTools.weakdeps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" @@ -792,9 +743,9 @@ version = "1.2.2" [[Requires]] deps = ["UUIDs"] -git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.0" +version = "1.3.1" [[Rmath]] deps = ["Random", "Rmath_jll"] @@ -810,32 +761,34 @@ version = "0.5.1+0" [[RuntimeGeneratedFunctions]] deps = ["ExprTools", "SHA", "Serialization"] -git-tree-sha1 = "04c968137612c4a5629fa531334bb81ad5680f00" +git-tree-sha1 = "86a8a8b783481e1ea6b9c91dd949cb32191f8ab4" uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" -version = "0.5.13" +version = "0.5.15" [[SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" version = "0.7.0" [[SciMLBase]] -deps = ["ADTypes", "Accessors", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "Expronicon", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] -git-tree-sha1 = "a263684f4134d50fe1863184281cc04a787a96a2" +deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] +git-tree-sha1 = "c056c723b68700fec386dfde8c577089df720c8e" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.71.0" +version = "2.108.0" [SciMLBase.extensions] SciMLBaseChainRulesCoreExt = "ChainRulesCore" + SciMLBaseMLStyleExt = "MLStyle" SciMLBaseMakieExt = "Makie" SciMLBasePartialFunctionsExt = "PartialFunctions" SciMLBasePyCallExt = "PyCall" SciMLBasePythonCallExt = "PythonCall" SciMLBaseRCallExt = "RCall" - SciMLBaseZygoteExt = "Zygote" + SciMLBaseZygoteExt = ["Zygote", "ChainRulesCore"] [SciMLBase.weakdeps] ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + MLStyle = "d8e11817-5142-5d16-987a-aa16d5891078" Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b" PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" @@ -845,9 +798,9 @@ version = "2.71.0" [[SciMLOperators]] deps = ["Accessors", "ArrayInterface", "DocStringExtensions", "LinearAlgebra", "MacroTools"] -git-tree-sha1 = "6149620767866d4b0f0f7028639b6e661b6a1e44" +git-tree-sha1 = "7d3a1519dc4d433a6b20035eaff20bde8be77c66" uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" -version = "0.3.12" +version = "1.4.0" weakdeps = ["SparseArrays", "StaticArraysCore"] [SciMLOperators.extensions] @@ -856,9 +809,9 @@ weakdeps = ["SparseArrays", "StaticArraysCore"] [[SciMLStructures]] deps = ["ArrayInterface"] -git-tree-sha1 = "0444a37a25fab98adbd90baa806ee492a3af133a" +git-tree-sha1 = "566c4ed301ccb2a44cbd5a27da5f885e0ed1d5df" uuid = "53ae85a6-f571-4167-b2af-e1d143709226" -version = "1.6.1" +version = "1.7.0" [[Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" @@ -866,9 +819,9 @@ version = "1.11.0" [[Setfield]] deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] -git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac" +git-tree-sha1 = "c5391c6ace3bc430ca630251d02ea9687169ca68" uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" -version = "1.1.1" +version = "1.1.2" [[Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" @@ -876,9 +829,9 @@ version = "1.11.0" [[SortingAlgorithms]] deps = ["DataStructures"] -git-tree-sha1 = "66e0a8e672a0bdfca2c3f5937efb8538b9ddc085" +git-tree-sha1 = "64d974c2e6fdf07f8155b5b2ca2ffa9069b608d9" uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.2.1" +version = "1.2.2" [[SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] @@ -887,9 +840,9 @@ version = "1.11.0" [[SpecialFunctions]] deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "64cca0c26b4f31ba18f13f6c12af7c85f478cfde" +git-tree-sha1 = "41852b8679f78c8d8961eeadc8f62cef861a52e3" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.5.0" +version = "2.5.1" weakdeps = ["ChainRulesCore"] [SpecialFunctions.extensions] @@ -897,9 +850,9 @@ weakdeps = ["ChainRulesCore"] [[StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "47091a0340a675c738b1304b58161f3b0839d454" +git-tree-sha1 = "cbea8a6bd7bed51b1619658dec70035e07b8502f" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.10" +version = "1.9.14" weakdeps = ["ChainRulesCore", "Statistics"] [StaticArrays.extensions] @@ -923,27 +876,33 @@ weakdeps = ["SparseArrays"] [[StatsAPI]] deps = ["LinearAlgebra"] -git-tree-sha1 = "1ff449ad350c9c4cbc756624d6f8a8c3ef56d3ed" +git-tree-sha1 = "9d72a13a3f4dd3795a195ac5a44d7d6ff5f552ff" uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" -version = "1.7.0" +version = "1.7.1" [[StatsBase]] deps = ["AliasTables", "DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "29321314c920c26684834965ec2ce0dacc9cf8e5" +git-tree-sha1 = "2c962245732371acd51700dbb268af311bddd719" uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.34.4" +version = "0.34.6" [[StatsFuns]] deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] -git-tree-sha1 = "b423576adc27097764a90e163157bcfc9acf0f46" +git-tree-sha1 = "8e45cecc66f3b42633b8ce14d431e8e57a3e242e" uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" -version = "1.3.2" +version = "1.5.0" weakdeps = ["ChainRulesCore", "InverseFunctions"] [StatsFuns.extensions] StatsFunsChainRulesCoreExt = "ChainRulesCore" StatsFunsInverseFunctionsExt = "InverseFunctions" +[[StringManipulation]] +deps = ["PrecompileTools"] +git-tree-sha1 = "725421ae8e530ec29bcbdddbe91ff8053421d023" +uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" +version = "0.4.1" + [[SuiteSparse]] deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" @@ -955,25 +914,25 @@ version = "7.7.0+0" [[SymPy]] deps = ["CommonEq", "CommonSolve", "LinearAlgebra", "PyCall", "SpecialFunctions", "SymPyCore"] -git-tree-sha1 = "83ff6b72182bab93d2ca0de10b11d5d89ce1c829" +git-tree-sha1 = "d3c2de8adc6e36352d2a2dae3ae87099964fcbc0" uuid = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" -version = "2.2.1" +version = "2.3.3" [[SymPyCore]] -deps = ["CommonEq", "CommonSolve", "Latexify", "LinearAlgebra", "Markdown", "RecipesBase", "SpecialFunctions"] -git-tree-sha1 = "dbceac356a3b33d1de385278ba7ec8db97de734c" +deps = ["CommonEq", "CommonSolve", "Latexify", "LinearAlgebra", "Markdown", "RecipesBase", "SpecialFunctions", "TermInterface"] +git-tree-sha1 = "504598903177dfb6a07921289e03eb442eb14fcd" uuid = "458b697b-88f0-4a86-b56b-78b75cfb3531" -version = "0.2.8" -weakdeps = ["TermInterface"] +version = "0.3.2" +weakdeps = ["SymbolicUtils"] [SymPyCore.extensions] - SymPyCoreTermInterfaceExt = "TermInterface" + SymPyCoreSymbolicUtilsExt = "SymbolicUtils" [[SymbolicIndexingInterface]] -deps = ["Accessors", "ArrayInterface", "RuntimeGeneratedFunctions", "StaticArraysCore"] -git-tree-sha1 = "fd2d4f0499f6bb4a0d9f5030f5c7d61eed385e03" +deps = ["Accessors", "ArrayInterface", "PrettyTables", "RuntimeGeneratedFunctions", "StaticArraysCore"] +git-tree-sha1 = "59ca6eddaaa9849e7de9fd1153b6faf0b1db7b80" uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -version = "0.3.37" +version = "0.3.42" [[SymbolicLimits]] deps = ["SymbolicUtils"] @@ -982,10 +941,10 @@ uuid = "19f23fe9-fdab-4a78-91af-e7b7767979c3" version = "0.2.2" [[SymbolicUtils]] -deps = ["AbstractTrees", "ArrayInterface", "Bijections", "ChainRulesCore", "Combinatorics", "ConstructionBase", "DataStructures", "DocStringExtensions", "DynamicPolynomials", "IfElse", "LinearAlgebra", "MultivariatePolynomials", "NaNMath", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "TermInterface", "TimerOutputs", "Unityper", "WeakValueDicts"] -git-tree-sha1 = "0312d7a96d1e1dc683df96a24378469e3c1abddc" +deps = ["AbstractTrees", "ArrayInterface", "Bijections", "ChainRulesCore", "Combinatorics", "ConstructionBase", "DataStructures", "DocStringExtensions", "DynamicPolynomials", "ExproniconLite", "LinearAlgebra", "MultivariatePolynomials", "NaNMath", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "TaskLocalValues", "TermInterface", "TimerOutputs", "Unityper"] +git-tree-sha1 = "cb2beb85947c0a894efa345c436edad20ecec977" uuid = "d1185830-fcd6-423d-90d6-eec64667417b" -version = "3.10.1" +version = "3.30.0" [SymbolicUtils.extensions] SymbolicUtilsLabelledArraysExt = "LabelledArrays" @@ -996,26 +955,30 @@ version = "3.10.1" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" [[Symbolics]] -deps = ["ADTypes", "ArrayInterface", "Bijections", "CommonWorldInvalidations", "ConstructionBase", "DataStructures", "DiffRules", "Distributions", "DocStringExtensions", "DomainSets", "DynamicPolynomials", "IfElse", "LaTeXStrings", "Latexify", "Libdl", "LinearAlgebra", "LogExpFunctions", "MacroTools", "Markdown", "NaNMath", "PrecompileTools", "Primes", "RecipesBase", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArraysCore", "SymbolicIndexingInterface", "SymbolicLimits", "SymbolicUtils", "TermInterface"] -git-tree-sha1 = "ad6615b11e39fb0619b0b3d766ab4d24a432d722" +deps = ["ADTypes", "ArrayInterface", "Bijections", "CommonWorldInvalidations", "ConstructionBase", "DataStructures", "DiffRules", "Distributions", "DocStringExtensions", "DomainSets", "DynamicPolynomials", "LaTeXStrings", "Latexify", "Libdl", "LinearAlgebra", "LogExpFunctions", "MacroTools", "Markdown", "NaNMath", "OffsetArrays", "PrecompileTools", "Primes", "RecipesBase", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArraysCore", "SymbolicIndexingInterface", "SymbolicLimits", "SymbolicUtils", "TermInterface"] +git-tree-sha1 = "6feaa0f2eb9728a6089ad81e31bf7539d41c8a30" uuid = "0c5d862f-8b57-4792-8d23-62f2024744c7" -version = "6.23.0" +version = "6.49.0" [Symbolics.extensions] + SymbolicsD3TreesExt = "D3Trees" SymbolicsForwardDiffExt = "ForwardDiff" SymbolicsGroebnerExt = "Groebner" SymbolicsLuxExt = "Lux" SymbolicsNemoExt = "Nemo" SymbolicsPreallocationToolsExt = ["PreallocationTools", "ForwardDiff"] SymbolicsSymPyExt = "SymPy" + SymbolicsSymPyPythonCallExt = "SymPyPythonCall" [Symbolics.weakdeps] + D3Trees = "e3df1716-f71e-5df9-9e2d-98e193103c45" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" Groebner = "0b43b601-686d-58a3-8a1c-6623616c7cd4" Lux = "b2108857-7c20-44ae-9111-449ecde12c47" Nemo = "2edaba10-b0f1-5616-af89-8c11ac63239a" PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46" SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" + SymPyPythonCall = "bc8888f7-b21e-4b7c-a06a-5d9c9496438c" [[TOML]] deps = ["Dates"] @@ -1030,14 +993,14 @@ version = "1.0.1" [[Tables]] deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" +git-tree-sha1 = "f2c1efbc8f3a609aadf318094f8fc5204bdaf344" uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.12.0" +version = "1.12.1" -[[Tar]] -deps = ["ArgTools", "SHA"] -uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.0" +[[TaskLocalValues]] +git-tree-sha1 = "67e469338d9ce74fc578f7db1736a74d93a49eb8" +uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" +version = "0.1.3" [[TermInterface]] git-tree-sha1 = "d673e0aca9e46a2f63720201f55cc7b3e7169b16" @@ -1051,9 +1014,15 @@ version = "1.11.0" [[TimerOutputs]] deps = ["ExprTools", "Printf"] -git-tree-sha1 = "d7298ebdfa1654583468a487e8e83fae9d72dac3" +git-tree-sha1 = "3748bd928e68c7c346b52125cf41fff0de6937d0" uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" -version = "0.5.26" +version = "0.5.29" + + [TimerOutputs.extensions] + FlameGraphsExt = "FlameGraphs" + + [TimerOutputs.weakdeps] + FlameGraphs = "08572546-2f56-4bcf-ba4e-bab62c3a3f89" [[UUIDs]] deps = ["Random", "SHA"] @@ -1075,11 +1044,6 @@ git-tree-sha1 = "58d6e80b4ee071f5efd07fda82cb9fbe17200868" uuid = "81def892-9a0e-5fdd-b105-ffc91e053289" version = "1.3.0" -[[WeakValueDicts]] -git-tree-sha1 = "98528c2610a5479f091d470967a25becfd83edd0" -uuid = "897b6980-f191-5a31-bcb0-bf3c4585e0c1" -version = "0.1.0" - [[Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" @@ -1094,14 +1058,3 @@ version = "5.11.0+0" deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" version = "1.59.0+0" - -[[oneTBB_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "7d0ea0f4895ef2f5cb83645fa689e52cb55cf493" -uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" -version = "2021.12.0+0" - -[[p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+2" diff --git a/README.md b/README.md index fd277f1..74da828 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ julia> latextf(G) ## Code generation -The function `code = SymbolicControlSystems.ccode(G::LTISystem)` returns a string with C-code for filtering of a signal through the linear system `G`. All symbolic variables present in `G` will be expected as inputs to the generated function. The transfer-function state is handled by the C concept of `static` variables, i.e., a variable that remembers it's value since the last function invocation. The signature of the generated function `transfer_function` expects all input arguments in alphabetical order, except for the input `u` which always comes first. +The function `code = SymbolicControlSystems.ccode(G::LTISystem)` returns a string with C-code for filtering of a signal through the linear system `G`. All symbolic variables present in `G` will be expected as inputs to the generated function. The transfer-function state is handled by the C concept of `static` variables (or optionally using explicit state variable arguments), i.e., a variable that remembers it's value since the last function invocation. The signature of the generated function `transfer_function` expects all input arguments in alphabetical order, except for the input `u` which always comes first. Code generation for systems with multiple inputs and outputs (MIMO) is only handled for statespace systems, call `ss(G)` to convert a transfer function to a statespace system. diff --git a/src/SymbolicControlSystems.jl b/src/SymbolicControlSystems.jl index 2939fa6..0e793a3 100644 --- a/src/SymbolicControlSystems.jl +++ b/src/SymbolicControlSystems.jl @@ -117,6 +117,78 @@ function ControlSystemsBase.tf(sys::NumOrDiv, h = nothing) tf(to_num.(numvec(G)[]), to_num.(denvec(G)[]), G.timeevol) end +function Base.convert(::Type{StateSpace{TE,T}}, G::TransferFunction; balance=false) where {TE,T<:Sym} + + if !isproper(G) + throw(ImproperException()) + end + + ny, nu = size(G) + + # A, B, C, D matrices for each element of the transfer function matrix + abcd_vec = [siso_tf_to_ss(T, g) for g in G.matrix[:]] + + # Number of states for each transfer function element realization + nvec = [size(abcd[1], 1) for abcd in abcd_vec] + ntot = sum(nvec) + + A = zeros(T, (ntot, ntot)) + B = zeros(T, (ntot, nu)) + C = zeros(T, (ny, ntot)) + D = zeros(T, (ny, nu)) + + inds = -1:0 + for j=1:nu + for i=1:ny + k = (j-1)*ny + i + + # states corresponding to the transfer function element (i,j) + inds = (inds.stop+1):(inds.stop+nvec[k]) + + A[inds,inds], B[inds,j:j], C[i:i,inds], D[i:i,j:j] = abcd_vec[k] + end + end + return StateSpace{TE,T}(A, B, C, D, TE(G.timeevol)) +end + +# These two functions are moved here since MatrixPencils don't operate on Sym +using ControlSystemsBase: SisoRational, SisoTf +siso_tf_to_ss(T::Type, f::SisoTf) = siso_tf_to_ss(T, convert(SisoRational, f)) + +# Conversion to statespace on controllable canonical form +function siso_tf_to_ss(T::Type, f::SisoRational) + + num0, den0 = numvec(f), denvec(f) + # Normalize the numerator and denominator to allow realization of transfer functions + # that are proper, but not strictly proper + num = num0 ./ den0[1] + den = den0 ./ den0[1] + + N = length(den) - 1 # The order of the rational function f + + # Get numerator coefficient of the same order as the denominator + bN = length(num) == N+1 ? num[1] : zero(eltype(num)) + + @views if N == 0 #|| num == zero(Polynomial{T}) + A = zeros(T, 0, 0) + B = zeros(T, 0, 1) + C = zeros(T, 1, 0) + else + A = diagm(1 => ones(T, N-1)) + A[end, :] .= .-reverse(den)[1:end-1] + + B = zeros(T, N, 1) + B[end] = one(T) + + C = zeros(T, 1, N) + C[1:min(N, length(num))] = reverse(num)[1:min(N, length(num))] + C[:] .-= bN .* reverse(den)[1:end-1] # Can index into polynomials at greater inddices than their length + end + D = fill(bN, 1, 1) + + return A, B, C, D +end + Base.:(==)(s1::TransferFunction{<:Any,<:ControlSystemsBase.SisoTf{Num}}, s2::TransferFunction{<:Any,<:ControlSystemsBase.SisoTf{<:NumOrDiv}}) = isequal(to_num(s1), to_num(s2)) Base.promote_op(::typeof(/),::Type{NumOrDiv},::Type{NumOrDiv}) = Num # This is required to make conversion to ss work. Arithmetic operaitons on Num are super type unstable so inference fails https://github.com/JuliaSymbolics/Symbolics.jl/issues/626 @@ -315,7 +387,7 @@ end """ - ccode(G; simplify = identity, cse = true) + ccode(G; simplify = identity, cse = true, static = true, double = true) Return a string with C-code for filtering a signal `u` through `G`. @@ -329,6 +401,8 @@ The state is internally handled by C `static` variables, so the generated code i - `G`: A linear system - `simplify`: A function for symbolic simplification. You may try `Sympy.simplify`, but for large systems, this will take a long time to compute. - `cse`: Perform common subexpression elimination. This generally improves the performance of the generated code. +- `static`: If `true`, the generated code will use static variables to store the state of the system. If `false`, the function will take pointers to the state variables as input arguments. +- `double`: If `true`, the generated code will use `double` as the numeric type. If false, it will use `float`. """ function ccode(G::TransferFunction; simplify = identity, cse = true, static=true, double=true) numT = double ? "double" : "float" diff --git a/test/runtests.jl b/test/runtests.jl index d0d86e5..95a3cc3 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -282,6 +282,145 @@ end end + @testset "TNon-static C-code" begin + @info "Testing Tustin and non-static C-code" + + # Test TransferFunction with static=false + @syms J c + G = tf(1.,[J^2,c,1]) + Gt = tustin(G, 0.1) + + # Generate non-static code for transfer function + code = SymbolicControlSystems.ccode(Gt, static=false) + @test !occursin("static double u[3]", code) + @test !occursin("static double y[3]", code) + @test occursin("double *u, double *y", code) + @test occursin("double ui, double J, double c", code) + + # Test StateSpace with static=false + code_ss = SymbolicControlSystems.ccode(ss(Gt), static=false) + @test !occursin("static double x[", code_ss) + @test occursin("double *x, double *y", code_ss) + + # Test with symbolic system and verify behavior + @syms w T d + h = 0.01 + G = tf([w^2], [1, 2*d*w, w^2]) * tf(1, [T, 1]) + Gd = tustin(G, h) + + # Generate non-static code + code = SymbolicControlSystems.ccode(Gd, static=false) + path = mktempdir() + filename = joinpath(path, "code_nonstatic.c") + outname = joinpath(path, "test_nonstatic.so") + + # Create wrapper C code that manages external state + wrapper_code = """ + #include + $code + + // Wrapper function that manages state for testing + double transfer_function_wrapper(double ui, double T, double d, double w, double *u_state, double *y_state) { + return transfer_function(u_state, y_state, ui, T, d, w); + } + """ + + write(joinpath(path, filename), wrapper_code) + run(`gcc $filename -lm -shared -o $outname`) + + # Test function with external state management + function c_lsim_nonstatic(u_signal, T, d, w) + u_state = zeros(3) + y_state = zeros(3) + Libc.Libdl.dlopen(outname) do lib + fn = Libc.Libdl.dlsym(lib, :transfer_function_wrapper) + map(u_signal) do u + @ccall $(fn)(u::Float64, T::Float64, d::Float64, w::Float64, + u_state::Ref{Cdouble}, y_state::Ref{Cdouble})::Float64 + end + end + end + + # Test with two independent filters + function c_lsim_dual(u_signal, T, d, w) + u_state1 = zeros(3) + y_state1 = zeros(3) + u_state2 = zeros(3) + y_state2 = zeros(3) + + result1 = Float64[] + result2 = Float64[] + + Libc.Libdl.dlopen(outname) do lib + fn = Libc.Libdl.dlsym(lib, :transfer_function_wrapper) + for u in u_signal + # First filter + r1 = @ccall $(fn)(u::Float64, T::Float64, d::Float64, w::Float64, + u_state1::Ref{Cdouble}, y_state1::Ref{Cdouble})::Float64 + push!(result1, r1) + + # Second filter with same input + r2 = @ccall $(fn)(u::Float64, T::Float64, d::Float64, w::Float64, + u_state2::Ref{Cdouble}, y_state2::Ref{Cdouble})::Float64 + push!(result2, r2) + end + end + + result1, result2 + end + + # Test filtering + u = randn(1, 100) + T_, d_, w_ = 0.03, 0.2, 2.0 + + y = c_lsim_nonstatic(u, T_, d_, w_) + Gd_ = sym2num(Gd, h, Pair.((T, d, w), (T_, d_, w_))...) + y_julia, _ = lsim(ss(Gd_), u) + + @test norm(y - y_julia)/norm(y_julia) < 1e-10 + + # Test that two independent filters work correctly + y1, y2 = c_lsim_dual(u, T_, d_, w_) + @test y1 ≈ y2 # Same input should give same output + @test norm(y1 - y_julia')/norm(y_julia) < 1e-10 + + # Test StateSpace with static=false + code_ss = SymbolicControlSystems.ccode(ss(Gd), static=false) + + # Create wrapper for state-space + wrapper_code_ss = """ + #include + $code_ss + + // Wrapper that manages state + void transfer_function_ss_wrapper(double *y, double u, double T, double d, double w, double *x_state) { + transfer_function(x_state, y, u, T, d, w); + } + """ + + filename_ss = joinpath(path, "code_nonstatic_ss.c") + outname_ss = joinpath(path, "test_nonstatic_ss.so") + write(joinpath(path, filename_ss), wrapper_code_ss) + run(`gcc $filename_ss -lm -shared -o $outname_ss`) + + function c_lsim_ss_nonstatic(u_signal, T, d, w) + nx = ControlSystemsBase.nstates(ss(Gd_)) + x_state = zeros(nx) + y = zeros(1) + + Libc.Libdl.dlopen(outname_ss) do lib + fn = Libc.Libdl.dlsym(lib, :transfer_function_ss_wrapper) + map(u_signal) do u + @ccall $(fn)(y::Ref{Cdouble}, u::Float64, T::Float64, d::Float64, w::Float64, + x_state::Ref{Cdouble})::Cvoid + y[] + end + end + end + + y_ss = c_lsim_ss_nonstatic(u, T_, d_, w_) + @test norm(y_ss - y_julia)/norm(y_julia) < 1e-10 + end From 6f0bc72d12ca2d50a72b04296dcabddba1e72204 Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Fri, 8 Aug 2025 12:12:15 +0200 Subject: [PATCH 2/4] fixes --- test/runtests.jl | 64 ++++++++++++++---------------------------------- 1 file changed, 19 insertions(+), 45 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 95a3cc3..73cc960 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -282,8 +282,8 @@ end end - @testset "TNon-static C-code" begin - @info "Testing Tustin and non-static C-code" + @testset "Non-static C-code" begin + @info "Testing Non-static C-code" # Test TransferFunction with static=false @syms J c @@ -313,55 +313,41 @@ end path = mktempdir() filename = joinpath(path, "code_nonstatic.c") outname = joinpath(path, "test_nonstatic.so") - - # Create wrapper C code that manages external state - wrapper_code = """ - #include - $code - - // Wrapper function that manages state for testing - double transfer_function_wrapper(double ui, double T, double d, double w, double *u_state, double *y_state) { - return transfer_function(u_state, y_state, ui, T, d, w); - } - """ - - write(joinpath(path, filename), wrapper_code) + write(joinpath(path, filename), code) + # Compile the C code to a shared library run(`gcc $filename -lm -shared -o $outname`) # Test function with external state management function c_lsim_nonstatic(u_signal, T, d, w) - u_state = zeros(3) - y_state = zeros(3) + u_state = zeros(4) + y_state = zeros(4) Libc.Libdl.dlopen(outname) do lib - fn = Libc.Libdl.dlsym(lib, :transfer_function_wrapper) + fn = Libc.Libdl.dlsym(lib, :transfer_function) map(u_signal) do u - @ccall $(fn)(u::Float64, T::Float64, d::Float64, w::Float64, - u_state::Ref{Cdouble}, y_state::Ref{Cdouble})::Float64 + @ccall $(fn)(u_state::Ref{Cdouble}, y_state::Ref{Cdouble}, u::Float64, T::Float64, d::Float64, w::Float64)::Float64 end end end # Test with two independent filters function c_lsim_dual(u_signal, T, d, w) - u_state1 = zeros(3) - y_state1 = zeros(3) - u_state2 = zeros(3) - y_state2 = zeros(3) + u_state1 = zeros(4) + y_state1 = zeros(4) + u_state2 = zeros(4) + y_state2 = zeros(4) result1 = Float64[] result2 = Float64[] Libc.Libdl.dlopen(outname) do lib - fn = Libc.Libdl.dlsym(lib, :transfer_function_wrapper) + fn = Libc.Libdl.dlsym(lib, :transfer_function) for u in u_signal # First filter - r1 = @ccall $(fn)(u::Float64, T::Float64, d::Float64, w::Float64, - u_state1::Ref{Cdouble}, y_state1::Ref{Cdouble})::Float64 + r1 = @ccall $(fn)(u_state1::Ref{Cdouble}, y_state1::Ref{Cdouble}, u::Float64, T::Float64, d::Float64, w::Float64)::Float64 push!(result1, r1) # Second filter with same input - r2 = @ccall $(fn)(u::Float64, T::Float64, d::Float64, w::Float64, - u_state2::Ref{Cdouble}, y_state2::Ref{Cdouble})::Float64 + r2 = @ccall $(fn)(u_state2::Ref{Cdouble}, y_state2::Ref{Cdouble}, u::Float64, T::Float64, d::Float64, w::Float64)::Float64 push!(result2, r2) end end @@ -387,32 +373,20 @@ end # Test StateSpace with static=false code_ss = SymbolicControlSystems.ccode(ss(Gd), static=false) - # Create wrapper for state-space - wrapper_code_ss = """ - #include - $code_ss - - // Wrapper that manages state - void transfer_function_ss_wrapper(double *y, double u, double T, double d, double w, double *x_state) { - transfer_function(x_state, y, u, T, d, w); - } - """ filename_ss = joinpath(path, "code_nonstatic_ss.c") outname_ss = joinpath(path, "test_nonstatic_ss.so") - write(joinpath(path, filename_ss), wrapper_code_ss) + write(joinpath(path, filename_ss), code_ss) run(`gcc $filename_ss -lm -shared -o $outname_ss`) function c_lsim_ss_nonstatic(u_signal, T, d, w) - nx = ControlSystemsBase.nstates(ss(Gd_)) - x_state = zeros(nx) + x_state = zeros(ss(Gd_).nx) y = zeros(1) Libc.Libdl.dlopen(outname_ss) do lib - fn = Libc.Libdl.dlsym(lib, :transfer_function_ss_wrapper) + fn = Libc.Libdl.dlsym(lib, :transfer_function) map(u_signal) do u - @ccall $(fn)(y::Ref{Cdouble}, u::Float64, T::Float64, d::Float64, w::Float64, - x_state::Ref{Cdouble})::Cvoid + @ccall $(fn)(x_state::Ref{Cdouble}, y::Ref{Cdouble}, u::Float64, T::Float64, d::Float64, w::Float64)::Cvoid y[] end end From 43d5c1c3330d0bf55f446f07229f13a719063140 Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Fri, 8 Aug 2025 12:13:50 +0200 Subject: [PATCH 3/4] bump --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48d94ad..eb56f7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v1 + - uses: actions/cache@v4 env: cache-name: cache-artifacts with: From e1b20483692c01e51be880f0c6507b10ec43cf81 Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Fri, 8 Aug 2025 12:16:22 +0200 Subject: [PATCH 4/4] more fixes --- src/SymbolicControlSystems.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SymbolicControlSystems.jl b/src/SymbolicControlSystems.jl index 0e793a3..9186bc2 100644 --- a/src/SymbolicControlSystems.jl +++ b/src/SymbolicControlSystems.jl @@ -117,7 +117,7 @@ function ControlSystemsBase.tf(sys::NumOrDiv, h = nothing) tf(to_num.(numvec(G)[]), to_num.(denvec(G)[]), G.timeevol) end -function Base.convert(::Type{StateSpace{TE,T}}, G::TransferFunction; balance=false) where {TE,T<:Sym} +function Base.convert(::Type{StateSpace{TE,T}}, G::TransferFunction; balance=false) where {TE,T<:Union{Sym, Num}} if !isproper(G) throw(ImproperException())