Next: 11. TCM File format Up: Toolkit for Conceptual Modeling Previous: 9. Mini-tutorial on Notation
Like most lists of frequently asked questions, this FAQ contains a compilation of questions and answers. The questions are either asked in the past or we expect that many users might want to ask these questions. For an overview and explanation of the TCM (environment) variables like $TCM_HOME please see section 1.4 of this manual.
TCM stands for the Toolkit for Conceptual Modeling, made by the Vrije Universiteit Amsterdam and the University of Twente, The Netherlands. It is a suite of graphical editors that is intended to be used for software specifications. TCM is also found to be useful by its users for drawing generic diagrams or tables, especially on the Linux platform.
The acronym TCM stands also for a number of other things that have nothing to do with our TCM, such as Trellis Coded Modulation (encryption theory), The Computer Museum (www.tcm.org), Traditional Chinese Medicine and the Texas Chain-saw Massacre (a horror movie).
TCM binaries, sources and documentation are uploaded to the site ftp://ftp.cs.utwente.nl/pub/tcm. This site is mirrored at ftp://ftp.cs.vu.nl/pub/tcm. As of version 2.0, source code distributions are available too. The binaries that are available include binaries for Sun Solaris 2.x (Sparc and x86), Linux 2.x (x86, libc), IRIX 5.x (SGI), AIX 4.x (RS6000), HP-UX 10.x (HP9000) and OSF/1 (Dec Alpha). All distributions can be downloaded freely from the TCM ftp-site and they are in ordinary tar.gz files and for the Linux platform we made RPM distributions. You can download the software also via the web page www.cs.utwente.nl/~tcm/software.html.
The installation instructions can be read in section 1.4 of this manual. The INSTALL file in the distributions and the web page www.cs.utwente.nl/~tcm/software.html contain installation instructions too.
You start TCM with the Unix command tcm, or you can start up individual editors like we have explained in section 1.4. If starting up TCM does not succeed or when TCM starts up and crashes immediately then it is probably one of the following problems:
All TCM distributions contain a copy of the user manual.
The web-page www.cs.utwente.nl/~tcm/usersguide/index.html is the user manual on the WWW.
If you want to know only a bit more about the methods supported in TCM, you can read the mini-tutorial in appendix A.
Roel Wieringa has written a book  that treats a number of methods that are supported by TCM in more depth (Entity-Relationship modeling, Structured Analysis and JSD).
From www.cs.utwente.nl/~roelw/RE1.ps you can download the table of contents of that book.
The home page of Roel Wieringa, www.cs.utwente.nl/~roelw contains links to a bibliography of his reports and articles and some of these can be downloaded in PostScript format.
When you look for the official UML documentation, take a look at www.omg.org/uml on the web-site of the Object Management Group. When you are new to conceptual modeling and you want to read a book that gives a brief introduction to UML, you can try . The Unified Modeling Reference Manual  is much more extensive however and is intended for people who are already familiar with some modeling method.
In principle, TCM should be able to compile and run on all Unix systems that have X Windows and Motif. Before compiling or porting TCM on your system, please read the developer's guide  that can also be found as a PostScript and PDF document in the doc subdirectory of the TCM source code distribution. For compiling the sources you need a C++ compiler (g++ is the best choice) and you need Motif, LessTif or Open Motif (preferred).
At the moment distributions have been made for Solaris 2.x (Sparc and x86), SunOS 4.x.x, Linux 2.0 (x86, ELF), IRIX 5.x (SGI), AIX 4.x (RS6000), HP-UX 10.x and OSF/1 (or Digital Unix) and even on Windows, running the CYGWIN/XFree86 environment. TCM should run under FreeBSD and Darwin (Mac OS X) too. See the file README or the web-page www.cs.utwente.nl/~tcm/software.html for the distributions currently available. We try to keep the Solaris and Linux distributions and the source code distributions up-to-date but for the other platforms it is possible that only a somewhat older version exists.
Most commercial Unix systems have the Motif library standardly included. However, Motif is often not included in older operating systems like SunOS or in free operating systems like Linux. Therefore we have made different Linux and SunOS distributions of TCM. One has the Motif library statically linked in and the other has not. The distributions that contain a statically linked Motif library have the string -statmotif in their file names. The distributions that dynamically link to the Motif library have the string -dynmotif in their file names.
Motif itself is copyrighted so we are not allowed to put the Motif library itself (libXm.so) in the distributions. www.rahul.net/kenton/faqs/mfaq_index.html contains the Motif FAQ including where you can get Motif. Instead of purchasing Motif, you can use the free Motif clone LessTif (www.lesstif.org) or preferably Open Motif (www.opengroup.org/openmotif). We've experienced "flakiness" with TCM compiled with Lesstif, so please try to use Open Motif Open Motif if at all possible.
It is possible when you compile the TCM sources to link it with Open Motif/LessTif or to use Open Motif/Lesstif when you have installed one of our 'dynmotif' distributions.
Yes of course, as of version 1.94, TCM is distributed under the GNU public license. That means that sources should be made available too. The most recent sources are available as tar.gz file in ftp://ftp.cs.utwente.nl/pub/tcm.
It is not difficult to port TCM to some Unix, if it has a decent C++ compiler and it has X11 and the Motif library (see also question B.7. Porting TCM merely consists of editing a configuration file (and maybe one or two Makefiles) and possibly a handful of conditionally compiled source code lines has to be added or changed, because some Unix calls might be different or because the compiler is somewhat idiosyncratic. Before compiling, please read the developer's guide .
If you don't succeed in compiling TCM (providing it is Unix with X/Motif), you can ask for help via our mailing list email@example.com. If you have successfully built an executable that is not available via our ftp-site you can take contact with us about putting this distribution on our site and about the incorporation of your Makefiles and source code changes in future versions of TCM.
TCM version 1.94. and higher are distributed under the GNU license. This license can be read in the file ftp://ftp.cs.utwente.nl/pub/tcm/COPYING.
This version of TCM is written in C++ and developed under Solaris and Linux. In fact it is programmed in a subset of C++, as C++ contains so many features that we don't need. The same source tree has been compiled on Solaris with the Sun CC compiler (v. SC3.0.1 and SC4.2), on Solaris, Linux, OSF/1 and HP-UX with the GNU g++ compiler (many versions of 2.7.2 and higher), on SunOS with the AT&T C++ compiler (v. 3.0.1), on IRIX 5.x with the Delta C++ compiler and on AIX 4.x with the xlC C++ compiler. With the Sun CC compiler and with the Delta C++ shared object libraries were created. The other compilations are statically linked. The reason that with g++ no shared libraries were created was because of the curious way that this compiler treats C++ templates. TCM uses the Xlib and Xt libraries (X11R5 or X11R6) and it uses the Xm library of OSF/Motif (versions 1.2, 2.0 and 2.1 all work). However, when TCM is compiled against with one version of Motif it can't be run with another version. Check the file ftp://ftp.cs.utwente.nl/pub/tcm/README for which Motif version is expected for our 'dynmotif' distributions.
Subscribe to the TCM mailing list. Send an empty message to firstname.lastname@example.org for subscription information.
There are two widespread complaints about Motif. The first complaint is that it is expensive commercial software. The second complaint is that it is not suited for being used in object oriented programs written in C++ 10.1.
Our answer to the first complaint is that people do not have to buy Motif for working with TCM. On some systems, like Solaris, Motif is part of the standard software. On others, like Linux, Motif is not included. But we have made Motif libraries part of the TCM executables for these systems. This is allowed by the Motif copyright. Furthermore, the application environment specification of Motif is free and there exist a public domain Motif clone, called LessTif (www.lesstif.org). You're advised to use Open Motif Open Motif, see question B.8.
Our answer to the second complaint, about C++ and Motif, is that in theory, it is true. But with the right discipline you can write object oriented programs in almost any programming language and without discipline you cannot write object oriented programs in C++ (as C++ is a hybrid between an object oriented and a procedural programming language). Young  gives a good introduction to Motif programming in C++. What counts most is that the program is based on an object oriented specification and design and that a suitable mapping is found to the programming language. We claim that this is the case for TCM: It is based on an object oriented specification and design and this design maps almost directly to the program which is a combination of C++ and Motif, whose interface happens to be a C library. TCM could also be written in another programming language. In fact, this is already happening, see question B.16.
But why is Motif used and not some of the other GUI libraries that are available? Motif gives us a lot of advantages. It is fast and very reliable. Motif is standardized and very well documented. There are a good learning and reference books for Motif such as [28,29,2,10] 10.2. The Motif interface is more or less standard in Unix systems, often in form of the common desktop environment (CDE). There are also many standard and free Motif widgets. The user does not need much time to learn to work with a Motif GUI and the user does not need to install special software to be able to use it.
Of course we found also some disadvantages: it costs some time for a programmer to master Motif and there are certain things that have to be done in the underlying layers of Motif: Xt and Xlib, which are more complicated from a programmer's point of view. Furthermore, Motif applications are compiled, not interpreted, which makes Motif not well suited for very rapid prototyping or programming by trial and error, like you can do in Perl, Python or Tcl/Tk. This means that you have to know what you want to program in advance and to be prepared to spend some time to implement a certain feature.
Not extensively. TCM is almost entirely made with our bare hands using the standard Unix tools for programming. But TCM itself proved to be a great tool for making the design. For instance, TSSD was used for the class structures, TFRT for the system decomposition and the source code organization and TGD was used to draw the structure of the widgets. Furthermore, all diagrams and tables in the user manual and the technical documentation are drawn with TCM. For generating documentation from the source code we used the great and simple to use package DOC++. DOC++ can be got from: www.zib.de/Visual/software/doc++/index.html. For testing and debugging TCM, we made use of the program called purify (www.rational.com/products/purify/index.html). Purify instruments a program to detect run-time memory corruption errors and memory leaks. It is a very powerful and helpful tool. The user interface of TCM is build with the Motif 1.2 widget set. The bubble help texts that pop up in the user interface are implemented with the Lite Clue widget (www.compgen.com/widgets/index.html#ALiteClue). For the representation of the diagrams and tables we did not use any special widgets. The lowest level of drawing is done with Xlib calls. The graph and its constituent parts are implemented as C++ classes, all written by ourselves.
As of version 2.20 TCM also runs on Windows systems under the CYGWIN/XFree86 environment. See the README.cygwin and the INSTALL.cygwin file in the software distribution before you install and use TCM under CYGWIN.
As of version 2.10 TCM should run under FreeBSD and Darwin (Mac OS X).
The TCM project had in the past a sister project called WHERE, which is performed at the NASA Software Research Laboratory (see research.ivv.nasa.gov/projects/WHERE). Part of this project was the translation of TCM into Java (see research.ivv.nasa.gov/projects/WHERE/TCMJava). The software is in alpha stage, but many things work. Because it is written in Java, TCMJava runs on Solaris, Windows NT, Linux and probably also on others.
Via research.ivv.nasa.gov/projects/WHERE/TCMJava you can download TcmJava. Note that for running TCMJava you should install the Java Development Kit or the Java Runtime Environment, but on the above mentioned web page it is explained what versions you need.
Our plan is to continue the development of our TCM for X Windows and Unix systems written in C++. We don't have plans to port TCM to systems that do not have X Windows and Motif, for the simple reason that it will cost us too much time. A port of TCM to another GUI library is no quick or easy job. The X11/Motif part consists of over 10000 lines of source code which should be adapted or rewritten.
Some behavior of TCM can be tailored with configuration files. TCM_CONFIG/tcm.conf is the system-wide configuration file. The options of this file may be overridden by a user's private configuration file in $HOME/.tcmrc.
The configuration files contain a number of attribute-value pairs separated by white space and enclosed by curly braces (basically it is the same as the TCM file format in appendix C). Comments in the file start with a hash (#). The text in the same line after the hash is ignored. The name of the attributes are case sensitive. In the file itself you find comment text which gives directions for what the attributes mean and what alternative attribute values are possible.
Yes that is possible but only for colors and fonts. The resource names start with TCM*. In the file TCM_CONFIG/TCM you find the X resources with the settings that are currently used in TCM (but the file is not used by TCM, the same settings are hard-coded in the sources). You can copy this file and adapt it to your wishes. You can load it with xrdb -merge or copy it in the file .Xresources or in .Xdefaults in your home directory. When you use the xrdb command then it must be issued each time when you restart X.
This is probably caused by other programs that already run and which occupy too much entries in the X color map - leaving not enough for TCM. You are probably running in 8-bit (256 color) mode, and have other programs that use colors running on your display. Common culprits are background pictures or patterns, and Netscape, which is a notorious color hog. You can best start up TCM first because it takes only what it needs, and then start up Netscape and the other color eaters. Netscape can also be started with the options -install for using a private color map or with -ncols <N> to set the maximum number of colors that it uses. When TCM cannot find any colors (on a color display) then it starts with a private color map. When you start TCM with the option -priv_cmap, it always uses a private color map. If you want to use TCM by default with a private colormap you can set the option PrivateColormap to True in the file TCM_CONFIG/tcm.conf or in $HOME/.tcmrc.
When you get a message like X Error of failed request: BadAlloc (insufficient resources for operation) etc., then this is probably caused by a lack of memory on your X server for the pixmap of the drawing area. The drawing area is implemented as a large X color pixmap, which consumes a lot of memory. The default pixmap is about 1300 by 1300 pixels. That is enough to draw a document on one A3 or two A4 pages. You can create a larger or smaller drawing area by starting the editor with the command line option -drawing "width"x"height" or by changing the initial drawing area size in View menu of the TCM start-up tool. For instance, you can start TGD with tgd -drawing 800x600 which gives a drawing area that is 800 pixels wide and 600 pixels high. If you want to have this initial size permanently you can set the options DrawingWidth and DrawingHeight in TCM_CONFIG/tcm.conf or $HOME/.tcmrc.
This is due to to the fact that the system cannot find a shared library needed by TCM. When you execute the command ldd `which tcm`, you see against which libraries TCM is linked and where these are found (if they are found) on your system. The remedy to this problem depends on the kind of BlaBla.
If you are still in big need, you can always try to ask us for help or for the library that you need (provided that this is allowed) or maybe it is possible to build a distribution in which that library is statically linked.
There are two possibilities.
Maybe you do not have to print at all and is it sufficient to use the Show Preview command. If you have a PostScript printer, you can print your document directly with the Print command. If that does not work, check if the printer name is correctly set (Printer Name), and if the printer is on-line (Printer Queue). Otherwise try if you can save the document to file as PostScript and try to send the PostScript file to the printer.
If you have a non-PostScript printer that is capable of printing graphics, write your document as plain PostScript to a file. You have to convert this PostScript file to a format that is suitable for your type of printer. The Ghostscript interpreter/previewer, called as gs, can help to do this. You can select different output devices, which include drivers for most current printers. Do gs -h or man gs for more information. You can find Ghostscript from any of the GNU distribution sites, such as ftp://ftp.uu.net/systems/gnu or ftp://gatekeeper.dec.com/pub/GNU.
If you work in a LATEX environment or any other type setter or word processor that accepts PostScript then you can save your document a PostScript. It is best to save your document as encapsulated PostScript. Encapsulated PostScript documents use a bounding box which depends on the relative sizes inside the picture, not on the underlying page. This makes it possible to include it in an arbitrary place, scale it, rotate it etc. The encapsulated PostScript file can be included in a LATEX document by an extension package like graphicx (for LATEX2e). With such a package it is probably possible to scale and rotate the included figure (see the package's documentation). All example diagrams and tables in this user manual were made with TCM and included as encapsulated PostScript with the graphicx package. If you do not want to scale or rotate explicitly, make sure that the document in the TCM editor fits to one page. To fit you can move it to the first page with the Center button and scale it with the Whole Drawing command in the Scale menu.
For word processors that have no good PostScript support you can export your document to PNG format. PNG is a format that is understood by most webbrowsers and by MS-Word. PNG is similar to the GIF-format but less controversial (see this article and burnallgifs.org).
Not at this moment. For each level you have to draw a separate diagram. The Diagram text field in TDFD and TEFD helps sets the prefix of new data and control process indexes. It does not offer much more.
We made a specification of an editor that manipulates leveled data flow diagrams . Our plan is to make an editor in which you can edit an entire data flow model, in particular all diagram levels.
Yes. The first step was implementing hierarchical diagram editors. That means that for example the entire DFD hierarchy is edited as one document and the inter-DFD consistency checks are all performed locally just like it is done now. The next step will be support for more specific methods (see question B.28).
No. Within an editor the nodes, edges, shapes and the constraints on them can not be reconfigured by the user. It is however possible to program extensions and modifications in the TCM source code.
Yes. We want to support UML [17,18] more extensively. UML is object oriented. The UML support is for both educational as research purposes. Also, we want to give specific support for a structured method, in particular for our own variant of the Yourdon Systems Method (YSM) (mainly for educational purposes).
The toolkit support for UML and YSM as representative of the family of object oriented respectively structured methods includes building (and checking) models that are made from diagrams built by different editors.
Yes and some others are already working on that. For instance, in a prototype someone generated SQL from .esd files (ER-diagrams) and in another one XML is generated from .std files (State-transition diagrams). If you are interested, contact us or see our 'links' page.
It is not very hard to write your own program that generates specifications in whatever language from TCM files. The TCM file format simple, human-readable and it is specified in appendix C.
At the moment PostScript, EPSF, PNG, the Fig format and the TCM format are generated. TCM only reads its own format. The Fig format can be read by the Xfig program and from this program or by using the command fig2dev you can generate numerous other graphical file formats such as LATEX, combined PostScript and LATEX, PiCTeX, GIF, JPEG, XPM and many more.
The TCM file format is specified in appendix C. If you take a look into a saved file, you will see that it is human-readable. Furthermore, it reflects the structure of a repository for TCM models, consisting of multiple documents. Each diagram file has four distinct parts: storage information, document information, the graph and the representation. Each table file has five distinct parts: storage information, document information, overall table information, the columns and the rows. With a little bit of imagination one can see many possible programs interfacing with TCM via this file format.
In figure 1.1 there is a list in which you can see which tool is intended for which notational technique. If you want to do something different: TCM contains a generic diagram editor, a generic table editor and a generic tree editor. In these editors almost no constraints are built-in so it is easy to (ab)use them. The specific tools offer some other specific graphical features, though, but the constraints can be a hindrance if they are not applicable to your diagram technique. Alternatively, you can try to extend or build your own diagram editor with the source code. See also question B.33.
First of all you could probably use one of the already existing editors. Especially the generic diagram editor TGD is quite versatile.
If you have the sources and you wish to build a specific editor yourself or extend an existing editor, then it is not extremely difficult to do that, at least when the kind of diagram that you want to edit can be described as a graph. Or, if the document has some kind of tabular format, then you can make a variant of the generic table editor. If you want to develop your own editor, based on TCM, you are advised to read the developer's guide .
When you want to place your shapes were you want, not where TCM thinks that you want, you could set Point Snapping off and then you can move all the nodes, line handles and text labels exactly to the pixel where you want. If you set the autoresize toggle off, you can resize the diagram shapes and table rows and columns by hand. If you have difficulty to access a particular shape because it is too close to another shape, you can try to temporarily scaling it, making the drawing larger. But, when you use TCM a lot, you will inevitably find a situation in which an editor messes up your drawing. If that is the case, please send us a bug-report.
When people draw a diagram by hand, you often see that nodes are connected in a tree-like fashion. In general, this is not allowed in a TCM editor. This is because most types of diagrams are graphs, so each line should connect two node shapes; a line cannot connect to another line. In TGD it is possible to draw something that look like a ``fork'', as you can connect in TGD a line (edge) with another line (edge). As another option, if that is allowed in the diagram technique, you can use a small black dot or another small shape as the junction of the tree. The tree editors have a special `forked tree' mode where the branches are drawn as a fork. You can not edit the tree in this mode, that is only possible in the `editable graph' mode.
If you find the pixels droppings disturbing, do a refresh (<Ctrl+V>). If you are not interested in technical details, skip the rest of this question.
TCM draws in exclusive or (XOR) mode. In XOR mode, a new destination pixel is produced by the exclusive or of the old destination pixel with the source pixel. In this mode, you can easily draw and erase a figure. You draw a figure to let it appear, and when you redraw it, you erase it. By sequencing drawing and redrawing you can simulating a shape being moved or dragged. Furthermore, in XOR mode, shapes can overlap each other without damaging each other. The overlapping part is rendered white, and when one of the shapes is moved or removed, it will be redrawn, so the overlapping part will then appear black again. For some reason a small rounding error can sometimes occur in drawing some kind of shape and that results in some remaining black pixels. When you do a refresh, these pixels disappear.
A feature of TCM is that it maintains a second pixmap in the background which contains a copy of the contents of the drawing area (double buffering). It is used to copy back the contents into the drawing area quickly when the drawing area has been resized or overlapped by other windows. Although this solution consumes a lot of memory, it makes drawing graphics relatively fast. A drawback is that pixel droppings may occur with some types of shapes.
Applications that run under XFree (the X11 port for Linux), seemed to have the problem that the BackSpace key acts like the Delete key: they both delete the character after the cursor (they have the same key code). You can assign them the right key codes in a file called .Xmodmap in your home directory. Add to that file the following two lines (and restart X):
keycode 22 = BackSpace keycode 107 = Delete
Because everything in TCM starts with a T.
It can happen that internal data structures such as the internal graph, a shape view or a table in the editor become inconsistent 10.3. Therefore, we have built some assertions in the code. They are used for internal consistency checking or for checking if a command can be executed safely. When these assertions fail, warning messages are added to the message log dialog and the message log dialog is displayed. The messages contain amongst others the source code file and line number where the assertion was checked and failed. This does not say much to an ordinary user, who does not want to browse the source code, But they can be very helpful for searching bugs. So when you send a bug report to us, you should include these assertion failed messages. Furthermore, as the diagram file is in plain text, you can also include a faulty document as plain text in your e-mail.
Maybe you can find the question and answer here in the FAQ. Otherwise you can post a message to the TCM mailing list (see question B.13).
Please send a bug report to email@example.com. Try to provide enough information that we can do something about it. You should give the name the version and the intended platform of the editor and also a resume of the commands you gave or other things you did. Please check also whether the error is reproducible or not. Also, if you have a faulty TCM document, you can e-mail it to us so that we can have a look at it. TCM document files are plain text so you can e-mail them as a plain text message (attachment).
Please check the documentation directory of the TCM distribution for the Wishlist - containing an overview of wishes not yet implemented - and some notes on future developments. In the specifications subdirectory (TCM_DOC/specifications) you can find some examples of the way we specify our additions to TCM.
Adhering to this standard specification format will enlighten our evaluation of your contribution a great deal. We might give you valuable feedback before implementing your contribution which otherwise could lack major functionality, conflict with other parts of TCM, or could turn out to be difficult to integrate within the existing TCM software.
After all : TCM is designed for specifying the software design before building it... :-)
Next: 11. TCM File format Up: Toolkit for Conceptual Modeling Previous: 9. Mini-tutorial on Notation Henk van de Zandschulp