Design: 06.01.02/P10

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 10: Network inheritance and initialization of modelling
            transformation

CHARACTERISTICS: ynny

OPERATOR SCRIPT:

STRUCTURE NETWORK INHERITANCE FOR LOCAL TRANSFORMATION: There
should be one asterisk marker on each line, and all but one
should be overlaid by a circle marker, their centers coincident.
Identify the single asterisk marker NOT accurately circled.

STRUCTURE NETWORK INHERITANCE FOR GLOBAL TRANSFORMATION: Same as
for STRUCTURE NETWORK INHERITANCE FOR LOCAL TRANSFORMATION,
above.

INHERITANCE OF MODELLING TRANSFORMATIONS: Same as for STRUCTURE
NETWORK INHERITANCE FOR LOCAL TRANSFORMATION, above.

DESIGN:

All test cases use same basic structure network for testing
inheritance.  Five distinct values for the transformation 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.

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

Throughout, use 2D transformations
xloc = x-MC for polymarkers, (before transformation) = 0.2

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

set up PERM to randomize position of polymarkers

set up CSS:

Structure network #101 draws actual results - the position of
asterisk polymarkers - in random order. Structure #105 draws
expected results by drawing circle markers at the expected
locations, except for polymarker 14 which is deliberately drawn
at an incorrect location.

structure #101
polymarker style = asterisk
set marker size scale factor equivalent to WC = 0.04
polymarker #1 at (xloc, y-location corresponding to PERM(1))
execute 102
polymarker #9 at (xloc, y-location corresponding to PERM(9))
postconcatenate x-shift of +0.4 to local transformation
polymarker #10 at (xloc, y-location corresponding to PERM(10))
set global transformation to make markers #11,12 distinguishable
  from #5,6
execute 104
re-set global transformation to identity
polymarker #13 at (xloc, y-location corresponding to PERM(13))
polymarker #14 at (xloc, y-location corresponding to PERM(14))
execute 105

structure #102
polymarker #2 at (xloc, y-location corresponding to PERM(2))
replace x-shift of +0.1 for local transformation
execute 103
polymarker #8 at (xloc, y-location corresponding to PERM(8))

structure #103
polymarker #3 at (xloc, y-location corresponding to PERM(3))
preconcatenate x-shift of +0.1 to local transformation
polymarker #4 at (xloc, y-location corresponding to PERM(4))
execute 104
polymarker #7 at (xloc, y-location corresponding to PERM(7))

structure #104
polymarker #5 / #11 at (xloc, y-location corresponding to PERM(5 / 11))
postconcatenate x-shift of +0.1 to local transformation
polymarker #6 / #12 at (xloc, y-location corresponding to PERM(6 / 12))

structure #105
set marker style = circle
set marker size scale factor equivalent to WC = 0.05
re-set local, global transformation to identity
All y-locations correspond to PERM as above.

Expected x-locations (except #14, deliberately incorrect):
polymarker#     x-location
-----------     ----------
01               0.2
02               0.2
03               0.3
04               0.4
05               0.4
06               0.5
07               0.4
08               0.3
09               0.2
10               0.6
11               0.6
12               0.7
13               0.6
14               0.5

TEST: #SR 4 7 8 16 17 18 19 20 21 22
      "The current local transformation should be saved and
       restored by <execute structure> during traversal."

OPQA/STRUCTURE NETWORK INHERITANCE FOR LOCAL TRANSFORMATION:
  which asterisk-marker is NOT accurately circled?
pass/fail depending on response = position of polymarker #14

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

set up PERM to randomize position of polymarkers

set up CSS:

structure #101
polymarker style = asterisk
set marker size scale factor equivalent to WC = 0.04
polymarker #1 at (xloc, y-location corresponding to PERM(1))
execute 102
polymarker #9 at (xloc, y-location corresponding to PERM(9))
replace global transformation with x-shift of +0.4
polymarker #10 at (xloc, y-location corresponding to PERM(10))
set local transformation to make markers #11,12 distinguishable
  from #5,6
execute 104
re-set local transformation to identity
polymarker #13 at (xloc, y-location corresponding to PERM(13))
polymarker #14 at (xloc, y-location corresponding to PERM(14))
execute 105

structure #102
polymarker #2 at (xloc, y-location corresponding to PERM(2))
replace global transformation with x-shift of +0.1
execute 103
polymarker #8 at (xloc, y-location corresponding to PERM(8))

structure #103
polymarker #3 at (xloc, y-location corresponding to PERM(3))
replace global transformation with x-shift of +0.2
polymarker #4 at (xloc, y-location corresponding to PERM(4))
execute 104
polymarker #7 at (xloc, y-location corresponding to PERM(7))

structure #104
polymarker #5 / #11 at (xloc, y-location corresponding to PERM(5 / 11))
replace global transformation with x-shift of +0.3
polymarker #6 / #12 at (xloc, y-location corresponding to PERM(6 / 12))

structure #105
set marker style = circle
set marker size scale factor equivalent to WC = 0.05
re-set global transformation to identity
All y-locations correspond to PERM as above.

Expected x-locations (except #14, deliberately incorrect):
polymarker#     x-location
-----------     ----------
01               0.2
02               0.2
03               0.3
04               0.4
05               0.4
06               0.5
07               0.4
08               0.3
09               0.2
10               0.6
11               0.6
12               0.5
13               0.6
14               0.5

TEST: #SR 12 15 16 17 18 19 20 21 22
      "The current global transformation should be saved and
       restored by <execute structure> during traversal."

OPQA/STRUCTURE NETWORK INHERITANCE FOR GLOBAL TRANSFORMATION:
  which asterisk-marker is NOT accurately circled?
pass/fail depending on response = position of polymarker #14

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

xloc = x-MC for polymarkers, (before transformation) = 0.1

set up PERM to randomize position of polymarkers

set up CSS:

structure #101
polymarker style = asterisk
set marker size scale factor equivalent to WC = 0.04
set global transformation = scale X by 1.5
set local transformation  = scale X by 4
polymarker #1 at (xloc, y-location corresponding to PERM(1))
execute 102
polymarker #9 at (xloc, y-location corresponding to PERM(9))
replace local transformation with x-shift of +0.1
polymarker #10 at (xloc, y-location corresponding to PERM(10))
set local transformation to make markers #11,12 distinguishable
  from #5,6: preconcatenate appropriate y-shift
execute 104
re-set local transformation: preconcatenate negative y-shift
polymarker #13 at (xloc, y-location corresponding to PERM(13))
polymarker #14 at (xloc, y-location corresponding to PERM(14))
execute 105

structure #102
polymarker #2 at (xloc, y-location corresponding to PERM(2))
set global transformation = scale X by 8
execute 103
polymarker #8 at (xloc, y-location corresponding to PERM(8))

structure #103
polymarker #3 at (xloc, y-location corresponding to PERM(3))
set local transformation = shift X by -0.05
polymarker #4 at (xloc, y-location corresponding to PERM(4))
execute 104
postconcatenate to local transformation: scale X by 1.4
polymarker #7 at (xloc, y-location corresponding to PERM(7))

structure #104
polymarker #5 / #11 at (xloc, y-location corresponding to PERM(5 / 11))
set local transformation = scale X by 0.8
polymarker #6 / #12 at (xloc, y-location corresponding to PERM(6 / 12))

structure #105
set marker style = circle
set marker size scale factor equivalent to WC = 0.05
re-set global transformation to identity
All y-locations correspond to PERM as above.

Expected x-locations (except #14, deliberately incorrect):
polymarker#    x-location    global trans    local trans
-----------    ----------    ------------    -----------
01               0.6         G = 1.5*L       L = 4*X
02               0.6         G = 1.5*4*L     L = X
03               0.8         G = 8*L         L = X
04               0.4         G = 8*L         L = X-0.05
05               0.4         G = 8*(L-0.05)  L = X
06               0.24        G = 8*(L-0.05)  L = 0.8*X
07               0.56        G = 8*L         L = 1.4*(X-0.05)
08               0.8         G = 8*L         L = X
09               0.6         G = 1.5*L       L = 4*X
10               0.3         G = 1.5*L       L = X+0.1
11               0.3         G = 1.5*(L+0.1) L = X
12               0.27        G = 1.5*(L+0.1) L = 0.8*X
13               0.3         G = 1.5*L       L = X+0.1
14               0.27        G = 1.5*L       L = X+0.1

TEST: #SR 4 8 12 15 16 17 18 19 20 21 22
      "For an executed structure, its global transformation
       should be initialized to the composite transformation of
       the invoking structure and its local transformation should
       be initialized to the identity transformation."

OPQA/INHERITANCE OF MODELLING TRANSFORMATIONS: which
   asterisk-marker is NOT accurately circled?
pass/fail depending on response = position of polymarker #14

END PROGRAM 10