Roughly speaking, a multi-adjoint logic program can be seen as a set of rules each one annotated with a truth degree. In this section we explain the syntax of fuzzy programs accepted by FLOPER.
For instance (one declaration and two rules):
$agr_average(X,Y,Z,W):-W is (X+Y+Z)/3.$
p(Y) ←prod r(a) &luka 0.8 with 1.
q(X) with 0.5.
For instance:
p(Y) ←prod r(a) &luka 0.8 with 1. ----> rule with body
p(Y) ← r(a) &luka 0.8 . ----> rule with implication and truth degree ommited
q(X) with 0.5. ----> fact (rule without body)
p(X) ←luka r(a) with 0.5.
p(X) ←luka 0.8 with 0.5.
p(X) ←luka r(a) &godel (0.7 @prod q(X,Y))with 1.
p(X) ←luka r(a) &godel 0.9 with 1.
p(X) ←luka &godel (q(X,Y),p(a),0.3,1) with 1.
r(a, X).
loop1(100, [a,b,c]).
q(f(a)).
Now we show some examples of syntactically correct/incorrect fuzzy programs:
Example 1. Correct use of most of the syntactic features of the fuzzy language:
q(f(a),b) <prod 0.9 with 0.7.
p([e,3,ij],25) with 0.74.
e(Y,a) <luka |godel(r(Y),0.2,s(a),1) with 1.
$agr_average(X,Y,Z,W):-W is (X+Y+Z)/3.$
p(Y) <prod r(a) &luka (0.8 &godel r(Y)) with 0.8.
Example 2. Fuzzy program syntactically incorrect:
s(b) wit 0.9. %% --->It's 'with'
q(a,b) < r(X) with 0.7. %% --->lack implication's labels or dash
p(Y) <prod t(a) &luka |godel with 0.8. %%--> bad body
q(Y,a) <luka r(Y) with 0.8 %%--> lack end point