kdrag.reflect.struct

kdrag.reflect.struct(cls) DatatypeSortRef

Use a dataclass to define a struct datatype. Fields are specified by type annotations.

>>> @struct
... class MyStruct32:
...     x: int
...     y: smt.BoolSort()
>>> MyStruct32.x.range()
Int
>>> MyStruct32.y.range()
Bool
Return type:

DatatypeSortRef