Closed johnsekar closed 4 years ago
This is a good suggestion. I started to annotate the type information in the ObjTables documentation. Incorporating the type information directly into ObjTables is even better.
I added these properties to LocalAttribute
type
related_type
min_related
max_related
min_related_rev
max_related_rev
I also added type
and related_type
to Attribute
and set the values for every subclass of Attribute
. The values are either a Python type (i.e. a class) or a tuple of Python types -- both are valid arguments of isinstance
. The tuple form is used when the value can be None
. For example:
type = str
.type = (str, None.__class__)
.
LocalAttribute class currently contains information on which attributes are related to which other attributes. I would like LocalAttribute class to be more informative, and a general reference point for doing runtime checks in the simulator. To this extent, I would like to have the following features
(Some of this is redundant, but it is useful to access this information from both ends of an edge)
Additionally, it would be useful to encode information about literal attributes as well, such as
Example 1: Simulator processing whether to add an edge between a.foo and b.bar (where foo and bar are attributes) will do:
Example 2: Simulator processing whether to assign a value (current stored in variable x) to attribute a.baz will do: