-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
serialization of more group attributes
The idea is to implement serializations directly for the underlying GAP objects, instead of implementing them for the Oscar objects. For boolean and numeric attributes, the two alternatives do not really differ, but for attributes whose values are themselves groups, for example `center(g)`, we can simply serialize `GAP.Globals.Center(GapObj(g))`, together with its attributes, instead of first creating `center(g)` anew and then serializing its first component. Another advantage is that this way, it will be easier to deal with "Oscar attributes" of groups that do not rely on GAP's attribute mechanism. (The serialization of permutation groups gets changed with this approach; if we proceed like this then a fallback must be provided, in order to deal with the deserialization of files containing permutation groups that were serialized with the old method.) Currently there is a problem with cyclic references, and the handling of attribute values that are GAP lists is not yet supported. Here is an example for the cyclic reference problem: ``` julia> g = small_group(4, 1); julia> path = mktempdir(); filenamev = joinpath(path, "v"); julia> save(filenamev, g) julia> Oscar.reset_global_serializer_state(); julia> loadedv = load(filenamev); julia> has_center(g) false julia> center(g); julia> save(filenamev, g) julia> Oscar.reset_global_serializer_state() Dict{Base.UUID, Any}() julia> loadedv = load(filenamev) Internal error: encountered unexpected error during compilation of showerror: StackOverflowError() ```
- Loading branch information
1 parent
fd5741d
commit 357fc3e
Showing
4 changed files
with
210 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters