[erlang-questions] [ANN] Priority Queue Implementation

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Fri Nov 11 16:42:10 CET 2011

On Thu, Nov 10, 2011 at 09:12, Michael Truog <mjtruog@REDACTED> wrote:
> I previously added code that took care of that case, where two nodes needed
> to be merged that both have queues.  However, I convinced myself at the
> time, that the case would never happen.  So, the code probably needs to be
> thought-through a bit more with more testing, but my hope is that merging
> the queues isn't necessary.

I have tested (tasted, but my typo was funnier) the forbidden fruit
that is QuickCheck/PropEr. Your repository now has a pull-request in
which I add partial testing via proper_statem. It generates an
internal crash of the data structure code if we makes a bunch of
inserts and then call len(), see


Only your pqueue2 implementation is affected. pqueue is not shown to
have any errors (yet). The crash is naturally in the "merge" part of the code :P


More information about the erlang-questions mailing list