definition of ConstraintSet and concepts for the algorithm

Combining the existing text and ideas from Harald and Martin, I've come 
up with the following definitions to go with the algorithm in the 
current text.  Let me know what you think.

  * We refer to each immediate attribute of a ConstraintSet (as defined
    by HasOwnProperty) as a 'constraint' since it is intended to
    constrain the corresponding Capability of the Constrainable object
    to a value that is within the range or list of values it specifies.
  * We refer to the "effective Capability" C of an object O as the
    possibly proper subset of the possible values of C (as returned by
    getCapabilities) taking into consideration environmental limitations
    and/or restrictions placed by other constraints. For example given a
    ConstraintSet that constrains Capabilities aspectRatio, height and
    width, the values assigned to any two of the Capabilities limit the
    effective Capability of the third. The set of effective Capabilities
    may be platform dependent. For example, on a resource-limited device
    it may not be possible to set Capabilities C1 and C2 both to 'high',
    while on another less limited device, this may be possible.
  * A set of values for the Capabilities of an object O satisfy
    ConstraintSet CS if each value a) is in the range of the
    corresponding effective Capability of O, and b) is in the range or
    list of values specified by the corresponding constraint in CS, if
    there is one, and c) there is no constraint in CS that does not
    correspond to a Capability of O. (Note that although this definition
    ignores the difference between mandatory and optional
    ConstraintSets, the algorithm below distinguishes between them.)
  * A set of ConstraintSets CS1...CSn (n >= 1) can be satisfied by an
    object O if it is possible to choose a sequence of values for the
    Capabilities of O that satisfy CS1...CSn simultaneously.
  * To apply a set of ConstraintSet CS1...CSn  to object O is to choose
    such a sequence of values that satisfy CS1...CSn and assign them as
    the settings for the properties of O.

When |applyConstraints| is called, the UA /must/ queue a task to run the 
following steps:.etc. .

-- 
Jim Barnett
Genesys

Received on Friday, 7 February 2014 19:27:24 UTC