xfuzzy

Section: User Commands (1)
Updated: 10 Sep 2001
Index
 

NAME

xfuzzy - an X-window based environment for the design, verification and synthesis of fuzzy logic based systems  

SYNOPSYS

xfuzzy [ -toolkitoption ... ] [ -Oc opsfile ] [ -Oj opsfile ] [ -w directory ] [ -l logfile ] [ -S simfile ] [ xfl-file ... ]  

DESCRIPTION

xfuzzy is a graphical design environment for fuzzy systems, based on X-window and the xfl language, a high-level abstraction fuzzy specification language.

xfuzzy provides an integrated graphical user interface to a set of xfl-based tools, that can also be used independently, covering all the aspects of fuzzy systems development.  

OPTIONS

xfuzzy accepts all the standard X Toolkit command line options as well as the following:
-Oc opsfile
Use opsfile as the file defining fuzzy operations in C (see xfc(1) for more details).
-Oj opsfile
Use opsfile as the file defining fuzzy operations in Java (see xfj(1) for more details).
-w directory
Set directory as the default working directory for the environment.
-l logfile
Log every message issued by xfuzzy during the working session to the file identified by logfile.
-S simfile
Load the simulation defined by simfile into the environment.
xfl-file ...
Load the xfl specifications identified by the list of xfl-file into the environment.
 

THE XFUZZY DISPLAY

Once started, xfuzzy shows its main window, composed of three main parts:

A button area, with seven buttons that allow access to the main functions offered by xfuzzy.

A selectable list of available specifications. These are those xfl system definitions that have been loaded into the environment and that can be used within it. Prior to the use of a particular tool, a specification must be selected from the list of available specifications. Otherwise, an error pop-up with the message "No specification selected" will appear and the tool will not be launched.

A log area, in which xfuzzy displays information for the user. This information can be directed to a file either by using the -l option or by one of the items in the "Set Up" menu. Whenever any of these messages requires special user attention, xfuzzy will ring the bell in your display. The same applies for those pop-ups that will be shown by xfuzzy in the case of several error conditions during the operation of the environment.

 

THE BUTTON AREA

The button area on the top of the xfuzzy display provides access to the environment facilities and tools by means of six menus:

The "File" menu allows the management of the specifications loaded into the environment, plus the point to exit from it.

The "Design" menu provides access to a set of graphical and textual editors in order to handle the xfl definitions loaded into the environment.

The "Verification" menu provides access to the xfuzzy modules for learning and system simulation. A specific facility to obtain surface plots from xfl definitions is also included here.

The "Synthesis" menu provides access to the synthesis facilities of xfuzzy, which allow the translation of xfl definitions into software (using either C or Java as target languages), and hardware, by means of VHDL or a FPGA boolean implementation.

The "Fuzzy Operations" menu gives access to the definitions of fuzzy operations known to the environment, in any of the available target languages: C, Java and VHDL.

The "Set Up" menu allows the management of certain working aspects of the environment.

Finally, the "Help" button shows the help information. Help in xfuzzy is based on HTML, so help files can be viewed using any Web browser. The particular browser invoked by xfuzzy when the "Help" button is pressed can be set by means of the resource xfuzzyHelpViewer.

 

THE FILE MENU

The "File" menu offers the following options:
New
To create a new blank specification into the environment. The new specification will be given the name "noname_NNN" (where NNN is an ordinal of the unnamed specifications loaded so far). A new (and more significant) name can be assigned using the "Rename" option.
Load
To load an existing xfl file into the environment. A file selection window will appear, allowing the user to navigate through her/his directories until the intended file is selected. The environment will identify the specification with the name of the file, without any extension (which is usually ".xfl"). If the file is already loaded, an error will be shown. If there is another specification with the same name which is loaded, a dialog offering an alternate name will appear.
Load As
To load an existing xfl file into the environment, assigning it a name different from that automatically assigned by the "Load" option. The same procedures in the above option are applied.
Save
To save a specification to its source xfl file. A confirmation to overwrite the contents of the pre-existing file will be shown.
Save As
To save a specification to a user defined file. A file selection window will appear, and a confirmation will be requested if a pre-existing file is selected.
Rename
To change the internal name of a specification loaded into the environment.
Duplicate
To create a new specification into the environment, using the same definition of an already loaded specification. The name of the new specification will be that of the source one, with the suffix "_dup".
Close
To delete a specification from the environment. A dialog will appear if there have been changes to the specification that have not been saved.
Quit
To exit xfuzzy. A series of dialogs will appear if there are elements which were changed and not saved.
 

THE DESIGN MENU

The editors accessed through the "Design" menu are intended to not interfere, so on any specification only an active editor can be used. The active editor is the only one that can save changes done with it to the definition held by the environment. The rest of editors can be opened, but any save options will not be accesible. The rule to set the active editor is simple: the first editor invoked on a specification is considered active. Subsequent calls to other editors will start them in read-only mode.

The first option of the "Design" menu is "Edit XFL file". This option invokes a textual editor on the source xfl file of the selected specification. The specific editor called by this option can be set by means of the resource xfuzzyEditor (when it is the active editor) or xfuzzyViewer (in read-only mode).

The other three options of the "Design" menu provide graphical editors for the main constructs of an xfl specification: operations, types and modules. All the graphical editors offer the same main commands:

OK
To exit the editor and update the specification.
Apply
To update the specification without exiting the editor. This two options are inactive in read-only mode.
Reload
To revert the contents of the editor to the state of the specification as it is loaded into the environment. If the editor was started in read-only mode and this is the only editor running on a specification, using "Reload" it will become the active editor.
Cancel
To exit the editor without updating the specification.
 

Operations

The operations editor offers a list of buttons labelled with the names of operation directives in xfl. Next to each of these buttons, the identifier of the operation currently in use by the specification is shown (or the identifier "<None>" if the system default is used). Pushing any of the operation directives button will show a list of the operation identifiers currently loaded into the environment, allowing the user to change the setting of the particular operation.

This editor should be used in combination with the options in the "Fuzzy Operations" menu to access the specific operation definitions loaded into the environment. The editor has an additional button to the ones described above. This button is labelled "Select" and permits choosing a specific set of operation definitions: either based on any of the target languages (C, Java and VHDL), or those operations supported by the learning tool (see xfbpa(1)).  

Types

The types editor window offers three areas. The first area is a list of defined types, allowing the usual operations of renaming a type, deleting a type and defining new types (with "Inherit" or "New").

Selecting one of the types in the list will cause the list of membership functions defined for it to appear in the second area. The usual operations for renaming, copying, deleting or creating functions are available, together with "Antonym", which reverses the function definition with respect to the universe of discourse.

Selecting one of the membership functions in the list will cause a graphical representation of it to appear in the third area. Depending on the function class, a set of grips are included for graphically manipulating the defintion of the function. Dragging one of these points with the left button of the mouse will move the point, while dragging with the middle button will translate the entire function. For point-wise defined functions, the buttons "Add Point" and "Delete Point" permit graphically defining or erasing points.

Two buttons in the first and second areas control the way the drawing area is used: pushing "Adjust to Card." in the first area will show a grid in the drawing area, corresponding to the type cardinality and will force points to adjust to this grid. "Show All" ("Show One/None") in the second area will cause the display of the selected membership function in the context of the rest of functions, which will appear dimmed.  

Modules

The modules editor window also offers three areas. The two first areas define the list of inputs and outputs to the system (respectively), with their corresponding types. There are buttons for adding and deleting elements to these lists.

The third area contains the rulebase of the system and has buttons for deleting a rule, adding a rule or editing an existing one. When one of these two last options is selected, a new window appears. This window offers a list of available terms for the antecedent and consequent of the rule, plus a button area with the rule operators defined by xfl. At the bottom of the window, the final form of the rule under construction is shown.

The current version of the modules editor does not support the multimodule capabilities of xfl.  

THE VERIFICATION MENU

The options in the verification menu give access to graphical interfaces for three xfl based tools: xfsim(1) for running simulations in which xfl specifications can be embedded, xfbpa(1) to apply supervised learning algorithms to xfl specifications, and xfplot(1) to obtain surface plots for xfl specifications. Refer to the corresponding manual pages of these tools for a detailed discussion of their options and characteristics.  

Simulation

There is no need to select a specification to open the simulation window. Since xfl specifications are identified inside simulation files, xfuzzy automatically loads any xfl file referenced inside a simulation and not already loaded into the environment.

The simulation window offers different input areas to define and modify the settings in a simulation, corresponding with the different possible contents of a simulation file (as described in xfsim(1)). In the bottom part of the window a button area offers commands that can be applied to the current simulation settings:

Load
To load a pre-existing simulation definition into the environment. As previously stated, xfl definitions referenced in the simulation file will be also automatically loaded.
Save
To save the current simulation settings to a file.
New
To reset the current simulation settings to their default values.
Make
To run the simulation makefile and build the simulation executable file.
Run
To execute the simulation. A window will appear to provide the initial values for the simulation variables. Once the values have been set and the simulation started, its evolution can be monitored by a window that shows information about the current iteration step. At any time, the user can stop the execution using the "Abort" button. When the execution is completed, the output viewers (if requested in the simulation definiton) are started.
Close
To close the simulation window.
 

Learning

The learning window is composed of three areas: the first one offers input fields to configure the learning algorithms (see xfbpa(1)), the second gives alphanumerical status information and the third provides a graphical representation of the evolution of the learning process.

The input fields in the configuration area are intended to ease as much as possible user interaction:

The button "Training File" opens a file selection window to specify the training file to be used.

The button "Algorithm" opens a list with the available algorithms, and depending on the selected algorithm, the button "Control Variables" opens a window to set the values for those control variables specific to the algorithm in use.

The button "Learning Type" switches the corresponding field.

The button "Specific Learning" opens a window to set this characteristic, including facilities for saving settings to a file and loading previously saved ones.

The button "Output Weights" opens a window with a list of the system outputs, allowing the assignment of different weights to each of them.

Finally, the button "Evolution to File" allows the selection of a specific file to store the evolution of the system during the learning process.

In the bottom part of the learning window a button area offers commands to control the execution of the learning process:

Run
To start (or restart) the learning process.
Stop
To stop the learning process before one of the end conditions has been reached. At this moment, any parameter controlling the process can be changed and learning can be restarted using the "Run" button.
Reload
To revert the specification definition to the status prior to the start of the learning process.
Apply
To update the specification without exiting the learning window. The same procedure described for editors is applicable here: if the learning window is opened while an editor is active on the specification, this option is not available. Conversely, the learning window is considered an active editor for the other editor windows.
Save
To save the current learned specification to an xfl file.
Close
To close the learning window.
 

Surface Plot

The surface plot window shows a list of the system inputs, two of which must be set to be in the X and Y axis, respectively. The rest of inputs become "Fixed" and their values can be provided through a text area. A list of output variables (if there are more than one) is also available, to assign one of them to the Z axis of the plot (see xfplot(1) for more details).

At the bottom part of the window, two buttons (labelled "Plot" and "Close") allow the user to start the plotting process or to close the window.  

THE SYNTHESIS MENU

The options in the synthesis menu give access to graphical interfaces for the four tools able to synthesize system implementations from xfl definitions: xfc(1) for software synthesis using C, xfj(1) for software synthesis using Java, xfvhdl(1) for hardware synthesis based on VHDL and xftl(1) for hardware synthesis based on a boolean representation of the system. Refer to the corresponding manual pages of these tools for a detailed discussion of their options and characteristics.

The option "To C" gives access to a direct interface to xfc(1), where those options that control code production can be set by means of the corresponding input fields.

The option "To Java" gives access to a direct interface to xfj(1), where those options that control code production can be set by means of the corresponding input fields.

The option "To VHDL" opens a window where the options of xfvhdl(1) can be set. Since there are options specifically tailored to direct Synopsys when invoked from the environment, if this synthesis tool is not available (this is configured by the resource xfuzzyHasSynopsys) these options are not shown and the button "Generate and Synthesize" is not active.

The option "To Table Lookup" allows the user to setup and execute xftl(1). As in the previous case, if Synopsys is not available those options related to the use of this tool are not shown. The buttons in the bottom area permit building the C source file, building the PLA definition file and (if Synopsys is available) synthesizing an FPGA definition from a previously generated PLA file. Since the process of generating a PLA file can be lengthy (all the input space must be sequentially explored and pass through the fuzzy inference engine), the user can control it interactively via a specific window and interrupt it at any moment using the "Abort" button.  

THE FUZZY OPERATIONS MENU

Each option of this menu invokes an interface where the user can access (and in certain cases, modify) the fuzzy operation definitions currently available into the environment. The top area of the window identifies the type of fuzzy operation definitions being displayed, and the currently operations file, if applicable (see xfc(1) and xfj(1) for details) and a list of the different operations identifiers available, grouped by their classes: T-norms, T-conorms, negations, implications and defuzzification methods. Selecting one of these operation identifiers will show the definition of the operation in the text area below the lists.

The bottom part of the window is a button area offering the following commands:

Load
To load an operations file into the environment.
Edit
To use a textual editor to manipulate the currently loaded operations file.
New
To reset the current operation definitions to system defaults.
Close
To close the operations window.

Four different types of operation definitions are accessible through the menu, using the corresponding option. The two first ones ("For C synthesis" and "For Java synthesis") are applicable to the operations used by the software synthesis tools xfc(1) and xfj(1), respectively. All the buttons described above are available for these options.

The two other options in the menu give access to operations whith definitions that are "hard-wired" inside the environment, so none of the edition buttons are available when accesing them. These definitions are those used by the VHDL synthesis tool xfvhdl(1) (option "For VHDL synthesis") and by the learning tool xfbpa(1) (option "For learning").  

THE SET UP MENU

The "Set Up" menu offers the following options:
Working Directory
To change the current working directory for xfuzzy. A directory selection window will appear, allowing the user to navigate through her/his directories until the intended one is selected.
Log to file
To start logging all the information presented by xfuzzy to a specific file.
Stop logging
To stop file logging (if any).
Clear log window
To erase the contents of the log area in the xfuzzy main window.
 

RESOURCES

Besides the toolkit resources, xfuzzy defines the following proprietary resources:
xfuzzyWDirectory(string)
Default working directory. Overriden by the -w option. Defaults to "."
xfuzzyTDirectory(string)
Temporal directory. Defaults to "/tmp"
xfuzzyEditor(string)
Command to be used when a textual editor is called. Defaults to "xterm -T xfuzzyEdit -e vi"
xfuzzyViewer(string)
Command to be used when a textual editor in read-only mode is called. Defaults to "xterm -T xfuzzyEdit -e view"
xfuzzyHelpViewer(string)
Web browser launched to view help pages. Defaults to "netscape"
xfuzzyBgTimeout(int)
Number of milliseconds for the background process read timeout. It is used to communicate with those processes started by xfuzzy and to show information to the user interactively (in simulation, learning and PLA file generation). Defaults to 100
xfuzzyCcCom(string)
Command to be used when a C compiler is called. Defaults to "cc"
xfuzzyMakeCom(string)
Command to be used when a make procedure is needed (simulation). Defaults to "make"
xfuzzyRawViewer(string)
Command to be used when showing simulation results in raw format (see xfsim(1)). Defaults to "xterm -T xfuzzyResults -e view %s", where %s is the results file name.
xfuzzyGplotViewer(string)
Command to be used when showing simulation results in gnuplot(1) format (see xfsim(1)). Defaults to "xterm -geometry 80x2 -T xfuzzyResults_%s -e gnuplot %s.g", where %s is the results file name.
xfuzzyHasSynopsys(boolean)
Used to indicate the availability of the Synopsys synthesis tool in the system where xfuzzy is running. Synopsys can be called directly by the hardware synthesis modules if available to obtain a final system implementation. Defaults to False
xfuzzyLrnMeanDevColor(pixel)
Color used by the learning window to show the graphical representation of the mean deviation.
xfuzzyLrnMaxDevColor(pixel)
Color used by the learning window to show the graphical representation of the maximum deviation.
xfuzzyActiveFunctionColor(pixel)
Color used by the types editor to show the graphical representation of the active membership function.
xfuzzyNormalFunctionColor(pixel)
Color used by the types editor to show the graphical representation of the non selected membership function of a given type when the "Show All" option is selected.
xfuzzyActiveGrip(pixel)
Color used by the types editor to show an active grip on the graphical representation of a membership function.
xfuzzyNormalGrip(pixel)
Color used by the types editor to show the non selected grips on the graphical representation of a membership function.
xfuzzyBackColor(pixel)
Background color of the graphical area in the types editor.
 

SEE ALSO

xfbpa(1), xfc(1), xfj(1), xfplot(1), xfsim(1), xftl(1), xfvhdl(1)

A guide to xfl, Xfuzzy user guide


 

Index

NAME
SYNOPSYS
DESCRIPTION
OPTIONS
THE XFUZZY DISPLAY
THE BUTTON AREA
THE FILE MENU
THE DESIGN MENU
Operations
Types
Modules
THE VERIFICATION MENU
Simulation
Learning
Surface Plot
THE SYNTHESIS MENU
THE FUZZY OPERATIONS MENU
THE SET UP MENU
RESOURCES
SEE ALSO