ConceptBase Home, Informatik V, RWTH Aachen

Frequently asked questions on ConceptBase 4.0

The following list gives answers to some of the most frequent questions on the usage of ConceptBase. It refers to versions 4.0 of ConceptBase released 14-Apr-1996.

See also frequently asked questions on version 3.3!


Question 1:
Is there a CORBA compliant interface to ConceptBase?
Answer:
Yes, see paper by Briukhov and Shumilov in our list of references.


Question 2:
I want to specify a constraint or a rule for an attribute. ConceptBase reports an error. Why?
Answer:
The definition of constraints and rules must be attached to instances of 'Class'. You may define an attribute to be an instance of Class. This may be complicated since both the source and destination of this attribute must be instances of Class, too. To avoid this hassle you can instead declare your constraint within an extra class:
      Class ConstraintsForXYAttribute with
       attribute
         references: C!XY
       constraint
         ic1: $ [your original constraint] $
       rule
         r1: $ [your original rule] $
      end
The 'references' attribute is just for attaching the extra class to the original attribute. It does not affect the semantics of the constraint (or rule).


Question 3:
ConceptBase won't compile assertions containing an attribute label which starts with a number. Why?
Answer:
This is a minor bug in the assertion compiler. Look at the following example:
      Class Foo with
       attribute
         1a: Barf;
         1b: Qoc
       constraint
         ic: $ forall a/Foo!1a not (a in Foo!1b) $
      end
Just replace the labels '1a' and '1b' by labels starting with a letter, e.g. 'v1a' and 'v1b' and everything should work just fine.


Question 4:
When I define the following meta formula, ConceptBase converts the variable 'r' into a constant 'r' which is quite wrong. Can you explain?
      Class RelationshipType with
        attribute
          role: EntityType;
          card_1: EntityType
        constraint
          ic_1_a: $ forall A/RelationshipType!card_1 a1,r/VAR
                             (a1 in A) and From(a1,r)
                      ==> (forall a2/VAR (a2 in A) and From(a2,r) ==> (a1 == a2) ) $
      end
Answer:
Yes, another minor 'bug'. The class VAR in the range 'r/VAR' is a phantom class that the meta formula compiler tries to replace by an expression (r in C) somewhere in the formula body. In doubt, you should use VAR only for attribute labels like 'm' occuring as variables in literals like (x m y). The above formula can be rewritten as:
      Class RelationshipType with
        attribute
          role: EntityType;
          card_1: EntityType
        constraint
          ic_1_a: $ forall A/RelationshipType!card_1 a1,r/Proposition
                             (a1 in A) and From(a1,r)
                      ==>
                    (forall a2/Proposition (a2 in A) and From(a2,r)
                                            ==> (a1 == a2) ) $
      end
The class Proposition applies to all objects and thus provides a better range for 'r' than VAR.


Question 5:
I would like to ask you how to declare in CB a property as a SET of a given type. e.g., attr:SET-OF Integer. And how one instantiates it ?
Answer:
By default class attributes in ConceptBase can have multiple instances. That is, if you want to restrict an attribute to be single-valued you must explicitely constrain it (see section 'Example: necessary and single' in CB User Manual). Consider the following class
      Class Product with
         necessary,single
           code: String
         attribute
           sales: Integer
      end
Here, the 'code' attribute is single (at most one filler allowed for instances) and necessary (at least one filler for instances). The attribute 'sales' is by default not constrained, i.e., you may specify an arbitrary number of fillers for this attribute. Example:
      Product GoudaCheese with
         code
           hascode: "C14-67-EN"
         sales
            sale-1: 7243;
            sale-2: 5434;
            sale-3: 3498
      end
In your application program, you can convert this data structure into set-valued attributes if you want.

M. Jeusfeld, 13-Jun-1997