Hi Nils!

On 6 Sep., 19:44, Nils Bruin <nbr...@sfu.ca> wrote:
> If your tests depend on the choice of random numbers in a non-
> deterministic algorithm, they are going to be very fragile.

Sure. But the funtionality "determine a Sylow subgroup", "find an
isomorphism between two finite groups" etc. is essential to the
computations. This is currently only available (vie GAP) by randomized
algorithms. So, I don't think I can easily change it, and have to
somehow cope with the instabilities (what I currently try to do).

> One possible way to handle this is by rewriting your tests in such a
> way that you test the properties that matter (and should not depend on
> some underlying implementation), ...

... yes, such as testing against the Hilbert-Poincaré series and other
invariants.

Sure. Probably I should use those kind of tests more often.

> However, when you constructed
> the example, you probably found your element with certain properties
> by doing some computations and tests in the representation that sage
> gave you. You could make those computations part of your test.

This is often done: There are many "high-level" tests that test
against theorems.

E.g., the program computes a homogeneous system of parameters, and
the  test then demonstrates (as an example for the user) how to
conclude from properties of the parameters that the ring presentation
is complete. In these cases I often also show how the parameters look
like, but it would not harm to mark this part of the test as "random".

More difficult are the "easy" tests: Testing __mul__, __cmp__ etc,
because here one has no theorems to test against.

> Resetting random seeds is useful for reproducing errors. Less so for
> reproducing test results.

Good point.

Cheers,
Simon

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to