Notes |
|
(0000342)
|
zs
|
2011-07-28 14:53
|
|
|
|
(0000343)
|
wangp
|
2011-07-29 10:13
|
|
Unfortunately it was only a partial fix. Here are a few more cases. I don't know if there are significant differences between them.
test([1, 29424], [1, 2, 3, 35701], !IO),
test([1], [2, 35701], !IO),
test([101, 102], [1, 2, 3, 35699, 35700, 35701], !IO),
test([35696, 35702, 35703, 35704, 35705], [1, 2, 3, 33416, 334283], !IO), |
|
|
(0000346)
|
wangp
|
2011-08-03 12:07
(Last edited: 2011-08-03 12:17) |
|
Is this the fix? edit: no.
diff --git a/library/tree_bitset.m b/library/tree_bitset.m
index e01831c..716416f 100644
--- a/library/tree_bitset.m
+++ b/library/tree_bitset.m
@@ -2130,7 +2130,7 @@ difference(SetA, SetB) = Set :-
interiornode_difference(LevelA, HeadA, TailA, LevelB, HeadB, TailB,
Level, List) :-
( LevelA < LevelB ->
- range_of_parent_node(HeadA ^ init_offset, LevelA + 1,
+ range_of_parent_node(HeadA ^ init_offset, LevelA,
ParentInitOffsetA, ParentLimitOffsetA),
(
find_containing_node(ParentInitOffsetA, ParentLimitOffsetA,
|
|
|
(0000347)
|
zs
|
2011-08-03 19:16
|
|
That fixes one bug, but there are others. I have tentative fixes for another two, but I am reconsidering the wisdom of just fixing bugs in the existing code. The code was designed the way it is because it was supposed to be slow but simple, and the bugs show it isn't simple. It looks like getting a faster design correct may not be that much more work than fixing the slow design.
In the meantime, one possible workaround for the problem is to make set_of_var use sparse_bitset instead of tree_bitset. |
|
|
(0000359)
|
zs
|
2011-09-06 10:23
|
|
Fix committed a while ago. |
|