Skip to content
Snippets Groups Projects

WIP: Feature/better placeholders

Merged Johannes Mey 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.

  1. Determine if a type can be the end point of a relation syn boolean TypeDecl.isReferenceTarget().
  2. 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.
Edited by Johannes Mey

Merge request reports

Pipeline #6331 passed

Pipeline passed for e14fe286 on feature/better-placeholders

Merged by René SchöneRené Schöne 3 years ago (Mar 11, 2022 4:50pm UTC)

Loading

Pipeline #12982 passed

Pipeline passed for 69479d66 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading