Design: 04.03.01/P03
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 3: Network inheritance and initialization of ASFs
CHARACTERISTICS: ynny
OPERATOR SCRIPT:
ASF DEFAULT: The screen should display a single polymarker, whose
type is either plus (+) or circle (O). Indicate which is shown
(as usual, if neither, enter 0).
STRUCTURE NETWORK INHERITANCE FOR POLYLINE ASFS: The screen
displays several left-right pairs of polylines. Make sure that
all pairs except one have matching linetypes, linewidths, and
color. Identify the non-matching pair.
STRUCTURE NETWORK INHERITANCE FOR POLYMARKER ASFS: The screen
displays several left-right pairs of polymarkers. Make sure that
all pairs except one have matching markertypes, markerwidths, and
color. Identify the non-matching pair.
STRUCTURE NETWORK INHERITANCE FOR TEXT ASFS: The screen displays
several left-right pairs of text primitives. Make sure that all
pairs except one have matching fonts, precisions, expansions,
spacings, and color. Identify the non-matching pair.
STRUCTURE NETWORK INHERITANCE FOR INTERIOR STYLE ASF: The screen
displays several left-right pairs of fill areas. Make sure that
all pairs except one have matching inetrior style (either HOLLOW
or EMPTY). Identify the non-matching pair.
STRUCTURE NETWORK INHERITANCE FOR INTERIOR STYLE INDEX ASF: The
screen displays several left-right pairs of fill areas. Make
sure that all pairs except one have matching hatch styles or
patterns. Identify the non-matching pair.
STRUCTURE NETWORK INHERITANCE FOR INTERIOR COLOR ASF: The screen
displays several left-right pairs of fill areas. Make sure that
all pairs except one have matching interior styles and color.
Identify the non-matching pair.
STRUCTURE NETWORK INHERITANCE FOR EDGE FLAG ASF: The screen
displays several left-right pairs of fill areas. Make sure that
all pairs except one have matching edge flags (ON or OFF).
Identify the non-matching pair.
STRUCTURE NETWORK INHERITANCE FOR EDGE ASFS: The screen displays
several left-right pairs of fill areas. Make sure that all pairs
except one have matching edgetypes, edgewidths, and color.
Identify the non-matching pair.
DESIGN:
call DISCOL to try to get 2 distinct foreground colors
TEST: #SR 5 7 8 9
"The implementation should initialize the ASF for markertype
to individual or bundled."
Determine whether individual or bundled is the default (no ASFs
set yet):
indmrk = individual markertype = plus or circle, randomly
bunmrk = bundled markertype = circle or plus, opposite of indmrk
set individual attribute:
markertype = indmrk
markerwidth = 0.1 in WC
set bundle #1 to:
markertype = bunmrk, markerwidth = 0.1 in WC, markercolor = 1
display a polymarker
OPQA/ASF DEFAULT: Is the displayed marker: 1-plus or 2-circle?
opans = operator response
if (opans = 0) then
fail
message: cannot determine ASF default
goto to done
endif
pass
if (opans = indmrk) then
asfdef = ASF default = INDIVIDUAL
message: default is INDIVIDUAL
else
asfdef = ASF default = BUNDLED
message: default is BUNDLED
endif
oppdef = opposite of asfdef
All the rest of the 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
*** *** *** inheritance for polyline ASFs *** *** ***
asftab = ASF table:
linetype linewidth color
-------- --------- -----
1: asfdef asfdef asfdef
2: individual bundled individual
3: oppdef oppdef oppdef
4: bundled individual bundled
5: asfdef asfdef oppdef
Make individual and bundled as distinct as possible:
set individual attributes:
linetype = dotted, linewidth = .03 in WC, linecolor = 1
set bundle #1 to:
linetype = dashed, linewidth = .001 in WC, linecolor = 2
randomize order of polylines
set up CSS as described above
display 14 pairs of polylines, using ASF entries 1-5
TEST: #SR 4 5 6 7 8 9 10 11
"The polyline ASFs should be saved and restored by
<execute structure> during traversal."
OPQA/STRUCTURE NETWORK INHERITANCE FOR POLYLINE ASFS:
which pair of lines does NOT match?
pass/fail depending on (response = position of line #14)
*** *** *** inheritance for polymarker ASFs *** *** ***
asftab = ASF table:
markertype markerwidth color
-------- --------- -----
1: asfdef asfdef asfdef
2: individual bundled individual
3: oppdef oppdef oppdef
4: bundled individual bundled
5: asfdef asfdef oppdef
Make individual and bundled as distinct as possible:
set individual attributes:
markertype = cross, markerwidth = .04 in WC, markercolor = 1
set bundle #1 to:
markertype = circle, markerwidth = .02 in WC, markercolor = 2
randomize order of polymarkers
set up CSS as described above
display 14 pairs of polymarkers, using ASF entries 1-5
TEST: #SR 4 5 6 7 8 9 10 11
"The polymarker ASFs should be saved and restored by
<execute structure> during traversal."
OPQA/STRUCTURE NETWORK INHERITANCE FOR POLYMARKER ASFS:
which pair of markers does NOT match?
pass/fail depending on (response = position of marker #14)
*** *** *** inheritance for text ASFs *** *** ***
asftab = ASF table:
font precision expansion spacing color
---- --------- --------- ------- -----
1: asfdef asfdef asfdef asfdef asfdef
2: individ bundled individ bundled individ
3: oppdef oppdef oppdef oppdef oppdef
4: bundled individ bundled individ bundled
5: bundled individ individ individ bundled
Make individual and bundled as distinct as possible:
set individual attributes:
font=2, precision=STROKE, expansion=0.5, spacing=0.3, color=2
set bundle #1 to:
font=1, precision=STRING, expansion=1.2, spacing=-0.3, color=1
randomize order of text
set up CSS as described above
display 14 pairs of text primitives, using ASF entries 1-5
TEST: #SR 4 5 6 7 8 9 10 11
"The text ASFs should be saved and restored by
<execute structure> during traversal."
OPQA/STRUCTURE NETWORK INHERITANCE FOR TEXT ASFS:
which pair of text primitives does NOT match?
pass/fail depending on (response = position of text #14)
*** *** *** inheritance for interior style ASF *** *** ***
set edge flag = OFF
asftab = ASF table: (this combination judged most likely to catch
a failure)
interior style
--------------
1: asfdef
2: oppdef
3: oppdef
4: asfdef
5: oppdef
Make individual and bundled as distinct as possible:
set individual attributes: interior style = hollow
set bundle #1 to: interior style = empty
randomize order of interiors
set up CSS as described above
display 14 pairs of interiors, using ASF entries 1-5
TEST: #SR 4 5 6 7 8 9 10 11
"The interior style ASF should be saved and restored by
<execute structure> during traversal."
OPQA/STRUCTURE NETWORK INHERITANCE FOR INTERIOR STYLE ASF:
which pair of interiors does NOT match?
pass/fail depending on (response = position of interior #14)
*** *** *** inheritance for interior style index ASF *** *** ***
set edge flag = OFF
if (HATCH available) then
thisis = this interior style = HATCH
iix1,iix2 = two available hatch styles
elseif (PATTERN available) then
thisis = this interior style = PATTERN
iix1,iix2 = 1,2
define patterns 1,2 as distinct
else
message: cannot test interior style index
goto end_int_index
endif
asftab = ASF table: (this combination judged most likely to catch
a failure)
interior style index
--------------------
1: asfdef
2: oppdef
3: oppdef
4: asfdef
5: oppdef
Make individual and bundled as distinct as possible:
set individual attributes:
interior style=thisis, interior style index=iix1
set bundle #1 to:
interior style=thisis, interior style index=iix2, color=2
randomize order of interior indices
set up CSS as described above
display 14 pairs of interior indices, using ASF entries 1-5
TEST: #SR 4 5 6 7 8 9 10 11
"The interior style index ASF should be saved and restored by
<execute structure> during traversal."
OPQA/STRUCTURE NETWORK INHERITANCE FOR INTERIOR STYLE INDEX ASF:
which pair of interiors does NOT match?
pass/fail depending on (response = position of interior #14)
end_int_index:
*** *** *** inheritance for interior color ASF *** *** ***
set edge flag = OFF
ints1 = 1st interior style = HOLLOW
if (SOLID available) then
ints2 = 2nd interior style = SOLID
elseif (HATCH available) then
ints2 = 2nd interior style = HATCH
else
ints2 = 2nd interior style = HOLLOW
endif
asftab = ASF table:
style color
----- -----
1: asfdef asfdef
2: asfdef oppdef
3: oppdef oppdef
4: oppdef asfdef
5: oppdef oppdef
Make individual and bundled as distinct as possible:
set individual attributes: style=ints1, color=2
set bundle #1 to: style=ints2, color=1
randomize order of interiors
set up CSS as described above
display 14 pairs of interiors, using ASF entries 1-5
TEST: #SR 4 5 6 7 8 9 10 11
"The interior colour ASF should be saved and restored by
<execute structure> during traversal."
OPQA/STRUCTURE NETWORK INHERITANCE FOR INTERIOR COLOR ASF:
which pair of interiors does NOT match?
pass/fail depending on (response = position of interior #14)
*** *** *** inheritance for edge flag ASF *** *** ***
set interior style = EMPTY
asftab = ASF table: (this combination judged most likely to catch
a failure)
edge flag
---------
1: asfdef
2: oppdef
3: oppdef
4: asfdef
5: oppdef
Make individual and bundled as distinct as possible:
set individual attributes: edge flag=ON
set bundle #1 to: edge flag=OFF
randomize order of edges
set up CSS as described above
display 14 pairs of edges, using ASF entries 1-5
TEST: #SR 4 5 6 7 8 9 10 11
"The edge flag ASF should be saved and restored by
<execute structure> during traversal."
OPQA/STRUCTURE NETWORK INHERITANCE FOR EDGE FLAG ASF:
which pair of edges does NOT match?
pass/fail depending on (response = position of edge #14)
*** *** *** inheritance for edge aspects ASFs *** *** ***
set interior style = EMPTY
set edge flag = ON
asftab = ASF table:
edgetype edgewidth color
-------- --------- -----
1: asfdef asfdef asfdef
2: individual bundled individual
3: oppdef oppdef oppdef
4: bundled individual bundled
5: asfdef asfdef oppdef
Make individual and bundled as distinct as possible:
set individual attributes:
edgetype = dotted, edgewidth = .03 in WC, edgecolor = 1
set bundle #1 to:
edgetype = dashed, edgewidth = .001 in WC, edgecolor = 2
randomize order of edges
set up CSS as described above
display 14 pairs of edges, using ASF entries 1-5
TEST: #SR 4 5 6 7 8 9 10 11
"The edge ASFs should be saved and restored by
<execute structure> during traversal."
OPQA/STRUCTURE NETWORK INHERITANCE FOR EDGE ASFS:
which pair of edges does NOT match?
pass/fail depending on (response = position of edge #14)
done:
END PROGRAM 3