slang --ast-json: named types and shared instance bodies are "<addr> name" string references
With slang 12 --ast-json out.json --ast-json-detailed-types, a typedef is a TypeAlias whose target is the PackedStructType/PackedUnionType/EnumType; Fields carry bitOffset (LSB) but no width, so compute width from the type (ScalarType=1, PredefinedIntegerType byte/int/longint, PackedArrayType range x element, struct=sum, union=max, enum=baseType). Any later use of a named type is a string "<addr> pkg::name" (look up the node by its addr), and instance bodies shared by several instances (instance arrays, identical params) are also string references in the body field. InstanceArray elements and generate-for blocks have empty names: index = array lower bound + position (lower index first), or the block's first isBody Parameter value (the genvar). Unnamed if-generate blocks are already named genblkN. --ast-json-scope drops package types, so dump the whole design.