ConceptBase Home, Informatik V, RWTH Aachen

Frequently asked questions on ConceptBase

The following list gives answers to some of the most frequent questions on the usage of ConceptBase. It refers to version 5.0 of ConceptBase released 12-May-1998.

See also frequently asked questions on version 4.0 and version 3.3!


Question 1:
I want to model a device which contains several parts where for some of these parts different versions are allowed. These versions are customized for certain requirements but I do not want to distinguish all combinations at the class level. How can I do that?
Answer:
You may either try to create a new link type 'version' whose semantics could be modeled by suitable meta formulas (see ConceptBase user manual) or use the already predefined "isA" link at the instance level. For example consider a computer manufacturer which models its product at the class level as follows:
      Class Product with
        attribute
          part: Product
      end  {This is actually a meta class }

      Product Computer with
       part
         memory: MainMemory;
         cpu: CPU
      end

      Product CPU end
      Product MainMemory end
The class Computer shall be treated as a simple class in this example. Now assume that there is a configuration constraint that CPU's 'ipx887*' would only work with 'DRAM' main memory chips (including 'SDRAM', 'S2DRAM' and 'VSDRAM' which are all fulfilling the specifications for 'DRAM'). The following shows you how to represent that with 'isA' at the instance level:
      CPU ipx887 end
      CPU ipx887a isA ipx887 end
      CPU ipx887b isA ipx887 end

      Class Computer with
        constraint
          c1: $ forall pc/Computer c/CPU mm/MainMemory
                    (pc cpu c) and (pc memory mm) and (c isA ipx887)
                 ==> (mm isA DRAM) $
      end

      MainMemory SRAM end
      MainMemory DRAM end
      MainMemory SDRAM isA DRAM end
      MainMemory S2DRAM isA SDRAM end
      MainMemory VSDRAM isA SDRAM end
Note that the objects ipx887*, SRAM and DRAM* are all at the instance level. Also note that the constraint is formulated for all CPU's of kind 'ipx887'. We treat 'ipx887' and 'DRAM' as general representatives of all their versions. If we would try to model that at the class level, then we had to create a class for each combination of ipx887 CPU and DRAM main memory. The above solution is much simplier. The computer manufacturer can include a new DRAM version just by inserting its definition like above for SDRAM etc. Note that the 'isA' link type is reflexive and transitive. This is exactly what we need here.

Now we can define some instances of computer. The first one is consistent with the constraint c1 of Computer, the second is not. Note that the constraint can only be violated when a CPU and certain main memory is configured into the same instance of computer.

      Computer pc_88 with
        cpu     cpu1: ipx887b
        memory  bank1: S2DRAM;
                bank2: SDRAM
      end

      Computer pc_44 with
        cpu     cpu1: ipx887a
        memory  bank1: SRAM
      end

© M. Jeusfeld, 27-May-1998