Design: 04.02.04.02/P08

This is an abstract, language-independent design. Grim details may be found in the corresponding source code. You may return to the documentation for the module containing this program design, or to the entire hierarchical table of topics covered by the PVT.


PROGRAM 8: Network inheritance and initialization of text index

CHARACTERISTICS: ynny

OPERATOR SCRIPT:

STRUCTURE NETWORK INHERITANCE FOR TEXT INDEX: This screen
displays several left-right pairs of annotation text relative primitives.
Make sure that all pairs except one have matching font, precision,
expansion, spacing, and color.  Identify the non-matching pair.

DESIGN:

All test cases use same basic structure network for testing
inheritance.  Five (distinct if possible) values for the
attribute to be tested are set up and propagated throughout the
network.  The first value is the system default from the PDT.
Note that structure #104 is executed by both #103 and #101.
Actual results are displayed on the left, expected results
on the right, with the 14th deliberately made incorrect.

default = val#1
  |                  102
  |                 /  prim 2
  |               /    attr = val#3   val#3
  V        val#1/      exec 103---------------103
101           /        prim 8                   prim 3
  prim 1    /                                   attr = val#4
  exec 102/                                     prim 4
  prim 9                                        exec 104\
  attr = val#2                                  prim 7    \ val#4
  prim 10                                                   \
  transform             val#2                                 \
  exec 104-----------------------------------------------------104
  un-transform                                                   prim 5/11
  prim 13                                                        attr = val#5
  prim 14                                                        prim 6/12
  exec 105---------->105
                       expected values


set all ASFs to BUNDLED

*** *** ***   inheritance for text index   *** *** ***

call DISCOL to try to get 5 distinct foreground colors,
  returning fcol = actual number of foreground colors
colind(1:5) = [1,2,3,4,5]
if (fcol < 5) then
   copy 1st valid part of list to tail of list
endif

set up bundles 1-5:

   bundle
   index    font  precision  expansion  spacing  color
   ------   ----  ---------  ---------  -------  -----
     1        1   STROKE         1.0       0.0   colind(1)
     2        2   STROKE         1.0       0.3   colind(2)
     3        1   STROKE         0.7       0.3   colind(3)
     4        2   STROKE         0.7       0.0   colind(4)
     5        1   STROKE         1.3       0.0   colind(5)

randomize location of annotation text relative primitives

set up CSS as described above

display 14 pairs of annotation text primitives, "ABC", using bundles 1-5

TEST: #SR 1 3 4 6 7
      "The text index should be saved and restored by
       <execute structure> during traversal."

OPQA/STRUCTURE NETWORK INHERITANCE FOR TEXT INDEX:
  which pair of annotation text relative primitives does NOT match?
pass/fail depending on (response = position of text 14)

END PROGRAM 8