CIF's 'AnnotationEqHashWrap' class wrongly assumes that annotation argument values can be statically evaluated
CIF's AnnotationEqHashWrap
class can be used to wrap Annotation
objects, allowing them to be compared and to be used keys of maps, etc. The class evaluates the values of annotation arguments, to for instance consider value {1, 2}
the same as {2, 1}
, even though they could have different expression representations. The class therefore assumes, that the annotation argument expressions can always be statically evaluated. However, this is not guaranteed by the rules of CIF annotations. That is, the CIF language reference manual page about annotations doesn't state this as a requirement.
If the static evaluation requirement holds, the class works. However, if it is used on annotations for which the requirement doesn't hold, it will crash.
Note that the AnnotationEqHashWrap
class is no longer being used anywhere in the ESCET code base. We could potentially remove it.