Skip to content
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
GroebnerBasis = "e39c9192-ea4d-5e15-9584-a488c6d614bd"
IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
Nemo = "2edaba10-b0f1-5616-af89-8c11ac63239a"
Oscar = "f1435218-dba5-11e9-1e4d-f1a5fab5fc13"
Primes = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae"
Singular = "bcd08a7b-43d2-5ff7-b6d4-c458787f915c"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
Expand All @@ -24,11 +24,11 @@ TestSetExtensions = "98d24dd4-01ad-11ea-1b02-c9a08f80db04"
[compat]
AbstractAlgebra = "0.13, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23"
DataStructures = "0.18"
GroebnerBasis = "0.1, 0.2, 0.3"
IterTools = "1"
MacroTools = "0.5"
ModelingToolkit = "7, 8"
Nemo = "0.24, 0.25, 0.26, 0.27, 0.28"
Oscar = "0.7"
Primes = "0.5"
Singular = "0.4, 0.5, 0.6, 0.7, 0.8, 0.9"
SpecialFunctions = "1, 2"
Expand Down
4 changes: 2 additions & 2 deletions examples/CRN.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ using Logging

using StructuralIdentifiability

logger = Logging.SimpleLogger(stdout, Logging.Info)
global_logger(logger)
# logger = Logging.SimpleLogger(stdout, Logging.Info)
# global_logger(logger)

ode = @ODEmodel(
x1'(t) = -k1 * x1(t) * x2(t) + k2 * x4(t) + k4 * x6(t),
Expand Down
3 changes: 2 additions & 1 deletion src/StructuralIdentifiability.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ using DataStructures
# Algebra packages
using AbstractAlgebra
using Nemo
using GroebnerBasis
# using GroebnerBasis
using Oscar
using Singular

# For testing (TODO: move to the test-specific dependencies)
Expand Down
11 changes: 5 additions & 6 deletions src/global_identifiability.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ function check_field_membership(
@debug "\tPoint is $point"

@debug "Constructing the equations"
eqs_sing = Array{Singular.spoly{Singular.n_Q},1}()
ring_sing, vars_sing = Singular.PolynomialRing(
Singular.QQ,
eqs_sing = Array{Nemo.gfp_mpoly,1}()
ring_sing, vars_sing = Oscar.PolynomialRing(
Oscar.FiniteField(536870909), #Singular.QQ,
vcat(map(var_to_str, gens(ring)), ["sat_aux$i" for i in 1:length(generators)]);
# vcat(map(var_to_str, gens(ring)), ["sat_aux"]);
ordering=:degrevlex
Expand Down Expand Up @@ -82,11 +82,10 @@ function check_field_membership(
if method == :Singular
gb = Singular.std(Singular.Ideal(ring_sing, eqs_sing))
elseif method == :GroebnerBasis
gb = GroebnerBasis.f4(Singular.Ideal(ring_sing, eqs_sing))
gb = Oscar.f4(Oscar.ideal(ring_sing, eqs_sing))
else
throw(Base.ArgumentError("Unknown method $method"))
end
# @debug gens(gb)

@debug "Producing the result"
flush(stdout)
Expand All @@ -95,7 +94,7 @@ function check_field_membership(
num, den = unpack_fraction(f)
poly = num * evaluate(den, point) - den * evaluate(num, point)
poly_sing = parent_ring_change(poly, ring_sing)
push!(result, iszero(Singular.reduce(poly_sing, gb)))
push!(result, iszero(Oscar.reduce(poly_sing, gb)))
end
return result
end
Expand Down