Hi Vincent, * Vincent Lefevre wrote on Mon, Feb 20, 2006 at 09:45:54AM CET: > > I'd like to know if the algorithm used for a pseudo-random number > generator provided by a library is part of the library interface. > A PRNG can be used so that the results are reproducible (using the > same seed). From this point of view, I'd say that a new library > version which gives different results (still with the same seed) > has an incompatible interface, but I'm not sure.
Good question. I'd say that depends on documentation: if the interface was documented to either provide a certain PRNG, or weaker, if it was documented to provide deterministic series, then that would likely change the library interface. If OTOH it was explicitly documented to have an unstable or non-deterministic algorithm, then it would not necessarily be a change of interface: the user should not have relied on it then. A more extreme case would be if the library documented to optionally make use of a real (non-pseudo) RNG with the same interface. Certainly there is a large grey area in between, also I don't know whether the definition of a PRNG implies any of the above already. This is a good example for why a library interface simply cannot be described by technical means (e.g., the preprocessed header files plus the ABI) only: documentation is an essential part. Cheers, Ralf _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool