xfc
Section: User Commands (1)
Updated: 10 Sep 2001
Index
NAME
xfc - xfl to C compiler
SYNOPSIS
xfc
[
-M[a|e]
]
[
-O opsfile
]
[
-o outprefix
]
[
-e engname
]
[
-t ftype
]
[
-w
]
xflfile
DESCRIPTION
xfc
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
xfc
imposes is that it must be compiled using the
libm.a
library, since it uses specific mathematical functions.
The C interface offered by the output of
xfc
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
ftype)
in the same order they are declared in the
system
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.
OPTIONS
- -M
-
Selects the mode of operation:
a
performs only the syntax and (static) semantics analysis of the xfl source, without producing any output.
e
(which is the default if no
-M
option is specified) produces the C code for the inference engine.
- -O opsfile
-
Use
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
#and
operator in xfl), T-conorms (for the
#or,
#also
and
#composition
operators in xfl), negation functions (for the
#not
operator in xfl), implication functions (for the
#implication
operator in xfl) and defuzzification methods (for the
#defuzzification
operator in xfl). If no operations file can be accessed,
xfc
provides a set of internally defined fuzzy operations: the T-norm
_sd_min
(implementing the standard minimum operator), the T-conorm
_sd_max
(implementing the standard maximum operator), the negation
_sd_not
(implementing the 1-complement operator), the implication
_sd_min
(standard minimum again), and the defuzzification method
_sd_CoA
(the standard center-of-area method). Furthermore, these are the values used by
xfc
when any of the xfl operation selection operators is not present in the source file.
- -o outprefix
-
Use
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
-
Use
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
-
Use
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".
- -w
-
Suppresses the printing of warning messages on stderr.
FILES
- $HOME/.xfcops
-
User's operations file (overriden by the
-O
option)
- $XFUZZY_LIB/xfcops
-
System-wide operations file (overriden by the user's operations file and the
-O
option)
SEE ALSO
xfuzzy(1)
A guide to xfl,
Xfuzzy user guide
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- FILES
-
- SEE ALSO
-