Individual ActivityClass isA AllThing with
attribute
INPUT: EntityClass
end
Then, the frame
Attribute ActivityClass!INPUT isA AllThing endstates that this attribute is a subclass of AllThing. Consequently, each instance of the INPUT attribute will also an instance of AllThing. O-Telos requires that the specialization is strict (axiom 16), i.e., both ActivityClass and EntityClass must be specializations of AllThing.
Class MODULE with
attribute
imports: Proposition
constraint
onlyImported: $ forall M/MODULE x,y/Proposition
(x in M) and (x attribute y) ==>
(y in M) or (M imports y) $
end
Then you may write down modules as follows:
MODULE M1 end
Vega in M1 end
Sammy in M1 end
MODULE ABC with
imports
o1: Vega;
o2: Sammy
end
Individual Charles in ABC with
attribute
rel: Sammy
end
The only drawback is that the constraint won't be compiled by release 3.3 (or earlier)
of ConceptBase because it quantifies over the class M.
The next release 4.0 will include this feature! Nevertheless, you can work
with such modules if you leave out such constraints.
(C in MC) (D isa C)Some ConceptBase users argue that there should be a builtin axiom which makes D an instance of MC, i.e. (D in MC). This would be dual to the class membership inheritance axiom of O-Telos:
(D isa C) (x in D) ==> (x in C)However, we decided not to add a new axiom. The reason is that D would have to obey all integrity constraints of MC. For example:
Class NonEmpty in MetaClass with
constraint
ic1: $ forall C/NonEmpty exists x/Proposition (x in C) $
end
Class LabourPartyMember in NonEmpty
end
Class CapitalistFraction isA LabourPartyMember
end
With the additional axiom, the subclass CapitalistFraction would have to obey
the constraint on NonEmpty, i.e., it would have to have at least one instance.
However, we think that we should not enforce that by an automatic axiom.
As soon as the meta formula compiler is available, ConceptBase users can add
the axiom themselves (if they wish), or declare the subclass as instance of
the metaclass explicitly, e.g.:
Class CapitalistFraction in NonEmpty isA LabourPartyMember end(Note: the above constraint ic1 does not work with release 3.3 or earlier.)
Class Employee with
attribute
name: String;
salary: Integer
end
Class Manager with
rule
r1: $ forall e/Employee s/Integer
(e salary s) and (s > 1000) ==> (e in Manager) $
end
Class Department with
attribute
head: Manager
end
Now assume that instances of Employee and Department are inserted:
Mary in Employee with
salary
hersalary: 1001
end
Marketing in Department with
head
sheboss: Mary
end
The attribute typing axiom of Telos demands the attribute value of 'sheboss'
to be an instance of the class defined in the attribute category 'head' of
Department, i.e., Mary must be an instance of Manager. According to the rule
'r1' this is fulfilled. Nevertheless, ConceptBase rejects the update. The reason
is that class memberships derived by user-defined rules is not taken into
account in the current implementation of the attribute typing axiom. You must
explicitely tell ConceptBase that Mary is an instance of Manager (or a subclass
of Manager). In our example, the rule can be represented as a constraint:
Class Employee with
attribute
name: String;
salary: Integer
end
Class Manager isA Employee with
constraint
c1: $ forall e/Manager s/Integer
(e salary s) ==> (s > 1000) $
end
Class Department with
attribute
head: Manager
end
Then the instance Mary would be written as:
Mary in Manager with
salary
hersalary: 1001
end
xset fp+ $CB_HOME/lib/andrew6.3/X11fonts