Closed recursion-ninja closed 6 years ago
There appears to be a defect in the decoding from the alphabet.
Alphabets = [ "A", "B", "C" ]
and there exists something like this in the parse result:"AB":[]
We get the empty bitvector when decoding this because notElem "AB" [ "A", "B", "C" ]
.
The example in the integration test fails as the read grammar is not specific enough to be able to specify reading the file as a particular alphabet, e.g. protein, instead of as a custom alphabet. The same problem appears in the Sankoff example here https://github.com/amnh/PCG/issues/80.
I corrected a defect in the bit-vector arithmetic used when converting between characters and ranges.
See commit 5e4401e.
When a dynamic character is input that uses the L1 norm (additive) metric, runtime exceptions are thrown regarding the specialized handling of this metric. I assume that the error exists in the
Ranged
instance definition of theDynamicCharacterElement
. We need to correct the instance definition (or the calling code) so that this is handled appropriately.