diff --git a/README.md b/README.md index 366c2d81..f1b94328 100644 --- a/README.md +++ b/README.md @@ -38,17 +38,13 @@ It works with polynomials from AbstractAlgebra.jl, DynamicPolynomials.jl, and Ne ### with AbstractAlgebra.jl -We create a ring of polynomials in 3 variables +We create a ring of polynomials in 3 variables and a simple polynomial system ```julia using AbstractAlgebra R, (x1, x2, x3) = QQ["x1", "x2", "x3"] -``` - -Then, we can define a simple polynomial system -```julia system = [ x1 + x2 + x3, x1*x2 + x1*x3 + x2*x3, @@ -66,9 +62,9 @@ G = groebner(system) ```julia # result 3-element Vector{AbstractAlgebra.Generic.MPoly{Rational{BigInt}}}: - x1 + x2 + x3 - x2^2 + x2*x3 + x3^2 x3^3 - 1 + x2^2 + x2*x3 + x3^2 + x1 + x2 + x3 ``` ### with DynamicPolynomials.jl @@ -86,10 +82,10 @@ G = groebner(system) ``` ```julia # result -3-element Vector{Polynomial{DynamicPolynomials.Commutative{DynamicPolynomials.CreationOrder}, Graded{LexOrder}, Int64}}: - 10x2 - 10x1 - 11x2² + 11x1² - 110 - 121x2 - 100x2² + 100x1x2 + 110x2³ - 10 - 11x1 + 10x1x2² +3-element Vector{Polynomial{DynamicPolynomials.Commutative{DynamicPolynomials.CreationOrder}, Graded{LexOrder}, Rational{BigInt}}}: + 10//11x2 - 10//11x1 - x2² + x1² + 1//1 - 11//10x2 - 10//11x2² + 10//11x1x2 + x2³ + 1//1 - 11//10x1 + x1x2² ``` ## Contacts diff --git a/benchmark/CI-scripts/run_benchmarks.jl b/benchmark/CI-scripts/run_benchmarks.jl index 69c4fc72..cca52dc9 100644 --- a/benchmark/CI-scripts/run_benchmarks.jl +++ b/benchmark/CI-scripts/run_benchmarks.jl @@ -112,10 +112,7 @@ push!( ( problem_name="groebner,AA,2^30+3,yang1", type=:time, - result=compute_gb( - Groebner.Examples.yang1(internal_ordering=:degrevlex, k=GF(2^30 + 3)), - 2 - ) + result=compute_gb(Groebner.Examples.yang1(internal_ordering=:degrevlex, k=GF(2^30 + 3)), 2) ) ) push!( @@ -148,11 +145,7 @@ push!( result=[ sum( compute_gb( - Groebner.Examples.cyclicn( - 6, - internal_ordering=:degrevlex, - k=GF(2^30 + 3) - ), + Groebner.Examples.cyclicn(6, internal_ordering=:degrevlex, k=GF(2^30 + 3)), 2000 ) ) @@ -165,12 +158,7 @@ push!( problem_name="groebner,AA,QQ,100xchandra 7", type=:time, result=[ - sum( - compute_gb( - Groebner.Examples.chandran(7, internal_ordering=:degrevlex, k=QQ), - 100 - ) - ) + sum(compute_gb(Groebner.Examples.chandran(7, internal_ordering=:degrevlex, k=QQ), 100)) ] ) ) @@ -221,9 +209,7 @@ push!( ( problem_name="groebner,AA,100 vars drl", type=:time, - result=compute_gb( - n_variable_set(100, internal_ordering=:degrevlex, k=GF(2^31 - 1)) - ) + result=compute_gb(n_variable_set(100, internal_ordering=:degrevlex, k=GF(2^31 - 1))) ) ) @@ -343,9 +329,7 @@ push!( ( problem_name="groebner,AA,QQ,katsura 8", type=:time, - result=compute_gb( - Groebner.Examples.katsuran(8, internal_ordering=:degrevlex, k=QQ) - ) + result=compute_gb(Groebner.Examples.katsuran(8, internal_ordering=:degrevlex, k=QQ)) ) ) push!( @@ -353,9 +337,7 @@ push!( ( problem_name="groebner,Nemo,QQ,katsura 8", type=:time, - result=compute_gb( - Groebner.Examples.katsuran(8, internal_ordering=:degrevlex, k=Nemo.QQ) - ) + result=compute_gb(Groebner.Examples.katsuran(8, internal_ordering=:degrevlex, k=Nemo.QQ)) ) ) push!( @@ -379,10 +361,7 @@ push!( ( problem_name="groebner,AA,QQ,noon 8", type=:time, - result=compute_gb( - Groebner.Examples.noonn(8, internal_ordering=:degrevlex, k=QQ), - 3 - ) + result=compute_gb(Groebner.Examples.noonn(8, internal_ordering=:degrevlex, k=QQ), 3) ) ) push!( diff --git a/benchmark/benchmark_systems.jl b/benchmark/benchmark_systems.jl index b92a00ec..70971fcb 100644 --- a/benchmark/benchmark_systems.jl +++ b/benchmark/benchmark_systems.jl @@ -68,18 +68,9 @@ function benchmark_set_1() ("NFkB (w.)", NFkB_with_weights(k=ground_field)), ("Goodwin (w.)", Goodwin_with_weights(k=ground_field)), ("yang1", Groebner.Examples.yang1(internal_ordering=:degrevlex, k=ground_field)), - ( - "bayes148", - Groebner.Examples.bayes148(internal_ordering=:degrevlex, k=ground_field) - ), - ( - "gametwo2", - Groebner.Examples.gametwo2(internal_ordering=:degrevlex, k=ground_field) - ), - ( - "jason210", - Groebner.Examples.jason210(internal_ordering=:degrevlex, k=ground_field) - ), + ("bayes148", Groebner.Examples.bayes148(internal_ordering=:degrevlex, k=ground_field)), + ("gametwo2", Groebner.Examples.gametwo2(internal_ordering=:degrevlex, k=ground_field)), + ("jason210", Groebner.Examples.jason210(internal_ordering=:degrevlex, k=ground_field)), ("alea6", Groebner.Examples.alea6(internal_ordering=:degrevlex, k=ground_field)), ("mayr42", Groebner.Examples.mayr42(internal_ordering=:degrevlex, k=ground_field)), ("BIOMD0000000103", BIOMD0000000103(k=ground_field)), @@ -150,10 +141,7 @@ function benchmark_set_3() ("reimer 6", Groebner.Examples.reimern(6, k=ground_field)), ("reimer 7", Groebner.Examples.reimern(7, k=ground_field)), ("reimer 8", Groebner.Examples.reimern(8, k=ground_field)), - ( - "chandra 9", - Groebner.Examples.chandran(9, k=ground_field, internal_ordering=:degrevlex) - ), + ("chandra 9", Groebner.Examples.chandran(9, k=ground_field, internal_ordering=:degrevlex)), ( "chandra 10", Groebner.Examples.chandran(10, k=ground_field, internal_ordering=:degrevlex) @@ -170,10 +158,7 @@ function benchmark_set_3() "chandra 13", Groebner.Examples.chandran(13, k=ground_field, internal_ordering=:degrevlex) ), - ( - "ipp", - Groebner.Examples.ipp(k=ground_field, tol=0.0, internal_ordering=:degrevlex) - ) + ("ipp", Groebner.Examples.ipp(k=ground_field, tol=0.0, internal_ordering=:degrevlex)) ] (name="The rationals", field=ground_field, systems=systems) @@ -253,8 +238,7 @@ end function benchmark_set_9() ground_field = AbstractAlgebra.QQ - systems = - [("BIOMD0000000103", BIOMD0000000103()), ("BIOMD0000000123", BIOMD0000000123())] + systems = [("BIOMD0000000103", BIOMD0000000103()), ("BIOMD0000000123", BIOMD0000000123())] (name="BIOMD, the rationals", field=ground_field, systems=systems) end diff --git a/benchmark/generate/benchmark_generators.jl b/benchmark/generate/benchmark_generators.jl index 3c2fd91f..dbd64c6a 100644 --- a/benchmark/generate/benchmark_generators.jl +++ b/benchmark/generate/benchmark_generators.jl @@ -1,12 +1,5 @@ -function generate_benchmark_source_for_groebner( - name, - system, - dir, - validate, - nruns, - time_filename -) +function generate_benchmark_source_for_groebner(name, system, dir, validate, nruns, time_filename) ring = parent(system[1]) field = base_ring(ring) vars_repr = join(map(string, gens(ring)), ", ") @@ -33,32 +26,11 @@ function generate_benchmark_source_for_groebner( String(take!(buf)) end -function generate_benchmark_source_for_singular( - name, - system, - dir, - validate, - nruns, - time_filename -) - generate_benchmark_source_for_groebner( - name, - system, - dir, - validate, - nruns, - time_filename - ) +function generate_benchmark_source_for_singular(name, system, dir, validate, nruns, time_filename) + generate_benchmark_source_for_groebner(name, system, dir, validate, nruns, time_filename) end -function generate_benchmark_source_for_maplefgb( - name, - system, - dir, - validate, - nruns, - time_filename -) +function generate_benchmark_source_for_maplefgb(name, system, dir, validate, nruns, time_filename) ring = parent(system[1]) field = base_ring(ring) buf = IOBuffer() @@ -84,10 +56,7 @@ function generate_benchmark_source_for_maplefgb( println(buf, "") println(buf, "timings_fn := \"$time_filename\":") println(buf, "FileTools[Text][WriteLine](timings_fn, \"$name\");") - println( - buf, - "FileTools[Text][WriteLine](timings_fn, cat(\"total_time, \", String(runtime))):" - ) + println(buf, "FileTools[Text][WriteLine](timings_fn, cat(\"total_time, \", String(runtime))):") if validate println(buf) output_fn = output_filename() @@ -106,14 +75,7 @@ function generate_benchmark_source_for_maplefgb( String(take!(buf)) end -function generate_benchmark_source_for_mgb( - name, - system, - dir, - validate, - nruns, - time_filename -) +function generate_benchmark_source_for_mgb(name, system, dir, validate, nruns, time_filename) ring = parent(system[1]) field = base_ring(ring) buf = IOBuffer() @@ -136,10 +98,7 @@ function generate_benchmark_source_for_mgb( println(buf, "") println(buf, "timings_fn := \"$time_filename\":") println(buf, "FileTools[Text][WriteLine](timings_fn, \"$name\");") - println( - buf, - "FileTools[Text][WriteLine](timings_fn, cat(\"total_time, \", String(runtime))):" - ) + println(buf, "FileTools[Text][WriteLine](timings_fn, cat(\"total_time, \", String(runtime))):") if validate println(buf) output_fn = output_filename() @@ -158,14 +117,7 @@ function generate_benchmark_source_for_mgb( String(take!(buf)) end -function generate_benchmark_source_for_msolve( - name, - system, - dir, - validate, - nruns, - time_filename -) +function generate_benchmark_source_for_msolve(name, system, dir, validate, nruns, time_filename) ring = parent(system[1]) field = base_ring(ring) vars_repr = join(map(string, gens(ring)), ", ") @@ -177,14 +129,7 @@ function generate_benchmark_source_for_msolve( String(take!(buf)) end -function generate_benchmark_source_for_openf4( - name, - system, - dir, - validate, - nruns, - time_filename -) +function generate_benchmark_source_for_openf4(name, system, dir, validate, nruns, time_filename) ring = parent(system[1]) field = base_ring(ring) buf = IOBuffer() @@ -203,10 +148,8 @@ function generate_benchmark_source_for_openf4( { """ ) - vars_repr = - join(map(s -> "\tvariableName.push_back(\"$s\");", map(repr, gens(ring))), "\n") - system_repr = - join(map(s -> "\tpolynomialArray.emplace_back(\"$s\");", map(repr, system)), "\n") + vars_repr = join(map(s -> "\tvariableName.push_back(\"$s\");", map(repr, gens(ring))), "\n") + system_repr = join(map(s -> "\tpolynomialArray.emplace_back(\"$s\");", map(repr, system)), "\n") println( buf, """ diff --git a/benchmark/generate/benchmark_systems/SI/SI.jl b/benchmark/generate/benchmark_systems/SI/SI.jl index f1286633..637dc97f 100644 --- a/benchmark/generate/benchmark_systems/SI/SI.jl +++ b/benchmark/generate/benchmark_systems/SI/SI.jl @@ -6,13 +6,11 @@ include((@__DIR__) * "/parser.jl") function load_SI_problem(name; k=AbstractAlgebra.QQ) if name == "SIWR" sys = read_SIWR(k=k)[2] - @assert AbstractAlgebra.internal_ordering(AbstractAlgebra.parent(sys[1])) == - :degrevlex + @assert AbstractAlgebra.internal_ordering(AbstractAlgebra.parent(sys[1])) == :degrevlex return sys elseif name == "SEAIJRC" sys = read_SEAIJRC(k=k)[2] - @assert AbstractAlgebra.internal_ordering(AbstractAlgebra.parent(sys[1])) == - :degrevlex + @assert AbstractAlgebra.internal_ordering(AbstractAlgebra.parent(sys[1])) == :degrevlex return sys else throw("Beda beda ogorchenie") diff --git a/benchmark/generate/benchmark_systems/biomodels/BIOMD.jl b/benchmark/generate/benchmark_systems/biomodels/BIOMD.jl index bf6ec06d..80eebc11 100644 --- a/benchmark/generate/benchmark_systems/biomodels/BIOMD.jl +++ b/benchmark/generate/benchmark_systems/biomodels/BIOMD.jl @@ -14,17 +14,14 @@ function BIOMD0000000123(; k=AbstractAlgebra.QQ, internal_ordering=:degrevlex) 2 // k(78125) * x5 + 21 // k(12500) * x6 + 807 // k(226000) * x9, - x1^3 * x8 - 663 // k(100) * x3 * x4 - 663 // k(100) * x4 * x5 - - 25023 // k(25000) * x4 + + x1^3 * x8 - 663 // k(100) * x3 * x4 - 663 // k(100) * x4 * x5 - 25023 // k(25000) * x4 + 21 // k(12500) * x6 + 21 // k(12500) * x7 + 5111 // k(1130000) * x10, 8 // k(3125) * x3 - 663 // k(100) * x4 * x5 - 78129 // k(156250) * x5 + 21 // k(12500) * x7 + 269 // k(22600) * x11, - 663 // k(100) * x3 * x4 - 231 // k(25000) * x6 + - 1 // k(2) * x7 + - 269 // k(226) * x12, + 663 // k(100) * x3 * x4 - 231 // k(25000) * x6 + 1 // k(2) * x7 + 269 // k(226) * x12, 663 // k(100) * x4 * x5 + 8 // k(3125) * x6 - 12521 // k(12500) * x7 + 269 // k(22600) * x13, -x1^3 * x8 + x4 - 23 // k(25000) * x8 + 5111 // k(1130000) * x14, @@ -37,8 +34,7 @@ function BIOMD0000000123(; k=AbstractAlgebra.QQ, internal_ordering=:degrevlex) 21 // k(12500) * x13, 113 // k(538) * x5 + 8 // k(3125) * x9 - 663 // k(100) * x10 * x11 - 3141 // k(625000) * x11 + 21 // k(12500) * x13, - 113 // k(53800) * x6 + 663 // k(100) * x9 * x10 - 6303 // k(12500) * x12 + - 1 // k(2) * x13, + 113 // k(53800) * x6 + 663 // k(100) * x9 * x10 - 6303 // k(12500) * x12 + 1 // k(2) * x13, 113 // k(538) * x7 + 663 // k(100) * x10 * x11 + 8 // k(3125) * x12 - 12667 // k(25000) * x13, -x2^3 * x14 + 2599 // k(6725000) * x8 + x10 - 19 // k(10000) * x14 @@ -102,8 +98,7 @@ function BIOMD0000000103(; k=AbstractAlgebra.QQ, internal_ordering=:degrevlex) 1 // k(500) * x1 * x3 + 1 // k(1000) * x4 * x6 - 3 // k(1000) * x5 * x8 - 51 // k(500) * x5 + 1 // k(1000) * x15, 1 // k(500) * x1 * x2 - 1 // k(1000) * x4 * x6 + 1 // k(1000) * x5 - - 1 // k(5000) * x6 * x8 - 1 // k(1000) * x6 * x9 - 101 // k(1000) * x6 + - 1 // k(1000) * x15, + 1 // k(5000) * x6 * x8 - 1 // k(1000) * x6 * x9 - 101 // k(1000) * x6 + 1 // k(1000) * x15, -1 // k(200000) * x2 * x7 - 7 // k(20000) * x6 * x7 - 1 // k(20000) * x7 * x11 - 7 // k(2000) * x7 * x12 - 1 // k(1000) * x7 + 1 // k(5), 1 // k(200000) * x2 * x7 - 3 // k(1000) * x3 * x8 - 3 // k(1000) * x4 * x8 - diff --git a/benchmark/generate/benchmark_systems/biomodels/parser.jl b/benchmark/generate/benchmark_systems/biomodels/parser.jl index e42fdea5..5879c2c7 100644 --- a/benchmark/generate/benchmark_systems/biomodels/parser.jl +++ b/benchmark/generate/benchmark_systems/biomodels/parser.jl @@ -36,9 +36,7 @@ function read_BIOMDs(nspecies) symvs = map(x -> Symbol(x), vs) expvs = Meta.parse(join(symvs, ",")) - R, xs = eval( - :((R, $expvs) = AbstractAlgebra.polynomial_ring(AbstractAlgebra.QQ, $symvs)) - ) + R, xs = eval(:((R, $expvs) = AbstractAlgebra.polynomial_ring(AbstractAlgebra.QQ, $symvs))) for p in params p = eval(Meta.parse(p)) diff --git a/benchmark/generate/benchmark_systems/symbolic-data/parser.jl b/benchmark/generate/benchmark_systems/symbolic-data/parser.jl index 64a1b217..f3791d68 100644 --- a/benchmark/generate/benchmark_systems/symbolic-data/parser.jl +++ b/benchmark/generate/benchmark_systems/symbolic-data/parser.jl @@ -20,12 +20,8 @@ function parse_polys_with_given_ring(ring, polys_str) append!(terms_str, map(s -> "-1*$(strip(s))", term_str_minus[2:end])) end terms_exploded_str = map(t -> map(strip, split(t, "*")), terms_str) - cfs, exps = parse_polynomial_from_terms( - ring, - constant_type, - terms_exploded_str, - str_to_var_idx - ) + cfs, exps = + parse_polynomial_from_terms(ring, constant_type, terms_exploded_str, str_to_var_idx) poly = ring(cfs, exps) push!(polys, poly) end @@ -66,8 +62,7 @@ function load_system_symbolic_data(filename) return ring, polys end -ring, sys = load_system_symbolic_data( - "/home/demin/SymbolicData/XMLResources/IntPS/SignalTheory.f966.xml" -) +ring, sys = + load_system_symbolic_data("/home/demin/SymbolicData/XMLResources/IntPS/SignalTheory.f966.xml") @time groebner(sys); diff --git a/benchmark/generate/groebner/run_in_groebner.jl b/benchmark/generate/groebner/run_in_groebner.jl index b55c9ad5..973ee7aa 100644 --- a/benchmark/generate/groebner/run_in_groebner.jl +++ b/benchmark/generate/groebner/run_in_groebner.jl @@ -75,8 +75,7 @@ function process_system() # deepcopy(StructuralIdentifiability._runtime_logger[cat]) # end # end - runtime[PROBLEM_NAME][:total_time] = - min(runtime[PROBLEM_NAME][:total_time], timing.time) + runtime[PROBLEM_NAME][:total_time] = min(runtime[PROBLEM_NAME][:total_time], timing.time) end # for cat in ID_TIME_CATEGORIES # if haskey(runtime[PROBLEM_NAME], cat) diff --git a/benchmark/generate/layman_parser.jl b/benchmark/generate/layman_parser.jl index 45976f17..c0c0f4cb 100644 --- a/benchmark/generate/layman_parser.jl +++ b/benchmark/generate/layman_parser.jl @@ -5,8 +5,7 @@ function extract_ring(line1, line2) char = parse(BigInt, strip(line2)) @assert char < typemax(UInt) base_field = iszero(char) ? Nemo.QQ : Nemo.GF(UInt(char)) - ring_nemo, vars_nemo = - Nemo.polynomial_ring(base_field, vars_str, internal_ordering=:degrevlex) + ring_nemo, vars_nemo = Nemo.polynomial_ring(base_field, vars_str, internal_ordering=:degrevlex) base_field, ring_nemo, vars_nemo end @@ -56,8 +55,7 @@ function getlines_backend_dependent(result) @assert all(line -> startswith(line, "#"), lines[1:7]) line2 = strip(split(lines[3])[end]) line1 = join(map(strip, split(split(lines[4], ":")[end], ",")), ",") - lines_polys = - filter(!isempty, map(f -> string(strip(f, [' ', '\n', '\r'])), lines[8:end])) + lines_polys = filter(!isempty, map(f -> string(strip(f, [' ', '\n', '\r'])), lines[8:end])) @assert startswith(lines_polys[1], "[") lines_polys[1] = lines_polys[1][2:end] @assert endswith(lines_polys[end], "]:") @@ -88,12 +86,8 @@ function parse_polys_with_given_ring(ring, polys_str) append!(terms_str, map(s -> "-1*$(strip(s))", term_str_minus[2:end])) end terms_exploded_str = map(t -> map(strip, split(t, "*")), terms_str) - cfs, exps = parse_polynomial_from_terms( - ring, - constant_type, - terms_exploded_str, - str_to_var_idx - ) + cfs, exps = + parse_polynomial_from_terms(ring, constant_type, terms_exploded_str, str_to_var_idx) poly_nemo = ring(cfs, exps) push!(polys, poly_nemo) end diff --git a/benchmark/generate/learn_apply/run_in_learn_apply.jl b/benchmark/generate/learn_apply/run_in_learn_apply.jl index a1a08afd..fbf0f62f 100644 --- a/benchmark/generate/learn_apply/run_in_learn_apply.jl +++ b/benchmark/generate/learn_apply/run_in_learn_apply.jl @@ -57,8 +57,8 @@ function process_system() timing1 = @timed trace, gb = groebner_learn(system, threaded=:no) timing2 = @timed flag, gb = groebner_apply!(trace, system, threaded=:no) @assert flag - timing3 = @timed flag, _ = - groebner_apply!(trace, (system, system, system, system), threaded=:no) + timing3 = + @timed flag, _ = groebner_apply!(trace, (system, system, system, system), threaded=:no) @assert flag timing4 = @timed flag, _ = groebner_apply!( trace, diff --git a/benchmark/generate/openf4/run_in_openf4.jl b/benchmark/generate/openf4/run_in_openf4.jl index a4c2e9aa..e66fd628 100644 --- a/benchmark/generate/openf4/run_in_openf4.jl +++ b/benchmark/generate/openf4/run_in_openf4.jl @@ -59,8 +59,7 @@ function process_system() exit(1) end @debug "Result is" result - runtime[PROBLEM_NAME][:total_time] = - min(runtime[PROBLEM_NAME][:total_time], timing.time) + runtime[PROBLEM_NAME][:total_time] = min(runtime[PROBLEM_NAME][:total_time], timing.time) end end diff --git a/benchmark/generate/siggb/run_in_siggb.jl b/benchmark/generate/siggb/run_in_siggb.jl index 416c984f..98b33f58 100644 --- a/benchmark/generate/siggb/run_in_siggb.jl +++ b/benchmark/generate/siggb/run_in_siggb.jl @@ -75,8 +75,7 @@ function process_system() # deepcopy(StructuralIdentifiability._runtime_logger[cat]) # end # end - runtime[PROBLEM_NAME][:total_time] = - min(runtime[PROBLEM_NAME][:total_time], timing.time) + runtime[PROBLEM_NAME][:total_time] = min(runtime[PROBLEM_NAME][:total_time], timing.time) end # for cat in ID_TIME_CATEGORIES # if haskey(runtime[PROBLEM_NAME], cat) diff --git a/benchmark/generate/singular/run_in_singular.jl b/benchmark/generate/singular/run_in_singular.jl index a54868f6..1a6c4bae 100644 --- a/benchmark/generate/singular/run_in_singular.jl +++ b/benchmark/generate/singular/run_in_singular.jl @@ -90,8 +90,7 @@ function process_system() singular_system = aa_system_to_singular(system) timing = @timed result = Singular.std(singular_system, complete_reduction=true) @debug "Result is" result - runtime[PROBLEM_NAME][:total_time] = - min(runtime[PROBLEM_NAME][:total_time], timing.time) + runtime[PROBLEM_NAME][:total_time] = min(runtime[PROBLEM_NAME][:total_time], timing.time) if VALIDATE output_fn = (@__DIR__) * "/$BENCHMARK_DIR/$PROBLEM_NAME/$(output_filename())" @info "Printing the basis to $output_fn" diff --git a/benchmark/one_script_to_run_them_all.jl b/benchmark/one_script_to_run_them_all.jl index e9492b1d..f3b20c6f 100644 --- a/benchmark/one_script_to_run_them_all.jl +++ b/benchmark/one_script_to_run_them_all.jl @@ -29,8 +29,7 @@ global_logger(Logging.ConsoleLogger(stdout, Logging.Info)) # Set the properties of progress bars const _progressbar_color = :light_green const _progressbar_value_color = :light_green -progressbar_enabled() = - Logging.Info <= Logging.min_enabled_level(current_logger()) < Logging.Warn +progressbar_enabled() = Logging.Info <= Logging.min_enabled_level(current_logger()) < Logging.Warn const _available_backends = ["groebner", "singular", "maplefgb", "mgb", "msolve", "openf4"] @@ -115,16 +114,7 @@ function parse_commandline() end #! format: on -function generate_benchmark_file( - backend, - name, - system, - dir, - validate, - nruns, - time_filename, - args -) +function generate_benchmark_file(backend, name, system, dir, validate, nruns, time_filename, args) if backend == "groebner" benchmark_source = generate_benchmark_source_for_groebner( name, @@ -174,38 +164,20 @@ function generate_benchmark_file( println(fd, benchmark_source) close(fd) elseif backend == "mgb" - benchmark_source = generate_benchmark_source_for_mgb( - name, - system, - dir, - validate, - nruns, - time_filename - ) + benchmark_source = + generate_benchmark_source_for_mgb(name, system, dir, validate, nruns, time_filename) fd = open("$dir/$name.mpl", "w") println(fd, benchmark_source) close(fd) elseif backend == "msolve" - benchmark_source = generate_benchmark_source_for_msolve( - name, - system, - dir, - validate, - nruns, - time_filename - ) + benchmark_source = + generate_benchmark_source_for_msolve(name, system, dir, validate, nruns, time_filename) fd = open("$dir/$name.in", "w") println(fd, benchmark_source) close(fd) elseif backend == "openf4" - benchmark_source = generate_benchmark_source_for_openf4( - name, - system, - dir, - validate, - nruns, - time_filename - ) + benchmark_source = + generate_benchmark_source_for_openf4(name, system, dir, validate, nruns, time_filename) fd = open("$dir/$name.cpp", "w") println(fd, benchmark_source) close(fd) @@ -507,9 +479,7 @@ function run_benchmarks(args) end println() - println( - "Benchmarking finished in $(round((time_ns() - timestamp) / 1e9, digits=2)) seconds." - ) + println("Benchmarking finished in $(round((time_ns() - timestamp) / 1e9, digits=2)) seconds.") printstyled("Benchmark results", color=:light_green) println(" are written to $benchmark_dir") @@ -578,8 +548,7 @@ function validate_results(args, problem_names) end # At this point, the recently computed basis is stored in `result` @assert result_exists - success, result_validation_certificate = - compute_basis_validation_certificate(result) + success, result_validation_certificate = compute_basis_validation_certificate(result) if !success @warn "Bad file encountered at $problem_result_path. Skipping" continue @@ -837,10 +806,7 @@ function collect_all_timings(args, runtimes, systems) j > 1 && strip(data[i, j]) != "-" && parse(Float64, data[i, j]) == minimum( - map( - x -> parse(Float64, x), - filter(x -> strip(x) != "-", data[i, 2:end]) - ) + map(x -> parse(Float64, x), filter(x -> strip(x) != "-", data[i, 2:end])) ), bold=true ) @@ -908,8 +874,7 @@ function collect_all_timings(args, runtimes, systems) end end - table_filename = - (@__DIR__) * "/$BENCHMARK_RESULTS/$(BENCHMARK_TABLE)_$(benchmark_id).md" + table_filename = (@__DIR__) * "/$BENCHMARK_RESULTS/$(BENCHMARK_TABLE)_$(benchmark_id).md" open(table_filename, "w") do io write(io, resulting_md) end @@ -921,16 +886,8 @@ end function check_args(args) backend = args["backend"] - @assert backend in ( - "groebner", - "singular", - "maplefgb", - "mgb", - "openf4", - "msolve", - "learn_apply", - "ALL" - ) + @assert backend in + ("groebner", "singular", "maplefgb", "mgb", "openf4", "msolve", "learn_apply", "ALL") if backend == "openf4" && args["suite"] in [3, 7] throw("Running benchmarks over the rationals is not possible for openf4") end diff --git a/benchmark/scripts/arithmetic-bench.jl b/benchmark/scripts/arithmetic-bench.jl index 7166704d..1613c96c 100644 --- a/benchmark/scripts/arithmetic-bench.jl +++ b/benchmark/scripts/arithmetic-bench.jl @@ -35,178 +35,84 @@ function create_systems(p) [ ( "kat5", - Groebner.Examples.katsuran( - 5, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.katsuran(5, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "kat6", - Groebner.Examples.katsuran( - 6, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.katsuran(6, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "kat7", - Groebner.Examples.katsuran( - 7, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.katsuran(7, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "kat8", - Groebner.Examples.katsuran( - 8, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.katsuran(8, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "kat9", - Groebner.Examples.katsuran( - 9, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.katsuran(9, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "kat10", - Groebner.Examples.katsuran( - 10, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.katsuran(10, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "kat11", - Groebner.Examples.katsuran( - 11, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) - ), - ( - "hen5", - Groebner.Examples.henrion5( - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.katsuran(11, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), + ("hen5", Groebner.Examples.henrion5(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))), ( "reim4", - Groebner.Examples.reimern( - 4, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.reimern(4, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "reim5", - Groebner.Examples.reimern( - 5, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.reimern(5, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "cyc4", - Groebner.Examples.cyclicn( - 4, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.cyclicn(4, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "cyc5", - Groebner.Examples.cyclicn( - 5, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.cyclicn(5, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "cyc6", - Groebner.Examples.cyclicn( - 6, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.cyclicn(6, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "cyc7", - Groebner.Examples.cyclicn( - 7, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.cyclicn(7, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "cyc8", - Groebner.Examples.cyclicn( - 8, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) - ), - ( - "eco10", - Groebner.Examples.eco10(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) - ), - ( - "eco11", - Groebner.Examples.eco11(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) - ), - ( - "eco12", - Groebner.Examples.eco12(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) - ), - ( - "eco13", - Groebner.Examples.eco12(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) + Groebner.Examples.cyclicn(8, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), + ("eco10", Groebner.Examples.eco10(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))), + ("eco11", Groebner.Examples.eco11(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))), + ("eco12", Groebner.Examples.eco12(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))), + ("eco13", Groebner.Examples.eco12(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))), ( "noon4", - Groebner.Examples.noonn( - 4, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.noonn(4, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "noon5", - Groebner.Examples.noonn( - 5, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.noonn(5, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "noon6", - Groebner.Examples.noonn( - 6, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.noonn(6, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "noon7", - Groebner.Examples.noonn( - 7, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.noonn(7, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "noon8", - Groebner.Examples.noonn( - 8, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.noonn(8, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ("hexapod", hexapod(p)) ] @@ -241,10 +147,7 @@ end ps = map(p -> "< 2^$(floor(Int, log(2, p)+1))", prms) header = reduce(vcat, map(p -> map(a -> "$p, $a", arithm), ps)) -hl = Highlighter( - (data, i, j) -> all(table_num[i, j] .<= table_num[i, :]), - crayon"green bold" -) +hl = Highlighter((data, i, j) -> all(table_num[i, j] .<= table_num[i, :]), crayon"green bold") highlighter = pretty_table( table, header=header, diff --git a/benchmark/scripts/char-bench.jl b/benchmark/scripts/char-bench.jl index 16121f53..db9aa216 100644 --- a/benchmark/scripts/char-bench.jl +++ b/benchmark/scripts/char-bench.jl @@ -31,166 +31,79 @@ function create_systems(p) systems = [ ( "kat5", - Groebner.Examples.katsuran( - 5, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.katsuran(5, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "kat6", - Groebner.Examples.katsuran( - 6, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.katsuran(6, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "kat7", - Groebner.Examples.katsuran( - 7, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.katsuran(7, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "kat8", - Groebner.Examples.katsuran( - 8, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.katsuran(8, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "kat9", - Groebner.Examples.katsuran( - 9, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.katsuran(9, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "kat10", - Groebner.Examples.katsuran( - 10, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) - ), - ( - "hen5", - Groebner.Examples.henrion5( - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.katsuran(10, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), + ("hen5", Groebner.Examples.henrion5(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))), ( "reim4", - Groebner.Examples.reimern( - 4, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.reimern(4, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "reim5", - Groebner.Examples.reimern( - 5, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.reimern(5, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "cyc4", - Groebner.Examples.cyclicn( - 4, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.cyclicn(4, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "cyc5", - Groebner.Examples.cyclicn( - 5, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.cyclicn(5, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "cyc6", - Groebner.Examples.cyclicn( - 6, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.cyclicn(6, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "cyc7", - Groebner.Examples.cyclicn( - 7, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.cyclicn(7, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "cyc8", - Groebner.Examples.cyclicn( - 8, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) - ), - ( - "eco10", - Groebner.Examples.eco10(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) - ), - ( - "eco11", - Groebner.Examples.eco11(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) - ), - ( - "eco12", - Groebner.Examples.eco12(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) + Groebner.Examples.cyclicn(8, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), + ("eco10", Groebner.Examples.eco10(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))), + ("eco11", Groebner.Examples.eco11(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))), + ("eco12", Groebner.Examples.eco12(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))), ( "noon4", - Groebner.Examples.noonn( - 4, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.noonn(4, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "noon5", - Groebner.Examples.noonn( - 5, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.noonn(5, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "noon6", - Groebner.Examples.noonn( - 6, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.noonn(6, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "noon7", - Groebner.Examples.noonn( - 7, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.noonn(7, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ( "noon8", - Groebner.Examples.noonn( - 8, - internal_ordering=:degrevlex, - k=AbstractAlgebra.GF(p) - ) + Groebner.Examples.noonn(8, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) ), ("hexapod", hexapod) ] diff --git a/benchmark/scripts/hashtable/hashtable-1.jl b/benchmark/scripts/hashtable/hashtable-1.jl index b8f8786f..87e78c8d 100644 --- a/benchmark/scripts/hashtable/hashtable-1.jl +++ b/benchmark/scripts/hashtable/hashtable-1.jl @@ -49,15 +49,9 @@ end # hashtable must be smaller than hashtable_resize_threshold at any point of its # lifetime hashtable_resize_threshold() = 0.4 -hashtable_needs_resize(size, load, added) = - (load + added) / size > hashtable_resize_threshold() - -function hashtable_initialize1( - nvars, - rng::AbstractRNG, - MonomT::T, - initial_size::Int -) where {T} +hashtable_needs_resize(size, load, added) = (load + added) / size > hashtable_resize_threshold() + +function hashtable_initialize1(nvars, rng::AbstractRNG, MonomT::T, initial_size::Int) where {T} exponents = Vector{MonomT}(undef, initial_size) hashdata = Vector{Hashvalue1}(undef, initial_size) hashtable = zeros(MonomId, initial_size) @@ -78,17 +72,7 @@ function hashtable_initialize1( # first stored exponent used as buffer lately exponents[1] = zeros(UInt8, nvars) - MonomialHashtable1( - exponents, - hashtable, - hashdata, - hasher, - nvars, - size, - load, - offset, - false - ) + MonomialHashtable1(exponents, hashtable, hashdata, hasher, nvars, size, load, offset, false) end function hashtable_resize_if_needed!(ht::MonomialHashtable1, added::Int) diff --git a/benchmark/scripts/llvm.jl b/benchmark/scripts/llvm.jl index ece5712e..1567f23b 100644 --- a/benchmark/scripts/llvm.jl +++ b/benchmark/scripts/llvm.jl @@ -229,13 +229,7 @@ end """ quote GC.@preserve a begin - Base.llvmcall( - ($textir, "entry"), - Bool, - Tuple{Ptr{T}, Int64}, - pointer(a), - length(a) - ) + Base.llvmcall(($textir, "entry"), Bool, Tuple{Ptr{T}, Int64}, pointer(a), length(a)) end end end diff --git a/benchmark/scripts/monom.jl b/benchmark/scripts/monom.jl index 716c0b8c..c3386584 100644 --- a/benchmark/scripts/monom.jl +++ b/benchmark/scripts/monom.jl @@ -62,17 +62,13 @@ end funcs = ["monom_lcm!", "monom_is_divisible"] execs = [ - ( - (n, setup) -> @btime Groebner.monom_lcm!(z, x, y) setup = begin - x, y = $(setup)($n) - z = Groebner.monom_copy(x) - end - ), - ( - (n, setup) -> @btime Groebner.monom_is_divisible(x, y) setup = begin - x, y = $(setup)($n) - end - ) + ((n, setup) -> @btime Groebner.monom_lcm!(z, x, y) setup = begin + x, y = $(setup)($n) + z = Groebner.monom_copy(x) + end), + ((n, setup) -> @btime Groebner.monom_is_divisible(x, y) setup = begin + x, y = $(setup)($n) + end) ] impls = ["dense:u8", "dense:u32", "packed", "sparse"] setup = [ diff --git a/benchmark/scripts/pairset/pairset.jl b/benchmark/scripts/pairset/pairset.jl index ee36d4ef..e4e8e0f7 100644 --- a/benchmark/scripts/pairset/pairset.jl +++ b/benchmark/scripts/pairset/pairset.jl @@ -31,8 +31,7 @@ function describe_data(data) println("-------------------------------------------------------------------------") res = [] for (j, x) in enumerate(data) - ht, update_ht, basis, pairset, i = - x["ht"], x["update_ht"], x["basis"], x["pairset"], x["i"] + ht, update_ht, basis, pairset, i = x["ht"], x["update_ht"], x["basis"], x["pairset"], x["i"] # println("$j\t$(basis.nfilled)\t\t$(pairset.load)\t\t$(update_ht.load)/$(update_ht.size)") push!(res, [basis.nfilled, pairset.load, update_ht.load, update_ht.size, i]) end @@ -56,8 +55,7 @@ clear_data() _data = deepcopy(data); @time begin for x in data - ht, update_ht, basis, pairset, i = - x["ht"], x["update_ht"], x["basis"], x["pairset"], x["i"] + ht, update_ht, basis, pairset, i = x["ht"], x["update_ht"], x["basis"], x["pairset"], x["i"] Groebner.pairset_update!(pairset, basis, ht, update_ht, i) end end @@ -69,8 +67,7 @@ end _data = deepcopy(data); @pstats "(cpu-cycles,task-clock),(instructions,branch-instructions,branch-misses), (L1-dcache-load-misses, L1-dcache-loads, cache-misses, cache-references)" begin for x in _data - ht, update_ht, basis, pairset, i = - x["ht"], x["update_ht"], x["basis"], x["pairset"], x["i"] + ht, update_ht, basis, pairset, i = x["ht"], x["update_ht"], x["basis"], x["pairset"], x["i"] Groebner.pairset_update!(pairset, basis, ht, update_ht, i) end end diff --git a/benchmark/scripts/runge-kutta/aa-runge-kutta-4-4.jl b/benchmark/scripts/runge-kutta/aa-runge-kutta-4-4.jl index 61c361c1..35daaaa3 100644 --- a/benchmark/scripts/runge-kutta/aa-runge-kutta-4-4.jl +++ b/benchmark/scripts/runge-kutta/aa-runge-kutta-4-4.jl @@ -11,10 +11,7 @@ system = [ 2 * a_41 * b_4 + 2 * a_42 * b_4 + 2 * a_43 * b_4 - 1, - 6 * a_21 * a_32 * b_3 + - 6 * a_21 * a_42 * b_4 + - 6 * a_31 * a_43 * b_4 + - 6 * a_32 * a_43 * b_4 - 1, + 6 * a_21 * a_32 * b_3 + 6 * a_21 * a_42 * b_4 + 6 * a_31 * a_43 * b_4 + 6 * a_32 * a_43 * b_4 - 1, 3 * a_21^2 * b_2 + 3 * a_31^2 * b_3 + 6 * a_31 * a_32 * b_3 + diff --git a/benchmark/scripts/runge-kutta/aa-runge-kutta-8-7.jl b/benchmark/scripts/runge-kutta/aa-runge-kutta-8-7.jl index ee72cbda..75a41632 100644 --- a/benchmark/scripts/runge-kutta/aa-runge-kutta-8-7.jl +++ b/benchmark/scripts/runge-kutta/aa-runge-kutta-8-7.jl @@ -626,8 +626,7 @@ system = [ a_87 * ( a_21^2 * a_32 * a_73 + a_74 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + - a_75 * - (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + + a_75 * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + a_76 * ( a_21^2 * a_62 + a_63 * (a_31 + a_32)^2 + @@ -1285,10 +1284,7 @@ system = [ ) * (a_81 + a_82 + a_83 + a_84 + a_85 + a_86 + a_87) - 1, 36 * a_21^3 * a_32^2 * b_3 + - 36 * - b_4 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + + 36 * b_4 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + 36 * b_5 * (a_21 * a_52 + a_53 * (a_31 + a_32) + a_54 * (a_41 + a_42 + a_43)) * @@ -1489,13 +1485,11 @@ system = [ ) + a_87 * ( a_21^2 * a_32 * a_43 * a_74 + - a_75 * - (a_21^2 * a_32 * a_53 + a_54 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2)) + + a_75 * (a_21^2 * a_32 * a_53 + a_54 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2)) + a_76 * ( a_21^2 * a_32 * a_63 + a_64 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + - a_65 * - (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + a_65 * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) ) ) ) - 1, @@ -1669,8 +1663,7 @@ system = [ a_87 * ( a_21^3 * a_32 * a_73 + a_74 * (a_21^3 * a_42 + a_43 * (a_31 + a_32)^3) + - a_75 * - (a_21^3 * a_52 + a_53 * (a_31 + a_32)^3 + a_54 * (a_41 + a_42 + a_43)^3) + + a_75 * (a_21^3 * a_52 + a_53 * (a_31 + a_32)^3 + a_54 * (a_41 + a_42 + a_43)^3) + a_76 * ( a_21^3 * a_62 + a_63 * (a_31 + a_32)^3 + @@ -1778,8 +1771,7 @@ system = [ ( a_21^2 * a_32 * a_73 + a_74 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + - a_75 * - (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + + a_75 * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + a_76 * ( a_21^2 * a_62 + a_63 * (a_31 + a_32)^2 + @@ -1822,8 +1814,7 @@ system = [ a_87 * ( a_21^2 * a_32 * a_73 + a_74 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + - a_75 * - (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + + a_75 * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + a_76 * ( a_21^2 * a_62 + a_63 * (a_31 + a_32)^2 + @@ -2180,14 +2171,7 @@ system = [ ) * (a_71 + a_72 + a_73 + a_74 + a_75 + a_76)^2 ) - 1, - 210 * - a_21 * - a_32 * - a_43 * - a_54 * - b_5 * - (a_41 + a_42 + a_43) * - (a_51 + a_52 + a_53 + a_54) + + 210 * a_21 * a_32 * a_43 * a_54 * b_5 * (a_41 + a_42 + a_43) * (a_51 + a_52 + a_53 + a_54) + 210 * b_6 * ( @@ -2506,17 +2490,13 @@ system = [ b_5 * ( a_21^3 * a_32^2 * a_53 + - a_54 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + a_54 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) ) + 252 * b_6 * ( a_21^3 * a_32^2 * a_63 + - a_64 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + + a_64 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + a_65 * (a_21 * a_52 + a_53 * (a_31 + a_32) + a_54 * (a_41 + a_42 + a_43)) * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) @@ -2525,9 +2505,7 @@ system = [ b_7 * ( a_21^3 * a_32^2 * a_73 + - a_74 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + + a_74 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + a_75 * (a_21 * a_52 + a_53 * (a_31 + a_32) + a_54 * (a_41 + a_42 + a_43)) * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + @@ -2549,9 +2527,7 @@ system = [ b_8 * ( a_21^3 * a_32^2 * a_83 + - a_84 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + + a_84 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + a_85 * (a_21 * a_52 + a_53 * (a_31 + a_32) + a_54 * (a_41 + a_42 + a_43)) * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + @@ -3304,13 +3280,7 @@ system = [ a_86 * (a_61 + a_62 + a_63 + a_64 + a_65)^2 + a_87 * (a_71 + a_72 + a_73 + a_74 + a_75 + a_76)^2 ) - 1, - 84 * - a_21 * - a_32 * - a_43 * - b_4 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_41 + a_42 + a_43) + + 84 * a_21 * a_32 * a_43 * b_4 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_41 + a_42 + a_43) + 84 * b_5 * (a_21 * a_32 * a_53 + a_54 * (a_21 * a_42 + a_43 * (a_31 + a_32))) * @@ -3495,10 +3465,7 @@ system = [ ) * (a_81 + a_82 + a_83 + a_84 + a_85 + a_86 + a_87) - 1, 56 * a_21^4 * a_32^2 * b_3 + - 56 * - b_4 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^3 * a_42 + a_43 * (a_31 + a_32)^3) + + 56 * b_4 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^3 * a_42 + a_43 * (a_31 + a_32)^3) + 56 * b_5 * (a_21 * a_52 + a_53 * (a_31 + a_32) + a_54 * (a_41 + a_42 + a_43)) * diff --git a/benchmark/scripts/runge-kutta/aa-runge-kutta-8-7_gf.jl b/benchmark/scripts/runge-kutta/aa-runge-kutta-8-7_gf.jl index 6e036612..00ffc986 100644 --- a/benchmark/scripts/runge-kutta/aa-runge-kutta-8-7_gf.jl +++ b/benchmark/scripts/runge-kutta/aa-runge-kutta-8-7_gf.jl @@ -626,8 +626,7 @@ system = [ a_87 * ( a_21^2 * a_32 * a_73 + a_74 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + - a_75 * - (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + + a_75 * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + a_76 * ( a_21^2 * a_62 + a_63 * (a_31 + a_32)^2 + @@ -1285,10 +1284,7 @@ system = [ ) * (a_81 + a_82 + a_83 + a_84 + a_85 + a_86 + a_87) - 1, 36 * a_21^3 * a_32^2 * b_3 + - 36 * - b_4 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + + 36 * b_4 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + 36 * b_5 * (a_21 * a_52 + a_53 * (a_31 + a_32) + a_54 * (a_41 + a_42 + a_43)) * @@ -1489,13 +1485,11 @@ system = [ ) + a_87 * ( a_21^2 * a_32 * a_43 * a_74 + - a_75 * - (a_21^2 * a_32 * a_53 + a_54 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2)) + + a_75 * (a_21^2 * a_32 * a_53 + a_54 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2)) + a_76 * ( a_21^2 * a_32 * a_63 + a_64 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + - a_65 * - (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + a_65 * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) ) ) ) - 1, @@ -1669,8 +1663,7 @@ system = [ a_87 * ( a_21^3 * a_32 * a_73 + a_74 * (a_21^3 * a_42 + a_43 * (a_31 + a_32)^3) + - a_75 * - (a_21^3 * a_52 + a_53 * (a_31 + a_32)^3 + a_54 * (a_41 + a_42 + a_43)^3) + + a_75 * (a_21^3 * a_52 + a_53 * (a_31 + a_32)^3 + a_54 * (a_41 + a_42 + a_43)^3) + a_76 * ( a_21^3 * a_62 + a_63 * (a_31 + a_32)^3 + @@ -1778,8 +1771,7 @@ system = [ ( a_21^2 * a_32 * a_73 + a_74 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + - a_75 * - (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + + a_75 * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + a_76 * ( a_21^2 * a_62 + a_63 * (a_31 + a_32)^2 + @@ -1822,8 +1814,7 @@ system = [ a_87 * ( a_21^2 * a_32 * a_73 + a_74 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + - a_75 * - (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + + a_75 * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + a_76 * ( a_21^2 * a_62 + a_63 * (a_31 + a_32)^2 + @@ -2180,14 +2171,7 @@ system = [ ) * (a_71 + a_72 + a_73 + a_74 + a_75 + a_76)^2 ) - 1, - 210 * - a_21 * - a_32 * - a_43 * - a_54 * - b_5 * - (a_41 + a_42 + a_43) * - (a_51 + a_52 + a_53 + a_54) + + 210 * a_21 * a_32 * a_43 * a_54 * b_5 * (a_41 + a_42 + a_43) * (a_51 + a_52 + a_53 + a_54) + 210 * b_6 * ( @@ -2506,17 +2490,13 @@ system = [ b_5 * ( a_21^3 * a_32^2 * a_53 + - a_54 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + a_54 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) ) + 252 * b_6 * ( a_21^3 * a_32^2 * a_63 + - a_64 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + + a_64 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + a_65 * (a_21 * a_52 + a_53 * (a_31 + a_32) + a_54 * (a_41 + a_42 + a_43)) * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) @@ -2525,9 +2505,7 @@ system = [ b_7 * ( a_21^3 * a_32^2 * a_73 + - a_74 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + + a_74 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + a_75 * (a_21 * a_52 + a_53 * (a_31 + a_32) + a_54 * (a_41 + a_42 + a_43)) * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + @@ -2549,9 +2527,7 @@ system = [ b_8 * ( a_21^3 * a_32^2 * a_83 + - a_84 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + + a_84 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + a_85 * (a_21 * a_52 + a_53 * (a_31 + a_32) + a_54 * (a_41 + a_42 + a_43)) * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + @@ -3304,13 +3280,7 @@ system = [ a_86 * (a_61 + a_62 + a_63 + a_64 + a_65)^2 + a_87 * (a_71 + a_72 + a_73 + a_74 + a_75 + a_76)^2 ) - 1, - 84 * - a_21 * - a_32 * - a_43 * - b_4 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_41 + a_42 + a_43) + + 84 * a_21 * a_32 * a_43 * b_4 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_41 + a_42 + a_43) + 84 * b_5 * (a_21 * a_32 * a_53 + a_54 * (a_21 * a_42 + a_43 * (a_31 + a_32))) * @@ -3495,10 +3465,7 @@ system = [ ) * (a_81 + a_82 + a_83 + a_84 + a_85 + a_86 + a_87) - 1, 56 * a_21^4 * a_32^2 * b_3 + - 56 * - b_4 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^3 * a_42 + a_43 * (a_31 + a_32)^3) + + 56 * b_4 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^3 * a_42 + a_43 * (a_31 + a_32)^3) + 56 * b_5 * (a_21 * a_52 + a_53 * (a_31 + a_32) + a_54 * (a_41 + a_42 + a_43)) * diff --git a/benchmark/scripts/runge-kutta/big_maxpairs_1000_gf.jl b/benchmark/scripts/runge-kutta/big_maxpairs_1000_gf.jl index b4e6e89e..0820504d 100644 --- a/benchmark/scripts/runge-kutta/big_maxpairs_1000_gf.jl +++ b/benchmark/scripts/runge-kutta/big_maxpairs_1000_gf.jl @@ -14,11 +14,7 @@ n = Groebner.Examples.noonn(3); Groebner.groebner(n, ordering=DegRevLex(), maxpairs=maxpairs); # Run! -@time gb = Groebner.groebner( - system, - ordering=DegRevLex(), - maxpairs=maxpairs, - monoms=Packed{UInt8}() -); +@time gb = + Groebner.groebner(system, ordering=DegRevLex(), maxpairs=maxpairs, monoms=Packed{UInt8}()); GC.gc() diff --git a/benchmark/scripts/runge-kutta/big_singular.jl b/benchmark/scripts/runge-kutta/big_singular.jl index 969d94c5..44e4e144 100644 --- a/benchmark/scripts/runge-kutta/big_singular.jl +++ b/benchmark/scripts/runge-kutta/big_singular.jl @@ -14,11 +14,7 @@ function aa_to_singular(poly) xstrings = map(string, AbstractAlgebra.gens(Rxx)) base = Singular.QQ new_ring, _ = Singular.polynomial_ring(base, xstrings, internal_ordering=:degrevlex) - AbstractAlgebra.change_base_ring( - AbstractAlgebra.base_ring(new_ring), - poly, - parent=new_ring - ) + AbstractAlgebra.change_base_ring(AbstractAlgebra.base_ring(new_ring), poly, parent=new_ring) end setup_memuse_tracker() diff --git a/benchmark/scripts/runge-kutta/runge-kutta-4-4.jl b/benchmark/scripts/runge-kutta/runge-kutta-4-4.jl index 6e584032..768acd15 100644 --- a/benchmark/scripts/runge-kutta/runge-kutta-4-4.jl +++ b/benchmark/scripts/runge-kutta/runge-kutta-4-4.jl @@ -8,10 +8,7 @@ system = [ 2 * a_41 * b_4 + 2 * a_42 * b_4 + 2 * a_43 * b_4 - 1, - 6 * a_21 * a_32 * b_3 + - 6 * a_21 * a_42 * b_4 + - 6 * a_31 * a_43 * b_4 + - 6 * a_32 * a_43 * b_4 - 1, + 6 * a_21 * a_32 * b_3 + 6 * a_21 * a_42 * b_4 + 6 * a_31 * a_43 * b_4 + 6 * a_32 * a_43 * b_4 - 1, 3 * a_21^2 * b_2 + 3 * a_31^2 * b_3 + 6 * a_31 * a_32 * b_3 + diff --git a/benchmark/scripts/runge-kutta/runge-kutta-8-7.jl b/benchmark/scripts/runge-kutta/runge-kutta-8-7.jl index aa54d76c..71f51292 100644 --- a/benchmark/scripts/runge-kutta/runge-kutta-8-7.jl +++ b/benchmark/scripts/runge-kutta/runge-kutta-8-7.jl @@ -548,8 +548,7 @@ system = [ a_87 * ( a_21^2 * a_32 * a_73 + a_74 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + - a_75 * - (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + + a_75 * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + a_76 * ( a_21^2 * a_62 + a_63 * (a_31 + a_32)^2 + @@ -1207,10 +1206,7 @@ system = [ ) * (a_81 + a_82 + a_83 + a_84 + a_85 + a_86 + a_87) - 1, 36 * a_21^3 * a_32^2 * b_3 + - 36 * - b_4 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + + 36 * b_4 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + 36 * b_5 * (a_21 * a_52 + a_53 * (a_31 + a_32) + a_54 * (a_41 + a_42 + a_43)) * @@ -1411,13 +1407,11 @@ system = [ ) + a_87 * ( a_21^2 * a_32 * a_43 * a_74 + - a_75 * - (a_21^2 * a_32 * a_53 + a_54 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2)) + + a_75 * (a_21^2 * a_32 * a_53 + a_54 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2)) + a_76 * ( a_21^2 * a_32 * a_63 + a_64 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + - a_65 * - (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + a_65 * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) ) ) ) - 1, @@ -1591,8 +1585,7 @@ system = [ a_87 * ( a_21^3 * a_32 * a_73 + a_74 * (a_21^3 * a_42 + a_43 * (a_31 + a_32)^3) + - a_75 * - (a_21^3 * a_52 + a_53 * (a_31 + a_32)^3 + a_54 * (a_41 + a_42 + a_43)^3) + + a_75 * (a_21^3 * a_52 + a_53 * (a_31 + a_32)^3 + a_54 * (a_41 + a_42 + a_43)^3) + a_76 * ( a_21^3 * a_62 + a_63 * (a_31 + a_32)^3 + @@ -1700,8 +1693,7 @@ system = [ ( a_21^2 * a_32 * a_73 + a_74 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + - a_75 * - (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + + a_75 * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + a_76 * ( a_21^2 * a_62 + a_63 * (a_31 + a_32)^2 + @@ -1744,8 +1736,7 @@ system = [ a_87 * ( a_21^2 * a_32 * a_73 + a_74 * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + - a_75 * - (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + + a_75 * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + a_76 * ( a_21^2 * a_62 + a_63 * (a_31 + a_32)^2 + @@ -2102,14 +2093,7 @@ system = [ ) * (a_71 + a_72 + a_73 + a_74 + a_75 + a_76)^2 ) - 1, - 210 * - a_21 * - a_32 * - a_43 * - a_54 * - b_5 * - (a_41 + a_42 + a_43) * - (a_51 + a_52 + a_53 + a_54) + + 210 * a_21 * a_32 * a_43 * a_54 * b_5 * (a_41 + a_42 + a_43) * (a_51 + a_52 + a_53 + a_54) + 210 * b_6 * ( @@ -2428,17 +2412,13 @@ system = [ b_5 * ( a_21^3 * a_32^2 * a_53 + - a_54 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + a_54 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) ) + 252 * b_6 * ( a_21^3 * a_32^2 * a_63 + - a_64 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + + a_64 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + a_65 * (a_21 * a_52 + a_53 * (a_31 + a_32) + a_54 * (a_41 + a_42 + a_43)) * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) @@ -2447,9 +2427,7 @@ system = [ b_7 * ( a_21^3 * a_32^2 * a_73 + - a_74 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + + a_74 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + a_75 * (a_21 * a_52 + a_53 * (a_31 + a_32) + a_54 * (a_41 + a_42 + a_43)) * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + @@ -2471,9 +2449,7 @@ system = [ b_8 * ( a_21^3 * a_32^2 * a_83 + - a_84 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + + a_84 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^2 * a_42 + a_43 * (a_31 + a_32)^2) + a_85 * (a_21 * a_52 + a_53 * (a_31 + a_32) + a_54 * (a_41 + a_42 + a_43)) * (a_21^2 * a_52 + a_53 * (a_31 + a_32)^2 + a_54 * (a_41 + a_42 + a_43)^2) + @@ -3226,13 +3202,7 @@ system = [ a_86 * (a_61 + a_62 + a_63 + a_64 + a_65)^2 + a_87 * (a_71 + a_72 + a_73 + a_74 + a_75 + a_76)^2 ) - 1, - 84 * - a_21 * - a_32 * - a_43 * - b_4 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_41 + a_42 + a_43) + + 84 * a_21 * a_32 * a_43 * b_4 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_41 + a_42 + a_43) + 84 * b_5 * (a_21 * a_32 * a_53 + a_54 * (a_21 * a_42 + a_43 * (a_31 + a_32))) * @@ -3417,10 +3387,7 @@ system = [ ) * (a_81 + a_82 + a_83 + a_84 + a_85 + a_86 + a_87) - 1, 56 * a_21^4 * a_32^2 * b_3 + - 56 * - b_4 * - (a_21 * a_42 + a_43 * (a_31 + a_32)) * - (a_21^3 * a_42 + a_43 * (a_31 + a_32)^3) + + 56 * b_4 * (a_21 * a_42 + a_43 * (a_31 + a_32)) * (a_21^3 * a_42 + a_43 * (a_31 + a_32)^3) + 56 * b_5 * (a_21 * a_52 + a_53 * (a_31 + a_32) + a_54 * (a_41 + a_42 + a_43)) * diff --git a/benchmark/scripts/threaded-bench-qq.jl b/benchmark/scripts/threaded-bench-qq.jl index e796eedc..d2273339 100644 --- a/benchmark/scripts/threaded-bench-qq.jl +++ b/benchmark/scripts/threaded-bench-qq.jl @@ -19,18 +19,9 @@ systems = [ # ("kat5", Groebner.Examples.katsuran(5, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), # ("kat6", Groebner.Examples.katsuran(6, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), # ("kat7", Groebner.Examples.katsuran(7, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), - ( - "kat8", - Groebner.Examples.katsuran(8, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ) - ), - ( - "kat9", - Groebner.Examples.katsuran(9, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ) - ), - ( - "kat10", - Groebner.Examples.katsuran(10, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ) - ), + ("kat8", Groebner.Examples.katsuran(8, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), + ("kat9", Groebner.Examples.katsuran(9, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), + ("kat10", Groebner.Examples.katsuran(10, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), # ("kat11", Groebner.Examples.katsuran(11, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), # ("kat12", Groebner.Examples.katsuran(12, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), # ("hen5", Groebner.Examples.henrion5(internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), @@ -38,18 +29,9 @@ systems = [ # ("reim5", Groebner.Examples.reimern(5, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), # ("cyc4", Groebner.Examples.cyclicn(4, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), # ("cyc5", Groebner.Examples.cyclicn(5, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), - ( - "cyc6", - Groebner.Examples.cyclicn(6, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ) - ), - ( - "cyc7", - Groebner.Examples.cyclicn(7, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ) - ), - ( - "cyc8", - Groebner.Examples.cyclicn(8, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ) - ), + ("cyc6", Groebner.Examples.cyclicn(6, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), + ("cyc7", Groebner.Examples.cyclicn(7, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), + ("cyc8", Groebner.Examples.cyclicn(8, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), ("eco10", Groebner.Examples.eco10(internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), ("eco11", Groebner.Examples.eco11(internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), # ("eco12", Groebner.Examples.eco12(internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), @@ -57,14 +39,8 @@ systems = [ # ("noon4", Groebner.Examples.noonn(4, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), # ("noon5", Groebner.Examples.noonn(5, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), # ("noon6", Groebner.Examples.noonn(6, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), - ( - "noon7", - Groebner.Examples.noonn(7, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ) - ), - ( - "noon8", - Groebner.Examples.noonn(8, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ) - ), + ("noon7", Groebner.Examples.noonn(7, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), + ("noon8", Groebner.Examples.noonn(8, internal_ordering=:degrevlex, k=AbstractAlgebra.QQ)), ("hexapod", hexapod) ] diff --git a/benchmark/scripts/threaded-bench.jl b/benchmark/scripts/threaded-bench.jl index 2e636135..0cc87ed0 100644 --- a/benchmark/scripts/threaded-bench.jl +++ b/benchmark/scripts/threaded-bench.jl @@ -41,26 +41,11 @@ systems = [ # ("eco12", Groebner.Examples.eco12(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))), # ("eco13", Groebner.Examples.eco13(internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))), # ("noon4", Groebner.Examples.noonn(4, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))), - ( - "noon5", - Groebner.Examples.noonn(5, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) - ), - ( - "noon6", - Groebner.Examples.noonn(6, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) - ), - ( - "noon7", - Groebner.Examples.noonn(7, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) - ), - ( - "noon8", - Groebner.Examples.noonn(8, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) - ), - ( - "noon9", - Groebner.Examples.noonn(9, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p)) - ) + ("noon5", Groebner.Examples.noonn(5, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))), + ("noon6", Groebner.Examples.noonn(6, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))), + ("noon7", Groebner.Examples.noonn(7, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))), + ("noon8", Groebner.Examples.noonn(8, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))), + ("noon9", Groebner.Examples.noonn(9, internal_ordering=:degrevlex, k=AbstractAlgebra.GF(p))) # ("hexapod", hexapod) ]