I did some major changes on the handling of compound types, e.g. (Array (Array X Y) Y). As far as I understand, in the current code:
The raw parser produces a structured representation of them, e.g. the grammar has all the necessary rules.
The AstVisitor converts this structure into textual representation
The sort2type function converts sort strings back to type objects ( ARRAY_TYPE, BITVECTOR_TYPE, etc.).
I propose to eliminate sort2type entirely and produce structured type representations in the AstVisitor directly, as done in this PR. This is only halfway done though, as BitVector and FloatingPoint is still parsed in sort2type.
Apart from that it looks like Opfuzz uses sort2type for constructing rules, so if that is needed then we could move sort2type into the opfuzz module.
I did some major changes on the handling of compound types, e.g.
(Array (Array X Y) Y)
. As far as I understand, in the current code:AstVisitor
converts this structure into textual representationsort2type
function converts sort strings back to type objects (ARRAY_TYPE
,BITVECTOR_TYPE
, etc.).I propose to eliminate
sort2type
entirely and produce structured type representations in theAstVisitor
directly, as done in this PR. This is only halfway done though, asBitVector
andFloatingPoint
is still parsed insort2type
.Apart from that it looks like Opfuzz uses
sort2type
for constructing rules, so if that is needed then we could movesort2type
into the opfuzz module.