Chances are slight that Gertrude is a wolf. It is highly unlikely that Greg is a swan. It is highly unlikely that Bernhard is yellow. Chances are about even that if either 'Gertrude is a wolf' or 'Bernhard is yellow' but not both then John put down the apple. Chances are about even that if 'Gertrude is a wolf' or 'Bernhard is yellow' or both then Lily is green. It is certain that if either 'Gertrude is a wolf' or 'Bernhard is yellow' but not both then Sandra took the milk.
We believe that either 'John put down the apple' or 'Lily is green' but not both.
It is highly unlikely that either 'John put down the apple' or 'Lily is green' but not both.
We believe that either 'John put down the apple' or 'Lily is green' but not both.

  and(A,B) :- A,B.
  or(A,B) :- A;B.
  nand(A,B) :- not(and(A,B)).
  nor(A,B) :- not(or(A,B)).
  xor(A,B) :- or(A,B), nand(A,B).

  %hop0
  0.1::factA.
  0.05::factB.
  0.05::factC.
  %hop1
  0.5::factX:-xor(factA,factC).
  0.5::factY:-or(factA,factC).
  1.0::factZ:-xor(factA,factC).

  %hop2
  conclusion:-xor(factX,factY).

  query(conclusion).
  
Either 'John put down the apple' or 'Lily is green' but not both.