Formalisms in FrameKit
To deal with graphical representations FrameKit distinguishes
two notions, formalism and model:
- A formalism describes a representation rules of a knowledge domain;
- A model is an instance of formalism.
It is one representation expressed using the related formalisms.
Formalisms have to goals in FrameKit. First, they describe a graphical
representation. This is done by means of configuration files that enable
the creation of new formalism without having to recompile Macao. Second,
they are a way to type services in FrameKit.
Description of a Formalism
In FrameKit, description of formalisms is object-oriented. This allows
an easy management and updating of formalisms. Each class in the formalism
is either a node or an edge (interconnecting nodes) and contains a set
of labels (string values, digits...) that characterizes instances of the
object. Additional information (how it looks, is it a link to a «sub-level»
when the formalism is hierarchic, etc.) must also be provided to fully
describe the formalism.
Figure 1: Description of a formalism
Figure 1 shows components of a formalism. A simple formalism dedicated
to the description of a local network is defined. It has three classes:
two nodes («computer» and «hub») and one edge («link»).
To fully describe the formalism, each node or edge must be declared. Each
declaration defines the class name, the class apearance and the class
information (string(s) associated to any instance of the class). A model
corresponding to this formalism is detailed in the model
section.
The description of a formalism is stored in a formalism file. Formalism
files are used by Macao to dynamically build a "tool palette" from which
the user will drag new instances of classes (nodes or edges).
Figure 2: example of Macao screen.
Figure 2 shows a maco screen. The window "untittled.root.1" (botom left)
is the one of the model you can create. On top of it, you have a tool
palette build for a Petri net formalism (window "AMI-Net"). The "Escher
cube" object, in window "untittled.root.1" own all the global information
of the model (like its name, author, version...), such information is
considered as global.
Hierarchical Formalisms
Macao, and thus FrameKit, are able to handle hierarchical graphical representation.
In that case, the formalism is made of several "sub-formalisms". It is
thus described by means of several formalism files, each one represents
the set of objects that can be found in the corresponding submodel. Thus,
hierarchical models are divided into pages.
Let us consider the LOCNET formalism that describes a local network composed
with Macintosh computers and Sun workstations (Figure 3). This formalism
may consider two global labels : name of the network and its local address.
Two nodes are considered, the first one represents a macintosh computer
and the other a sun workstation. Finally, three edges may link nodes together:
appletalk_link connect two macintosh nodes, ethernet_local_link connect
two sun workstation nodes and mixed_link connect one macintosh to one
sun.
Figure 3: The LOCNET formalism.
We can use the LOCNET formalism to build a hierarchical formalism called
NET, describing a bigger network composed of LOCNET-like subnetworks (Figure
4). Its global labels are the name of the network and its IP address entry.
Nodes are:
- subnet, wich is a link to a submodel having the LOCNET formalism.
When doubleclicking on a subnet node, Macao opens a new window to which
a LOCNET tool palette is associated. Such nodes are called «boxes»;
- sun, this node is similar to the one defined in the LOCNET formalism.
One edge, ethernet_link, allows to connect subnets and sun workstation
as well. The couple of formalisms ( NET, LOCNET) describe a hierarchical
formalism. recursivity is possible: node N in formalism F may point to
a submodel having formalism F as well.
Figure 4: The LOCNET formalism.
A NET model is presented in the model
section.
|