amnh / PCG

𝙋𝙝𝙮𝙡𝙤𝙜𝙚𝙣𝙚𝙩𝙞𝙘 𝘾𝙤𝙢𝙥𝙤𝙣𝙚𝙣𝙩 𝙂𝙧𝙖𝙥𝙝 ⸺ Haskell program and libraries for general phylogenetic graph search
28 stars 1 forks source link

Singleton gap state placed on root "ungapped" field #138

Closed recursion-ninja closed 5 years ago

recursion-ninja commented 5 years ago

There is a singleton gap state placed on root "ungapped" field. This violates an invariant of that node decoration field and consequently causes fatal runtime issues on the pre-order assignment of final states.

The conditions which cause the gap state to be placed in the ungapped field if the root node is still unknown.

recursion-ninja commented 5 years ago

I think that this is a manifestation of a GHC defect I've uncovered:

https://gitlab.haskell.org/ghc/ghc/issues/16679

recursion-ninja commented 5 years ago

Essentially, when filtering gaps from a dynamic character, we check for equality of DynamicCharacterElement values, which are just BitVector values, which in turn are just Natural numbers.

When the "gap" value and the element value have the same numeric value, but a different representation, the equality check returns False when it should return True. Because of this false inequality, gap values are not being removed when they ought to be, resulting in a fatal runtime defect

This GHC defect has cost us at least three weeks of developer time.

This was the same issue we had mid-July that prevented generating results for the Indo-European language talk.

recursion-ninja commented 5 years ago

The underlying problem has been addressed with bv-little-1.0.1, see this commit: 645f8b6