(hak) 40> fff
***
*** Fuzzy Facility for First-order terms
*** Run of Mon Aug 27 04:13:08 CEST 2018
*** 
*** Welcome to FFF, a facility (under development) for fuzzy lattice operations on first-order terms
*** 
*** Type '#help;<CR>' for help or 'quit;<CR>' to quit (if no prompt upon an error, type ';<CR>')
*** 

FFF> #load "t1.fff";

FFF> #trace 1;
@@@ tracing in now turned ON at level 1

FFF> #fun f/2 g/3 a/0 b/0 p/1 q/1 r/1 s/1;
*** The current signature has 8 functors: {f/2, g/3, a/0, b/0, p/1, q/1, r/1, s/1}

FFF> #sim p q 0.6 r s 0.4 f g 0.9 a b 0.7;
*** Declared similarities: 
	p q 0.6
	r s 0.4
	f g 0.9
	a b 0.7

FFF> #close;
*** Computed similarity closure (enter '#show;<CR>' to see it)

FFF> f(X,X) \/ g(b,a,b);
@@@ generalizing lhs term f(X,X) and rhs term g(b,a,b) at degree 1.0
@@@ since f ~ g [0.9] the new generalization degree is now 0.9
@@@ process the arguments of a term with functor f/2
@@@    argument 1
@@@    unapplying lhs term X and rhs term b at degree 0.9
@@@    there is no similar unapplication for X and b at degree 0.9
@@@    the final unapplied fuzzy pair is the original unchanged <X,b,0.9>
@@@    argument 2
@@@    unapplying lhs term X and rhs term a at degree 0.9
@@@       computing similarity degree of X and X
@@@       results in 1.0
@@@    the lhs argument 0's unapplied variable _0 gives term: X resulting in degree 1.0
@@@       computing similarity degree of a and b
@@@       results in 0.7
@@@    the rhs argument 0's unapplied variable _0 gives term: b resulting in degree 0.7
@@@    so the resulting unapplication degree is 0.7
@@@    therefore the final unapplied fuzzy pair is <_0,_0,0.7>
@@@ finished processsing the arguments of f(_0,_0)
*** The fuzzy lub is f(_0,_0)
*** Its approximation degree is 0.7
@@@ partitioning for index 3 corresponding to degree 0.7
@@@ created an array of similarity classes for 8 functors: [f, g, a, b, p, q, r, s] at approximation degree 0.7 (degreeIndex 3)
@@@ 
@@@ computed class of functor f: {f, g}
@@@ recording it as a new signature class {f, g} in classes []
@@@ now classes = [{f, g}]
@@@ 
@@@ computed class of functor g: {f, g}
@@@ found canonical class for {f, g} in known classes [{f, g}] at index 0: {f, g}
@@@ 
@@@ computed class of functor a: {a, b}
@@@ recording it as a new signature class {a, b} in classes [{f, g}]
@@@ now classes = [{f, g}, {a, b}]
@@@ 
@@@ computed class of functor b: {a, b}
@@@ found canonical class for {a, b} in known classes [{f, g}, {a, b}] at index 1: {a, b}
@@@ 
@@@ computed class of functor p: {p}
@@@ recording it as a new signature class {p} in classes [{f, g}, {a, b}]
@@@ now classes = [{f, g}, {a, b}, {p}]
@@@ 
@@@ computed class of functor q: {q}
@@@ recording it as a new signature class {q} in classes [{f, g}, {a, b}, {p}]
@@@ now classes = [{f, g}, {a, b}, {p}, {q}]
@@@ 
@@@ computed class of functor r: {r}
@@@ recording it as a new signature class {r} in classes [{f, g}, {a, b}, {p}, {q}]
@@@ now classes = [{f, g}, {a, b}, {p}, {q}, {r}]
@@@ 
@@@ computed class of functor s: {s}
@@@ recording it as a new signature class {s} in classes [{f, g}, {a, b}, {p}, {q}, {r}]
@@@ now classes = [{f, g}, {a, b}, {p}, {q}, {r}, {s}]
@@@ partition(0.7) :
@@@ @@@ the set of functors 0.7-similar to f is {f, g}
@@@ @@@ the set of functors 0.7-similar to g is {f, g}
@@@ @@@ the set of functors 0.7-similar to a is {a, b}
@@@ @@@ the set of functors 0.7-similar to b is {a, b}
@@@ @@@ the set of functors 0.7-similar to p is {p}
@@@ @@@ the set of functors 0.7-similar to q is {q}
@@@ @@@ the set of functors 0.7-similar to r is {r}
@@@ @@@ the set of functors 0.7-similar to s is {s}
*** Its 0.7-similar term representative is f(_0,_0)
@@@ registered variables: [X, _0]
*** Left substitution:
*** 	_0 = X
*** Right substitution:
@@@ partitioning for index 5 corresponding to degree 1.0
@@@ created an array of similarity classes for 8 functors: [f, g, a, b, p, q, r, s] at approximation degree 1.0 (degreeIndex 5)
@@@ 
@@@ computed class of functor f: {f}
@@@ recording it as a new signature class {f} in classes [{f, g}, {a, b}, {p}, {q}, {r}, {s}]
@@@ now classes = [{f, g}, {a, b}, {p}, {q}, {r}, {s}, {f}]
@@@ 
@@@ computed class of functor g: {g}
@@@ recording it as a new signature class {g} in classes [{f, g}, {a, b}, {p}, {q}, {r}, {s}, {f}]
@@@ now classes = [{f, g}, {a, b}, {p}, {q}, {r}, {s}, {f}, {g}]
@@@ 
@@@ computed class of functor a: {a}
@@@ recording it as a new signature class {a} in classes [{f, g}, {a, b}, {p}, {q}, {r}, {s}, {f}, {g}]
@@@ now classes = [{f, g}, {a, b}, {p}, {q}, {r}, {s}, {f}, {g}, {a}]
@@@ 
@@@ computed class of functor b: {b}
@@@ recording it as a new signature class {b} in classes [{f, g}, {a, b}, {p}, {q}, {r}, {s}, {f}, {g}, {a}]
@@@ now classes = [{f, g}, {a, b}, {p}, {q}, {r}, {s}, {f}, {g}, {a}, {b}]
@@@ 
@@@ computed class of functor p: {p}
@@@ found canonical class for {p} in known classes [{f, g}, {a, b}, {p}, {q}, {r}, {s}, {f}, {g}, {a}, {b}] at index 2: {p}
@@@ 
@@@ computed class of functor q: {q}
@@@ found canonical class for {q} in known classes [{f, g}, {a, b}, {p}, {q}, {r}, {s}, {f}, {g}, {a}, {b}] at index 3: {q}
@@@ 
@@@ computed class of functor r: {r}
@@@ found canonical class for {r} in known classes [{f, g}, {a, b}, {p}, {q}, {r}, {s}, {f}, {g}, {a}, {b}] at index 4: {r}
@@@ 
@@@ computed class of functor s: {s}
@@@ found canonical class for {s} in known classes [{f, g}, {a, b}, {p}, {q}, {r}, {s}, {f}, {g}, {a}, {b}] at index 5: {s}
@@@ partition(1.0) :
@@@ @@@ the set of functors 1.0-similar to f is {f}
@@@ @@@ the set of functors 1.0-similar to g is {g}
@@@ @@@ the set of functors 1.0-similar to a is {a}
@@@ @@@ the set of functors 1.0-similar to b is {b}
@@@ @@@ the set of functors 1.0-similar to p is {p}
@@@ @@@ the set of functors 1.0-similar to q is {q}
@@@ @@@ the set of functors 1.0-similar to r is {r}
@@@ @@@ the set of functors 1.0-similar to s is {s}
*** 	_0 = b

FFF> quit;
*** So long - and thanks for playing with FFF...
*** We hope that you had some FFFuzzy FFFun! 8^D
(hak) 41> 