09.09. Operatoren
Gegeben die folgenden Operatordefinitionen:
:- op(300, xfx, [are, is_a]).
:- op(300, fx, likes).
:- op(200, xfy, and).
:- op(100, fy, famous).
:- op(500, xf, or_not).
Welche der folgenden Ausdrücke sind wohlgeformt?
Wie klammert Prolog die Ausdrücke intern?
?- write_canonical(X is_a witch or_not).
?- write_canonical(harry and ron and hermione are friends).
?- write_canonical(harry is_a wizard and likes quidditch).
?- write_canonical(dumbledore is_a famous famous wizard or_not).
?- write_canonical(famous harry and ron are wizards).
?- write_canonical(ron is_a wizards and harry likes quidditch).