I think the simplest way we can accomplish goals C0 and C1 is to have a language independent schema in something like JSON or YAML. Both are easy to write and understand. Both have existing parsers for many languages, so we will not have to write our own.
Using a Python DSL as a schema seems to have many down sides and few upsides. We’d have to parse the Python AST, which is incredibly painful and changes between versions. Furthermore, using the full Python AST means that there are more places for the user to be confused. For example, if type_key = "GlobalVar"
is allowed, then is type_key = "GlobalVar" + self.name_hint
allowed? The user has no way to know which parts of the Python AST are allowed and which are forbidden. Its not clear to me that a Python DSL is easier for anyone to use even though it is “just Python”. And using the Python AST certain creates a larger maintenance burden for everyone maintaining TVM.