Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type piracy in Nemo #1495

Open
fingolfin opened this issue Jun 16, 2023 · 3 comments
Open

Type piracy in Nemo #1495

fingolfin opened this issue Jun 16, 2023 · 3 comments

Comments

@fingolfin
Copy link
Member

fingolfin commented Jun 16, 2023

Enabling the type piracy report in test/Aqua.jl currently reports this (in Julia 1.10.3, for commit 50e68d8):

julia> using Aqua, Nemo ; Aqua.test_piracies(Nemo);

Welcome to Nemo version 0.45.0

Nemo comes with absolutely no warranty whatsoever
Possible type-piracy detected:
[1] ^(a::T, n::Union{Integer, ZZRingElem}) where T<:RingElem @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMiscInteger.jl:279
[2] _order(G::AbstractAlgebra.Group) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/Nemo.jl:590
[3] _order(g::GroupElem) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/Nemo.jl:591
[4] divrem(f::PolyRingElem{T}, g::PolyRingElem{T}) where T<:RingElem @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMiscPoly.jl:441
[5] eigvals(M::MatElem{T}) where T<:FieldElem @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/matrix.jl:253
[6] eigvals(L::Field, M::MatElem{T}) where T<:RingElem @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/matrix.jl:280
[7] factor(a::T) where T<:Union{Int64, UInt64} @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/flint/fmpz.jl:1478
[8] factor_squarefree(f::PolyRingElem{<:FieldElement}) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMiscPoly.jl:314
[9] gcd(a::ResElem{T}, b::ResElem{T}) where T<:Union{Integer, ZZRingElem} @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMoreStuff.jl:587
[10] gcdx(a::ResElem{T}, b::ResElem{T}) where T<:Union{Integer, ZZRingElem} @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMoreStuff.jl:592
[11] image(M::Map{D, C}, a) where {D, C} @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMoreStuff.jl:1099
[12] is_power(a::Rational) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMiscInteger.jl:162
[13] is_power(a::Integer) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMiscInteger.jl:141
[14] is_squarefree(f::PolyRingElem{<:FieldElement}) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMiscPoly.jl:497
[15] is_squarefree(f::PolyRingElem{<:RingElement}) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMiscPoly.jl:517
[16] is_squarefree(n::Union{Int64, ZZRingElem}) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMiscInteger.jl:221
[17] isdiag(A::MatElem) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMiscMatrix.jl:468
[18] mod(f::PolyRingElem{T}, g::PolyRingElem{T}) where T<:RingElem @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMiscPoly.jl:414
[19] mulmod(a::UInt64, b::UInt64, n::UInt64, ni::UInt64) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMiscInteger.jl:16
[20] preimage(M::Map{D, C}, a) where {D, C} @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMoreStuff.jl:1090
[21] preimage_map(k::T, K::T) where T<:FinField @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/embedding/embedding.jl:444
[22] remove(a::BigInt, b::BigInt) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/flint/fmpz.jl:1733
[23] remove(a::UInt64, b::UInt64) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/flint/fmpz.jl:1716
[24] remove(a::Int64, b::Int64) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/flint/fmpz.jl:1727
[25] remove(x::Integer, y::Integer) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/flint/fmpz.jl:1743
[26] root(a::FinFieldElem, n::Integer) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMoreStuff.jl:1299
[27] setprecision(x::BigFloat, p::Int64) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMoreStuff.jl:430
[28] valuation(a::UInt64, b::UInt64) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMoreStuff.jl:148
[29] valuation(x::Integer, y::Integer) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/flint/fmpz.jl:1763
@fingolfin

This comment was marked as outdated.

@lgoettgens

This comment was marked as outdated.

@lgoettgens
Copy link
Collaborator

#1531 reduces the number of reported type piracies from 140 to 29 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants