[GAP Forum] Serialisation
Stephen Linton
steve.linton at st-andrews.ac.uk
Wed Feb 11 14:15:09 GMT 2015
Dear GAP Forum,
> On 11 Feb 2015, at 14:05, Sandeep Murthy <s.murthy at mykolab.com> wrote:
>
> Hi
>
> I am trying to use the IO_PickleToString() method from the SCSCP package
> to test out how GAP serialises group objects. This does not appear to be
> working as expected on the isomorphic groups Sym(3) and D_6 (dihedral group).
>
> gap> IO_PickleToString( SymmetricGroup( 3 ) );
> "PRMGILIS\>2PERM\>7(1,2,3)PERM\>5(1,2)INTG\>16FAIL”
>
> This looks OK but for D_6 it fails:
>
> gap> IO_PickleToString( DihedralGroup( 6 ) );
> Error, no method found! For debugging hints type ?Recovery from NoMethodFound
> Error, no 1st choice method found for `IO_Pickle' on 2 arguments called from
> IO_Pickle( s, obj ); called from
> <function "IO_PickleToString">( <arguments> )
> called from read-eval loop at line 20 of *stdin*
> you can 'quit;' to quit to outer loop, or
> you can 'return;' to continue
> brk>
>
> Why is this? Both should return OpenMath strings.
>
> Sandeep
The difference is that DihedralGroup(6) does NOT, by default, return a permutation group.
gap> DihedralGroup(6);
<pc group of size 6 with 2 generators>
There is currently no pickling method for pc groups.
You can ask GAP for D_6 as a permutation group:
gap> DihedralGroup(IsPermGroup, 6);
Group([ (1,2,3), (2,3) ])
IO_PickleToString should work for this group.
As an aside the outputs of IO_PickleToString are NOT OpenMath. The IO_Pickle functions use their own format which only they can reliably read.
Steve
More information about the Forum
mailing list