-
Notifications
You must be signed in to change notification settings - Fork 0
Generalizations
Leon Starr edited this page Jul 24, 2026
·
2 revisions
Here is an example of a generalization relationship.
R38
Bank Level +
Top Bank Level
Middle Bank Level
Bottom Bank Level
<subclass>.(Bank, Floor) -> Bank Level.(Bank, Floor)
--
And here's a snippet from the generated diagram:

Here we are specifying the superclass, subclasses and the referential attribute formalization using this grammar:
// Generalization
gen_rel = superclass subclasses genref // A generalization relationship
superclass = INDENT icaps_name SP? "+" EOL* // A superclass class name
subclasses = subclass+
subclass = INDENT INDENT icaps_name EOL* // A subclass class name
// Genref
genref = single_line_genref / binref+ // Either abbreviated <subclass> source or explicit source for each subclass
single_line_genref = INDENT allsubs_attrs SP '->' (WRAP / SP) target_attrs EOL* // Abbreviated in a single line
Copyright 2023-2026 © Leon Starr under MIT Open Source License