Flora-2 is an eccentric language and I know this is a long shot but I haven't found any active resources devoted to it so I'm trying here. Its so popular... there is no stackoverflow tag for it. If you know anything about the status and future of Flora-2 and XSB Prolog, I'd love to hear that, too.
Can someone explain Flora-2 diamond-inheritance rules to me? The manual has an example but doesn't show the results of the example. The wording seems to be the opposite of what I see in the interpreter and in the diamond.flr demo. Here's the demo:
c[f*->g].
c1[f(a)*->a]::c.
c2[f(b)*->b]::c.
o:c1.
o:c2.
?- ?X[?Y->?Z].
(What I see happens with or without the base class c)
The manual says:
At the level of methods of arity > 1, a conflict is considered to have taken place if there are two non-overwritten definitions of the same method attached to two different superclasses. When deciding whether a conflict has taken place we disregard the arguments of the method. For instance, in
a:c. c[m(k)*->f]. a:d. d[m(u)*->f].
a multiple inheritance conflict has taken place even though in one case the method m is applied to object k, while in the other it is applied to object u.
(I'm pretty sure they mean arity >= 1 but the results are similar for arity 2 as well)
So I take that to mean that the inheritance of f has a conflict so its undefined (although I'm a bit confused about what 'undefined' means, in a related section it says "inheritance does not take place"). Here's what I get when I run the diamond:
?X = o
?Y = f
?Z = g
?X = o
?Y = f(a)
?Z = a
I expected only the first solution, although I'd think that the second solution would at least make some sense if it also had the solution
?X = o
?Y = f(b)
?Z = b
... but it didn't.
FYI, I'm using the latest stable XSB and the latest Flora-2 release... 0.95.