Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Validation of Parameter Subsets in Commands

IP.com Disclosure Number: IPCOM000112996D
Original Publication Date: 1994-Jun-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 4 page(s) / 109K

Publishing Venue

IBM

Related People

Housel, BC: AUTHOR

Abstract

Disclosed is a technique for specifying different parameter subsets in a command. Using this specification, a table-driven parser verifies: (a) that all parameters coded in a command are valid; and (b) that all required parameters are present.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Validation of Parameter Subsets in Commands

      Disclosed is a technique for specifying different parameter
subsets in a command.  Using this specification, a table-driven
parser verifies:  (a) that all parameters coded in a command are
valid; and (b) that all required parameters are present.

      Frequently, commands may contain a number of parameters in
which certain subsets are legal and other subsets are not.  For
example, in Fig. 1 the command "ADD" is used to add users and
transactions.  The parameter sets for users and transactions are
different.  Specifying a transaction identifier (TRANID) for a user
is an error; similarly, coding a Social Security Number (SSN) for a
transaction is invalid.

      In general, as shown in Fig. 2, different parameter sets may
contain common parameters and unique parameters.  The command shown
in Fig. 2 has parameters A, B, C, D, E, and F.  These parameters are
grouped into three parameter sets.

      Some of the valid sets of parameters that may legally occur in
this command are:  [B,E], [A,B,E], and [A,B,C,D].  By contrast, the
following parameter sets are illegal:  [D,E], [C,D,F], and [C,D,E].
An additional factor is optionality.  For example, parameter A may be
required in parameter sets 1 and 2 but be optional in parameter set
3.

      When more than one parameter set is possible for a command, the
command syntax scan is not sufficient to signal when an invalid
parameter has been specified or when a required parameter has been
omitted.  This disclosure defines how various subsets of parameters
can be grouped into parameter sets.  These parameter sets are used to
define legal groupings of the command parameters.

      The table-driven command processor contains a parameter table
for each command.  The Parameter Table (PT) contains one row for each
parameter defined for the command.  PT[c]  denotes the current
parameter table entry being processed.  Parameters sets are defined
using Parameter Set bit Vectors (PSVs).  Each bit in a PSV denotes
parameter set.  The length of the PSV equals the maximum allowed
number of parameter sets.  Two PSV attributes are defined for each
parameter definition:  V_PSV and R_PSV.  V_PSV[j,k]=1 if parameter j
is in parameter set k; R_PSV[j,k]=1 if parameter j is required for
parameter set k.

      In Fig. 1, let the "transaction" and "user" parameters be
assigned to parameter sets 1 and 2, respectively.  The positional
parameter and the keyword parameter ACCTNO are in parameter sets 1
and 2; thus, their V_PSV is 11B (note: b...bB, where "b" is 0 or 1,
is a bit-vector constant).  The V_PSV of the trans...