Section: User Commands (1)
Updated: 10 Sep 2001
xfc - xfl to C compiler
takes an xfl file and produces a C source file which implements the fuzzy inference engine defined in xfl as a C function. This file can be freely combined with any other modules to produce programs containing fuzzy logic capabilities.
The only requirement that the C output file generated by
imposes is that it must be compiled using the
library, since it uses specific mathematical functions.
The C interface offered by the output of
is based on a function which implements the fuzzy inference engine defined by the xfl source specification. This function returns a non-zero value in case of any error and a zero otherwise. Parameters are passed to the function by reference (of type (FUZZY *), as stated by
in the same order they are declared in the
module of the xfl source. Upon return, the values of those parameters identified as outputs from the xfl-based fuzzy system are updated according to its definition.
Selects the mode of operation:
performs only the syntax and (static) semantics analysis of the xfl source, without producing any output.
(which is the default if no
option is specified) produces the C code for the inference engine.
- -O opsfile
as the fuzzy operations file. By default, either the user's operations file ("$HOME/.xfcops") or a system-wide file ("$XFUZZY_LIB/xfcops", where $XFUZZY_LIB is the directory holding the Xfuzzy libraries distribution) is used. The operations file allows the use of specific definitions of T-norms (for the
operator in xfl), T-conorms (for the
operators in xfl), negation functions (for the
operator in xfl), implication functions (for the
operator in xfl) and defuzzification methods (for the
operator in xfl). If no operations file can be accessed,
provides a set of internally defined fuzzy operations: the T-norm
(implementing the standard minimum operator), the T-conorm
(implementing the standard maximum operator), the negation
(implementing the 1-complement operator), the implication
(standard minimum again), and the defuzzification method
(the standard center-of-area method). Furthermore, these are the values used by
when any of the xfl operation selection operators is not present in the source file.
- -o outprefix
as the prefix for the output file. This prefix is prepended to the string "Ie.c" to produce the output file name. Any valid path component can be used. The default value is "./a.xf".
- -e engname
as the name of the function implementing the fuzzy inference engine. Any valid C function identifier can be used. The default value is "__FiEngine".
- -t ftype
as the type of fuzzy variables (specially, of the parameters to the inference engine function) within the output file. Any valid C type identifier can be used as value, since the value of this option is used in a "typedef FUZZY ftype" construct. The default value is "double".
Suppresses the printing of warning messages on stderr.
User's operations file (overriden by the
System-wide operations file (overriden by the user's operations file and the
A guide to xfl,
Xfuzzy user guide
- SEE ALSO