okeuday/pqueue — Issue #6: Another error in pqueue2.
Author: jlouis
Created: 2011-11-11 23:19:44+00:00
State: open

There is a problem with either my model or pqueue2:

```
Shrinking .......(7 time(s))
[{set,{var,1},{call,queue_srv,in,[-11]}},{set,{var,3},{call,queue_srv,in,[12,-13]}},{set,{var,5},{call,queue_srv,in,[-21]}},{set,{var,8},{call,queue_srv,in,[6]}},{set,{var,12},{call,queue_srv,to_list,[]}}]
History: [{{state,[]},ok},{{state,[{0,[-11]}]},ok},{{state,[{-13,[12]},{0,[-11]}]},ok},{{state,[{-13,[12]},{0,[-11,-21]}]},ok},{{state,[{-13,[12]},{0,[-11,-21,6]}]},[12,-21,6,-11]}]
State: {state,[{-13,[12]},{0,[-11,-21,6]}]}
Result: {postcondition,false}
false
```

The error manifests itself in the call `to_list/1` where the order is different from what is expected. We have `12` at priority `-13` and then `-11, -21, 6` at priority `0`. We expect the output to be `[12, -11, -21, 6]` but it is `[12, -21, 6, -11]`.