Design: 04.03.04.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: Current nameset during conceptual traversal

CHARACTERISTICS: nnnn

OPERATOR SCRIPT: passive test.

DESIGN:

Throughout, incremental spatial search (ISS) is used to probe the
behavior of the current nameset.  It always searches for a
primitive at location 1,1,1.  Its filters are set to accept only
the expected nameset.

<inquire PHIGS facilities> to determine
  nanams = number of available names in namesets

maxnam = min (nanams, 100)
maxnam is used by ISS to generate the correct filters

Set up structure #101:
1. add names to set: 3,4,5,9
2. execute structure 102
3. remove names from set: 4,6
4. execute structure 102

Set up structure #102:
1. polymarker at 1,1,1
2. remove names from set: 5,6,7,8
3. add names to set: 1,2,8,9
4. polymarker at 1,1,1

TEST: #SR 1 4 11 15
      "The current name set should be initialized to the null set
       at the start of traversal."

perform ISS with:
  starting path:       102,0
  expected found path: 102,1
  expected nameset:    empty

pass/fail depending on (primitive found at expected location
  and nothing found beyond that location)

TEST: #SR 1 4 11 12 13 15
      "The current name set should be augmented by <add names to
       set> and reduced by <remove names from set> during
       traversal within a structure."

perform ISS with:
  starting path:       102,0
  expected found path: 102,4
  expected nameset:    1,2,8,9

pass/fail depending on (primitive found at expected location
  and nothing found beyond that location)

TEST: #SR 1 4 11 12 13 15
      "The current name set should be inherited unchanged from an
       invoking structure during traversal."

perform ISS with:
  starting path:       101,0
  expected found path: 101,2, 102,1
  expected nameset:    3,4,5,9

pass/fail depending on (primitive found at expected location
  and nothing found beyond that location)

TEST: #SR 1 4 11 12 13 15
      "The current name set should be inherited unchanged from an
       invoking structure during traversal and then modified by
       <add names to set> and <remove names from set> within the
       structure."

perform ISS with:
  starting path:       101,0
  expected found path: 101,2, 102,4
  expected nameset:    1,2,3,4,8,9

pass/fail depending on (primitive found at expected location
  and nothing found beyond that location)

TEST: #SR 1 4 11 12 13 14 15
      "After sub-traversal of the network specified by <execute
       structure>, the current name set should be restored to the
       value it had just prior to the sub-traversal."

perform ISS with:
  starting path:       101,0
  expected found path: 101,4, 102,1
  expected nameset:    3,5,9

pass/fail depending on (primitive found at expected location
  and nothing found beyond that location)

TEST: #SR 1 4 11 12 13 14 15
      "The current nameset should reflect all the effects of
       traversal: inheritance, restoration after sub-traversal,
       and additions and removals within the current structure."

perform ISS with:
  starting path:       101,0
  expected found path: 101,4, 102,4
  expected nameset:    1,2,3,8,9

pass/fail depending on (primitive found at expected location
  and nothing found beyond that location)


C  Set up structure #103:
C  1. add names to set: 0, 1, max+1, -1
C  2. polymarker at 1,1,1
C  3. remove names from set: 1, max+11, -10
C  4. polymarker at 1,1,1

TEST: #SR 1 10 11 12 15 16
      "The current name set should be augmented by the valid names
       specified by <add names to set> during traversal within a
       structure, and invalid names should be ignored."

perform ISS with:
  starting path:       103,0
  expected found path: 103,2
  expected nameset:    0,1

pass/fail depending on (primitive found at expected location
  and nothing found beyond that location)

TEST: #SR 4 10 11 13 15 16
      "The current name set should be reduced by the valid names
       specified by <remove names from set> during traversal within
       a structure, and invalid names should be ignored."

perform ISS with:
  starting path:       103,0
  expected found path: 103,4
  expected nameset:    0

pass/fail depending on (primitive found at expected location
  and nothing found beyond that location)

END PROGRAM 3