#12901: permutation_automorphism_group fails in optional doctest of
coding/linear_code.py
-----------------------------------+------------------------
Reporter: benjaminfjones | Owner: wdj
Type: defect | Status: new
Priority: minor | Milestone: sage-6.4
Component: coding theory | Resolution:
Keywords: linear code gap | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-----------------------------------+------------------------
Description changed by jdemeyer:
Old description:
> There is a bug in the `permutation_automorphism_group(algorithm="gap")`
> method of `LinearCode`. It was discovered when doctests were added to
> `coding/linear_code.py` in #12893.
>
> {{{
> wstein@sage:sage-5.0.beta15-boxen-x86_64-Linux$ ./sage -t --optional
> devel/sage/sage/coding/linear_code.py sage -t --optional
> "devel/sage/sage/coding/linear_code.py"
> **********************************************************************
> File "/scratch/wstein/ref/sage-5.0.beta15-boxen-
> x86_64-Linux/devel/sage/sage/coding/linear_code.py", line 1992:
> sage: C.permutation_automorphism_group(algorithm="gap") # requires
> optional GAP package Guava
> Exception raised:
> Traceback (most recent call last):
> File "/scratch/wstein/ref/sage-5.0.beta15-boxen-
> x86_64-Linux/local/bin/ncadoctest.py", line 1231, in run_one_test
> self.run_one_example(test, example, filename, compileflags)
> File "/scratch/wstein/ref/sage-5.0.beta15-boxen-
> x86_64-Linux/local/bin/sagedoctest.py", line 38, in run_one_example
> OrigDocTestRunner.run_one_example(self, test, example, filename,
> compileflags)
> File "/scratch/wstein/ref/sage-5.0.beta15-boxen-
> x86_64-Linux/local/bin/ncadoctest.py", line 1172, in run_one_example
> compileflags, 1) in test.globs
> File "<doctest __main__.example_49[21]>", line 1, in <module>
> C.permutation_automorphism_group(algorithm="gap") # requires
> optional GAP package Guava###line 1992:
> sage: C.permutation_automorphism_group(algorithm="gap") # requires
> optional GAP package Guava
> File "/scratch/wstein/ref/sage-5.0.beta15-boxen-
> x86_64-Linux/local/lib/python/site-packages/sage/misc/decorators.py",
> line 687, in wrapper
> return func(*args, **kwds)
> File "/scratch/wstein/ref/sage-5.0.beta15-boxen-
> x86_64-Linux/local/lib/python/site-packages/sage/coding/linear_code.py",
> line 2033, in permutation_automorphism_group
> A = gap("MatrixAutomorphisms(matCwt)")
> File "/scratch/wstein/ref/sage-5.0.beta15-boxen-
> x86_64-Linux/local/lib/python/site-
> packages/sage/interfaces/interface.py", line 198, in __call__
> return cls(self, x, name=name)
> File "/scratch/wstein/ref/sage-5.0.beta15-boxen-
> x86_64-Linux/local/lib/python/site-packages/sage/interfaces/expect.py",
> line 1331, in __init__
> raise TypeError, x
> TypeError: Gap produced error output
> Error, no 1st choice method found for `MatrixAutomorphisms' on 1
> arguments
>
> executing $sage24:=MatrixAutomorphisms(matCwt);;
> **********************************************************************
> File "/scratch/wstein/ref/sage-5.0.beta15-boxen-
> x86_64-Linux/devel/sage/sage/coding/linear_code.py", line 1995:
> sage: C.permutation_automorphism_group(algorithm="gap") # requires
> optional GAP package Guava
> Exception raised:
> Traceback (most recent call last):
> File "/scratch/wstein/ref/sage-5.0.beta15-boxen-
> x86_64-Linux/local/bin/ncadoctest.py", line 1231, in run_one_test
> self.run_one_example(test, example, filename, compileflags)
> File "/scratch/wstein/ref/sage-5.0.beta15-boxen-
> x86_64-Linux/local/bin/sagedoctest.py", line 38, in run_one_example
> OrigDocTestRunner.run_one_example(self, test, example, filename,
> compileflags)
> File "/scratch/wstein/ref/sage-5.0.beta15-boxen-
> x86_64-Linux/local/bin/ncadoctest.py", line 1172, in run_one_example
> compileflags, 1) in test.globs
> File "<doctest __main__.example_49[23]>", line 1, in <module>
> C.permutation_automorphism_group(algorithm="gap") # requires
> optional GAP package Guava###line 1995:
> sage: C.permutation_automorphism_group(algorithm="gap") # requires
> optional GAP package Guava
> File "/scratch/wstein/ref/sage-5.0.beta15-boxen-
> x86_64-Linux/local/lib/python/site-packages/sage/misc/decorators.py",
> line 687, in wrapper
> return func(*args, **kwds)
> File "/scratch/wstein/ref/sage-5.0.beta15-boxen-
> x86_64-Linux/local/lib/python/site-packages/sage/coding/linear_code.py",
> line 2033, in permutation_automorphism_group
> A = gap("MatrixAutomorphisms(matCwt)")
> File "/scratch/wstein/ref/sage-5.0.beta15-boxen-
> x86_64-Linux/local/lib/python/site-
> packages/sage/interfaces/interface.py", line 198, in __call__
> return cls(self, x, name=name)
> File "/scratch/wstein/ref/sage-5.0.beta15-boxen-
> x86_64-Linux/local/lib/python/site-packages/sage/interfaces/expect.py",
> line 1331, in __init__
> raise TypeError, x
> TypeError: Gap produced error output
> Error, no 1st choice method found for `MatrixAutomorphisms' on 1
> arguments
>
> executing $sage26:=MatrixAutomorphisms(matCwt);;
> **********************************************************************
> 1 items had failures:
> 2 of 25 in __main__.example_49
> ***Test Failed*** 2 failures.
> For whitespace errors, see the file
> /home/wstein/.sage//tmp/linear_code_4858.py
> [14.8 s]
>
> ----------------------------------------------------------------------
> The following tests failed:
>
> sage -t --optional "devel/sage/sage/coding/linear_code.py"
> Total time for all tests: 14.9 seconds
> }}}
New description:
There is a bug in the `permutation_automorphism_group(algorithm="gap")`
method of `LinearCode`. It was discovered when doctests were added to
`coding/linear_code.py` in #12893.
{{{
~/Installations/sage-git» sage -tp --optional=sage,gap_packages
src/sage/coding
Running doctests with ID 2014-07-16-19-21-12-c6433e4f.
Sorting sources by runtime so that slower doctests are run first....
Doctesting 17 files using 2 threads.
sage -t src/sage/coding/linear_code.py
**********************************************************************
File "src/sage/coding/linear_code.py", line 1416, in
sage.coding.linear_code.LinearCode.decode
Failed example:
C.decode(v, algorithm="guava") # optional - gap_packages (Guava
package)
Exception raised:
Traceback (most recent call last):
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 480, in _run
self.execute(example, compiled, test.globs)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 839, in execute
exec compiled in globs
File "<doctest sage.coding.linear_code.LinearCode.decode[20]>", line
1, in <module>
C.decode(v, algorithm="guava") # optional - gap_packages (Guava
package)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/coding/linear_code.py", line 1440, in decode
result = gap.Decodeword(code, right_word)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/interfaces/interface.py", line 563, in __call__
return self._parent.function_call(self._name, list(args), kwds)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/interfaces/gap.py", line 898, in function_call
['%s=%s'%(key,value.name()) for key, value in kwds.items()])))
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/interfaces/gap.py", line 570, in eval
result = Expect.eval(self, input_line, **kwds)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/interfaces/expect.py", line 1229, in eval
for L in code.split('\n') if L != ''])
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/interfaces/gap.py", line 771, in _eval_line
raise RuntimeError(message)
RuntimeError: Gap produced error output
Error, List Element: <list>[2] must have an assigned value
executing Decodeword($sage5,$sage27);
**********************************************************************
File "src/sage/coding/linear_code.py", line 2304, in
sage.coding.linear_code.LinearCode.permutation_automorphism_group
Failed example:
C.permutation_automorphism_group(algorithm="gap") # optional -
gap_packages (Guava package)
Exception raised:
Traceback (most recent call last):
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 480, in _run
self.execute(example, compiled, test.globs)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 839, in execute
exec compiled in globs
File "<doctest
sage.coding.linear_code.LinearCode.permutation_automorphism_group[21]>",
line 1, in <module>
C.permutation_automorphism_group(algorithm="gap") # optional -
gap_packages (Guava package)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/coding/linear_code.py", line 2345, in
permutation_automorphism_group
A = gap("MatrixAutomorphisms(matCwt)")
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/interfaces/interface.py", line 199, in __call__
return cls(self, x, name=name)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/interfaces/expect.py", line 1312, in __init__
self._name = parent._create(value, name=name)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/interfaces/interface.py", line 389, in _create
self.set(name, value)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/interfaces/gap.py", line 1305, in set
out = self._eval_line(cmd, allow_use_file=True)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/interfaces/gap.py", line 771, in _eval_line
raise RuntimeError(message)
TypeError: Gap produced error output
Error, no method found! For debugging hints type ?Recovery from
NoMethodFound
Error, no 1st choice method found for `MatrixAutomorphisms' on 1
arguments
executing $sage26:=MatrixAutomorphisms(matCwt);;
**********************************************************************
File "src/sage/coding/linear_code.py", line 2306, in
sage.coding.linear_code.LinearCode.permutation_automorphism_group
Failed example:
C.permutation_automorphism_group(algorithm="gap") # optional -
gap_packages (Guava package)
Exception raised:
Traceback (most recent call last):
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 480, in _run
self.execute(example, compiled, test.globs)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 839, in execute
exec compiled in globs
File "<doctest
sage.coding.linear_code.LinearCode.permutation_automorphism_group[23]>",
line 1, in <module>
C.permutation_automorphism_group(algorithm="gap") # optional -
gap_packages (Guava package)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/coding/linear_code.py", line 2345, in
permutation_automorphism_group
A = gap("MatrixAutomorphisms(matCwt)")
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/interfaces/interface.py", line 199, in __call__
return cls(self, x, name=name)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/interfaces/expect.py", line 1312, in __init__
self._name = parent._create(value, name=name)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/interfaces/interface.py", line 389, in _create
self.set(name, value)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/interfaces/gap.py", line 1305, in set
out = self._eval_line(cmd, allow_use_file=True)
File "/home/punarbasu/Installations/sage-git/local/lib/python2.7
/site-packages/sage/interfaces/gap.py", line 771, in _eval_line
raise RuntimeError(message)
TypeError: Gap produced error output
Error, no method found! For debugging hints type ?Recovery from
NoMethodFound
Error, no 1st choice method found for `MatrixAutomorphisms' on 1
arguments
executing $sage11:=MatrixAutomorphisms(matCwt);;
**********************************************************************
2 items had failures:
1 of 23 in sage.coding.linear_code.LinearCode.decode
2 of 25 in
sage.coding.linear_code.LinearCode.permutation_automorphism_group
[398 tests, 3 failures, 36.46 s]
}}}
--
--
Ticket URL: <http://trac.sagemath.org/ticket/12901#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.