Previous topic  Top  Next topic  Print this Topic
 

F-Molecules

 

Instead of giving several individual atoms, information about an object can be collected in F-molecules, which combine multiple F-atom statements in a concise way. For example, the following F-molecule denotes that car74 is a car whose owner is Paul and whose admissible drivers are Peter and Mary.

car74:Car[owner->paul, admissibleDriver->{peter, mary}].

This F-molecule may be split into several F-atoms:

car74:Car.

car74[owner->paul].

car74[admissibleDriver->peter].

car74[admissibleDriver->mary].

For F-molecules containing multi-valued methods (methods with a cardinality that allows more than only one value), the set of result objects can be divided into singleton sets (recall that the ObjectLogic semantics is multi-valued, not set-valued). For singleton sets, it is allowed to omit the curly bracket enclosing the result set, so that the two variants above are equivalent, which means that they yield the same object base.

The same can be done for schema-level statements such as subclass-F-atoms or signature-F-atoms. For that purpose, a subclass relationship may follow after the host object. Then, a specification list of signatures separated by commas, may be given. If a signature contains more than one class, those can be collected in parentheses, separated by commas:

Car::Vehicle[

 passenger {1:*} *=>  Person,

 seats {1:*} *=> xsd#integer].

The following set of F-atoms is equivalent to the above F-molecule:

Car::Vehicle.

Car[passenger {1:*} *=>  Person].

Car[seats {1:*} *=>  xsd#integer].

More complex nesting is also possible in ObjectLogic f-molecules. Besides collecting the properties of the host object, the properties of other objects appearing in an F-molecule, e.g. method objects or result objects may also be inserted. Hence, a molecule may not only represent the properties of one single object but can also include nested information on different objects, even recursively:

car74:Car[owner->paul:Person[friend->peter:Person[age->17]].

 

This complex f-molecule is equivalent to the following set of f-atoms:

peter:Person.

peter[age -> 17].

paul:Person.

paul[friend->peter].

car74:Car.

car74[owner -> paul].