K-attribute

From cosmopool meta
Jump to navigation Jump to search

attribute of a knowledge object; has a type (primitive or pointer), a constraint and a value

Purpose

k-attributes are the main components of a k-class for storing the data of k-instances of this k-class. k-attributes define which data are allowed.

Definition

A k-attribute has the following components:

dimension

The dimension of the data structure:

  • 0 for a "scalar", i.e. a single value
  • 1 for a "vector", i.e. a familiy of values over a finite segment of integers {0,1,...,n}
  • 2 for a "matrix", i.e. a 2-parameter family of values over a product of segments of integers {0,1,...,m}x{0,1,...,n}

structure

Cf. wikipedia: list of data structures

The following structures can have any dimension:

empty structure
  • no structure, i.e. just one item (scalar, vector or matrix)
mapping

A mapping (possibly with different source and destination types)

  • is useful only for dim > 0
tree-like structure

There are several tree-like structures, however most useful is the arborescence, possibly with internal cross-references:

  • a preorder (reflexive, transitive)
  • a partial order (reflexive, antisymmetric, transitive)
  • an arborescence, i.e. a directed graph in which, for a vertex v called the root and any other vertex u, there is exactly one directed path from v to u; s.a. wikipedia: tree data structure
  • an arborescence with internal cross-references, i.e. with an additional binary relation between arbitrary graph vertices, which does not relate vertices being in a parent-child relation

type

The data type is either one of the following primitive (literal) types

or a pointer (resource) to a

  • k-instance
  • k-instance selection (?)
  • k-class
  • k-relation instance
  • k-relation selection (?)
  • k-relation class

constraint

  • The constraint limits the allowed values of an attribute to a certain range. The constraint depends on the data type. (E.g. for a string the constraint is the minimal and maximal number of characters and the set of allowed characters (unicodes).) If no constraint is defined, then the default constraint of the respective data type applies. For objects of dimension >0 the constraint applies to each component individually.
  • To constrain an integer means to specify a subset of the set of integers, which can be done in infinitely many ways (strictly more than there are integers, and possibly even continuously many, cf. the continuum hypothesis). The rules to constrain the values of the integer type therefore have to be adapted to practical purposes, e.g. minimum/maximum, even/odd, ...
  • The boolean type has no meaningful constraint.

Examples

  • Suppose we want to define an object class as a hierarchical taxonomy with internal cross-references of instances from a set of some object classes. - We then define a new object with a single attribute: an arborescence with internal crossreferences of k-instances of a fixed set of k-classes.