It is probable that Mary left the apple. Chances are slight that John went to the office. It is probably the case that Greg is a rhino. There is a very good chance that if either 'John went to the office' or 'Mary left the apple' but not both then Lily is a frog. It is impossible that if either 'Mary left the apple' or 'John went to the office' but not both then Bernhard is a swan. It is probable that if either 'Greg is a rhino' or 'John went to the office' but not both then Brian is a swan.
It is impossible that either 'John went to the office' or 'Greg is a rhino' but not both.
It is probable that either 'John went to the office' or 'Greg is a rhino' but not both.
It is impossible that either 'John went to the office' or 'Greg is a rhino' 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.7::factA.
  0.1::factB.
  0.7::factC.
  %hop1
  0.8::factX:-xor(factB,factA).
  0.0::factY:-xor(factA,factB).
  0.7::factZ:-xor(factC,factB).

  %hop2
  conclusion:-xor(factB,factC).

  query(conclusion).
  
Either 'John went to the office' or 'Greg is a rhino' but not both.