BACK

Download Φ License Φ Books&Manuals Φ Forum Φ Team Φ Home



First Steps with ConceptBase

This short guide introduces you to two of the user interfaces for ConceptBase and what you can do with them. More details including elaborate tutorials are found at Books&Manuals.

Step 1: You should download and install ConceptBase from its download site. Afterwards you find the system in the directory $HOME/conceptbase (Linux, Mac OS) or C:\conceptbase (Windows). There are several scripts in this directory. The two user interface scripts are cbiva and cbgraph. The Windows counterparts have the file type .bat. The script cbserver is for starting a local ConceptBase server. We skip this here because both cbiva and cbgraph automatically start up a local ConceptBase server (Linux, Windows 10 with Linux subsystem), or connect to a public ConceptBase server (Mac OS, Windows 7). But keep in mind that ConceptBase consists of user interfaces and the ConceptBase server. The server stores objects (instances, classes, metaclasses, ...) and answers queries.

Step 2: Start the CBIva user interface. Under Windows you can do so by double-clicking the file cbiva.bat in the directory C:\conceptbase. Under Linux and Mac OS, you can open a terminal and enter:

$HOME/conceptbase/cbiva
CBIva

Afterwards a windows pops up and display a text editor connected to a ConceptBase server:

Step 3: The CBIva user interface shows a blank text field. A smaller text field below is for messages from the server, e.g. error messages. Now enter the following two class definition into the text window:

Employee in Class with
  attribute
    name: String;
    salary: Integer;
    worksFor: Project
end

Project in Class with
  attribute
    budget: Integer
end
CBIva

Afterwards press the 'TELL' button. It has the shape of a blue arrow pointing to a disk symbol and highlighted in the screendump by a red reactangle. As a result, the two classes are stored in the server. The message windows confirm the successful operation by a message with yellow background.

Step 4: Now define some instances of the classes. Note that ConceptBase subsumes under the term 'attribute' classical attributes such as name, salary, budget and also relations such as worksFor. Everything is an object in ConceptBase, even numbers and strings.

bill in Employee with
  name
    billsname: "William Smith"
  salary
    salary1: 50000;
    salary2: 10000
  worksFor
    project1: FirstStepsProject
end
CBIva

Now, press the 'TELL' button again. You will notice that the ConceptBase server reports an error. The object 'FirstStepsProject' is not defined. You may argue that the string and the two numbers were also not defined. That is a subtle difference that the ConceptBase server makes: values like strings and numbers are automatically created as objects as soon as they are encountered. Lets repair the error and tell the following:

bill in Employee with
  name
    billsname: "William Smith"
  salary
    salary1: 50000;
    salary2: 10000
  worksFor
    project1: FirstStepsProject
end

FirstStepsProject in Project end

If you tell these two objects, then no error will be reported. You may argue that the instance FirstStepsProject does not provide a value for the attribute 'budget'. This is not a mistake. All attributes in ConceptBase are multi-valued, i.e. they can have zero, one, or any number of fillers. In the example above, the salary attribute has two fillers.

Step 5: Now lets move the the graphical editor CBGraph. It allows to visualize and edit any object, e.g. the object bill. Double click on bill in the CBIva text window and press the right mouse button. Then select the menu item 'Display in GraphEditor'. CBGraph

A new window pops up and shows 'bill' as a node. You can move the node via the left mouse button. Now press the right mouse button and select 'outgoing attributes' and then 'name William Smith'. You can move the new node "William Smith" and also the node label "billsname" with the left mouse button. Use the right mouse button to display more properties, e.g. the classes ('instance of'). CBGraph

Finally, you can save the graph by the option 'File' / Save' of the CBGraph menu. You can also press the 'disk' button just below the word 'Options'. CBGraph asks you for the file name, e.g. 'firststeps.gel'. It should end with the filetype '.gel'. Afterwards, exit CBGraph and also CBIva. The stored file 'firststeps.gel' can be used to restart your session in a very convenient way. Under Windows, you can associate the program C:\conceptbase\cbgraph.bat to all files with this file type. Under Linux or MacOS, you can again use a terminal to start CBGraph with the graph file:

$HOME\conceptbase\cbgraph firststeps.gel
Under Windows, you can also use a command window and enter
c:\conceptbase\cbgraph firststeps.gel

We assume that you changed the directory before to the dorectory containing the graph file. The graph file contains all object definitions as a sources. Hence, you do not need to enter them again. See here for instructions on how to integrate cbiva and cbgraph into your desktop and to directly upstart CBGraph when click a link to a graph file in a browser.

Have great fun with exploring ConceptBase! Read the user manual for more details. You can check out many more tips and solutions from the ConceptBase Forum.


http://conceptbase.cc -- Contact: M. Jeusfeld, University of Skövde, Box 408, S-54128 Skövde, Sweden
2018-05-29/M.Jeusfeld


Get ConceptBase.cc at SourceForge.net. Fast, secure and Free Open Source software downloads