10. Frequently Asked Questions
Keywords: User

Next: 11. TCM File format Up: Toolkit for Conceptual Modeling Previous: 9. Mini-tutorial on Notation
Subsections

- 10.1 What is TCM?
- 10.2 Where can I get TCM?
- 10.3 How do I install TCM?
- 10.4 How do I start up TCM?
- 10.5 Where can I find the user manual of TCM?
- 10.6 What else can I read about the methods supported in TCM?
- 10.7 Is TCM available for my platform?
- 10.8 What to do if I don't have Motif?
- 10.9 Can I obtain the source code of TCM?
- 10.10 How can I compile or port TCM for my system?
- 10.11 What are the terms of usage?
- 10.12 In what programming language is TCM written?
- 10.13 How do I stay up-to-date with the developments of TCM?
- 10.14 Why is Motif used for the GUI?
- 10.15 Did you use other tools or widget sets to build TCM?
- 10.16 Does TCM run under Windows, Macintosh, Java etc. ?
- 10.17 How can I configure TCM?
- 10.18 Can I set X Resources for TCM?
- 10.19 Why does TCM sometimes show fewer or different colors?
- 10.20 Why does TCM crash with ``X Error of failed request''?
- 10.21 Why won't TCM start saying ``libBlaBla.so: can't open file''?
- 10.22 Why does TCM complain about old versions when I load a diagram?
- 10.23 How can I print my TCM documents?
- 10.24 How can I include a TCM picture in my text document?
- 10.25 Is it possible to create process decompositions in TDFD?
- 10.26 Are there plans for consistency checks across diagrams?
- 10.27 Is it possible for the user to define its own symbols?
- 10.28 Do you have any plans to support specific methods?
- 10.29 Do you have plans for code generation?
- 10.30 Is it possible to drag and drop with TCM?
- 10.31 What file formats does TCM generate?
- 10.32 I want to draw an XYZ diagram, which tool should I use?
- 10.33 Is it possible to make an editor for XYZ diagrams?
- 10.34 How can I have more influence on the layout?
- 10.35 How can I connect an edge with an edge?
- 10.36 Why are there black pixels left in the drawing area?
- 10.37 Why doesn't the BackSpace key function correctly in Linux?
- 10.38 Why does TCM have a tea pot with a 'T' as logo?
- 10.39 What do these ``assertion failed:'' messages mean?
- 10.40 I have a question. What should I do now?
- 10.41 I found a bug. What should I do now?
- 10.42 How can I contribute to TCM?

#
10. Frequently Asked Questions

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.

#
10.1 What is TCM?

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).

# 10.2 Where can I get TCM?

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.

#
10.3 How do I install TCM?

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.

#
10.4 How do I start up TCM?

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:

1.
  You should set `$TCM_HOME` to the globally accessible TCM directory. Check also that the tools are accessible and in your `PATH` variable (check this for instance with the Unix command `which`). If not, add `TCM_BIN` to your `PATH` variable.

2.
  Make sure that you run X Windows and that your `DISPLAY` variable is set correctly (you can test this with `echo $DISPLAY`). Note also that when you run an X application remotely, your X display should be open for it. See the manual pages xhost(1) and xauth(1) for how you can safely open your X display for remote applications.

3.
  Check the version of the operating system you are running, for instance with `uname -a`. Maybe you have installed a TCM distribution for a different OS. With the command `file `which tcm`` you can see what type of executables the distribution contains.

4.
  If you cannot start TCM because of messages about libraries that are not found or cannot be opened, e.g. ``libXm.so: can't open file'' then proceed with the answer of question B.21.

5.
  If TCM immediately crashes with a message like ``X Error of failed request'' then proceed with the answer of question B.20.

6.
  If TCM does start up but it displays some dubious error messages about failed assertions or implementation errors then proceed with the answer of question B.39.

7.
  When you work under Linux, make sure that your system has the glibc (also known as libc6) libraries version 2.1 installed. TCM does not work with the older libc5 libraries nor with glibc 2.0. Also the X libraries should have been compiled with glibc 2.1.

8.
  If all this does not help, you can always send a description of your problems in an e-mail to the mailing list tcm-users@cs.utwente.nl. See question B.13 for how to subscribe to this list.

#
10.5 Where can I find the user manual of TCM?

All TCM distributions contain a copy of the user manual. The file
`TCM_DOC/usersguide-<version>.ps.gz` is the user manual in gzipped PostScript format. An HTML version can be read via `TCM_DOC/usersguide/index.html` You can also download the user manual separately from our FTP-site ftp://ftp.cs.utwente.nl/pub/tcm. There you can find copies both in gzipped PostScript as in PDF-format.

The web-page www.cs.utwente.nl/~tcm/usersguide/index.html is the user manual on the WWW.

# 10.6 What else can I read about the methods supported in TCM?

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 [22] 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 [9]. The Unified Modeling Reference Manual [1] is much more extensive however and is intended for people who are already familiar with some modeling method.

#
10.7 Is TCM available for my platform?

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 [4] 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.

#
10.8 What to do if I don't have Motif?

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.

#
10.9 Can I obtain the source code of TCM?

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.

#
10.10 How can I compile or port TCM for my system?

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 [4].

If you don't succeed in compiling TCM (providing it is Unix with X/Motif), you can ask for help via our mailing list tcm-users@cs.utwente.nl. 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.

#
10.11 What are the terms of usage?

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.

#
10.12 In what programming language is TCM written?

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.

#
10.13 How do I stay up-to-date with the developments of TCM?

Subscribe to the TCM mailing list. Send an empty message to tcm-users-request@cs.utwente.nl for subscription information.

#
10.14 Why is Motif used for the GUI?

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 [28] 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.

# 10.15 Did you use other tools or widget sets to build TCM?

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.

#
10.16 Does TCM run under Windows, Macintosh, Java etc. ?

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.

#
10.17 How can I configure TCM?

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.

#
10.18 Can I set X Resources for TCM?

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.

#
10.19 Why does TCM sometimes show fewer or different colors?

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`.

#
10.20 Why does TCM crash with ``X Error of failed request''?

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`.

#
10.21 Why won't TCM start saying ``libBlaBla.so: can't open file''?

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 BlaBla is either libglobal.so, libgui.so, libeditor.so, libdiagram.so or libtable.so then TCM cannot find its own libraries. Check if they are installed in `TCM_LIB`. If they are, expand your `LD_LIBRARY_PATH` variable with the value of `TCM_LIB`.

- If BlaBla is libXm.so then TCM cannot find (the right version of) the Motif library. Check the version number of the Motif library. As it is impossible to run with version 1.2 when it needs 2.0 and vice versa. When you do not have Motif, you should obtain a distribution in which Motif is statically linked (see question B.8). If you have Motif, you could try to set the `LD_LIBRARY_PATH` to include the Motif library directory.

  In the past, the Linux executables of TCM were stripped too rigorously so that a Motif library with a different minor revision number than the one we used, could not be dynamically linked. Hopefully the current version of TCM has fixed this problem.

- If BlaBla is libX11.so, libXt.so or something else with an X in it, then TCM cannot find one of the X Windows libraries. Look where they actually are on your system. Install them in the expected directory, or append to your `LD_LIBRARY_PATH` the directory where they actually are.

- If BlaBla is something else, like for instance libC.so.5 or libg++.so.27 then some other Unix or C library cannot be found. Either set your `LD_LIBRARY_PATH`, if they are at a different place than expected or install them if that is possible.

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.

# 10.22 Why does TCM complain about old versions when I load a diagram?

There are two possibilities.

1.
  The first most probable one is that your documents were indeed made by a newer version of TCM. For instance, you or someone else might have made the document with a newer version of TCM, probably at home or work. TCM editors are supposed to be upward compatible and should read older file formats. As of TCM version 1.99 (file format version 1.30) the TCM editors also attempt to read in newer file formats than the one that they generate; incompatibilities will be shown in the message log dialog window. They always generate one file format. In the entry Document Info in the Document menu you can see what file format the editor generates and what file format you have read. The best solution is to upgrade TCM.
2.
  A second possibility is that the file format was not written correctly. This is a bug in the Linux version that was once reported. The third line of the saved file should contain the file format version, for instance `{ Format 1.2 }`. But instead some random number was written. Probably the cause is a buggy version of libg++.so and libstdc++.so. At least, it has been reported to us that after an upgrade of /usr/lib/libg++.so.27.1.0 and /usr/lib/libstdc++.so.27.1.0 to /usr/lib/libg++.so.27.2.1 respectively /usr/lib/libstdc++.so.27.2.1 this problem ceased to exist.

#
10.23 How can I print my TCM documents?

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.

#
10.24 How can I include a TCM picture in my text document?

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).

#
10.25 Is it possible to create process decompositions in TDFD?

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 [6]. Our plan is to make an editor in which you can edit an entire data flow model, in particular all diagram levels.

#
10.26 Are there plans for consistency checks across diagrams?

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).

# 10.27 Is it possible for the user to define its own symbols?

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.

#
10.28 Do you have any plans to support specific methods?

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.

#
10.29 Do you have plans for code generation?

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.

#
10.30 Is it possible to drag and drop with TCM?

No. There is no real drag and drop between editors even not between the same type of editor. Drag and drop between the same type of editor (see it as an extension of the cut-paste buffer) is put on our wish list. But for the time being, if you want to move things from one editor to the other, you have to save it to file (with Save or Save selection) and load it (with Load or Append) into the other editor.

#
10.31 What file formats does TCM generate?

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.

# 10.32 I want to draw an XYZ diagram, which tool should I use?

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.

#
10.33 Is it possible to make an editor for XYZ diagrams?

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 [4].

#
10.34 How can I have more influence on the layout?

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.

#
10.35 How can I connect an edge with an edge?

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.

#
10.36 Why are there black pixels left in the drawing area?

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.

#
10.37 Why doesn't the BackSpace key function correctly in Linux?

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

#
10.38 Why does TCM have a tea pot with a 'T' as logo?

Because everything in TCM starts with a T.

#
10.39 What do these ``assertion failed:'' messages mean?

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.

# 10.40 I have a question. What should I do now?

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).

#
10.41 I found a bug. What should I do now?

Please send a bug report to tcm@cs.utwente.nl. 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).

# 10.42 How can I contribute to TCM?

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... :-)

Finally, check the TCM mailing list (see question B.13), for maybe someone else is already inventing the same wheel.

#### Footnotes

... C++ 10.1
  Is it possible to write a good program that is not object-oriented? If not, is that because you use object oriented as a synonym for good?
...[28,29,2,10] 10.2
  These are the books that used. There are a number of more recent books. See the Motif FAQ on www.rahul.net/kenton/faqs/mfaq_index.html or posted in news:comp.x.windows.motif.
... inconsistent 10.3
  When you want you can even try to enforce an inconsistent editor state by editing a TCM document file by hand and load that document into the editor. Most of the times TCM notices that it has read a mess but sometimes it becomes so confused that it crashes gracefully.

Next: 11. TCM File format Up: Toolkit for Conceptual Modeling Previous: 9. Mini-tutorial on Notation