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

Serialization Refactor #4162

Draft
wants to merge 40 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
45d3516
some progress on simplifying ref handling in IPC Serialization
antonydellavecchia Sep 16, 2024
3e62a1b
some progress
antonydellavecchia Sep 16, 2024
8d76aab
moving things around
antonydellavecchia Sep 17, 2024
94587e3
type params function
antonydellavecchia Sep 17, 2024
e4c5bae
some progress on refactoring
antonydellavecchia Sep 18, 2024
1dfd391
some progress
antonydellavecchia Sep 19, 2024
c1cbd72
more progress
antonydellavecchia Sep 20, 2024
12eb6ef
almost completed uni variate polynomials
antonydellavecchia Sep 28, 2024
84c46e6
uni vairate polynomials serialization passing
antonydellavecchia Sep 28, 2024
e35b665
MPolyRing tests passing
antonydellavecchia Sep 29, 2024
4537cf0
moving things around
antonydellavecchia Sep 29, 2024
eb3c734
grading needs containers
antonydellavecchia Sep 30, 2024
a94c566
not sure where i left this
antonydellavecchia Oct 22, 2024
72a96cf
new load_type_params
antonydellavecchia Nov 5, 2024
5e06a82
bug with julia 1.11.1
antonydellavecchia Nov 6, 2024
4cbaee4
vectors + polynomials working
antonydellavecchia Nov 7, 2024
7255064
some progress on tuples
antonydellavecchia Nov 7, 2024
b41dee5
reworking save_type_params
antonydellavecchia Nov 11, 2024
d758fad
tidying
antonydellavecchia Nov 13, 2024
f61ecd1
dicts working
antonydellavecchia Nov 14, 2024
66a5f2e
containers completed, need some upgrades though
antonydellavecchia Nov 19, 2024
32bb5ee
tidying
antonydellavecchia Nov 21, 2024
47e3f3f
broke everything
antonydellavecchia Nov 21, 2024
d971bb5
fixed containers and polynomials
antonydellavecchia Dec 3, 2024
beea514
some issues with field embeddings
antonydellavecchia Dec 3, 2024
b6f35d3
fields tests working now
antonydellavecchia Dec 13, 2024
4b37896
algebras working
antonydellavecchia Jan 14, 2025
0b0d1de
started on groups
antonydellavecchia Jan 14, 2025
62b1bbc
Merge branch 'master' into adv/ipc-serialize
antonydellavecchia Jan 15, 2025
0324e87
fix, inconsistencies from merge
antonydellavecchia Jan 15, 2025
98fc56d
crawling through groups
antonydellavecchia Jan 15, 2025
49b0768
matrices working
antonydellavecchia Jan 16, 2025
a26a575
MPolyMap Working
antonydellavecchia Jan 16, 2025
f539b16
some progress on polyhedral objects
antonydellavecchia Jan 16, 2025
5404f73
adjust GAP serialization to the refactoring
ThomasBreuer Jan 18, 2025
0bb0cc7
GAP object serialization working
antonydellavecchia Jan 20, 2025
336c350
groups working
antonydellavecchia Jan 20, 2025
d322733
removed false kwarg in docs
antonydellavecchia Jan 20, 2025
af036e9
Lie Theory serialization working
antonydellavecchia Jan 20, 2025
215e946
stuck on regression in polyhedral
antonydellavecchia Jan 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions gap/OscarInterface/gap/OscarInterface.gd
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ DeclareProperty( "GroupGeneratorsDefinePresentation", IsGroup );

# Use GAP operations for the serialization of GAP objects.
# (The methods will be Julia functions.)
DeclareOperation( "SerializationInOscarDependentObjects", [ IsObject ] );
DeclareOperation( "SerializeInOscar", [ IsObject, IsObject ] );
DeclareConstructor( "DeserializeInOscar", [ IsObject, IsObject, IsObject ] );
DeclareConstructor( "DeserializeInOscar", [ IsObject, IsObject, IsObject, IsObject ] );
19 changes: 16 additions & 3 deletions gap/OscarInterface/gap/OscarInterface.gi
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ InstallMethod( GroupGeneratorsDefinePresentation,
############################################################################


Perform( Oscar._GAP_type_params,
function( entry )
InstallMethod( SerializationInOscarDependentObjects,
[ JuliaToGAP( IsString, entry[1] ) ],
Julia.GAP.WrapJuliaFunc( entry[2] ) );
end );

Perform( Oscar._GAP_serializations,
function( entry )
InstallMethod( SerializeInOscar,
Expand All @@ -136,9 +143,15 @@ Perform( Oscar._GAP_serializations,

Perform( Oscar._GAP_deserializations,
function( entry )
InstallMethod( DeserializeInOscar,
[ JuliaToGAP( IsString, entry[1] ), "IsObject", "IsObject" ],
Julia.GAP.WrapJuliaFunc( entry[2] ) );
if entry[3] then
InstallMethod( DeserializeInOscar,
[ JuliaToGAP( IsString, entry[1] ), "IsObject", "IsObject", "IsObject" ],
Julia.GAP.WrapJuliaFunc( entry[2] ) );
else
InstallMethod( DeserializeInOscar,
[ JuliaToGAP( IsString, entry[1] ), "IsObject", "IsObject" ],
Julia.GAP.WrapJuliaFunc( entry[2] ) );
fi;
end );

############################################################################
Expand Down
4 changes: 2 additions & 2 deletions src/Combinatorics/SimplicialComplexes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ function deletion(K::SimplicialComplex, face::Union{<:AbstractSet{Int},<:Abstrac
end

@doc raw"""
automorphism_group(K::SimplicialComplex; action=:on_vertices)
automorphism_group(K::SimplicialComplex)

Given a simplicial complex `K` return its automorphism group as a `PermGroup`.
The group can be returned as a subgroup of the permutation group of the vertices
Expand Down Expand Up @@ -670,7 +670,7 @@ function automorphism_group(K::SimplicialComplex; action=:on_vertices)
end

@doc raw"""
on_simplicial_complex(K::SimplicialComplex, g::PermGroupElem)
on_simplicial_complex(K::SimplicialComplex, g::PermGroupElem;)

Given a simplicial complex `K` return the simplicial complex corresponding
to a permutation on it's vertices given by `g`.
Expand Down
12 changes: 6 additions & 6 deletions src/Serialization/Algebras.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
# Free associative algebra serialization
@register_serialization_type FreeAssociativeAlgebra uses_id

type_params(R::T) where T <: FreeAssociativeAlgebra = T, base_ring(R)

function save_object(s::SerializerState, A::FreeAssociativeAlgebra)
save_data_dict(s) do
save_typed_object(s, base_ring(A), :base_ring),
save_object(s, symbols(A), :symbols)
end
end

function load_object(s::DeserializerState, ::Type{<:FreeAssociativeAlgebra})
R = load_typed_object(s, :base_ring)
function load_object(s::DeserializerState, ::Type{<:FreeAssociativeAlgebra}, R::Ring)
gens = load_object(s, Vector{Symbol}, :symbols)
return free_associative_algebra(R, gens)[1]
end

# Free associative algebra element serialization
@register_serialization_type FreeAssociativeAlgebraElem uses_params

# see save_type_params in Rings
# see type_params in Rings

function save_object(s::SerializerState, f::FreeAssociativeAlgebraElem)
save_data_array(s) do
Expand All @@ -33,8 +33,8 @@ function save_object(s::SerializerState, f::FreeAssociativeAlgebraElem)
end
end

function load_object(s::DeserializerState, ::Type{<:FreeAssociativeAlgebraElem}, parents::Vector)
parent_algebra = parents[end]
function load_object(s::DeserializerState, ::Type{<:FreeAssociativeAlgebraElem},
parent_algebra::FreeAssociativeAlgebra)
coeff_type = elem_type(base_ring(parent_algebra))
elem = MPolyBuildCtx(parent_algebra)

Expand Down
Loading
Loading