home *** CD-ROM | disk | FTP | other *** search
- < the╔══╗╔══╗╔ ╔
- ║ ╙╢ ╙╢ ║ █
- ║ ║ ║ ╔═══╗ ╠═ ╔═══╗╔ ╔═══╗║ ╔ ╔═══╗╔ ╔═══╗╔ ╓─╖ ╔═══╗╔ ╔═╗╔═╗╔
- ║ ║ ║ ║ ║ ║ ║ ╙╢ ║ ╙╢ ║ ║ ╙╢ ║ ╙╢ ║╓╜ ║ ╙╢ ║ ╙╢ ╙╢
- ║ ║ ║┌╫───╜ ║ ┌╢ ║┌╢ ║ ║┌╢ ║┌╢ ║ ║║ ┌╢ ║ ║ ║ ║
- ║ ║ ║│║ ╓─╢ │║ ╓╢│║ ╓╢ ║│║ ╓╢│║ ╓╢ ║║ │║ ╓╢ ║ ║ ║
- ╜ ╨ ╙┘╚═══╝ ╚═╛╚═══╝╙┘╚═══╝╙─╨┘╚═══╝╙┘╚═══╝║┌╜╙─┘╚═══╝╙─╜ ╨ ║
- ╓────╫┘ ║
- ╓─────────────────────────────────────────╚════╝──────────────────╜
- ╙─── architecture
-
- (software foundation)
- SNAV - data model
- - 16.4.90 page 1 -
-
- ┌───────┐
- ─────────>│ AVNER │
- ─────────>│ BEN │──────> Software Engineering Method
- └───────┘
- 10 Dov-Hoz st. Tel-Aviv 63416 Israel tel. 972-3-221535
-
-
-
-
-
-
-
-
-
-
-
- ┌─────────────────────────────────────────────────┐
- │ "The Screen NAVigator" │
- │ │
- │ DATA MODEL DESCRIPTION │
- │ │
- │ Version 1.00, April 1990. │
- └─────────────────────────────────────────────────┘
-
- Copyright (c) 1990 by Avner Ben.
-
-
-
-
-
-
- Written by Avner Ben
- 13 April 1990.
- SNAV - data model
- - 16.4.90 page 2 -
-
- ENOTATIONF
- E───────────────────────────────────────────────────────────────────────F
-
- the following specification makes extensive use of Entity-Relationship
- diagrams (ER).
-
- The ER notation follows the one used by IBM in the
- Repository-Manager/MVS ER DDL. My usage of this notation has nothing
- to do with that specific software product. I have simply found the
- particular data model a convenient basis for the type of
- transformation suggested by OOD in general, and the logic of my
- MetaDiagram system in particular. (See IBM Corporation's RM/MVS
- documentation for syntax specification).
-
- I have used the ER model described below as a "logical specification",
- from which I decomposed the working data model, using a private
- notation that I call Object-Dependency Diagram (ODD). For syntax
- specification, refer to file "notation.prn". The method I used for
- the decomposition is similar to decomposing an hierarchical database
- model from a conventional ER.
-
- The following document describes only the abstract data model. The
- decomposition is reserved for a more thorough document. For the
- resulting operational model, refer to file "snav.prn" and the source
- code.
- SNAV - data model
- - 16.4.90 page 3 -
-
- ETHE SNAV ABSTRACT DATA MODELF
- E───────────────────────────────────────────────────────────────────────F
-
- The diagram below displays an overall view of the "entities" taking an
- essential part in the SNAV system, and the important "relationships",
- in which they play a role. This is a conceptual view. The real
- system (to be discussed later) is somewhat more detailed.
- ┌─────────────────────────────────────────────────────────────────────┐
- │ │
- │ ┌─────────┐ │
- │ │DIRECTION│ │
- │ │ value │ │
- │ │ name │ │
- │ └─────────┘ │
- │ m^M │
- │ set of │ (in) │
- │ │ │
- │ m│M │
- │ ┌─────────────────┐ ┌─────┴──────┐ divides ┌──────┐ │
- │ │COMPUTER_ALPHABET│ │INTERSECTION│1 space_on 1│AXIS │ │
- │ │ name │ │ value ├──────────────────>│ value│ │
- │ │ num_chars │ │ meaning │M (defined_by) │ name │ │
- │ └────────┬────────┘ └─────┬──────┘ └──────┘ │
- │ m│ m│ │
- │ │ (included │ │ │
- │ includes │ in) has │ (makes │ │
- │ │ │ visible) │ │
- │ │1 is_semigraphic 1│1 distributed on │ │
- │ ├────────────────────>├─────────────────────────────┘ │
- │ │ │ (plots) │
- │ mVO mV │
- │ ┌─────────┐ ┌──────┐ │
- │ │CHARACTER│ │WEIGHT│ │
- │ │ │ │ width│ │
- │ │ │ │ │ │
- │ └─────────┘ └──────┘ │
- │ │
- └─────────────────────────────────────────────────────────────────────┘
- SNAV - data model
- E THE SNAV ABSTRACT DATA MODELF
- - 16.4.90 page 4 -
-
- The SNAV system is a character-oriented formatted-output driver, where
- graphics is restricted to character-graphics. The overall package
- supplies two kinds of services: pattern drawing and pattern
- recognition. Most of this early release is dedicated to the first
- service. The latter is currently supplied in rudimentary form. the
- majority of the software, however, is dedicated to primitives, used by
- both services. There is no unique projecting logic and unique
- scanning logic. Both services draw their power from different
- combinations of the same toolkit of primitives.
-
- Snav's graphics are essentially vector-graphics. That is, shapes are
- generated by cursor in motion. There is no such thing as drawing an
- oblong between four points. What Snav does is putting the cursor at
- some corner, and then moving in some direction, leaving a trail of
- pixels, changing directions at each corner. That means, that
- everything on the output panel must either be capable of generating
- motion - called "semigraphic" - or is ignored. When the line visits a
- cell which is already in motion, "welding" of lines will occur. \e
- This complex notion has been implemented as a database, in the
- following general way: some characters of the alphabet have a dual
- meaning: they are also serve as "semigraphic". Such a character may
- also be considered as a discrete graphic element. A semigraphic is
- associated with an "intersection" - a set of one or more "directions"
- on the plain. A semigraphic is also associated with a "weight".
- Weight is distributed on the two axes (dimensions) of the plain (SNAV
- assumes weight to be uniform over an axis!). An axis may be reduced
- to a private case of intersection, simplifying the design somewhat.
-
- All in all, we can see a division between two subsystems: the right
- half of the diagram, dealing with the abstract notion of "character
- geometry", and the left half, dealing with the application of the
- former to the concrete world of character drawing. The first topic is
- treated by the code in "snav0", and the second, by "snav1". The
- entities in "snav2' and "snav3" are not represented in the model
- above.
-
- following is an account of the entities involved:
- SNAV - data model
- E THE SNAV ABSTRACT DATA MODELF
- - 16.4.90 page 5 -
-
- DIRECTION(-1dirval-0,dirname).
-
- Answers the question "which way are we going?". A point on the output
- panel is of interest to Snav, only if the group of pixels currently
- occupying it "connects" in (at least) some direction. Such a graphic
- element has the potential to unite with the neighboring cell, if that
- connects in exactly the opposite direction. When a number of
- semigraphic elements happen to be adjacent, and they connect in the
- proper directions, a semigraphic shape emerges to the eye. Obviously,
- the management of directions is a key issue in Snav. A direction is
- recognized by integer value, and has a name. The domain of names
- include exactly 5 values: "Right", "Up", "Down" and "Left" and the
- null direction (added to recognize nonsemigraphic characters). The
- entity is addressed by enumerated key rather than by name, to
- facilitate efficient grouping by "intersection" (see below). The set
- of values is ordered, not only for the same reason, but also to
- acknowledge what seems to me like a "natural" priority for scanning
- semigraphic shapes, based upon some experience with simple animation.
-
- INTERSECTIONS(-1intval-0,intmean).
-
- Intersection is simply an ordered set of directions. Its purpose is
- to represent the motion part of a semigraphic. "These are the
- directions we can move in from here". An intersection is addressed by
- an integer value, computed by bitwise OR'ing of the directions
- included. This saves the need to physically store the directions in
- the implementation of intersection, and also gives it a unique key.
- The 4 directions of the plain make for 16 values of intersection, to
- which is added the null intersection. These may be grouped according
- to intersection type, or "meaning": "arrows" have one direction,
- "corners" and "dashes" have two directions, "forks" have three
- directions, and the "cross" has all the four directions.
-
- WEIGHTS(-1width-0).
-
- A weight is an integer value, associated with an intersection, to
- create a semigraphic. Where the intersection determines the symbol's
- function, the weights (there may be a number of them) make it visible.
- Each weight, associated with an intersection, must also be associated
- with an axis. Since there at most two of these on the plane, then a
- planar semigraphic may have at most two weights. The values used for
- weight are 0-3. 1 and 2 mean exactly that (single and double line). 3
- is used for the "full" thickness line. 0 is used for
- "TypeWriter-Graphics" - course semigraphics, using simple characters.
-
- AXIS(-1intval-0,axval,axname).
-
- Character weight is associated with the two axes of the plane,
- respectively. The Axis may be reduced to private case of ("inherited"
- from) intersection. "Horizontal" (or "y") is a special case of the
- intersection {Right,Left}, and "Vertical" (or "x") is a case of
- {Up,Down}. Note that the relationship between intersection and axis
- does not necessarily apply to same occurrence as the transitive
- relationship between intersection and weight and (then) axis.
- SNAV - data model
- E THE SNAV ABSTRACT DATA MODELF
- - 16.4.90 page 6 -
-
- COMPUTER_ALPHABET(-1name-0,numchars)
-
- A computer alphabet consists of an ordered set of characters. Some
- characters in the current alphabet may become semigraphic, by being
- associated with some intersection and a set of weights (one axis at a
- time). We require to know the maximum number of characters in
- advance, and we do not expect it to change afterwards.
-
- CHARACTER(-1charname-0).
-
- The character, in Snav, is a decadent entity. Actually, Snav does not
- even store the character's name, or any other qualities. The reason
- for this is that Snav does not actually generate characters. It
- counts on the host device to do that, supplied with the character's
- serial number within the current alphabet ("collating sequence",
- "code-set"). It is retained in the design document, for vendors of
- pixel-oriented graphics to elaborate on.
- SNAV - data model
- - 16.4.90 page 7 -
-
- ETHE OPERATIONAL DATA MODELF
- E───────────────────────────────────────────────────────────────────────F
-
- The working data model, on ER level, retains much of the conceptual
- model, with two minor extensions: the transitive relationship between
- intersection and weight and axis has been replaced with the extra
- entity "weight_distribution". "weight" actually stands for the
- attributed relationship "axis/weight" (and is implemented that way).
- The dotted line between alphabet and the semigraphic relationship
- stands for an inverted access path, added to the implementation of
- alphabet.
-
- Other refinements: Some "many" roles have been changed to "1", to
- reflect the fact that the inverse access path has not been
- implemented. The fact is also reflected by removal of all unused
- inverse role names.
- ┌─────────────────────────────────────────────────────────────────────┐
- │ │
- │ ┌─────────┐ │
- │ │DIRECTION│ │
- │ │ value │ │
- │ │ name │ │
- │ └─────────┘ │
- │ 1^M │
- │ set of │ │
- │ │ │
- │ m│M │
- │ ┌─────────────────┐ ┌─────┴──────┐ divides ┌──────┐ │
- │ │COMPUTER_ALPHABET│ │INTERSECTION│1 space_on 1│AXIS │ │
- │ │ name │ │ value ├──────────────────>│ value│ │
- │ │ num_chars │∙∙ │ meaning │M │ name │ │
- │ └────────┬────────┘ ∙ └─────┬──────┘ └──────┘ │
- │ 1│ includes ∙∙∙∙∙∙∙∙>│1 1^M │
- │ │ semigraphic │ │ │
- │ includes │ has │ │ │
- │ │ │ │ │
- │ │1 is_semigraphic 1│1 distributed │ │
- │ ├──────────────────>│ on │ │
- │ │ │ │ │
- │ mVO mV 1│ │
- │ ┌─────────┐ ┌───────────────────┐ ┌──┴───┐ │
- │ │CHARACTER│ │WEIGHT_DISTRIBUTION│1 divided_to m│WEIGHT│ │
- │ │ │ │ value ├───────────────>│ width│ │
- │ │ │ │ │ M│ │ │
- │ └─────────┘ └───────────────────┘ └──────┘ │
- │ │
- └─────────────────────────────────────────────────────────────────────┘
-