Title: Constraints
1Constraints
- Constraints shape the Lawful State Space of an
object - Create polymorphisms
- Constraints on value
- Homework Read Supplementary materials Module 3
- The generic constraint
- Supplementary materials Module 6
2Attribute Value Constraint is a partition
partitioned by partition of
.......PARTITION
Is a subtype of
Subtyping Criteria
Is a subtype of
Partition based on State
Attribute Value Constraint (Partition based on
value of a single property)
Is a subtype of
Is a subtype of
Inclusion Set
Exclusion Set
Partition of a partition based on
Inclusion/Exclusion of states
3VALUE SET
Union of 1 or more
STATEFUL SUBSET OF A DOMAIN
Value Set
VALUE SET
4NOMINAL DOMAINS
Irreducible fact normalized by inclusion set
- Inclusion set
- Property may take any value in inclusion set, and
no other. Eg - Person may only be Male or Female
- Playing card may only be Joker, Spade, Club,
Heart or Diamond - Exclusion set
- Property may not take a value in exclusion set.
Eg - New Mexico Whiptail lizard may not be Male
- May only be Female
Irreducible fact normalized by exclusion set
or Hermaphrodite
IMPOSSIBLE
Exhaustive Partition
No. of values in Value Set
We know every value but not how many there are
Unknown
Known
Known
Exhaustive Partition?
Actual value
Non-exhaustive Partition
Eg. The set has 5 values, of which 2 are not known
Unknown
Eg. 3 values of an indeterminate number are known
Optional Attributes
5NOMINAL DOMAINS
IMPOSSIBLE
Exhaustive Partition
No. of values in Value Set
We know every value but not how many there are
Unknown
Known
Known
Exhaustive Partition?
Actual value
Non-exhaustive Partition
Eg. The set has 5 values, of which 2 are not known
Unknown
Eg. 3 values of an indeterminate number are known
Known Risk?
Unknown Risk
- Inclusion set
- Can sometimes, but not always be sure we are
lawful - Often implemented in systems as Optional
properties - Exclusion set
- May spot violations, but cannot be sure we can
catch them all - If the sole member of an exhaustive exclusion set
is the Unknown Value, it is a mandatory property - Is Mandatory Attribute a misnomer? In this
sense it means that the attribute value must be
known, a stricter condition than asserting that
the existence of the attribute must be mandatory.
6EXCLUSION OR INCLUSION SET Inclusion and
Exclusion sets are aggregate objects that consist
of other aggregate objects
OBJECT C Constraining Set
AGGREGATE OBJECT SET OF VALUES
Constraining Value
Constraining Value
Constraining Value
Constraining Value
Constraining Value
OBJECT A Subtype of Attributes domain
AGGREGATE OBJECT SET OF RELATIONSHIPS
- ATOMIC RULES NORMALIZED BY AGGREGATE RELATIONSHIP
- Constraining Relationship
- (Object Class)
OBJECT B (constrain)
Is subtype of
Is subtype of
- SUBTYPE B1
- Exclusion Relationship (Object Class)
- SUBTYPE B2
- Inclusion Relationship (Object Class)
Is valid/invalid for (constrain)
is invalid (excluded by)
Is valid (i.e., included by)
Attribute Value
Attribute
Must take only 1
7Example of role
?
Same as constrain?
If both B1 and B2 are exhaustive, B will be
exhaustive, but not vice-versa
8The set cannot be empty
(OPTIONAL) At most 1
(OPTIONAL) At most 1
9RANGE
The set of bounds cannot be empty
IMPLIES
(OPTIONAL) At most 1
(OPTIONAL) At most 1
THE STRUCTURE OF RANGE
METAMODEL OF RANGE
VALUE SET
AGGREGATE OBJECT SET OF VALUES OR RANGES
VALUE SET Subtype of Attributes domain (Object A)
10ORDINAL DOMAINS
ADORES
LIKES A LOT
LIKES A LITTLE
NEUTRAL
DISLIKES A LITTLE
Jane is a woman who adores blue cars, likes red
cars a lot, green cars a little, is neutral about
white cars, and dislikes black cars a little.
Thus it is possible to rank Janes color
preference in order of magnitude, but it is
impossible to say how much she prefers one car
color above another.
Jim, the sales manager of a car showroom knows
Janes car color preferences. He asks Charles,
the car sales man, to show Jane cars of colors
she is at least neutral about. Thus neutrality in
preference for car colors is the lower bound of
the range of car colors he will show Jane. In
other words, the attribute is Persons car color
preference. The range is neutral or greater car
color preference, and the lower bound of the
range is neutral car color preference. The range
has no upper bound.
Charles, unfortunately, loathes Jane secretly
because she had once turned him down for a date.
Charles is a petty man who does not want to show
Jane cars with colors she will like. On the other
hand he is afraid of disobeying Jim. He strikes a
secret compromise with himself. He decides he
will show Jane cars with colors which, at worst
she will dislike only a little, and at best
colors she will like only a little. Thus Charles
sets the upper bound of the car color preference
range at Likes a little for cars he intends to
show Jane, and the lower bound for the range at
dislike a little. Thus a range may have an upper
bound, a lower bound or both. This range
constraint is an inclusion set. The cars Charles
intended to show Jane had to take a value from in
this range of car color preference.
Ranges can also be exclusion sets. For example,
Jim could have asked Charles not to show Jane
cars of colors she neither likes nor dislikes, or
worse (neutral car color preference or car colors
she dislikes even a little). This would then be
an exclusion set for car color preference with an
upper bound (neutrality) - Jim would have
excluded this range of Janes car color
preference from cars he would show her, i.e.,
values in the range would not be permitted.
11QUANTITATIVE DOMAINS
- Question Are the following statements identical?
- The thread must be two feet long or less
- The thread must be less than two feet long
- Answer is No
- is a range with a closed (upper) bound
- is a range with an open (upper) bound
- Upper and/or lower bounds of ranges of
quantitative values may be open or closed - In ordinal domains
- The expression must be less than the nth rank
is equivalent to must be (n-1)th rank or less - The expression must be greater than the nth
rank is equivalent to must be (n1)th rank or
more - In ordinal domains, open and closed bounds are
merely different expressions of the same meaning - This meaning is also an irreducible fact
12May be 0 or more
must have 1 to 2
Subtype (role) of
BOUND
Subtype of
Subtype of
may have 0 or 1
Subtype of
Upper/Lower Bound Partition
Subtype of
Quantitative Bound
Subtype of
may have 0 or 1
Lower Bound
Upper Bound
Closed/Open Partition
Subtype of
Closed Bound
Open Bound
13Attribute
Must take only 1 may be value of 0 or more
(ROLE)
A value in a domain need not be an attribute
value, but those that are, are playing that role.
They are subtypes of Value based on having that
relationship with Attribute.
Ordinal or Quantitative Value
is subtype of (ROLE)
Limiting Value
(ROLE)
The two sets are equal
is subtype of
Is valid/invalid in (i.e., included/excluded from
range)
Range
Value in a Range
Limit 1 or more limited by 1 or 2
14BOUND (Aggregate Object)
Limiting Value
Is valid/invalid in 1 or more (I.e.,
included/excluded from range) bounded by 1 or 2
Limit 1 or more limited by 1 or 2
Cannot exceed 0 or more cannot be exceeded by 0
or 1
Cannot be exceeded by 0 or more cannot exceed 0
or 1
Is subtype of
Is subtype of
LOWER BOUND
UPPER BOUND
Excluded from 0 or more
Is subtype of
Included in 0 or more
If the limiting relationship exists, the other
must, too and vice-versa (the two sets are equal)
Is subtype of
OPEN BOUND
(Ordinal or Quantitative) Value in Range
CLOSED BOUND
Must contain 1 or more be contained in 1 or more
Range
The two sets are equal (the limiting value of a
given range, must be either included or excluded
from the range)
15SAME OBJECT
SAME OBJECT
SAME OBJECT
SAME OBJECT
SAME OBJECT
16THE SEMANTICS OF BOUND
(See Box 29 in Module 3 of supplementary
materials)
The pattern of information that defines the
concept called Bound
Establishing the limits of a range is only one of
several roles of an ordinal or quantitative value
17Merging Value Sets
- Merging value sets creates a new perspective.
- Perspective is an object. It changes state
- The old value sets and ranges go away and are
subsumed into the merged range/value set - Identical values merge into one value
- A set does not distinguish between identical
members (a list does) - Ranges merge
- Open overlapping ranges cannot merge
- The limiting value is excluded from the range,
hence it will always divide a merger, or will
cause a conflict - A conflict creates a Null State. Null represents
lack of meaning, not magnitude (Nil) - Open and Closed overlapping ranges may merge if
an overlapping edge (limit) is the Unknown
Value - Because Known values will override unknown values
- If an open limit is Known, the range will be
divided at the limit(s) into separate ranges - Inclusion sets may only merge with Inclusion sets
- Exclusion sets may only merge with exclusion sets
18Metamodel of a simple value constraint
- How do constraints on objects flow to subtypes?
- Subtypes may be more, but not less constrained
than their supertype - A constraint on the subtype/Polymorphism may be
stricter than a constraint on its parent, but the
subtype cannot violate the lawful state space of
its parent - Constraints on cardinality are an example of this
- RULE
- The cardinality constraints of a subtype
relationship may be stricter than its parent, but
cannot violate the cardinality of the parent
19SAME OBJECT
MERGER IMPLIES UNION OF VALUE SETS
SAME OBJECT
20COMPLEX VALUE CONSTRAINTS
21Constraints that bind more than 2 objects
Examples of a 3 way constraints between states
Ordinal Rules values could lead to sequencing
rules
Joint constraint
Magnitude constraint
Could have been value sets
Could have been ranges
RULE EXPRESSIONS
A Joint Constraint is the repository of a single
atomic rule that mutually relates all
participating attributes (objects)
Could have been value sets
Could have been ranges
A KIND OF INCLUSION SET
A KIND OF INCLUSION SET
A quantitative relationship can contain a
mathematical formula that involves each
participating attribute (A single atomic rule
that relates all participating attributes)
Duration of a process cannot be less than the
duration of its longest subprocess
Could have been an exclusion set
Could have been an exclusion set
22CFOs Signature
CEOs Signature
JOINT CONSTRAINT (relationship)
A Joint Constraint is the repository of a single
atomic rule that mutually relates all
participating attributes
Payability of Check
23Rent
Energy Fee
AmountRent Energy fee (quantitative
relationship)
A quantitative relationship can contain a
mathematical formula that involves each
participating attribute (A single atomic rule
that relates all participating attributes)
Check Amount
24EXAMPLES OF STATIC RULES
(RULE) CONSTRAIN
Value Set
Value Set
Of 1 or more
Join with 1 or more join with 0 or 1
May be used by 0 to many involve values in 1
Expression of Rule
Inclusion/Exclusion
Inclusion/Exclusion Partition
Subtype of
Include
- Percentages must add up to 100
- The area of a rectangle is the product of its
sides - The height of a room cannot exceed the height of
the building it is in - These are parts of a car (a relationship between
objects)
Exclude
PROCESS
EXAMPLES OF DYNAMIC RULES
- Assemble the car from its parts
- The check must be signed before it is payable
25(RULE) CONSTRAIN
Value Set
Of 1 or more
Join with 1 or more join with 0 or 1
May be used by 0 to many involve values in 1
Expression of Rule
Inclusion/Exclusion Partition
Subtype of
Include
Exclude
26RELATIONSHIPS BETWEEN ATTRIBUTES
CODOMAIN OF RULE
DOMAIN OF RULE
SET C (set of all permitted values of attribute C)
SET A (set of all permitted values of attribute A)
RULE
value C1 (image of value A1)
Value A1
object
DOMAIN OF RULE
SET A Set of all permitted values of an attribute
(attribute A)
SET C Set of all permitted values of a different
attribute (attribute C)
CODOMAIN OF RULE
object
Value A1
COMBINATION OF ATTRIBUTES VALUES
value C1 (image of combination of values)
RULE
SET B (set of all permitted values of a another
attribute (attribute B)
DOMAIN OF RULE
- ORDER No of Sets (Classes) involved
- DEGREENo. of values (objects) involved
- STATIONARITYRule and/or value set changes over
time
Value B1
27FRAGMENT FROM METAMODEL OF ATTRIBUTE
Attribute
is a subtype of
DOMAIN
Must take only 1 of 0 or more
Equal sets
The concept called Constrain depends on
inclusion/Exclusion for its very existence
Subtype of
CONSTRAIN
term in 0 or more conjoined via operator with 0
or more
of only 1
May be contained in 0 to many contain 1 to many
May be used by 0 to many involve values in 1
Of 1 or more
Join with 1 or more join with1 or more
Expression of Rule
Value Set
Expressed by 1 or more expression of 1
Inclusion/Exclusion Partition
Business Process Automation
Subtype of
Include
Exclude
Normalizing Ignorance
UNKNOWN
- Know two or more attributes are related, but not
how - Not know which attributes participate in a rule
- Know which attributes participate in a rule, but
not all their values - Not know whether to include or exclude
- Know the meaning of a rule, but not how it might
be expressed/calculated - Eg know exposure to advertising will influence
sales, but not how, or all the variables involved - When the co-domain is quantitative, know some,
but not all terms of the rule expression - Assign Dont Know value to some terms
TRANSFORM
E.g. Area of a rectangle (of sides of length a
and b)
Business Rules (Meaning) Layer
28RULE
Expressed by 1 or more expression of 1
Expression of Rule
Subtype of
Equivalent to 0 or 1 equivalent to of 0 or more
different
Normal Form of expression
29IMPLICATION
30- CONSTRAINING STATE SPACE
- Collections of constraints may define the lawful
state space of an object - The collection is an object
- Collections may merge
- Members of the original collection will merge,
constrained by the rules we have discussed
CONSTRAIN
term in 0 or more conjoined via operator with 0
or more
Expressed by 1 or more express 1
Expression of Rule
Join with 1 or more join with 0 or 1
May be used in 0 to many involve values in 1
RECURSIVE RELATIONSHIP
Constraining set
IRREFLEXIVE RELATIONSHIP
ORDER OF A CONSTRAINT When a constraint
constrains another constraint (Constraining set)
Value Set
May be contained in 0 to many contain 1 to many
1 or more constrained by 0 or more
31READING ASSIGNMENT
32merger of 0 or more
Attribute Constraint (Partition based on value of
a single attribute)
merger of 0 or more (inherited)
merger of 0 or more (inherited)
Is a subtype of
Inclusion Set
Exclusion Set
Partition based on Inclusion/Exclusion of states
X
merger not permitted
33PARAMETER OF
limit of bound
contained in value set
34Parameter of
merger of 0 or more
constrain
Value Constraint (Partition based on value of a
single attribute)
Is a subtype of
merger of 0 or more (inherited)
merger of 0 or more (inherited)
may merge with only 0 may merge with only 0
Inclusion Set
Exclusion Set
merger not permitted
Partition based on Inclusion/Exclusion of states
35FRAGMENT FROM METAMODEL OF ATTRIBUTE
Attribute
VALUE CONSTRAINT
is a subtype of
Union of 0 or more
DOMAIN
Must take only 1
Equal sets
Value Set
Constrains 0 or more constrained by 0 or more
Value
Contains 1 or more contained in 0 or more
Subtype of
Subtype of
Contains 1 or more contained in 0 or
more (Inherited relationship)
Subtype of
Sets are equal
Limit of 0 or more must specify 1 limiting
Limit all values in 1 or more values limited by
1 or 2
must have 1 to 2
BOUND
Range
Subtypes of
Subtype of
Subtype of
may have 0 or 1
Closed/Open Partition
Upper/Lower Bound Partition
Subtype of
Closed Bound
may have 0 or 1
Lower Bound
Open Bound
Upper Bound
36FRAGMENT FROM METAMODEL OF ATTRIBUTE
Attribute
CONSTRAIN
is a subtype of
DOMAIN
Must take only 1 of 0 or more
Equal sets
1
Subtype of
term in 0 or more conjoined via operator with 0
or more
Expressed by 1 or more expression of 1
of only 1
1
0..
Join with 1 or more join with 0 or 1
Rule Expression
1 or more constrained by 0 or more
Include/Exclude
Inclusion/Exclusion Partition
Subtype of
Include
Subtype of
may merge with only 0 may merge with only 0
May be used in 0 to many involve values in 1
May participate in 0 to many contain 1 to many
Exclude
Domain based (nonexhaustive) Partition
Subtype of
Subset of
(inherited)
Value Set
(inherited)
(Only) Ordinal or Nominal Rule Expression
Include/Exclude
Subtype of
Subtype of
Subset of
(inherited)
(inherited)
(Only) Nominal Rule Expression
Include/Exclude
(inherited)
1..
1..
Nominal Terms
Ordinal Terms
37FRAGMENT FROM METAMODEL OF ATTRIBUTE
Attribute
CONSTRAIN
is a subtype of
DOMAIN
Must take only 1 of 0 or more
Equal sets
1
Subtype of
term in 0 or more conjoined via operator with 0
or more
Expressed by 1 or more expression of 1
of only 1
1
0..
Join with 1 or more join with 0 or 1
Rule Expression
1 or more constrained by 0 or more
Include/Exclude
Exclude terms with Arithmetic operators
Inclusion/Exclusion Partition
Subtype of
Include
Subtype of
may merge with only 0 may merge with only 0
May be used in 0 to many involve values in 1
May participate in 0 to many contain 1 to many
Exclude
Domain based (nonexhaustive) Partition
Subtype of
Subset of
(inherited)
Value Set
(inherited)
(Only) Ordinal or Nominal Rule Expression
Include/Exclude
Exclude terms with ranking operations
Subtype of
Subtype of
Subset of
(inherited)
(inherited)
(Only) Nominal Rule Expression
Include/Exclude
38FRAGMENT FROM METAMODEL OF ATTRIBUTE
Attribute
CONSTRAIN
is a subtype of
DOMAIN
Must take only 1 of 0 or more
Equal sets
1
Subtype of
term in 0 or more conjoined via operator with 0
or more
Expressed by 1 or more expression of 1
of only 1
1
0..
Join with 1 or more join with 0 or 1
Rule Expression
1 or more constrained by 0 or more
Value
Include/Exclude
Exclude rules with Arithmetic operators
Inclusion/Exclusion Partition
Subtype of
Include
may merge with only 0 may merge with only 0
Subtype of
May be used in 0 to many involve values in 1
May participate in 0 to many contain 1 to many
Exclude
Domain based (nonexhaustive) Partition
Subset of
Subtype of
(inherited)
(inherited)
(Only) Ordinal or Nominal Rule Expression
Value Set
Include/Exclude
Exclude rules with ranking operations
Subtype of
Subtype of
Subset of
(inherited)
(inherited)
(Only) Nominal Rule Expression
Include/Exclude
39 Limiting Value
Is valid/invalid in 1 or more (i.e.,
included/excluded from range) bounded by 1 or 2
Limit 1 or more limited by 1 or 2
Cannot exceed 0 or more cannot be exceeded by 0
or 1
Cannot be exceeded by 0 or more cannot exceed 0
or 1
Is subtype of
Is subtype of
LOWER BOUND
UPPER BOUND
Excluded from 0 or more
Is subtype of
Included in 0 or more
Is subtype of
OPEN BOUND
CLOSED BOUND
The two sets are equal
(Ordinal or Quantitative) Value in Range
The two sets are equal
Must contain 1 or more be contained in 1 or more
Range
40SAME OBJECT
SAME OBJECT
SAME OBJECT
MERGER IMPLIES UNION OF VALUE SETS
41SAME OBJECT
42SAME OBJECT
SAME OBJECT
43SAME OBJECT
SAME OBJECT
44SAME OBJECT
SAME OBJECT
WINDOW INTO CONSTRAIN
VALUE CONSTRAINT
45SAME OBJECT
SAME OBJECT
WINDOW INTO CONSTRAIN
VALUE CONSTRAINT
46SAME OBJECT
SAME OBJECT
WINDOW INTO CONSTRAIN
VALUE CONSTRAINT
Subtype of
BOUND
SAME OBJECT
47SAME OBJECT
SAME OBJECT
WINDOW INTO CONSTRAIN
VALUE CONSTRAINT
Subtype of
BOUND
SAME OBJECT