A fuzzy logic C++ library
FAQ

User level

What OSes are supported ?

This software is mainly a library, and as so, it should be usable on any platform as soon as the basic requirements (C++ compiler) and the dependencies are met. However, the build system has only been tested on the following platforms:

  • Linux/Ubuntu
  • Windows XP

Since these two are the most representative, I am rather confident for building/using on other platforms. At most, it will require a few minor adjustments in the hardcoded paths in the makefile. See Building the software for more details. Please contact author in case of trouble, or missing details on the build process.

Where shall I start to get an idea of the features?
  • Once you have successfully downloaded and build (build not necessary if you can use the binaries provided in the archive), get down into the 'bin' folder (cd bin), and run the following (Linux shell syntax, remove the "./" on Windows):
    ./demo1
    ./demo2
    ./demo3
    
    Warning:
    These will only run if you have the corresponding graphical back-end shared libraries installed on your machine. See Slifis Graphical API for plotting.
    Check their documentation: demo1.cpp, demo2.cpp, demo3.cpp
  • Additionally, you can run the try-fis.cpp application, either by right clicking on a ".fis" file, or by launching it from command-line:
    try-fis demo_shower.fis
    
    This will launch this graphical app, and you can move the mouse around. On input plots, this will change the input value. On the rule-base plot, clicking on lines will either add/delete a rule or a rule-term or change the ouput value, depending on where the mouse pointer is.

How can I use the library and integrate it in my code ?

For the core part, this has two answers:

  • To compile your code, all you need to do is add one include line in the .cpp files using the API classes/functions (see Introduction), and tell your compiler where it can find the header files. With GCC on Linux, you need to add
    -I/usr/local/include
    
    to your compiler flags. On Windows, it will be:
    -I"c:\program files\slifis\include"
    
  • Next, the linking step. The library in provided in two forms, static (.a) and shared/dynamic (.so/.dll) form. These include the libraries dependencies, so no additional files need to be linked with your program.
    To use the static version, you will need to add /usr/local/lib/lib_slifis.a to your linker command (or "c:\\program files\\slifis\\lib\\lib_slifis.a" on Windows.
    To link with shared library, just replace .a with .so on Linux (Windows .dll build broken, will be fixed in next release).

For the 'gapi' part of library (that is a separate component), it will be similar (see Introduction), except that only the static library (lib_slifis_gapi.a) is provided. You will need to link also with the used backend-library, as it is of course not possible to include those huge packages in the library.
This linking operation can be done easilly for Cairo/Gtk2 using pkg-config, and by linking manually for OpenCv.

Why that funny/stupid/strange name ?

Slifis stands for Simple LInear Fuzzy Inference System. The "Linear" is there to state that the underlying computation is based on line segments (the membership functions are piecewise linear functions). "Simple" because I assumed it would remain kind of a small project, which is not quite true anymore.

Are there any limitations on the membreship functions I can build ?

Yes, you cannot have a function with a vertical segment, i.e. have two points with same 'x' value. But MEMBFUNC::AddPoint() deals with that, and throws an error if you do.

Building

Whats the difference between 'applications' and 'demos' ?
The first may be used as standalone tools, and thus are installed on system by 'make install', while the latter are not.
For both demos and apps, why are they split into two separate folders ('gui' and 'cl') ?
Because 'gui' demos and apps require a graphical library installed on the system to build and run, while the first can be build without. See Build options.