Merged requested to merge feature/better-placeholders into master
resolves #12 (closed)
Currently, all nonterminal classes get accompanying placeholder classes prefixed with unresolved. There are several problems with that.
- Unresolved classes are also created for types that cannot be the endpoint of a relation.
- The existence of an unresolved class means that the class must be instantiable. Even though the class is obtained by subtyping, if the superclass is abstract, there might be unimplemented abstract methods.
Therefore, two improvements are required.
- Determine if a type can be the end point of a relation
syn boolean TypeDecl.isReferenceTarget().
- Determine if a type is instantiable at all
syn boolean TypeDecl.instantiable().
These points can be checked easily. However, there is another problem. Relation endpoints can refer to types that have subtypes. However, the placeholder must still have the type of the supertype. Currently, an arbitrary instantiable subtype is selected.
- TODO: It must be made sure, that this (and only this) subtype gets a placeholder class.