Clp interface with egraph

Hello all,
I have just released a new version (v0.6.0) of my egraph library where you can now use a generalized form of an egraph rule where you can match and produce multiple terms:

egraph:rule(triangle, 
   [seg(A, B)-_, seg(B, C)-_, seg(C, A)-_], 
   [triangle(A, B, C)-_]
) :-
   A \== B, B \== C, A \== C.

After discussing it with the zulip egraph community, I have also came up with a clp like interface to the egraph, which you can use like this:

?- A #= a, FFA #= f(f(a)), A = FFA, FFFFA #= f(f(f(f(a)))).
A = FFA, FFA = FFFFA,
FFFFA#=a,
FFFFA#=f(f(a)),
FFFFA#=f(f(f(f(a)))).

The thing is that I am not really sure what use could this have ?
Anybody has ideas ?
I just find it neat.

N.B.: @jan The addon page is still stuck on version 0.5 ? I suppose it is still a problem with a server not updating correctly like last time ?

1 Like