This is to ask advice on how to pin down what appears to be a subtle bug in Rakudo so that I can file a bug report.

*Background*

I am updating the work I have down on ModuleCitation, which is not efficient at present.

Since I am create a recursive index, that is modules which cite modules, etc, there is a chance for a cycle and hence a recursive hole. I avoid this by calling another module I wrote called Algorithm::Tarjan.

When passing the new software through a series of unit tests, I get an error in the Tarjan module.

I isolated the lines of code and included the whole of the Tarjan algorithm in a test program, and got the error to recur. It was occurring in a block that started

for %!nodes.values -> $module { # each value is an object with an attribute 'name'

}

When trying to work out whether the problem was in the data, I amended the line to

for %!nodes.values.sort( { .name } ) -> $module { .... # the idea is to print trace statements that can be easily identfied

but then the whole of the new module worked without error. The order of the objects should not have any effect on the algorithm.

So then I wondered if this was a bug that had been picked up already, so I updated my perl6 to the most recent version of Rakudo.

Now the program with the isolated code and the data samples that I prepared works without error and without the .sort kludge.

However, the unit tests of the ModuleCitation module still fail without the kludge, but succeed if the kludge in the Tarjan module.

*Conclusion*

The problem does not appear to be a programming error because a change that should have no effect on the algorithm cures the error.

The problem seems to be a bug in Rakudo.

The problem seems to be related to the size of a data structure and the complexity of the software.


*Advice requested*

In order to be more useful to Rakudo developers, I would like to try to find a way to reproduce the error without the specific application I am developing. (I would also like to eliminate the possibility that it is a programming error of mine). If there is a need to find a work around and include it the existing Tarjan algorithm, I would prefer it wasn't something like a sort.

Since I don't know what the standard .sort method does, I am not sure how to create a sample set of data to reproduce the error.

Any ideas about what to try?

I have been abstract here to get some general ideas about what to try.

If anyone would like to look at the source files, I can mail them. However, I think that there may be a problem that is connected to speed or memory limitations.

Regards,

Richard

Reply via email to