UserPreferences

RSF


Rigi Standard Format

The graph data format used by Rigi and other tools. [WWW]RSF: Themes and Variations is a good description of RSF, or you can refer to the [WWW]formal definition.

The following paragraphs were taken from the Rigi documentation:

RSF is the main file format for rigiedit. There are two major dialects of RSF: unstructured and structured. In general, external tools, conceptual modelers, and parsers provide unstructured RSF for rigiedit, and rigiedit saves the graph as structured RSF, including spatial information such as the subsystem hierarchy.

The main difference between structured and unstructured rsf is that unstructured rsf must have a unique node name for each node. This means that if a method contains three switch statements, they have to be given three unique names such as 1!switch, 2!switch, and 3!switch, otherwise Rigi will collapse them into a single node. In the same way, methods have to contain the names of their parent classes in case there are two methods in different classes with the same name. In structured rsf, each node has a hidden unique node name that identifies it, so that the visible labels no longer have to be unique.

RSF has a variant, a 4-tuple format, that is used by the htmlrsf program to position HTML links in the source files. For 4-tuples, sortrsf, can be used to remove duplicate tuples and, optionally, it can be used to strip the fourth element from each of the tuples. However, sortrsf can not be used to generate multiarc arcs.

The 4-tuple RSF variant carries as its fourth component the location in the source where either the node or arc is declared. This is in addition to such attributes in the RSF file as file and lineno which are often generated for nodes. The fourth component makes it possible to locate the node or arc reference in the source code, a feature that is necessary for marking up the source for web browsing.