home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c100 / 1.ddi / SNAV0111.ZIP / NOTATION.PRN < prev    next >
Encoding:
Text File  |  1990-04-16  |  41.3 KB  |  650 lines

  1. <         the╔══╗╔══╗╔                      ╔
  2.             ║  ╙╢  ╙╢                      ║ █
  3.             ║   ║   ║ ╔═══╗ ╠═ ╔═══╗╔ ╔═══╗║ ╔ ╔═══╗╔ ╔═══╗╔ ╓─╖ ╔═══╗╔ ╔═╗╔═╗╔
  4.             ║   ║   ║ ║   ║ ║  ║   ╙╢ ║   ╙╢ ║ ║   ╙╢ ║   ╙╢ ║╓╜ ║   ╙╢ ║ ╙╢ ╙╢
  5.             ║   ║   ║┌╫───╜ ║ ┌╢    ║┌╢    ║ ║┌╢    ║┌╢    ║ ║║ ┌╢    ║ ║  ║  ║
  6.             ║   ║   ║│║   ╓─╢ │║   ╓╢│║   ╓╢ ║│║   ╓╢│║   ╓╢ ║║ │║   ╓╢ ║  ║  ║
  7.             ╜   ╨   ╙┘╚═══╝ ╚═╛╚═══╝╙┘╚═══╝╙─╨┘╚═══╝╙┘╚═══╝║┌╜╙─┘╚═══╝╙─╜  ╨  ║
  8.                                                       ╓────╫┘                 ║
  9.             ╓─────────────────────────────────────────╚════╝──────────────────╜
  10.             ╙─── architecture
  11.          
  12.             (software foundation)
  13.                                 SNAV - ODD specification
  14.                                    - 17.4.90 page 1 -
  15.          
  16.                            ┌───────┐
  17.                  ─────────>│ AVNER │
  18.                  ─────────>│  BEN  │──────> Software Engineering Method
  19.                            └───────┘
  20.                  10 Dov-Hoz st. Tel-Aviv 63416 Israel tel. 972-3-221535
  21.          
  22.          
  23.          
  24.          
  25.          
  26.          
  27.          
  28.          
  29.          
  30.          
  31.          
  32.                    ┌─────────────────────────────────────────────────┐
  33.                    │             "The Screen NAVigator"              │
  34.                    │                                                 │
  35.                    │           ODD notation specification            │
  36.                    │                                                 │
  37.                    │            Version 1.00, April 1990.            │
  38.                    └─────────────────────────────────────────────────┘
  39.          
  40.                             Copyright (c) 1990 by Avner Ben.
  41.          
  42.          
  43.          
  44.          
  45.          
  46.          
  47.                                                   Written by  Avner Ben
  48.                                                               13 April 1990.
  49.                                 SNAV - ODD specification
  50.                                    - 17.4.90 page 2 -
  51.          
  52.          EABSTRACTF
  53.          E───────────────────────────────────────────────────────────────────────F
  54.          
  55.          The following  document specifies  a graphic  notation called  "Object
  56.          Dependency  Diagram"  (ODD).     It  is   intended  as  a   data-model
  57.          specification  tool  in  the  C++  programming  language  environment.
  58.          Assuming a three level project  hierarchy, ODD addresses the middle  -
  59.          that  is  designer's  -  level.    It  facilitates  the  discussion of
  60.          implementation dependant design decisions, prior to actual coding  (or
  61.          in iteration  with it),  yet at  a level  that maintains "eye contact"
  62.          with the conceptual model.  In the project life-cycle, ODD has a  full
  63.          downward compatibility, that is, 1:1 mapping to C++ syntax.   Upwards,
  64.          It may  be decomposed  from an  ER conceptual  model, though  a formal
  65.          method is yet to be proposed.  ODD does not support explicit  semantic
  66.          hierarchies,  and  is  not  aimed,  by  default,  for use in other OOP
  67.          environments, but C++.
  68.          
  69.          Keywords:      OOD,   OBJECT-ORIENTED   DESIGN,  OOP,  OBJECT-ORIENTED
  70.          PROGRAMMING, C++, DATA-MODELLING, DATA-DRIVEN DESIGN.
  71.                                 SNAV - ODD specification
  72.                                    - 17.4.90 page 3 -
  73.          
  74.          ECONTENTSF
  75.          E───────────────────────────────────────────────────────────────────────F
  76.          
  77.          
  78.          
  79.          
  80.          
  81.          
  82.          
  83.          
  84.          
  85.          
  86.          
  87.          
  88.                    Abstract ..................................................2
  89.                    Contents ..................................................3
  90.                  ──────────────────────────────────────────────────────────────
  91.                    Preface ...................................................4
  92.                    ODD and the structured life-cycle .........................5
  93.                    ODD specification .........................................6
  94.                    Usage conventions ........................................12
  95.                    Limitations of the model .................................13
  96.                    Examples .................................................14
  97.                                 SNAV - ODD specification
  98.                                    - 17.4.90 page 4 -
  99.          
  100.          EPREFACEF
  101.          E───────────────────────────────────────────────────────────────────────F
  102.          
  103.          I  have  developed  this  notation  In  conjunction with my "SNAV" C++
  104.          character-output  driver.    It  is  also  inspired  by  my  work   in
  105.          conjunction with  the "Sapiens"  application generator  in particular,
  106.          the  hierarchical  database  model  in  general, and recently, the C++
  107.          programming  language  data-model.    I   have  used  it  as  a   both
  108.          specification and documentation tool.  ODD has a strong,  quasi-formal
  109.          mapping  to  both  programming  level  (C++ code) and systems-analysis
  110.          level (ER or a similar conceptual data model).
  111.                                 SNAV - ODD specification
  112.                                    - 17.4.90 page 5 -
  113.          
  114.          EODD AND THE STRUCTURED LIFE-CYCLEF
  115.          E───────────────────────────────────────────────────────────────────────F
  116.          
  117.          Software design  tools like  ODD facilitate  what I  perceive to  be a
  118.          "pragmatic" development life-cycle.   The work consists of  many rapid
  119.          phases of  "top-down" design  (that is,  "implementing" analysis  into
  120.          code),  and  "bottom-up"  design  ("re-engineering" analysis documents
  121.          from code).  This  resembles "prototyping" more than  conventional  DP
  122.          life-cycle.  It fits better the nature of Object-Oriented programming,
  123.          where both the complexity of  the applications and the flexibility  of
  124.          the tools, make thorough preliminary analysis and structured design an
  125.          impractical  solution.    Yet,  we  should  not  rush from here to the
  126.          irresponsible conclusion, of proceeding without any method whatsoever.
  127.          
  128.          Of   the   traditional   "life-cycle"   phases,   specified   in  many
  129.          software-engineering  texts,  the  professional  software designer may
  130.          find  three  to  be  of  interest:  system-analysis (user-requirements
  131.          level),  software  design   (operational  specification  level),   and
  132.          software   implementation   (writing   code).      Enterprenuring  and
  133.          maintenance, I  find uninteresting.   The  ordering (analysis, design,
  134.          implementation) represents  timing, importance  and degree  of detail.
  135.          There is supposed to be a unidirectional mapping, representing at each
  136.          "level", a  binary policy-to-implementation  link.   The time-ordering
  137.          implies flatly that design may not start before analysis has come to a
  138.          full-stop,  and  once  implementation  begins,  the design team may go
  139.          away.
  140.          
  141.          I suggest to accept the functional partitioning, with the exception of
  142.          the  time-ordering.    In  the  end,  the  project library should have
  143.          complete editions of each  of the three needed  documents.  It is  not
  144.          useful to predetermine,  from which publication  one should start,  or
  145.          that once it  has reached a  complete form, it  is never to  be opened
  146.          again.    The  three  books  serve  different  populations,  and  give
  147.          complementary perspectives on the same reality, that is, the  software
  148.          design database.  No mater where  one starts, the three views must  be
  149.          up-to-date simultaneously.  In analogy to software, any update made to
  150.          the  software-design  database  from   one  terminal,  must  have   an
  151.          instantaneous  reflection  in  the  images  presented on the other two
  152.          terminals, (if it has a mapping, and if it passes the resolution).
  153.          
  154.          In this  timeless life-cycle  hierarchy, the  middle stage  - design -
  155.          becomes the most important.   The whole effort depends on  its ability
  156.          to  bridge  between  the  two  extreme  models,  yet without being too
  157.          complex to  manage.   ODD is  aimed as  a middle  tool in  such design
  158.          architecture, with ER on the one end and C++ header files on the other
  159.          end.  This applies,  of course, to strongly  data-driven applications,
  160.          since it stresses the data  model.  Most important structural  changes
  161.          to the code may  be easily reflected in  the ODD, and most  changes to
  162.          the ODD may  be easily reflected  in the ER,  and vice-versa.   So the
  163.          designer may always  assess the strength  of the design,  on all three
  164.          levels.
  165.                                 SNAV - ODD specification
  166.                                    - 17.4.90 page 6 -
  167.          
  168.          EOBJECT DEPENDENCY DIAGRAM - DEFINITIONF
  169.          E───────────────────────────────────────────────────────────────────────F
  170.          
  171.          The ODD  medium is  useful for  displaying all  the important  classes
  172.          unique to a C++ application, where they are used, and the static links
  173.          between them (inclusion, inheritance, etc.).  It may also be used,  to
  174.          a lesser extent, to display dataflow between them, where that is  used
  175.          as a way for implementing structure.
  176.          
  177.          An ODD consists of the following symbols:
  178.          
  179.          -1The "Class" symbol:-0
  180.          
  181.          ┌───────────┐  Represented by a name within an oblong.  This symbol is
  182.          │           │  normally used for a proper  C++ class.  It may  also be
  183.          │  ┌─────┐  │  used for  a "pseudoclass":   a  C++ variable  or struct
  184.          │  │class│  │  were  these  are  a  "decadent"  representation  of   a
  185.          │  └─────┘  │  conceptual-level object that  should map into  a class.
  186.          │           │  A class  may be  repeated in  the ODD  as many times as
  187.          └───────────┘  needed, depending  on its  hierarchical links,  and the
  188.          number of frames to which it is divided.
  189.          
  190.          -1The "Hierarchical Link" symbol:-0
  191.          
  192.          ┌──────────────────┐  Represented by  a line  beginning at  the bottom
  193.          │                  │  end of one  class and ending  at the top  end of
  194.          │        │         │  some class.   The  line need  not be  explicitly
  195.          │      d*│         │  directed.  It owes its direction to an  explicit
  196.          │  ┌─────┴──────┐  │  top-down  positioning  of  the  classes.  When a
  197.          │  │parent_class│  │  class initiates a number of hierarchical  links,
  198.          │  └─────┬──────┘  │  their exit points may  be unified.  There  is no
  199.          │        │         │  importance   to   the   horizontal  ordering  of
  200.          │        │         │  hierarchical links.
  201.          │     p40│         │
  202.          │  ┌─────┴─────┐   │  An   hierarchical   link   has   a  type  and  a
  203.          │  │child_class│   │  cardinality.  These  are written near  the entry
  204.          │  └───────────┘   │  point   of   the   link,   in  the  order  type,
  205.          │                  │  cardinality, with no separating space.  Type  is
  206.          └──────────────────┘  represented  by  a  letter,  cardinality  by   a
  207.          number.  The default type is "d", and cardinality, "1".
  208.          
  209.          All root classes  in the ODD  (classes that have  no explicit parent),
  210.          are assumed  to be  linked to  class "system".   Class  system has  no
  211.          attributes and is  not rendered in  the chart.   However, the link  to
  212.          system is represented as a  link coming from nowhere and  entering the
  213.          top  of  the  class.    It  is  referred  to  as  its  "entry  point".
  214.          Entry-points have type and cardinality like any other link.
  215.                                 SNAV - ODD specification
  216.          E                OBJECT DEPENDENCY DIAGRAM - DEFINITIONF
  217.                                    - 17.4.90 page 7 -
  218.          
  219.          -1Specifying hierarchical link type:-0
  220.          
  221.          There are three hierarchical-link types:  "d" (for declared), "p" (for
  222.          pointed) and "c" (for computed).  A relationship of any other kind may
  223.          not  be  specified  as  hierarchical.    The  type  of  an entry point
  224.          represents its "normal" (but  not necessarily the only) access method,
  225.          when standing alone.
  226.          
  227.          -1"Declared link".-0  The object is physically included within the parent,
  228.          and is (normally)  invisible outside it.   Its lifetime  is limited to
  229.          the scope of  its parent.   Represented by the  letter d. The  default
  230.          type.
  231.          
  232.          -1"Pointed  link".-0    The  object  has  been allocated elsewhere, and is
  233.          referenced.    Its  lifetime  is  independent  of  its  parent.    The
  234.          referencing method is implementation  dependant (e.g. pointer to  ram,
  235.          foreign key to an FMS, etc.).  Represented by the letter p.
  236.          
  237.          -1"Computed link".-0   The  object is  (virtually) pointed,  but does  not
  238.          necessarily exist.  The parent object stores a "foreign-key" variable,
  239.          which  may  be  used  to  physically  allocate the object, if the need
  240.          occurs.  The  lifetime (and mere  existence) of the  virtual object is
  241.          implementation  dependant.    Useful  for  keeping  consistency with a
  242.          higher-level    design     specification,    and     for    optimizing
  243.          performance-oriented software.
  244.          
  245.          -1Specifying hierarchical-link cardinality:-0
  246.          
  247.          Cardinality  is  specified  by   either  a  maximum  number,   or  the
  248.          "indefinite cardinality" symbol (*), adjacent to the link-type letter.
  249.          The cardinality specifies the  maximum number of occurrences  (objects
  250.          allocated) for the child class within its parent.  The cardinality  of
  251.          an entry-point determines the maximum  number of objects of this  type
  252.          in the whole  of the system.   Where the  class has a  unique key, the
  253.          cardinality determines the size of the datatype's "domain" of  values.
  254.          The following cardinalities have a special design significance:
  255.          
  256.          '0' (zero) cardinality practically says that such an object will never
  257.          be allocated.  Its only legitimate use is for an abstract class.  Such
  258.          a class  must also  have a  pointing link  from system,  and a derived
  259.          class with an unhierarchical "polymorphic" link back to it.
  260.                                 SNAV - ODD specification
  261.          E                OBJECT DEPENDENCY DIAGRAM - DEFINITIONF
  262.                                    - 17.4.90 page 8 -
  263.          
  264.          '1' cardinality is the default case.   It says that zero to  one child
  265.          objects may be allocated within each parent object.  Cardinality of  1
  266.          in a declared link (the grand default) practically says that the child
  267.          class  is  a  declared  part  of  the  parent class's structure.  In a
  268.          pointed or computed link, it says that the child object's existence is
  269.          optional.
  270.          
  271.          A cardinality greater than 1 is essentially implementation  dependant.
  272.          In a declared  link it may  suggest an array  implementation.  It  may
  273.          also represent the fact that there are some distinct variables of this
  274.          datatype.  The designer has to  decide, in this case, wether to  unify
  275.          their representation.  However,  ODD, being a data-model,  supplies no
  276.          facilities for  discerning between  two objects  by function;  only by
  277.          datatype!  In a pointed link, it may suggest a linked list,  unordered
  278.          set or sequential  file implementation.   We may expect  the parent to
  279.          act as  an "iterator  class" or  "generator class".   But  it may also
  280.          serve as a  dynamic array implementation.  Computed links are  similar
  281.          to declared links, in this respect.
  282.          
  283.          An indefinite cardinality may mean zero, one or any number of objects.
  284.          It should  be used  when the  link implements  a generator or iterator
  285.          class.  In general,  it should be used  whenever the actual number  is
  286.          determined during run-time.  (If the number of records in the file  is
  287.          known  in  advance,  use  it!).    Note  that  cardinality  may not be
  288.          specified by variable or by formula!  Optionally, cardinalities may be
  289.          specified by range, (using a pair of numbers within brackets,  divided
  290.          by comma), and by approximation (using the symbols > < >= and <=).  It
  291.          is recommended to keep this practice to the minimum.  These  represent
  292.          run-time dependent and  other procedural considerations,  which should
  293.          be kept away from the data-model!
  294.          
  295.          -1The "UnHierarchical Link" symbol:-0
  296.          
  297.          An  unhierarchical  link  is  represented  by a directed arc beginning
  298.          anywhere  within  a  class,  and  ending  with  the arrowhead pointing
  299.          anywhere within  another class,  excepts for  its top.   There are two
  300.          kinds  of  unhierarchical   links:    "inheritance"   and  "procedural
  301.          constraint".
  302.                                 SNAV - ODD specification
  303.          E                OBJECT DEPENDENCY DIAGRAM - DEFINITIONF
  304.                                    - 17.4.90 page 9 -
  305.          
  306.          -1Unhierarchical links of the "Inheritance" type:-0
  307.          
  308.          ┌─────────────────────────────────────┐  Inheritance is a directed 1:1
  309.          │                                     │  relationship,  but,  contrary
  310.          │        │                  │         │  with 1:1  hierarchies of  the
  311.          │      d*│                  │d4       │  declaration,   pointing    or
  312.          │  ┌─────┴─────┐     ┌──────┴──────┐  │  computing types, parent-child
  313.          │  │super_class│  ┌─>│derived_class│  │  roles  are  inverted.     One
  314.          │  └─────┬─────┘  │  └─────────────┘  │  object of the parent class is
  315.          │        │        │                   │  included  within  the   child
  316.          │        └────────┘                   │  class.    The  inclusion   is
  317.          │                                     │  implemented in a  transparent
  318.          └─────────────────────────────────────┘  way.    The  parent's   shell
  319.          "melts",  leaving  its  data  and  state  variables and methods at the
  320.          child's  disposal  (the  child  "inherits"  them).    The  inheritance
  321.          mechanism  may  be  partially  stopped,  by  methods  being explicitly
  322.          overridden by the child, and by both methods and data being explicitly
  323.          hidden by the parent.  The Inheritance link saves explicit  inclusion,
  324.          by declaration or pointing, and  saves the need to prove  the parent's
  325.          existence, or to dereference its contents.
  326.          
  327.          ┌────────────────────────────┐  A  special  case  of  inheritance   is
  328.          │                            │  "polymorphism", or inheritance from  a
  329.          │         │             │    │  generic class.  it is  defined by  the
  330.          │       p*│<∙∙∙∙∙∙∙∙∙∙∙∙│p*  │  following  construct:    the parent is
  331.          │  ┌──────┴──────┐     ┌┴┐   │  pointing  in  system,  the  child   is
  332.          │  │generic_class│  ┌─>│?│   │  pointing in system, and the child  has
  333.          │  └──────┬──────┘  │  └─┘   │  a   special    type   of    procedural
  334.          │         │         │        │  constraint, pointing from the  child's
  335.          │         └─────────┘        │  entry-point     to     the    parent's
  336.          │                            │  entry-point.    The  child  may  be  a
  337.          └────────────────────────────┘  dummy, representing the whole  derived
  338.          genre, by having  a question mark  for name.   Where the parent  is of
  339.          cardinality zero, it said to be  an "abstract" class.  Such class  has
  340.          no occurrences (objects allocated), and its sole purpose is to  define
  341.          the genre.
  342.          
  343.          Unhierarchical links of  the "inheritance" type  are represented by  a
  344.          solid  arc.    They  differ  from  hierarchical  links  proper, by the
  345.          position of their entry point.
  346.                                 SNAV - ODD specification
  347.          E                OBJECT DEPENDENCY DIAGRAM - DEFINITIONF
  348.                                    - 17.4.90 page 10 -
  349.          
  350.          -1Unhierarchical links of the "Procedural Constraint" type:-0
  351.          
  352.          Also known  as "triggered  update", "update  policy", "update  logic",
  353.          "derived  update"   and  "existence   constraint",  in   a  number  of
  354.          commercially  available  database  management  systems and application
  355.          generators.   These tools  have been  invented to  allow the  database
  356.          designer to supplement  the inherent data  model with links  it is not
  357.          built to support.
  358.          
  359.          This  kind  of  link  is  partly  procedural,  because  it  is usually
  360.          implemented  as  some  algorithm  that  draws  upon  timing  or  other
  361.          unstructural ordering, and because  its very existence is  "triggered"
  362.          by an event.  But it is equally non-procedural, because its activation
  363.          is beyond any programmed process's immediate control (though it may be
  364.          "conditioned").  The  non-procedurality of this  programming technique
  365.          becomes obvious when  a chain of  "derived updates" is  created during
  366.          run   time.      Even   if   this   was   carefully   designed   by  a
  367.          procedurally-minded programmer, another  process can come  and trigger
  368.          it  from  the  middle.  the  latter  phenomenon has no parallel in the
  369.          procedural world (and there, is likely to pass for a "bug").
  370.          
  371.          Unhierarchical links which are  used as dataflows implementing  pieces
  372.          of a grand algorithm are irrelevant for the data-model.  But essential
  373.          for  the  data-model  are   those  derived  accesses  that   implement
  374.          structural constraints that, for  some reason, may not  be implemented
  375.          with plain inclusion, reference  and inheritance.  For  example, where
  376.          part of the  database must, at  any time, duplicate  another part (for
  377.          example, inverted  file structures),  or where  the existence  of some
  378.          object is a prerequisite for the allocation of another object (and  it
  379.          is  not  its  child  or  inherited  from  it),  or  where  some object
  380.          "controls" the data within another object.  The person maintaining the
  381.          data-model must be notified of these constraints, or data integrity in
  382.          the real database may be corrupted!
  383.                                 SNAV - ODD specification
  384.          E                OBJECT DEPENDENCY DIAGRAM - DEFINITIONF
  385.                                    - 17.4.90 page 11 -
  386.          
  387.          While implementing  such constraints  in a  procedural environment  is
  388.          virtually impractical,  in an  Object-Oriented environment  it is very
  389.          natural, provided that strict data-hiding is practiced.  Each  derived
  390.          access suggests a  method, internal to  the triggering object.   Since
  391.          all update is done through the class's front-end protocol, the correct
  392.          method  will  be  triggered  by  the  constructor, destructor, or some
  393.          front-end method  invoked by  the user.   This  topic summarizes ODD's
  394.          contribution  to  the  method  design  aspect of an objective software
  395.          system. The  rest of the  protocol should be  derived from a  parallel
  396.          procedural study (for example, DFD), or left for the coding level.
  397.          
  398.          ┌─────────────────────────────────────┐  procedural  constraint  links
  399.          │                                     │  may   be   of   two    types:
  400.          │         │                 │         │  "output", represented by  the
  401.          │       p*│               p*│         │  letter  "o"  along  the  arc,
  402.          │    ┌────┴────┐     ┌──────┴──────┐  │  (the  default)  and  "input",
  403.          │  ∙∙│main_file│  ∙∙>│inverted_file│  │  represented by the letter "i"
  404.          │  ∙ └────┬────┘  ∙  └──────┬──────┘  │  along the arc. derived output
  405.          │  ∙      │       ∙         │         │  means    that    any   update
  406.          │  ∙      │       ∙         │         │  (creation,  modification   or
  407.          │  ∙    p*│  ∙∙∙∙∙∙         │         │  destruction) to the  "source"
  408.          │  ∙ ┌────┴────┐      ┌─────┴─────┐   │  object may imply some  update
  409.          │  ∙ │main_data│   ∙∙>│primary_key│   │  (creation,  modification   or
  410.          │  ∙ └─────────┘   ∙  └───────────┘   │  destruction)  to  some object
  411.          │  ∙               ∙                  │  of   the   "target"    class.
  412.          │  ∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙                  │  Derived  input  represents  a
  413.          │                                     │  weaker  link,  to  be kept to
  414.          └─────────────────────────────────────┘  the minimum.   It  means that
  415.          when the source  object is created,  modified or destroyed,  it may be
  416.          influenced by the existence, inexistence or contents of some object of
  417.          the target class.   However, it  has no way  of knowing if  the target
  418.          will  be  modified  or  cease  to  exist later, resulting in poor data
  419.          integrity.  An OODBMS to support derived input integrity is yet to  be
  420.          invented.
  421.          
  422.          Unhierarchical  links   of  the   "procedural  constraint"   type  are
  423.          represented  by  a  dotted  arc.    In case of "concatenated key", all
  424.          source  objects  needed  to  locate  the  target  must  be identified,
  425.          regardless of which of them owns the trigger.
  426.          
  427.          An  exceptional  usage  of  the  procedural  constraint  symbol, is to
  428.          express polymorphic inheritance.
  429.                                 SNAV - ODD specification
  430.                                    - 17.4.90 page 12 -
  431.          
  432.          EUSAGE CONVENTIONSF
  433.          E───────────────────────────────────────────────────────────────────────F
  434.          
  435.          For  presentation   convenience,  the   OO  database   forest  may  be
  436.          distributed among  a number  of "frames".   The  division and internal
  437.          ordering have  semantic meaning  for the  designer, but  imply nothing
  438.          about the structure of the database.  The same object may repeated  as
  439.          many times  as needed,  in the  overall presentation,  again, implying
  440.          nothing about database  structure.  Each  tree in the  frame maintains
  441.          its own hierarchy, regardless of its indentation, if any, relative  to
  442.          the other trees.  Roots are  nodes that link to system, regardless  of
  443.          where placed.
  444.          
  445.          A ODD frame consists of a  forest of (one or more) class-trees.   Each
  446.          class-tree has one root and zero or more subtrees, etc..  The nodes of
  447.          the  trees,  denoted  by  a  square,  represent  datatypes,   normally
  448.          implemented as classes (on some rare occasions, what should be a class
  449.          may decay  into a  simple datatype,  e.g. integer).   The hierarchy is
  450.          top-down, with no importance to left-right order.
  451.          
  452.          Hierarchical links always point from the bottom of the parent class to
  453.          the top of the child class.   Any other link is unhierarchical.   Each
  454.          binary hierarchical link  describes the fact  that each object  of the
  455.          parent class  is equipped  to accommodate  some objects  of the  lower
  456.          class.  The type  of link denoted by  a letter The entry  to each tree
  457.          denotes the normal way of referencing objects of these class.
  458.          
  459.          Inheritance is denoted  by an unhierarchical  link from superclass  to
  460.          child-class.    Update  constraints  are  denoted by dotted lines from
  461.          source (triggering object) to target (object to be updated).
  462.          
  463.          Unhierarchical links to an object not within the current frame may end
  464.          with a mention of its name.
  465.          
  466.          While  a  class  may  appear  any  number  of times, its specification
  467.          subtree is expected to appear once, in what is perceived as the proper
  468.          place (normally  its root  occurrence).   Redundant specifications may
  469.          interfere with maintenance.
  470.                                 SNAV - ODD specification
  471.                                    - 17.4.90 page 13 -
  472.          
  473.          ELIMITATIONS OF THE MODELF
  474.          E───────────────────────────────────────────────────────────────────────F
  475.          
  476.          ODD is a strongly data-driven model.  It is poorly equipped to display
  477.          dataflow  and  definitely  not  control-flow.    Most  OOP   candidate
  478.          applications  are  data  driven.    However,  if the application has a
  479.          strong  procedural  aspect,  the  designer  must  supplement it with a
  480.          flow-oriented  tool,  such   as  DFD,  flowchart,   action-diagram  or
  481.          state-machine.    The  relationship  between  the views is essentially
  482.          informal, as is the relationship  between DFD and ER, for  example, in
  483.          the analysis stage.
  484.          
  485.          Like any design-oriented tools, ODD may force the programming-oriented
  486.          designer to "invent" entities that do  not seem to exist in his  code,
  487.          at least not in an immediate way.  Pseudoclasses are a fine example.
  488.          
  489.          ODD, like other true  data-models, does not support  multi-dimensional
  490.          arrays.  A  matrix of objects  must be broken  to two arrays,  with an
  491.          interim pseudoclass invented in the middle.
  492.          
  493.          ODD, like C++, does not support class-aggregation.  In C++, one cannot
  494.          use  a   generic  parent-child   aggregate  to   inherit  a   parallel
  495.          parent-child aggregate,  at least  not in  an explicit  way.  Some  OO
  496.          implementations (e.g. IBM's RM/MVS) support this.
  497.          
  498.          ODD is an experimental  technique, based upon very  limited experience
  499.          with a limited kind of applications.  I am awaiting user contributions
  500.          to its syntax and usage.
  501.                                 SNAV - ODD specification
  502.                                    - 17.4.90 page 14 -
  503.          
  504.          EA GENERAL EXAMPLEF
  505.          E───────────────────────────────────────────────────────────────────────F
  506.          
  507.          Objects of class A are usually declared by the user.  There may be any
  508.          number  of  them  in  the  system.    An  object of class A physically
  509.          includes one object of class  A_CHILD_1.  It has an  integer equalling
  510.          the internal value of an object-occurrence of class FOREIGN, which may
  511.          be invoked when needed.  B is an abstract class (zero occurrences), to
  512.          be accessed by pointer.  An  object of this generic class points  to a
  513.          linked-list of B_CHILD objects.   Class B_CHILD derives from class  A.
  514.          An update to class B_CHILD may imply a derived update to the A_CHILD_1
  515.          in its superclass.   The anonymous class is  some working case of  the
  516.          generic class B, declared by a pointer to the superclass.
  517.          ┌─────────────────────────────────────────────────────────────────────┐
  518.          │                                                                     │
  519.          │              │                        │         │                   │
  520.          │            d*│                      p0│<∙∙∙∙∙∙∙∙│                   │
  521.          │            ┌─┴─┐                    ┌─┴─┐      ┌┴┐                  │
  522.          │            │ a │                    │ b │  ┌──>│?│                  │
  523.          │            └─┬─┘                    └─┬─┘  │   └─┘                  │
  524.          │              │                        │    │                        │
  525.          │         ┌────┴─────┬────────┐         ├────┘                        │
  526.          │         │         c│        │        p│                             │
  527.          │    ┌────┴────┐ ┌───┴───┐    │     ┌───┴───┐                         │
  528.          │    │a_child_1│ │foreign│    └────>│b_child│                         │
  529.          │    └─────────┘ └───────┘          └───────┘                         │
  530.          │                    ^                  ∙                             │
  531.          │                    ∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙                             │
  532.          │                                                                     │
  533.          └─────────────────────────────────────────────────────────────────────┘
  534.                                 SNAV - ODD specification
  535.                                    - 17.4.90 page 15 -
  536.          
  537.          ESNAV EXAMPLE #1F
  538.          E───────────────────────────────────────────────────────────────────────F
  539.          
  540.          Objects  of  class  "direction"  may  be  safely declared.  The domain
  541.          includes  four  values.  the  domain  of class "intersection" includes
  542.          sixteen values.  An object of class intersection is an ordered set  of
  543.          (at most) four directions.  Since direction is uniquely identified  by
  544.          an integer key, the set is encoded into a single integer using bitwise
  545.          arithmetic.    From  the   user's  standpoint,  an  object   of  class
  546.          intersection virtually includes the  (zero to four) direction  objects
  547.          (to be  decoded by intersection's internal  methods, during  runtime).
  548.          "Axis" is a special case of ("inherited" from) intersection,  applying
  549.          to two of its sixteen possible values.  Class  "weight_d(istribution)"
  550.          has a domain of 16 values.  Each weight_d object includes exactly  one
  551.          axis/wgt object.   Class "axis/wgt" inherits  class axis.   Objects of
  552.          class  axis/wgt  are  not  normally  referenced outside their weight_d
  553.          context, so the class is not displayed at root level.
  554.          ┌─────────────────────────────────────────────────────────────────────┐
  555.          │                                                                     │
  556.          │             │             │             │            │              │
  557.          │           d4│          d16│             │d2          │d16           │
  558.          │        ┌────┴────┐    ┌───┴───┐     ┌───┴───┐   ┌────┴───┐          │
  559.          │        │direction│    │inter- │  ┌─>│  axis │   │weight_d│          │
  560.          │        └─────────┘    │section│  │  └───┬───┘   └────┬───┘          │
  561.          │                       └───┬───┘  │      │            │              │
  562.          │                           │      │      │            │              │
  563.          │                           ├──────┘      └──┐         │              │
  564.          │                           │                │         │              │
  565.          │                         c4│                │         │              │
  566.          │                      ┌────┴────┐           │    ┌────┴───┐          │
  567.          │                      │direction│           └───>│ axis/  │          │
  568.          │                      └─────────┘                │ weight │          │
  569.          │                                                 └────────┘          │
  570.          │                                                                     │
  571.          └─────────────────────────────────────────────────────────────────────┘
  572.                                 SNAV - ODD specification
  573.                                    - 17.4.90 page 16 -
  574.          
  575.          ESNAV EXAMPLE #2F
  576.          E───────────────────────────────────────────────────────────────────────F
  577.          
  578.          Class  "computer_alphabet"  includes  an  array of "character"s, whose
  579.          exact size is fixed during runtime.   Each character is defined by  an
  580.          "intersection" and  a "weight_d".   Only  the integer  values of these
  581.          objects are stored. It also manages an inverted file, consisting of an
  582.          array  of   sixteen  by   sixteen  integers,   representing  character
  583.          collating-sequence values.   The y-axis of  the matrix is  for encoded
  584.          intersection value, and its x-axis is for encoded weight_d value.
  585.          ┌─────────────────────────────────────────────────────────────────────┐
  586.          │                                                                     │
  587.          │                                       │                             │
  588.          │                                       │p*                           │
  589.          │                                   ┌───┴────┐                        │
  590.          │                                   │computer│                        │
  591.          │                                   │alphabet│                        │
  592.          │                                   └───┬────┘                        │
  593.          │                                       │                             │
  594.          │                            ┌──────────┴────────┐                    │
  595.          │                          d*│                c16│                    │
  596.          │                          ┌─┴──┐          ┌─────┴──────┐             │
  597.          │            ∙∙∙∙∙∙∙∙∙∙∙∙∙∙│char│      ∙∙∙>│intersection│             │
  598.          │            ∙             └─┬──┘      ∙   └────────────┘             │
  599.          │            ∙     ∙∙∙∙∙∙∙∙∙∙│∙∙∙∙∙∙∙∙∙∙         │                    │
  600.          │            ∙     ∙  ┌──────┴─────┐             │                    │
  601.          │            ∙     ∙ c│           c│          c16│                    │
  602.          │            ∙  ┌─────┴──────┐ ┌───┴────┐    ┌───┴────┐               │
  603.          │            ∙  │intersection│ │weight_d│∙∙∙>│weight_d│               │
  604.          │            ∙  └────────────┘ └────────┘    └───┬────┘               │
  605.          │            ∙                                   │                    │
  606.          │            ∙                                   │                    │
  607.          │            ∙                                   │                    │
  608.          │            ∙                                 ┌─┴──┐                 │
  609.          │            ∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙>│char│                 │
  610.          │                                              └────┘                 │
  611.          │                                                                     │
  612.          └─────────────────────────────────────────────────────────────────────┘
  613.                                 SNAV - ODD specification
  614.                                    - 17.4.90 page 17 -
  615.          
  616.          ESNAV EXAMPLE #3F
  617.          E───────────────────────────────────────────────────────────────────────F
  618.          
  619.          The  abstract  class  "panel"  includes  one  "point"  object  (cursor
  620.          position),  one  "direction  object"  (cursor  direction), two "color"
  621.          objects (current  and default  pallets), and  one "square_pos" object.
  622.          An  object  of  class  "square_pos"  determines  window dimensions, by
  623.          including two "point_pos" objects (top-left and bottom-right corners).
  624.          As the number of occurrences  indicates, "panel" is an abstract class,
  625.          intended to be implemented by the user, suiting some specific  device,
  626.          using polymorphic inheritance.
  627.          ┌─────────────────────────────────────────────────────────────────────┐
  628.          │                                                                     │
  629.          │                                │                       │            │
  630.          │                              p0│<∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙│p*          │
  631.          │                             ┌──┴──┐                   ┌┴┐           │
  632.          │                             │panel│                ┌─>│?│           │
  633.          │                             └──┬──┘                │  └─┘           │
  634.          │                                │                   │                │
  635.          │               ┌───────────┬────┴────┬─────────┬────┘                │
  636.          │               │           │       d2│         │                     │
  637.          │          ┌────┴────┐ ┌────┴────┐ ┌──┴──┐ ┌────┴─────┐               │
  638.          │          │point_pos│ │direction│ │color│ │square_pos│               │
  639.          │          └─────────┘ └─────────┘ └─────┘ └────┬─────┘               │
  640.          │                                               │                     │
  641.          │                                               │                     │
  642.          │                                             d2│                     │
  643.          │                                          ┌────┴────┐                │
  644.          │                                          │point_pos│                │
  645.          │                                          └─────────┘                │
  646.          │                                                                     │
  647.          └─────────────────────────────────────────────────────────────────────┘
  648.          
  649.          
  650.